/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
presto-player
/
dist
/
components
/
web-components
/
Upload File
HOME
const t=t=>null!=t?t.constructor:null,e=(t,e)=>Boolean(t&&e&&t instanceof e),n=t=>null==t,i=e=>t(e)===Object,s=e=>t(e)===String,r=t=>Array.isArray(t),o=t=>e(t,NodeList),c=t=>null!==t&&"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument,l=t=>n(t)||(s(t)||r(t)||o(t))&&!t.length||i(t)&&!Object.keys(t).length;var u={nullOrUndefined:n,object:i,string:s,nodeList:o,element:c,empty:l,array:r};function a(t){return Array.isArray?Array.isArray(t):"[object Array]"===y(t)}function h(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function f(t){return null==t?"":h(t)}function d(t){return"string"==typeof t}function g(t){return"number"==typeof t}function v(t){return!0===t||!1===t||m(t)&&"[object Boolean]"==y(t)}function M(t){return"object"==typeof t}function m(t){return M(t)&&null!==t}function p(t){return null!=t}function x(t){return!t.trim().length}function y(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const L="Incorrect 'index' type",w=t=>`Invalid value for key ${t}`,$=t=>`Pattern length exceeds max of ${t}.`,S=t=>`Missing ${t} property in key`,b=t=>`Property 'weight' in key '${t}' must be a positive integer`,A=Object.prototype.hasOwnProperty;class k{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let n=N(t);e+=n.weight,this._keys.push(n),this._keyMap[n.id]=n,e+=n.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function N(t){let e=null,n=null,r=null,i=1,s=null;if(d(t)||a(t))r=t,e=C(t),n=I(t);else{if(!A.call(t,"name"))throw new Error(S("name"));const o=t.name;if(r=o,A.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(b(o));e=C(o),n=I(o),s=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:s}}function C(t){return a(t)?t:t.split(".")}function I(t){return a(t)?t.join("."):t}function R(t,e){let n=[],r=!1;const i=(t,e,s)=>{if(p(t))if(e[s]){const o=t[e[s]];if(!p(o))return;if(s===e.length-1&&(d(o)||g(o)||v(o)))n.push(f(o));else if(a(o)){r=!0;for(let t=0,n=o.length;t<n;t+=1)i(o[t],e,s+1)}else e.length&&i(o,e,s+1)}else n.push(t)};return i(t,d(e)?e.split("."):e,0),r?n:n[0]}const j={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},O={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},F={location:0,threshold:.6,distance:100},_={useExtendedSearch:!1,getFn:R,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var E={...O,...j,...F,..._};const T=/[^ ]+/g;function W(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(e){const i=e.match(T).length;if(n.has(i))return n.get(i);const s=1/Math.pow(i,.5*t),o=parseFloat(Math.round(s*r)/r);return n.set(i,o),o},clear(){n.clear()}}}class J{constructor({getFn:t=E.getFn,fieldNormWeight:e=E.fieldNormWeight}={}){this.norm=W(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,d(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();d(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,n=this.size();e<n;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!p(t)||x(t))return;let n={v:t,i:e,n:this.norm.get(t)};this.records.push(n)}_addObject(t,e){let n={i:e,$:{}};this.keys.forEach((e,r)=>{let i=e.getFn?e.getFn(t):this.getFn(t,e.path);if(p(i))if(a(i)){let t=[];const e=[{nestedArrIndex:-1,value:i}];for(;e.length;){const{nestedArrIndex:n,value:r}=e.pop();if(p(r))if(d(r)&&!x(r)){let e={v:r,i:n,n:this.norm.get(r)};t.push(e)}else a(r)&&r.forEach((t,n)=>{e.push({nestedArrIndex:n,value:t})})}n.$[r]=t}else if(d(i)&&!x(i)){let t={v:i,n:this.norm.get(i)};n.$[r]=t}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function P(t,e,{getFn:n=E.getFn,fieldNormWeight:r=E.fieldNormWeight}={}){const i=new J({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(N)),i.setSources(e),i.create(),i}function z(t,{getFn:e=E.getFn,fieldNormWeight:n=E.fieldNormWeight}={}){const{keys:r,records:i}=t,s=new J({getFn:e,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(i),s}function B(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=E.distance,ignoreLocation:s=E.ignoreLocation}={}){const o=e/t.length;if(s)return o;const c=Math.abs(r-n);return i?o+c/i:c?1:o}function D(t=[],e=E.minMatchCharLength){let n=[],r=-1,i=-1,s=0;for(let o=t.length;s<o;s+=1){let o=t[s];o&&-1===r?r=s:o||-1===r||(i=s-1,i-r+1>=e&&n.push([r,i]),r=-1)}return t[s-1]&&s-r>=e&&n.push([r,s-1]),n}const K=32;function U(t,e,n,{location:r=E.location,distance:i=E.distance,threshold:s=E.threshold,findAllMatches:o=E.findAllMatches,minMatchCharLength:c=E.minMatchCharLength,includeMatches:a=E.includeMatches,ignoreLocation:h=E.ignoreLocation}={}){if(e.length>K)throw new Error($(K));const l=e.length,u=t.length,d=Math.max(0,Math.min(r,u));let g=s,f=d;const p=c>1||a,m=p?Array(u):[];let y;for(;(y=t.indexOf(e,f))>-1;){let t=B(e,{currentLocation:y,expectedLocation:d,distance:i,ignoreLocation:h});if(g=Math.min(t,g),f=y+l,p){let t=0;for(;t<l;)m[y+t]=1,t+=1}}f=-1;let v=[],M=1,x=l+u;const k=1<<l-1;for(let r=0;r<l;r+=1){let s=0,c=x;for(;s<c;)B(e,{errors:r,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:h})<=g?s=c:x=c,c=Math.floor((x-s)/2+s);x=c;let a=Math.max(1,d-c+1),y=o?u:Math.min(d+c,u)+l,E=Array(y+2);E[y+1]=(1<<r)-1;for(let s=y;s>=a;s-=1){let o=s-1,c=n[t.charAt(o)];if(p&&(m[o]=+!!c),E[s]=(E[s+1]<<1|1)&c,r&&(E[s]|=(v[s+1]|v[s])<<1|1|v[s+1]),E[s]&k&&(M=B(e,{errors:r,currentLocation:o,expectedLocation:d,distance:i,ignoreLocation:h}),M<=g)){if(g=M,f=o,f<=d)break;a=Math.max(1,2*d-f)}}if(B(e,{errors:r+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:h})>g)break;v=E}const L={isMatch:f>=0,score:Math.max(.001,M)};if(p){const t=D(m,c);t.length?a&&(L.indices=t):L.isMatch=!1}return L}function H(t){let e={};for(let n=0,r=t.length;n<r;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<r-n-1}return e}class V{constructor(t,{location:e=E.location,threshold:n=E.threshold,distance:r=E.distance,includeMatches:i=E.includeMatches,findAllMatches:s=E.findAllMatches,minMatchCharLength:o=E.minMatchCharLength,isCaseSensitive:c=E.isCaseSensitive,ignoreLocation:a=E.ignoreLocation}={}){if(this.options={location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:a},this.pattern=c?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const h=(t,e)=>{this.chunks.push({pattern:t,alphabet:H(t),startIndex:e})},l=this.pattern.length;if(l>K){let t=0;const e=l%K,n=l-e;for(;t<n;)h(this.pattern.substr(t,K),t),t+=K;if(e){const t=l-K;h(this.pattern.substr(t),t)}}else h(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:n}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}const{location:r,distance:i,threshold:s,findAllMatches:o,minMatchCharLength:c,ignoreLocation:a}=this.options;let h=[],l=0,u=!1;this.chunks.forEach(({pattern:e,alphabet:d,startIndex:g})=>{const{isMatch:f,score:p,indices:m}=U(t,e,d,{location:r+g,distance:i,threshold:s,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:a});f&&(u=!0),l+=p,f&&m&&(h=[...h,...m])});let d={isMatch:u,score:u?l/this.chunks.length:1};return u&&n&&(d.indices=h),d}}class q{constructor(t){this.pattern=t}static isMultiMatch(t){return G(t,this.multiRegex)}static isSingleMatch(t){return G(t,this.singleRegex)}search(){}}function G(t,e){const n=t.match(e);return n?n[1]:null}class Q extends q{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class X extends q{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class Y extends q{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}}class Z extends q{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class tt extends q{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class et extends q{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}}class nt extends q{constructor(t,{location:e=E.location,threshold:n=E.threshold,distance:r=E.distance,includeMatches:i=E.includeMatches,findAllMatches:s=E.findAllMatches,minMatchCharLength:o=E.minMatchCharLength,isCaseSensitive:c=E.isCaseSensitive,ignoreLocation:a=E.ignoreLocation}={}){super(t),this._bitapSearch=new V(t,{location:e,threshold:n,distance:r,includeMatches:i,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class it extends q{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,n=0;const r=[],i=this.pattern.length;for(;(e=t.indexOf(this.pattern,n))>-1;)n=e+i,r.push([e,n-1]);const s=!!r.length;return{isMatch:s,score:s?0:1,indices:r}}}const st=[Q,it,Y,Z,et,tt,X,nt],rt=st.length,ot=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ct="|";function lt(t,e={}){return t.split(ct).map(t=>{let n=t.trim().split(ot).filter(t=>t&&!!t.trim()),r=[];for(let t=0,i=n.length;t<i;t+=1){const i=n[t];let s=!1,o=-1;for(;!s&&++o<rt;){const t=st[o];let n=t.isMultiMatch(i);n&&(r.push(new t(n,e)),s=!0)}if(!s)for(o=-1;++o<rt;){const t=st[o];let n=t.isSingleMatch(i);if(n){r.push(new t(n,e));break}}}return r})}const ut=new Set([nt.type,it.type]);class at{constructor(t,{isCaseSensitive:e=E.isCaseSensitive,includeMatches:n=E.includeMatches,minMatchCharLength:r=E.minMatchCharLength,ignoreLocation:i=E.ignoreLocation,findAllMatches:s=E.findAllMatches,location:o=E.location,threshold:c=E.threshold,distance:a=E.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:n,minMatchCharLength:r,findAllMatches:s,ignoreLocation:i,location:o,threshold:c,distance:a},this.pattern=e?t:t.toLowerCase(),this.query=lt(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:r}=this.options;t=r?t:t.toLowerCase();let i=0,s=[],o=0;for(let r=0,c=e.length;r<c;r+=1){const c=e[r];s.length=0,i=0;for(let e=0,r=c.length;e<r;e+=1){const r=c[e],{isMatch:a,indices:h,score:l}=r.search(t);if(!a){o=0,i=0,s.length=0;break}if(i+=1,o+=l,n){const t=r.constructor.type;ut.has(t)?s=[...s,...h]:s.push(h)}}if(i){let t={isMatch:!0,score:o/i};return n&&(t.indices=s),t}}return{isMatch:!1,score:1}}}const ht=[];function ft(...t){ht.push(...t)}function dt(t,e){for(let n=0,r=ht.length;n<r;n+=1){let r=ht[n];if(r.condition(t,e))return new r(t,e)}return new V(t,e)}const gt={AND:"$and",OR:"$or"},vt={PATH:"$path",PATTERN:"$val"},Mt=t=>!(!t[gt.AND]&&!t[gt.OR]),mt=t=>!!t[vt.PATH],pt=t=>!a(t)&&M(t)&&!Mt(t),xt=t=>({[gt.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function yt(t,e,{auto:n=!0}={}){const r=t=>{let i=Object.keys(t);const s=mt(t);if(!s&&i.length>1&&!Mt(t))return r(xt(t));if(pt(t)){const r=s?t[vt.PATH]:i[0],o=s?t[vt.PATTERN]:t[r];if(!d(o))throw new Error(w(r));const c={keyId:I(r),pattern:o};return n&&(c.searcher=dt(o,e)),c}let o={children:[],operator:i[0]};return i.forEach(e=>{const n=t[e];a(n)&&n.forEach(t=>{o.children.push(r(t))})}),o};return Mt(t)||(t=xt(t)),r(t)}function Lt(t,{ignoreFieldNorm:e=E.ignoreFieldNorm}){t.forEach(t=>{let n=1;t.matches.forEach(({key:t,norm:r,score:i})=>{const s=t?t.weight:null;n*=Math.pow(0===i&&s?Number.EPSILON:i,(s||1)*(e?1:r))}),t.score=n})}function wt(t,e){const n=t.matches;e.matches=[],p(n)&&n.forEach(t=>{if(!p(t.indices)||!t.indices.length)return;const{indices:n,value:r}=t;let i={indices:n,value:r};t.key&&(i.key=t.key.src),t.idx>-1&&(i.refIndex=t.idx),e.matches.push(i)})}function $t(t,e){e.score=t.score}function St(t,e,{includeMatches:n=E.includeMatches,includeScore:r=E.includeScore}={}){const i=[];return n&&i.push(wt),r&&i.push($t),t.map(t=>{const{idx:n}=t,r={item:e[n],refIndex:n};return i.length&&i.forEach(e=>{e(t,r)}),r})}class bt{constructor(t,e={},n){this.options={...E,...e},this._keyStore=new k(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof J))throw new Error(L);this._myIndex=e||P(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){p(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let n=0,r=this._docs.length;n<r;n+=1){const i=this._docs[n];t(i,n)&&(this.removeAt(n),n-=1,r-=1,e.push(i))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:n,includeScore:r,shouldSort:i,sortFn:s,ignoreFieldNorm:o}=this.options;let c=d(t)?d(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Lt(c,{ignoreFieldNorm:o}),i&&c.sort(s),g(e)&&e>-1&&(c=c.slice(0,e)),St(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const e=dt(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:t,i:n,n:i})=>{if(!p(t))return;const{isMatch:s,score:o,indices:c}=e.searchIn(t);s&&r.push({item:t,idx:n,matches:[{score:o,value:t,norm:i,indices:c}]})}),r}_searchLogical(t){const e=yt(t,this.options),n=(t,e,r)=>{if(!t.children){const{keyId:n,searcher:i}=t,s=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:i});return s&&s.length?[{idx:r,item:e,matches:s}]:[]}const i=[];for(let s=0,o=t.children.length;s<o;s+=1){const o=t.children[s],c=n(o,e,r);if(c.length)i.push(...c);else if(t.operator===gt.AND)return[]}return i},r=this._myIndex.records,i={},s=[];return r.forEach(({$:t,i:r})=>{if(p(t)){let o=n(e,t,r);o.length&&(i[r]||(i[r]={idx:r,item:t,matches:[]},s.push(i[r])),o.forEach(({matches:t})=>{i[r].matches.push(...t)}))}}),s}_searchObjectList(t){const e=dt(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:t,i:r})=>{if(!p(t))return;let s=[];n.forEach((n,r)=>{s.push(...this._findMatches({key:n,value:t[r],searcher:e}))}),s.length&&i.push({idx:r,item:t,matches:s})}),i}_findMatches({key:t,value:e,searcher:n}){if(!p(e))return[];let r=[];if(a(e))e.forEach(({v:e,i,n:s})=>{if(!p(e))return;const{isMatch:o,score:c,indices:a}=n.searchIn(e);o&&r.push({score:c,key:t,value:e,idx:i,norm:s,indices:a})});else{const{v:i,n:s}=e,{isMatch:o,score:c,indices:a}=n.searchIn(i);o&&r.push({score:c,key:t,value:i,norm:s,indices:a})}return r}}function At(t){return"string"==typeof t&&t.includes(".m3u8")}function kt(t){for(var e=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)t=t.parentNode,e.push(t);return e}function Nt(t,e){u.element(t)&&!u.empty(e)&&Object.entries(e).filter(([,t])=>!u.nullOrUndefined(t)).forEach(([e,n])=>t.setAttribute(e,n))}function Ct(t,e,n){const r=document.createElement(t);return u.object(e)&&Nt(r,e),u.string(n)&&(r.innerText=n),r}function It(t,e){try{return JSON.parse(t)}catch(t){return console.warn("Invalid value:",t),e}}bt.version="6.6.2",bt.createIndex=P,bt.parseIndex=z,bt.config=E,bt.parseQuery=yt,ft(at);const Rt=t=>{if(!t)return null;const e=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((e,n)=>(t[n]&&(e[n]=t[n]),e),{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})});return e},jt=(t,e,n)=>{if(u.empty(e))return[];if(u.empty(n))return[];if(!u.string(t))return[];const r={...null==n?void 0:n.minMatchCharLength,...null==n?void 0:n.threshold,shouldSort:!1,includeMatches:!0,threshold:.3,keys:["text"]};return null!==e&&e&&0!==e.length?new bt(e,r).search(t):[]},Ot=(t,e,n)=>{if(!u.string(t))return[];if(u.empty(e))return[];if(u.empty(n))return[];const r=jt(t,e,n);return r&&Array.prototype.map.call(r,function(t){return{time:Math.ceil(t.item.startTime),label:""}})};function Ft(t,e){var n,r,i,s;if(!t)return;if(!(null===(n=null==t?void 0:t.media)||void 0===n?void 0:n.textTracks)||0===(null===(i=null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.textTracks)||void 0===i?void 0:i.length))return;const o=t.media.textTracks,c=(null===(s=t.config.preset)||void 0===s?void 0:s.search)||"";let a="";if(a=-1===t.captions.currentTrack?Wt(t):o[t.captions.currentTrack],u.empty(a))return[];const h=Rt(a);return u.empty(h)?[]:Ot(e,null==h?void 0:h.cues,c)}function _t(t){var e;if(!t)return;if(!(null==t?void 0:t.elements)||!(null===(e=null==t?void 0:t.elements)||void 0===e?void 0:e.progress))return;let n=t.elements.progress.querySelectorAll(".plyr__progress__marker");if(!u.empty(n))for(var r=0;r<n.length;r++)n[r].remove()}function Et(t,e){if(!t)return;if(_t(t),!(null==e?void 0:e.length))return;const n=document.createDocumentFragment(),r=document.createDocumentFragment();e.forEach(e=>{const n=Ct("span",{class:"plyr__progress__marker"},""),i=e.time/t.duration*100+"%";n.addEventListener("click",()=>{t.currentTime=e.time}),n.style.left=i,r.appendChild(n)}),n.appendChild(r),t.elements.markers={points:r,tip:null},t.elements.progress.appendChild(n)}function Tt(t){var e,n,r,i,s,o;if(!(null===(n=null===(e=null==t?void 0:t.config.preset)||void 0===e?void 0:e.search)||void 0===n?void 0:n.enabled))return;if(!(null===(i=null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.textTracks)||void 0===i?void 0:i.length)||0===(null===(o=null===(s=null==t?void 0:t.media)||void 0===s?void 0:s.textTracks)||void 0===o?void 0:o.length))return;if(-1!==(null==t?void 0:t.currentTrack))return;t.toggleCaptions(!0);let c=setInterval(()=>{var e;const n=null===(e=t.media.textTracks[0])||void 0===e?void 0:e.cues;(null==n?void 0:n.length)>0&&(Jt(t),t.toggleCaptions(!1),clearInterval(c))},200)}function Wt(t){if(!t)return;const e=localStorage.getItem("presto-player-"+t.id+"-cues");return u.empty(e)?"":JSON.parse(e)}function Jt(t){var e,n,r,i,s;if(!t||!(null===(e=null==t?void 0:t.media)||void 0===e?void 0:e.textTracks)||0===(null===(r=null===(n=null==t?void 0:t.media)||void 0===n?void 0:n.textTracks)||void 0===r?void 0:r.length))return;const o=(null===(s=null===(i=null==t?void 0:t.media)||void 0===i?void 0:i.textTracks)||void 0===s?void 0:s[0])?Rt(t.media.textTracks[0]):{};u.empty(o)||localStorage.setItem("presto-player-"+t.id+"-cues",JSON.stringify(o))}export{Et as a,Tt as c,kt as g,At as i,It as p,_t as r,Ft as s};