HEX
Server: nginx/1.18.0
System: Linux mail.dakarash.co.id 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: www-data (33)
PHP: 8.1.2-1ubuntu2.23
Disabled: NONE
Upload Files
File: /home/dakarash.co.id/public_html/plugins/presto-player/dist/components/web-components/p-7dedb08f.js
function t({current:t,duration:e,showAfter:n=null}){if(0===n)return!0;if(null===n||!e)return!1;if(t===n)return!0;let r=t/e*100;return 99.9<r&&(r=100),r>=n}function e(t){if(!t)return;let e,n,r,i;if(t.match(/^rgb/)){const i=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/);e=i[1],n=i[2],r=i[3]}else{const i=+("0x"+t.slice(1).replace(t.length<5&&/./g,"$&$&"));e=i>>16,n=i>>8&255,r=255&i}return i=Math.sqrt(e*e*.299+n*n*.587+r*r*.114),i>127.5?"light":"dark"}function n(t){let e,n=t.split(":");return n.length>1&&(e=60*parseInt(n[0])),parseInt(n[1])+parseInt(e)}function i(){var t=navigator.userAgent||navigator.vendor;return/windows phone/i.test(t)?"Windows Phone":/android/i.test(t)?"Android":"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||/(iPad|iPhone|iPod)/gi.test(navigator.platform)?"iOS":"unknown"}function r(){return"iOS"===i()}function s(){return"Android"===i()&&(t=window.navigator.standalone,e=window.navigator.userAgent.toLowerCase(),n=/safari/.test(e),!(/iphone|ipod|ipad/.test(e)?!t&&n||t||n:!e.includes("wv")));var t,e,n}function o(t){var e=t.match(/^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i);return e?[e[1],e[2],e[3],"1"]:(e=t.match(/^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*((0.)?\d+)\s*\)$/i))?[e[1],e[2],e[3],e[4]]:void 0}function c(t){var e,n,r,s,o;if("unknown"!==i()&&!(null===(n=null===(e=null==t?void 0:t.config)||void 0===e?void 0:e.blockAttributes)||void 0===n?void 0:n.playsInline)&&("function"==typeof(null===(r=null==t?void 0:t.media)||void 0===r?void 0:r.webkitExitFullScreen)&&(null==t||t.media.webkitExitFullScreen()),"function"==typeof(null===(s=null==t?void 0:t.embed)||void 0===s?void 0:s.exitFullscreen)&&(null===(o=null==t?void 0:t.embed)||void 0===o||o.exitFullscreen()),"youtube"===t.provider)){const e=t.currentTime;t.currentTime=t.duration,t.once("playing",(()=>{t.currentTime=e}))}}const l=t=>null!=t?t.constructor:null,u=t=>null==t,a=t=>l(t)===Object,h=t=>l(t)===String,d=u,f=a,g=h,v=t=>u(t)||(h(t)||(t=>Array.isArray(t))(t)||(t=>((t,e)=>Boolean(t&&e&&t instanceof e))(t,NodeList))(t))&&!t.length||a(t)&&!Object.keys(t).length;function M(t){return Array.isArray?Array.isArray(t):"[object Array]"===b(t)}function p(t){return"string"==typeof t}function m(t){return"number"==typeof t}function x(t){return"object"==typeof t}function y(t){return null!=t}function L(t){return!t.trim().length}function b(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const w=Object.prototype.hasOwnProperty;class ${constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{let n=S(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 S(t){let e=null,n=null,r=null,i=1,s=null;if(p(t)||M(t))r=t,e=k(t),n=A(t);else{if(!w.call(t,"name"))throw new Error("Missing name property in key");const o=t.name;if(r=o,w.call(t,"weight")&&(i=t.weight,i<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(o));e=k(o),n=A(o),s=t.getFn}return{path:e,id:n,weight:i,src:r,getFn:s}}function k(t){return M(t)?t:t.split(".")}function A(t){return M(t)?t.join("."):t}var I={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,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,getFn:function(t,e){let n=[],r=!1;const i=(t,e,s)=>{if(y(t))if(e[s]){const o=t[e[s]];if(!y(o))return;if(s===e.length-1&&(p(o)||m(o)||function(t){return!0===t||!1===t||function(t){return x(t)&&null!==t}(t)&&"[object Boolean]"==b(t)}(o)))n.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(o));else if(M(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,p(e)?e.split("."):e,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};const j=/[^ ]+/g;class C{constructor({getFn:t=I.getFn,fieldNormWeight:e=I.fieldNormWeight}={}){this.norm=function(t=1,e=3){const n=new Map,r=Math.pow(10,e);return{get(e){const i=e.match(j).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()}}}(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,p(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();p(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(!y(t)||L(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(y(i))if(M(i)){let t=[];const e=[{nestedArrIndex:-1,value:i}];for(;e.length;){const{nestedArrIndex:n,value:r}=e.pop();if(y(r))if(p(r)&&!L(r)){let e={v:r,i:n,n:this.norm.get(r)};t.push(e)}else M(r)&&r.forEach(((t,n)=>{e.push({nestedArrIndex:n,value:t})}))}n.$[r]=t}else if(p(i)&&!L(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 N(t,e,{getFn:n=I.getFn,fieldNormWeight:r=I.fieldNormWeight}={}){const i=new C({getFn:n,fieldNormWeight:r});return i.setKeys(t.map(S)),i.setSources(e),i.create(),i}function O(t,{errors:e=0,currentLocation:n=0,expectedLocation:r=0,distance:i=I.distance,ignoreLocation:s=I.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 R(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 F{constructor(t,{location:e=I.location,threshold:n=I.threshold,distance:r=I.distance,includeMatches:i=I.includeMatches,findAllMatches:s=I.findAllMatches,minMatchCharLength:o=I.minMatchCharLength,isCaseSensitive:c=I.isCaseSensitive,ignoreLocation:a=I.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 l=(t,e)=>{this.chunks.push({pattern:t,alphabet:R(t),startIndex:e})},h=this.pattern.length;if(h>32){let t=0;const e=h%32,n=h-e;for(;t<n;)l(this.pattern.substr(t,32),t),t+=32;if(e){const t=h-32;l(this.pattern.substr(t),t)}}else l(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 l=[],h=0,u=!1;this.chunks.forEach((({pattern:e,alphabet:d,startIndex:g})=>{const{isMatch:f,score:p,indices:m}=function(t,e,n,{location:r=I.location,distance:i=I.distance,threshold:s=I.threshold,findAllMatches:o=I.findAllMatches,minMatchCharLength:c=I.minMatchCharLength,includeMatches:a=I.includeMatches,ignoreLocation:l=I.ignoreLocation}={}){if(e.length>32)throw new Error("Pattern length exceeds max of 32.");const h=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 v;for(;(v=t.indexOf(e,f))>-1;){let t=O(e,{currentLocation:v,expectedLocation:d,distance:i,ignoreLocation:l});if(g=Math.min(t,g),f=v+h,p){let t=0;for(;t<h;)m[v+t]=1,t+=1}}f=-1;let y=[],M=1,x=h+u;const k=1<<h-1;for(let r=0;r<h;r+=1){let s=0,c=x;for(;s<c;)O(e,{errors:r,currentLocation:d+c,expectedLocation:d,distance:i,ignoreLocation:l})<=g?s=c:x=c,c=Math.floor((x-s)/2+s);x=c;let a=Math.max(1,d-c+1),v=o?u:Math.min(d+c,u)+h,I=Array(v+2);I[v+1]=(1<<r)-1;for(let s=v;s>=a;s-=1){let o=s-1,c=n[t.charAt(o)];if(p&&(m[o]=+!!c),I[s]=(I[s+1]<<1|1)&c,r&&(I[s]|=(y[s+1]|y[s])<<1|1|y[s+1]),I[s]&k&&(M=O(e,{errors:r,currentLocation:o,expectedLocation:d,distance:i,ignoreLocation:l}),M<=g)){if(g=M,f=o,f<=d)break;a=Math.max(1,2*d-f)}}if(O(e,{errors:r+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:l})>g)break;y=I}const L={isMatch:f>=0,score:Math.max(.001,M)};if(p){const t=function(t=[],e=I.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}(m,c);t.length?a&&(L.indices=t):L.isMatch=!1}return L}(t,e,d,{location:r+g,distance:i,threshold:s,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:a});f&&(u=!0),h+=p,f&&m&&(l=[...l,...m])}));let d={isMatch:u,score:u?h/this.chunks.length:1};return u&&n&&(d.indices=l),d}}class _{constructor(t){this.pattern=t}static isMultiMatch(t){return W(t,this.multiRegex)}static isSingleMatch(t){return W(t,this.singleRegex)}search(){}}function W(t,e){const n=t.match(e);return n?n[1]:null}class E extends _{constructor(t,{location:e=I.location,threshold:n=I.threshold,distance:r=I.distance,includeMatches:i=I.includeMatches,findAllMatches:s=I.findAllMatches,minMatchCharLength:o=I.minMatchCharLength,isCaseSensitive:c=I.isCaseSensitive,ignoreLocation:a=I.ignoreLocation}={}){super(t),this._bitapSearch=new F(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 P extends _{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 J=[class extends _{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]}}},P,class extends _{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 extends _{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 extends _{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 extends _{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 extends _{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]}}},E],T=J.length,z=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,B=new Set([E.type,P.type]),K=[];function D(t,e){for(let n=0,r=K.length;n<r;n+=1){let r=K[n];if(r.condition(t,e))return new r(t,e)}return new F(t,e)}const U=t=>!(!t.$and&&!t.$or),V=t=>({$and:Object.keys(t).map((e=>({[e]:t[e]})))});function q(t,e,{auto:n=!0}={}){const r=t=>{let i=Object.keys(t);const s=(t=>!!t.$path)(t);if(!s&&i.length>1&&!U(t))return r(V(t));if((t=>!M(t)&&x(t)&&!U(t))(t)){const r=s?t.$path:i[0],o=s?t.$val:t[r];if(!p(o))throw new Error((t=>`Invalid value for key ${t}`)(r));const c={keyId:A(r),pattern:o};return n&&(c.searcher=D(o,e)),c}let o={children:[],operator:i[0]};return i.forEach((e=>{const n=t[e];M(n)&&n.forEach((t=>{o.children.push(r(t))}))})),o};return U(t)||(t=V(t)),r(t)}function G(t,e){const n=t.matches;e.matches=[],y(n)&&n.forEach((t=>{if(!y(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 H(t,e){e.score=t.score}class Q{constructor(t,e={},n){this.options={...I,...e},this._keyStore=new $(this.options.keys),this.setCollection(t,n)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof C))throw new Error("Incorrect 'index' type");this._myIndex=e||N(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){y(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=p(t)?p(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=I.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}))}(c,{ignoreFieldNorm:o}),i&&c.sort(s),m(e)&&e>-1&&(c=c.slice(0,e)),function(t,e,{includeMatches:n=I.includeMatches,includeScore:r=I.includeScore}={}){const i=[];return n&&i.push(G),r&&i.push(H),t.map((t=>{const{idx:n}=t,r={item:e[n],refIndex:n};return i.length&&i.forEach((e=>{e(t,r)})),r}))}(c,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(t){const e=D(t,this.options),{records:n}=this._myIndex,r=[];return n.forEach((({v:t,i:n,n:i})=>{if(!y(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=q(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=n(t.children[s],e,r);if(o.length)i.push(...o);else if("$and"===t.operator)return[]}return i},r={},i=[];return this._myIndex.records.forEach((({$:t,i:s})=>{if(y(t)){let o=n(e,t,s);o.length&&(r[s]||(r[s]={idx:s,item:t,matches:[]},i.push(r[s])),o.forEach((({matches:t})=>{r[s].matches.push(...t)})))}})),i}_searchObjectList(t){const e=D(t,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach((({$:t,i:r})=>{if(!y(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(!y(e))return[];let r=[];if(M(e))e.forEach((({v:e,i:i,n:s})=>{if(!y(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 X(t){return"string"==typeof t&&t.includes(".m3u8")}function Y(t){for(var e=[];t.parentNode&&"body"!=t.parentNode.nodeName.toLowerCase();)e.push(t=t.parentNode);return e}Q.version="6.6.2",Q.createIndex=N,Q.parseIndex=function(t,{getFn:e=I.getFn,fieldNormWeight:n=I.fieldNormWeight}={}){const{keys:r,records:i}=t,s=new C({getFn:e,fieldNormWeight:n});return s.setKeys(r),s.setIndexRecords(i),s},Q.config=I,Q.parseQuery=q,K.push(class{constructor(t,{isCaseSensitive:e=I.isCaseSensitive,includeMatches:n=I.includeMatches,minMatchCharLength:r=I.minMatchCharLength,ignoreLocation:i=I.ignoreLocation,findAllMatches:s=I.findAllMatches,location:o=I.location,threshold:c=I.threshold,distance:a=I.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=function(t,e={}){return t.split("|").map((t=>{let n=t.trim().split(z).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<T;){const t=J[o];let n=t.isMultiMatch(i);n&&(r.push(new t(n,e)),s=!0)}if(!s)for(o=-1;++o<T;){const t=J[o];let n=t.isSingleMatch(i);if(n){r.push(new t(n,e));break}}}return r}))}(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:l,score:h}=r.search(t);if(!a){o=0,i=0,s.length=0;break}i+=1,o+=h,n&&(B.has(r.constructor.type)?s=[...s,...l]:s.push(l))}if(i){let t={isMatch:!0,score:o/i};return n&&(t.indices=s),t}}return{isMatch:!1,score:1}}});const Z=t=>t?["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}}))}):null;function tt(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?function(t){if(!t)return;const e=localStorage.getItem("presto-player-"+t.id+"-cues");return v(e)?"":JSON.parse(e)}(t):o[t.captions.currentTrack],v(a))return[];const l=Z(a);return v(l)?[]:((t,e,n)=>{if(!g(t))return[];if(v(e))return[];if(v(n))return[];const r=((t,e,n)=>{if(v(e))return[];if(v(n))return[];if(!g(t))return[];const r=Object.assign(Object.assign(Object.assign({},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 Q(e,r).search(t):[]})(t,e,n);return r&&Array.prototype.map.call(r,(function(t){return{time:Math.ceil(t.item.startTime),label:""}}))})(e,null==l?void 0:l.cues,c)}function et(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(!v(n))for(var r=0;r<n.length;r++)n[r].remove()}function nt(t,e){if(!t)return;if(et(t),!(null==e?void 0:e.length))return;const n=document.createDocumentFragment(),r=document.createDocumentFragment();e.forEach((e=>{const n=function(t,e,n){const r=document.createElement("span");return f(e)&&function(t,e){var n;null!==(n=t)&&"object"==typeof n&&1===n.nodeType&&"object"==typeof n.style&&"object"==typeof n.ownerDocument&&!v(e)&&Object.entries(e).filter((([,t])=>!d(t))).forEach((([e,n])=>t.setAttribute(e,n)))}(r,e),g("")&&(r.innerText=""),r}(0,{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 it(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&&(function(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])?Z(t.media.textTracks[0]):{};v(o)||localStorage.setItem("presto-player-"+t.id+"-cues",JSON.stringify(o))}(t),t.toggleCaptions(!1),clearInterval(c))}),200)}export{r as a,n as b,it as c,nt as d,c as e,s as f,Y as g,X as i,e as l,o as p,et as r,tt as s,t};