/*! * artplayer-plugin-vtt-thumbnail.js v1.0.3 * Github: https://github.com/zhw2590582/ArtPlayer * (c) 2017-2025 Harvey Zack * Released under the MIT License. */ !function(e,t,r,n,o,i,c,u){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[n]&&a[n],f=s.i||{},l=s.cache||{},p="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!l[t]){if(!e[t]){if(o[t])return o[t];var i="function"==typeof a[n]&&a[n];if(!r&&i)return i(t,!0);if(s)return s(t,!0);if(p&&"string"==typeof t)return p(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var u=l[t]=new d.Module(t);e[t][0].call(u.exports,f,u,u.exports,a)}return l[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=p,this.exports={}},d.modules=e,d.cache=l,d.parent=s,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=f,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return a[n]}}),a[n]=d;for(var y=0;y=e.start&&d<=e.end})))return[2,n(e,"display","none")];if(p>0&&ps.clientWidth-y.w/2?n(e,"left","".concat(s.clientWidth-y.w,"px")):n(e,"left","".concat(p-y.w/2,"px"));else o||n(e,"display","none");a&&(clearTimeout(f),f=setTimeout(function(){n(e,"display","none")},500))}return[2]})}),function(e,t,n){return r.apply(this,arguments)}))}}),[2,{name:"artplayerPluginVttThumbnail"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=s)},{"@swc/helpers/cjs/_async_to_generator.cjs":"4ElRo","@swc/helpers/cjs/_ts_generator.cjs":"a4h1C","./getVttArray":"bE6vP","@parcel/transformer-js/src/esmodule-helpers.js":"ihnSZ"}],"4ElRo":[function(e,t,r,n){"use strict";function o(e,t,r,n,o,i,c){try{var u=e[i](c),a=u.value}catch(e){r(e);return}u.done?t(a):Promise.resolve(a).then(n,o)}r._=function(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var c=e.apply(t,r);function u(e){o(c,n,i,u,a,"next",e)}function a(e){o(c,n,i,u,a,"throw",e)}u(void 0)})}}},{}],a4h1C:[function(e,t,r,n){"use strict";r._=e("3d8e14b4b7163380").__generator},{"3d8e14b4b7163380":"36MWs"}],"36MWs":[function(e,t,r,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"__extends",function(){return u}),o.export(r,"__assign",function(){return a}),o.export(r,"__rest",function(){return s}),o.export(r,"__decorate",function(){return f}),o.export(r,"__param",function(){return l}),o.export(r,"__esDecorate",function(){return p}),o.export(r,"__runInitializers",function(){return d}),o.export(r,"__propKey",function(){return y}),o.export(r,"__setFunctionName",function(){return _}),o.export(r,"__metadata",function(){return h}),o.export(r,"__awaiter",function(){return v}),o.export(r,"__generator",function(){return b}),o.export(r,"__createBinding",function(){return m}),o.export(r,"__exportStar",function(){return w}),o.export(r,"__values",function(){return g}),o.export(r,"__read",function(){return j}),o.export(r,"__spread",function(){return x}),o.export(r,"__spreadArrays",function(){return O}),o.export(r,"__spreadArray",function(){return P}),o.export(r,"__await",function(){return S}),o.export(r,"__asyncGenerator",function(){return E}),o.export(r,"__asyncDelegator",function(){return T}),o.export(r,"__asyncValues",function(){return I}),o.export(r,"__makeTemplateObject",function(){return D}),o.export(r,"__importStar",function(){return k}),o.export(r,"__importDefault",function(){return A}),o.export(r,"__classPrivateFieldGet",function(){return M}),o.export(r,"__classPrivateFieldSet",function(){return C}),o.export(r,"__classPrivateFieldIn",function(){return N}),o.export(r,"__addDisposableResource",function(){return W}),o.export(r,"__disposeResources",function(){return V}),o.export(r,"__rewriteRelativeImportExtension",function(){return q});var i=e("@swc/helpers/cjs/_type_of.cjs"),c=function(e,t){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return(a=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function f(e,t,r,n){var o,c=arguments.length,u=c<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if(("undefined"==typeof Reflect?"undefined":(0,i._)(Reflect))==="object"&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(u=(c<3?o(u):c>3?o(t,r,u):o(t,r))||u);return c>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,c){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,s=n.kind,f="getter"===s?"get":"setter"===s?"set":"value",l=!t&&e?n.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d=!1,y=r.length-1;y>=0;y--){var _={};for(var h in n)_[h]="access"===h?{}:n[h];for(var h in n.access)_.access[h]=n.access[h];_.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");c.push(u(e||null))};var v=(0,r[y])("accessor"===s?{get:p.get,set:p.set}:p[f],_);if("accessor"===s){if(void 0===v)continue;if(null===v||(void 0===v?"undefined":(0,i._)(v))!=="object")throw TypeError("Object expected");(a=u(v.get))&&(p.get=a),(a=u(v.set))&&(p.set=a),(a=u(v.init))&&o.unshift(a)}else(a=u(v))&&("field"===s?o.unshift(a):p[f]=a)}l&&Object.defineProperty(l,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return c}function x(){for(var e=[],t=0;t1||u(e,t)})},t&&(n[e]=t(n[e])))}function u(e,t){try{var r;(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(a,s):f(i[0][2],r)}catch(e){f(i[0][3],e)}}function a(e){u("next",e)}function s(e){u("throw",e)}function f(e,t){e(t),i.shift(),i.length&&u(i[0][0],i[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){var i,c,u;i=n,c=o,u=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){i({value:e,done:u})},c)})}}}function D(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var R=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},F=function(e){return(F=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)};function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=F(e),n=0;nr?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+c}function a(){return s.apply(this,arguments)}function s(){return(s=(0,i._)(function(){var e,t,r,n,o,i,a,s,f,l,p,d,y,_,h,v,b,m,w=arguments;return(0,c._)(this,function(c){switch(c.label){case 0:return[4,fetch(e=w.length>0&&void 0!==w[0]?w[0]:"")];case 1:return[4,c.sent().text()];case 2:for(n=1,t=c.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,s=o.match(a),f=/(.*)#(\w{4})=(.*)/i,l=i.match(f),p=Math.floor(u(s[1])),d=Math.floor(u(s[2])),y=l[1],/^\/|((https?|ftp|file):\/\/)/i.test(y)||((_=e.split("/")).pop(),_.push(y),y=_.join("/")),h={start:p,end:d,url:y},v=l[2].split(""),b=l[3].split(","),m=0;m