@api.video/video-uploader
Version:
api.video video uploader
1 lines • 58.2 kB
JavaScript
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(this,(()=>(()=>{var t={7633:(t,e,r)=>{r(9170),r(6992),r(1539),r(8674),r(7922),r(4668),r(7727),r(8783);var n=r(857);t.exports=n.Promise},9662:(t,e,r)=>{var n=r(614),o=r(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(4411),o=r(6330),i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(614),o=String,i=TypeError;t.exports=function(t){if("object"==typeof t||n(t))return t;throw i("Can't set "+o(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),o=r(30),i=r(3070).f,a=n("unscopables"),s=Array.prototype;null==s[a]&&i(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},5787:(t,e,r)=>{var n=r(7976),o=TypeError;t.exports=function(t,e){if(n(e,t))return t;throw o("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(111),o=String,i=TypeError;t.exports=function(t){if(n(t))return t;throw i(o(t)+" is not an object")}},1318:(t,e,r)=>{var n=r(5656),o=r(1400),i=r(6244),a=function(t){return function(e,r,a){var s,u=n(e),c=i(u),l=o(a,c);if(t&&r!=r){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},206:(t,e,r)=>{var n=r(1702);t.exports=n([].slice)},7072:(t,e,r)=>{var n=r(5112)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},4326:(t,e,r)=>{var n=r(84),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,r)=>{var n=r(1694),o=r(614),i=r(4326),a=r(5112)("toStringTag"),s=Object,u="Arguments"==i(function(){return arguments}());t.exports=n?i:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=s(t),a))?r:u?i(e):"Object"==(n=i(e))&&o(e.callee)?"Arguments":n}},9920:(t,e,r)=>{var n=r(2597),o=r(3887),i=r(1236),a=r(3070);t.exports=function(t,e,r){for(var s=o(e),u=a.f,c=i.f,l=0;l<s.length;l++){var f=s[l];n(t,f)||r&&n(r,f)||u(t,f,c(e,f))}}},8544:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},6178:t=>{t.exports=function(t,e){return{value:t,done:e}}},8880:(t,e,r)=>{var n=r(9781),o=r(3070),i=r(9114);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},8052:(t,e,r)=>{var n=r(614),o=r(3070),i=r(6339),a=r(3072);t.exports=function(t,e,r,s){s||(s={});var u=s.enumerable,c=void 0!==s.name?s.name:e;if(n(r)&&i(r,c,s),s.global)u?t[e]=r:a(e,r);else{try{s.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=r:o.f(t,e,{value:r,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},3072:(t,e,r)=>{var n=r(7854),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:t=>{var e="object"==typeof document&&document.all,r=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:r}},317:(t,e,r)=>{var n=r(7854),o=r(111),i=n.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:(t,e,r)=>{var n=r(317)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},7871:(t,e,r)=>{var n=r(3823),o=r(5268);t.exports=!n&&!o&&"object"==typeof window&&"object"==typeof document},3823:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},1528:(t,e,r)=>{var n=r(8113),o=r(7854);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},6833:(t,e,r)=>{var n=r(8113);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},5268:(t,e,r)=>{var n=r(4326),o=r(7854);t.exports="process"==n(o.process)},1036:(t,e,r)=>{var n=r(8113);t.exports=/web0s(?!.*chrome)/i.test(n)},8113:(t,e,r)=>{var n=r(5005);t.exports=n("navigator","userAgent")||""},7392:(t,e,r)=>{var n,o,i=r(7854),a=r(8113),s=i.process,u=i.Deno,c=s&&s.versions||u&&u.version,l=c&&c.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1060:(t,e,r)=>{var n=r(1702),o=Error,i=n("".replace),a=String(o("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,u=s.test(a);t.exports=function(t,e){if(u&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,s,"");return t}},2914:(t,e,r)=>{var n=r(7293),o=r(9114);t.exports=!n((function(){var t=Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",o(1,7)),7!==t.stack)}))},2109:(t,e,r)=>{var n=r(7854),o=r(1236).f,i=r(8880),a=r(8052),s=r(3072),u=r(9920),c=r(4705);t.exports=function(t,e){var r,l,f,p,h,v=t.target,d=t.global,y=t.stat;if(r=d?n:y?n[v]||s(v,{}):(n[v]||{}).prototype)for(l in e){if(p=e[l],f=t.dontCallGetSet?(h=o(r,l))&&h.value:r[l],!c(d?l:v+(y?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;u(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),a(r,l,p,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},2104:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.apply,a=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},9974:(t,e,r)=>{var n=r(1702),o=r(9662),i=r(4374),a=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},4374:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},6916:(t,e,r)=>{var n=r(4374),o=Function.prototype.call;t.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},6530:(t,e,r)=>{var n=r(9781),o=r(2597),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,s=o(i,"name"),u=s&&"something"===function(){}.name,c=s&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:s,PROPER:u,CONFIGURABLE:c}},84:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.call,a=n&&o.bind.bind(i,i);t.exports=function(t){return n?a(t):function(){return i.apply(t,arguments)}}},1702:(t,e,r)=>{var n=r(4326),o=r(84);t.exports=function(t){if("Function"===n(t))return o(t)}},5005:(t,e,r)=>{var n=r(7854),o=r(614),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},1246:(t,e,r)=>{var n=r(648),o=r(8173),i=r(8554),a=r(7497),s=r(5112)("iterator");t.exports=function(t){if(!i(t))return o(t,s)||o(t,"@@iterator")||a[n(t)]}},4121:(t,e,r)=>{var n=r(6916),o=r(9662),i=r(9670),a=r(6330),s=r(1246),u=TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(o(r))return i(n(r,t));throw u(a(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662),o=r(8554);t.exports=function(t,e){var r=t[e];return o(r)?void 0:n(r)}},7854:(t,e,r)=>{var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},2597:(t,e,r)=>{var n=r(1702),o=r(7908),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},3501:t=>{t.exports={}},842:(t,e,r)=>{var n=r(7854);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},490:(t,e,r)=>{var n=r(5005);t.exports=n("document","documentElement")},4664:(t,e,r)=>{var n=r(9781),o=r(7293),i=r(317);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(4326),a=Object,s=n("".split);t.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?s(t,""):a(t)}:a},2788:(t,e,r)=>{var n=r(1702),o=r(614),i=r(5465),a=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return a(t)}),t.exports=i.inspectSource},8340:(t,e,r)=>{var n=r(111),o=r(8880);t.exports=function(t,e){n(e)&&"cause"in e&&o(t,"cause",e.cause)}},9909:(t,e,r)=>{var n,o,i,a=r(4811),s=r(7854),u=r(111),c=r(8880),l=r(2597),f=r(5465),p=r(6200),h=r(3501),v="Object already initialized",d=s.TypeError,y=s.WeakMap;if(a||f.state){var b=f.state||(f.state=new y);b.get=b.get,b.has=b.has,b.set=b.set,n=function(t,e){if(b.has(t))throw d(v);return e.facade=t,b.set(t,e),e},o=function(t){return b.get(t)||{}},i=function(t){return b.has(t)}}else{var g=p("state");h[g]=!0,n=function(t,e){if(l(t,g))throw d(v);return e.facade=t,c(t,g,e),e},o=function(t){return l(t,g)?t[g]:{}},i=function(t){return l(t,g)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!u(e)||(r=o(e)).type!==t)throw d("Incompatible receiver, "+t+" required");return r}}}},7659:(t,e,r)=>{var n=r(5112),o=r(7497),i=n("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},614:(t,e,r)=>{var n=r(4154),o=n.all;t.exports=n.IS_HTMLDDA?function(t){return"function"==typeof t||t===o}:function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(614),a=r(648),s=r(5005),u=r(2788),c=function(){},l=[],f=s("Reflect","construct"),p=/^\s*(?:class|function)\b/,h=n(p.exec),v=!p.exec(c),d=function(t){if(!i(t))return!1;try{return f(c,l,t),!0}catch(t){return!1}},y=function(t){if(!i(t))return!1;switch(a(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return v||!!h(p,u(t))}catch(t){return!0}};y.sham=!0,t.exports=!f||o((function(){var t;return d(d.call)||!d(Object)||!d((function(){t=!0}))||t}))?y:d},4705:(t,e,r)=>{var n=r(7293),o=r(614),i=/#|\.prototype\./,a=function(t,e){var r=u[s(t)];return r==l||r!=c&&(o(e)?n(e):!!e)},s=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=a.data={},c=a.NATIVE="N",l=a.POLYFILL="P";t.exports=a},8554:t=>{t.exports=function(t){return null==t}},111:(t,e,r)=>{var n=r(614),o=r(4154),i=o.all;t.exports=o.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:n(t)||t===i}:function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},2190:(t,e,r)=>{var n=r(5005),o=r(614),i=r(7976),a=r(3307),s=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return o(e)&&i(e.prototype,s(t))}},408:(t,e,r)=>{var n=r(9974),o=r(6916),i=r(9670),a=r(6330),s=r(7659),u=r(6244),c=r(7976),l=r(4121),f=r(1246),p=r(9212),h=TypeError,v=function(t,e){this.stopped=t,this.result=e},d=v.prototype;t.exports=function(t,e,r){var y,b,g,m,w,S,x,P=r&&r.that,E=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_RECORD),_=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),k=n(e,P),j=function(t){return y&&p(y,"normal",t),new v(!0,t)},C=function(t){return E?(i(t),T?k(t[0],t[1],j):k(t[0],t[1])):T?k(t,j):k(t)};if(O)y=t.iterator;else if(_)y=t;else{if(!(b=f(t)))throw h(a(t)+" is not iterable");if(s(b)){for(g=0,m=u(t);m>g;g++)if((w=C(t[g]))&&c(d,w))return w;return new v(!1)}y=l(t,b)}for(S=O?t.next:y.next;!(x=o(S,y)).done;){try{w=C(x.value)}catch(t){p(y,"throw",t)}if("object"==typeof w&&w&&c(d,w))return w}return new v(!1)}},9212:(t,e,r)=>{var n=r(6916),o=r(9670),i=r(8173);t.exports=function(t,e,r){var a,s;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){s=!0,a=t}if("throw"===e)throw r;if(s)throw a;return o(a),r}},3061:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,o=r(30),i=r(9114),a=r(8003),s=r(7497),u=function(){return this};t.exports=function(t,e,r,c){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!c,r)}),a(t,l,!1,!0),s[l]=u,t}},1656:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(1913),a=r(6530),s=r(614),u=r(3061),c=r(9518),l=r(7674),f=r(8003),p=r(8880),h=r(8052),v=r(5112),d=r(7497),y=r(3383),b=a.PROPER,g=a.CONFIGURABLE,m=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,S=v("iterator"),x="keys",P="values",E="entries",O=function(){return this};t.exports=function(t,e,r,a,v,y,_){u(r,e,a);var T,k,j,C=function(t){if(t===v&&N)return N;if(!w&&t in R)return R[t];switch(t){case x:case P:case E:return function(){return new r(this,t)}}return function(){return new r(this)}},A=e+" Iterator",I=!1,R=t.prototype,U=R[S]||R["@@iterator"]||v&&R[v],N=!w&&U||C(v),L="Array"==e&&R.entries||U;if(L&&(T=c(L.call(new t)))!==Object.prototype&&T.next&&(i||c(T)===m||(l?l(T,m):s(T[S])||h(T,S,O)),f(T,A,!0,!0),i&&(d[A]=O)),b&&v==P&&U&&U.name!==P&&(!i&&g?p(R,"name",P):(I=!0,N=function(){return o(U,this)})),v)if(k={values:C(P),keys:y?N:C(x),entries:C(E)},_)for(j in k)(w||I||!(j in R))&&h(R,j,k[j]);else n({target:e,proto:!0,forced:w||I},k);return i&&!_||R[S]===N||h(R,S,N,{name:v}),d[e]=N,k}},3383:(t,e,r)=>{"use strict";var n,o,i,a=r(7293),s=r(614),u=r(111),c=r(30),l=r(9518),f=r(8052),p=r(5112),h=r(1913),v=p("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(n=o):d=!0),!u(n)||a((function(){var t={};return n[v].call(t)!==t}))?n={}:h&&(n=c(n)),s(n[v])||f(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},6339:(t,e,r)=>{var n=r(7293),o=r(614),i=r(2597),a=r(9781),s=r(6530).CONFIGURABLE,u=r(2788),c=r(9909),l=c.enforce,f=c.get,p=Object.defineProperty,h=a&&!n((function(){return 8!==p((function(){}),"length",{value:8}).length})),v=String(String).split("String"),d=t.exports=function(t,e,r){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!i(t,"name")||s&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),h&&r&&i(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&i(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=l(t);return i(n,"source")||(n.source=v.join("string"==typeof e?e:"")),t};Function.prototype.toString=d((function(){return o(this)&&f(this).source||u(this)}),"toString")},4758:t=>{var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},5948:(t,e,r)=>{var n,o,i,a,s,u,c,l,f=r(7854),p=r(9974),h=r(1236).f,v=r(261).set,d=r(6833),y=r(1528),b=r(1036),g=r(5268),m=f.MutationObserver||f.WebKitMutationObserver,w=f.document,S=f.process,x=f.Promise,P=h(f,"queueMicrotask"),E=P&&P.value;E||(n=function(){var t,e;for(g&&(t=S.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},d||g||b||!m||!w?!y&&x&&x.resolve?((c=x.resolve(void 0)).constructor=x,l=p(c.then,c),a=function(){l(n)}):g?a=function(){S.nextTick(n)}:(v=p(v,f),a=function(){v(n)}):(s=!0,u=w.createTextNode(""),new m(n).observe(u,{characterData:!0}),a=function(){u.data=s=!s})),t.exports=E||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},8523:(t,e,r)=>{"use strict";var n=r(9662),o=TypeError,i=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw o("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new i(t)}},6277:(t,e,r)=>{var n=r(1340);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:n(t)}},30:(t,e,r)=>{var n,o=r(9670),i=r(6048),a=r(748),s=r(3501),u=r(490),c=r(317),l=r(6200)("IE_PROTO"),f=function(){},p=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&n?h(n):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):h(n);for(var r=a.length;r--;)delete v.prototype[a[r]];return v()};s[l]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(f.prototype=o(t),r=new f,f.prototype=null,r[l]=t):r=v(),void 0===e?r:i.f(r,e)}},6048:(t,e,r)=>{var n=r(9781),o=r(3353),i=r(3070),a=r(9670),s=r(5656),u=r(1956);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=s(e),o=u(e),c=o.length,l=0;c>l;)i.f(t,r=o[l++],n[r]);return t}},3070:(t,e,r)=>{var n=r(9781),o=r(4664),i=r(3353),a=r(9670),s=r(4948),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor;e.f=n?i?function(t,e,r){if(a(t),e=s(e),a(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=l(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return c(t,e,r)}:c:function(t,e,r){if(a(t),e=s(e),a(r),o)try{return c(t,e,r)}catch(t){}if("get"in r||"set"in r)throw u("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},1236:(t,e,r)=>{var n=r(9781),o=r(6916),i=r(5296),a=r(9114),s=r(5656),u=r(4948),c=r(2597),l=r(4664),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=s(t),e=u(e),l)try{return f(t,e)}catch(t){}if(c(t,e))return a(!o(i.f,t,e),t[e])}},8006:(t,e,r)=>{var n=r(6324),o=r(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,r)=>{var n=r(2597),o=r(614),i=r(7908),a=r(6200),s=r(8544),u=a("IE_PROTO"),c=Object,l=c.prototype;t.exports=s?c.getPrototypeOf:function(t){var e=i(t);if(n(e,u))return e[u];var r=e.constructor;return o(r)&&e instanceof r?r.prototype:e instanceof c?l:null}},7976:(t,e,r)=>{var n=r(1702);t.exports=n({}.isPrototypeOf)},6324:(t,e,r)=>{var n=r(1702),o=r(2597),i=r(5656),a=r(1318).indexOf,s=r(3501),u=n([].push);t.exports=function(t,e){var r,n=i(t),c=0,l=[];for(r in n)!o(s,r)&&o(n,r)&&u(l,r);for(;e.length>c;)o(n,r=e[c++])&&(~a(l,r)||u(l,r));return l}},1956:(t,e,r)=>{var n=r(6324),o=r(748);t.exports=Object.keys||function(t){return n(t,o)}},5296:(t,e)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);e.f=o?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},7674:(t,e,r)=>{var n=r(1702),o=r(9670),i=r(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},288:(t,e,r)=>{"use strict";var n=r(1694),o=r(648);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},2140:(t,e,r)=>{var n=r(6916),o=r(614),i=r(111),a=TypeError;t.exports=function(t,e){var r,s;if("string"===e&&o(r=t.toString)&&!i(s=n(r,t)))return s;if(o(r=t.valueOf)&&!i(s=n(r,t)))return s;if("string"!==e&&o(r=t.toString)&&!i(s=n(r,t)))return s;throw a("Can't convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),o=r(1702),i=r(8006),a=r(5181),s=r(9670),u=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(s(t)),r=a.f;return r?u(e,r(t)):e}},857:(t,e,r)=>{var n=r(7854);t.exports=n},2534:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},3702:(t,e,r)=>{var n=r(7854),o=r(2492),i=r(614),a=r(4705),s=r(2788),u=r(5112),c=r(7871),l=r(3823),f=r(1913),p=r(7392),h=o&&o.prototype,v=u("species"),d=!1,y=i(n.PromiseRejectionEvent),b=a("Promise",(function(){var t=s(o),e=t!==String(o);if(!e&&66===p)return!0;if(f&&(!h.catch||!h.finally))return!0;if(!p||p<51||!/native code/.test(t)){var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[v]=n,!(d=r.then((function(){}))instanceof n))return!0}return!e&&(c||l)&&!y}));t.exports={CONSTRUCTOR:b,REJECTION_EVENT:y,SUBCLASSING:d}},2492:(t,e,r)=>{var n=r(7854);t.exports=n.Promise},9478:(t,e,r)=>{var n=r(9670),o=r(111),i=r(8523);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},612:(t,e,r)=>{var n=r(2492),o=r(7072),i=r(3702).CONSTRUCTOR;t.exports=i||!o((function(t){n.all(t).then(void 0,(function(){}))}))},8572:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return this.head=t.next,this.tail===t&&(this.tail=null),t.item}},t.exports=e},4488:(t,e,r)=>{var n=r(8554),o=TypeError;t.exports=function(t){if(n(t))throw o("Can't call method on "+t);return t}},6340:(t,e,r)=>{"use strict";var n=r(5005),o=r(3070),i=r(5112),a=r(9781),s=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[s]&&r(e,s,{configurable:!0,get:function(){return this}})}},8003:(t,e,r)=>{var n=r(3070).f,o=r(2597),i=r(5112)("toStringTag");t.exports=function(t,e,r){t&&!r&&(t=t.prototype),t&&!o(t,i)&&n(t,i,{configurable:!0,value:e})}},6200:(t,e,r)=>{var n=r(2309),o=r(9711),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5465:(t,e,r)=>{var n=r(7854),o=r(3072),i="__core-js_shared__",a=n[i]||o(i,{});t.exports=a},2309:(t,e,r)=>{var n=r(1913),o=r(5465);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.5",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,r)=>{var n=r(9670),o=r(9483),i=r(8554),a=r(5112)("species");t.exports=function(t,e){var r,s=n(t).constructor;return void 0===s||i(r=n(s)[a])?e:o(r)}},8710:(t,e,r)=>{var n=r(1702),o=r(9303),i=r(1340),a=r(4488),s=n("".charAt),u=n("".charCodeAt),c=n("".slice),l=function(t){return function(e,r){var n,l,f=i(a(e)),p=o(r),h=f.length;return p<0||p>=h?t?"":void 0:(n=u(f,p))<55296||n>56319||p+1===h||(l=u(f,p+1))<56320||l>57343?t?s(f,p):n:t?c(f,p,p+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},6293:(t,e,r)=>{var n=r(7392),o=r(7293);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},261:(t,e,r)=>{var n,o,i,a,s=r(7854),u=r(2104),c=r(9974),l=r(614),f=r(2597),p=r(7293),h=r(490),v=r(206),d=r(317),y=r(8053),b=r(6833),g=r(5268),m=s.setImmediate,w=s.clearImmediate,S=s.process,x=s.Dispatch,P=s.Function,E=s.MessageChannel,O=s.String,_=0,T={};try{n=s.location}catch(t){}var k=function(t){if(f(T,t)){var e=T[t];delete T[t],e()}},j=function(t){return function(){k(t)}},C=function(t){k(t.data)},A=function(t){s.postMessage(O(t),n.protocol+"//"+n.host)};m&&w||(m=function(t){y(arguments.length,1);var e=l(t)?t:P(t),r=v(arguments,1);return T[++_]=function(){u(e,void 0,r)},o(_),_},w=function(t){delete T[t]},g?o=function(t){S.nextTick(j(t))}:x&&x.now?o=function(t){x.now(j(t))}:E&&!b?(a=(i=new E).port2,i.port1.onmessage=C,o=c(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!p(A)?(o=A,s.addEventListener("message",C,!1)):o="onreadystatechange"in d("script")?function(t){h.appendChild(d("script")).onreadystatechange=function(){h.removeChild(this),k(t)}}:function(t){setTimeout(j(t),0)}),t.exports={set:m,clear:w}},1400:(t,e,r)=>{var n=r(9303),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},5656:(t,e,r)=>{var n=r(8361),o=r(4488);t.exports=function(t){return n(o(t))}},9303:(t,e,r)=>{var n=r(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},7466:(t,e,r)=>{var n=r(9303),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},7908:(t,e,r)=>{var n=r(4488),o=Object;t.exports=function(t){return o(n(t))}},7593:(t,e,r)=>{var n=r(6916),o=r(111),i=r(2190),a=r(8173),s=r(2140),u=r(5112),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var r,u=a(t,l);if(u){if(void 0===e&&(e="default"),r=n(u,t,e),!o(r)||i(r))return r;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),s(t,e)}},4948:(t,e,r)=>{var n=r(7593),o=r(2190);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},1694:(t,e,r)=>{var n={};n[r(5112)("toStringTag")]="z",t.exports="[object z]"===String(n)},1340:(t,e,r)=>{var n=r(648),o=String;t.exports=function(t){if("Symbol"===n(t))throw TypeError("Cannot convert a Symbol value to a string");return o(t)}},6330:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:(t,e,r)=>{var n=r(1702),o=0,i=Math.random(),a=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++o+i,36)}},3307:(t,e,r)=>{var n=r(6293);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:(t,e,r)=>{var n=r(9781),o=r(7293);t.exports=n&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},8053:t=>{var e=TypeError;t.exports=function(t,r){if(t<r)throw e("Not enough arguments");return t}},4811:(t,e,r)=>{var n=r(7854),o=r(614),i=n.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},5112:(t,e,r)=>{var n=r(7854),o=r(2309),i=r(2597),a=r(9711),s=r(6293),u=r(3307),c=o("wks"),l=n.Symbol,f=l&&l.for,p=u?l:l&&l.withoutSetter||a;t.exports=function(t){if(!i(c,t)||!s&&"string"!=typeof c[t]){var e="Symbol."+t;s&&i(l,t)?c[t]=l[t]:c[t]=u&&f?f(e):p(e)}return c[t]}},6967:(t,e,r)=>{"use strict";var n=r(2109),o=r(7976),i=r(9518),a=r(7674),s=r(9920),u=r(30),c=r(8880),l=r(9114),f=r(1060),p=r(8340),h=r(408),v=r(6277),d=r(5112),y=r(2914),b=d("toStringTag"),g=Error,m=[].push,w=function(t,e){var r,n=arguments.length>2?arguments[2]:void 0,s=o(S,this);a?r=a(g(),s?i(this):S):(r=s?this:u(S),c(r,b,"Error")),void 0!==e&&c(r,"message",v(e)),y&&c(r,"stack",f(r.stack,1)),p(r,n);var l=[];return h(t,m,{that:l}),c(r,"errors",l),r};a?a(w,g):s(w,g,{name:!0});var S=w.prototype=u(g.prototype,{constructor:l(1,w),message:l(1,""),name:l(1,"AggregateError")});n({global:!0,constructor:!0,arity:2},{AggregateError:w})},9170:(t,e,r)=>{r(6967)},6992:(t,e,r)=>{"use strict";var n=r(5656),o=r(1223),i=r(7497),a=r(9909),s=r(3070).f,u=r(1656),c=r(6178),l=r(1913),f=r(9781),p="Array Iterator",h=a.set,v=a.getterFor(p);t.exports=u(Array,"Array",(function(t,e){h(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=v(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,c(void 0,!0)):c("keys"==r?n:"values"==r?e[n]:[n,e[n]],!1)}),"values");var d=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!l&&f&&"values"!==d.name)try{s(d,"name",{value:"values"})}catch(t){}},1539:(t,e,r)=>{var n=r(1694),o=r(8052),i=r(288);n||o(Object.prototype,"toString",i,{unsafe:!0})},7922:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),u=r(408);n({target:"Promise",stat:!0},{allSettled:function(t){var e=this,r=a.f(e),n=r.resolve,c=r.reject,l=s((function(){var r=i(e.resolve),a=[],s=0,c=1;u(t,(function(t){var i=s++,u=!1;c++,o(r,e,t).then((function(t){u||(u=!0,a[i]={status:"fulfilled",value:t},--c||n(a))}),(function(t){u||(u=!0,a[i]={status:"rejected",reason:t},--c||n(a))}))})),--c||n(a)}));return l.error&&c(l.value),r.promise}})},821:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),u=r(408);n({target:"Promise",stat:!0,forced:r(612)},{all:function(t){var e=this,r=a.f(e),n=r.resolve,c=r.reject,l=s((function(){var r=i(e.resolve),a=[],s=0,l=1;u(t,(function(t){var i=s++,u=!1;l++,o(r,e,t).then((function(t){u||(u=!0,a[i]=t,--l||n(a))}),c)})),--l||n(a)}));return l.error&&c(l.value),r.promise}})},4668:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(5005),s=r(8523),u=r(2534),c=r(408),l="No one promise resolved";n({target:"Promise",stat:!0},{any:function(t){var e=this,r=a("AggregateError"),n=s.f(e),f=n.resolve,p=n.reject,h=u((function(){var n=i(e.resolve),a=[],s=0,u=1,h=!1;c(t,(function(t){var i=s++,c=!1;u++,o(n,e,t).then((function(t){c||h||(h=!0,f(t))}),(function(t){c||h||(c=!0,a[i]=t,--u||p(new r(a,l)))}))})),--u||p(new r(a,l))}));return h.error&&p(h.value),n.promise}})},4164:(t,e,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(3702).CONSTRUCTOR,a=r(2492),s=r(5005),u=r(614),c=r(8052),l=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&u(a)){var f=s("Promise").prototype.catch;l.catch!==f&&c(l,"catch",f,{unsafe:!0})}},3401:(t,e,r)=>{"use strict";var n,o,i,a=r(2109),s=r(1913),u=r(5268),c=r(7854),l=r(6916),f=r(8052),p=r(7674),h=r(8003),v=r(6340),d=r(9662),y=r(614),b=r(111),g=r(5787),m=r(6707),w=r(261).set,S=r(5948),x=r(842),P=r(2534),E=r(8572),O=r(9909),_=r(2492),T=r(3702),k=r(8523),j="Promise",C=T.CONSTRUCTOR,A=T.REJECTION_EVENT,I=T.SUBCLASSING,R=O.getterFor(j),U=O.set,N=_&&_.prototype,L=_,M=N,D=c.TypeError,B=c.document,z=c.process,H=k.f,F=H,K=!!(B&&B.createEvent&&c.dispatchEvent),V="unhandledrejection",G=function(t){var e;return!(!b(t)||!y(e=t.then))&&e},q=function(t,e){var r,n,o,i=e.value,a=1==e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&J(e),e.rejection=1),!0===s?r=i:(f&&f.enter(),r=s(i),f&&(f.exit(),o=!0)),r===t.promise?c(D("Promise-chain cycle")):(n=G(r))?l(n,r,u,c):u(r)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},W=function(t,e){t.notified||(t.notified=!0,S((function(){for(var r,n=t.reactions;r=n.get();)q(r,t);t.notified=!1,e&&!t.rejection&&X(t)})))},Z=function(t,e,r){var n,o;K?((n=B.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!A&&(o=c["on"+t])?o(n):t===V&&x("Unhandled promise rejection",r)},X=function(t){l(w,c,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=P((function(){u?z.emit("unhandledRejection",n,r):Z(V,r,n)})),t.rejection=u||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},J=function(t){l(w,c,(function(){var e=t.facade;u?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},Q=function(t,e,r){return function(n){t(e,n,r)}},$=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,W(t,!0))},tt=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw D("Promise can't be resolved itself");var n=G(e);n?S((function(){var r={done:!1};try{l(n,e,Q(tt,r,t),Q($,r,t))}catch(e){$(r,e,t)}})):(t.value=e,t.state=1,W(t,!1))}catch(e){$({done:!1},e,t)}}};if(C&&(M=(L=function(t){g(this,M),d(t),l(n,this);var e=R(this);try{t(Q(tt,e),Q($,e))}catch(t){$(e,t)}}).prototype,(n=function(t){U(this,{type:j,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=f(M,"then",(function(t,e){var r=R(this),n=H(m(this,L));return r.parent=!0,n.ok=!y(t)||t,n.fail=y(e)&&e,n.domain=u?z.domain:void 0,0==r.state?r.reactions.add(n):S((function(){q(n,r)})),n.promise})),o=function(){var t=new n,e=R(t);this.promise=t,this.resolve=Q(tt,e),this.reject=Q($,e)},k.f=H=function(t){return t===L||void 0===t?new o(t):F(t)},!s&&y(_)&&N!==Object.prototype)){i=N.then,I||f(N,"then",(function(t,e){var r=this;return new L((function(t,e){l(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete N.constructor}catch(t){}p&&p(N,M)}a({global:!0,constructor:!0,wrap:!0,forced:C},{Promise:L}),h(L,j,!1,!0),v(j)},7727:(t,e,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(2492),a=r(7293),s=r(5005),u=r(614),c=r(6707),l=r(9478),f=r(8052),p=i&&i.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){p.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),r=u(t);return this.then(r?function(r){return l(e,t()).then((function(){return r}))}:t,r?function(r){return l(e,t()).then((function(){throw r}))}:t)}}),!o&&u(i)){var h=s("Promise").prototype.finally;p.finally!==h&&f(p,"finally",h,{unsafe:!0})}},8674:(t,e,r)=>{r(3401),r(821),r(4164),r(6027),r(683),r(6294)},6027:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),s=r(2534),u=r(408);n({target:"Promise",stat:!0,forced:r(612)},{race:function(t){var e=this,r=a.f(e),n=r.reject,c=s((function(){var a=i(e.resolve);u(t,(function(t){o(a,e,t).then(r.resolve,n)}))}));return c.error&&n(c.value),r.promise}})},683:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(8523);n({target:"Promise",stat:!0,forced:r(3702).CONSTRUCTOR},{reject:function(t){var e=i.f(this);return o(e.reject,void 0,t),e.promise}})},6294:(t,e,r)=>{"use strict";var n=r(2109),o=r(5005),i=r(1913),a=r(2492),s=r(3702).CONSTRUCTOR,u=r(9478),c=o("Promise"),l=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(t){return u(l&&this===c?a:this,t)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,o=r(1340),i=r(9909),a=r(1656),s=r(6178),u="String Iterator",c=i.set,l=i.getterFor(u);a(String,"String",(function(t){c(this,{type:u,string:o(t),index:0})}),(function(){var t,e=l(this),r=e.string,o=e.index;return o>=r.length?s(void 0,!0):(t=n(r,o),e.index+=t.length,s(t,!1))}))},3948:(t,e,r)=>{var n=r(7854),o=r(8324),i=r(8509),a=r(6992),s=r(8880),u=r(5112),c=u("iterator"),l=u("toStringTag"),f=a.values,p=function(t,e){if(t){if(t[c]!==f)try{s(t,c,f)}catch(e){t[c]=f}if(t[l]||s(t,l,e),o[e])for(var r in a)if(t[r]!==a[r])try{s(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var h in o)p(n[h]&&n[h].prototype,h);p(i,"DOMTokenList")},1150:(t,e,r)=>{var n=r(7633);r(3948),t.exports=n},6909:function(t,e){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)},n=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};e.__esModule=!0,e.AbstractUploader=e.DEFAULT_RETRY_STRATEGY=e.DEFAULT_API_HOST=e.DEFAULT_RETRIES=e.MAX_CHUNK_SIZE=e.DEFAULT_CHUNK_SIZE=e.MIN_CHUNK_SIZE=void 0,e.MIN_CHUNK_SIZE=5242880,e.DEFAULT_CHUNK_SIZE=52428800,e.MAX_CHUNK_SIZE=134217728,e.DEFAULT_RETRIES=6,e.DEFAULT_API_HOST="ws.api.video";var i="";try{i="1.1.6"}catch(t){}e.DEFAULT_RETRY_STRATEGY=function(t){return function(e,r){return r.status&&r.status>=400&&r.status<500||e>=t?null:Math.floor(200+2e3*e*(e+1))}};var a=function(){function t(r){if(this.headers={},this.onProgressCallbacks=[],this.onPlayableCallbacks=[],this.abortControllers={},this.apiHost=r.apiHost||e.DEFAULT_API_HOST,r.hasOwnProperty("uploadToken")){var n=r;n.videoId&&(this.videoId=n.videoId),this.uploadEndpoint="https://".concat(this.apiHost,"/upload?token=").concat(n.uploadToken)}else if(r.hasOwnProperty("accessToken")){var o=r;if(!o.videoId)throw new Error("'videoId' is missing");this.refreshToken=o.refreshToken,this.uploadEndpoint="https://".concat(this.apiHost,"/videos/").concat(o.videoId,"/source"),this.headers.Authorization="Bearer ".concat(o.accessToken)}else{if(!r.hasOwnProperty("apiKey"))throw new Error("You must provide either an accessToken, an uploadToken or an API key");var a=r;if(!a.videoId)throw new Error("'videoId' is missing");this.uploadEndpoint="https://".concat(this.apiHost,"/videos/").concat(a.videoId,"/source"),this.headers.Authorization="Basic ".concat(btoa(a.apiKey+":"))}this.headers["AV-Origin-Client"]="typescript-uploader:"+i,this.retries=r.retries||e.DEFAULT_RETRIES,this.retryStrategy=r.retryStrategy||(0,e.DEFAULT_RETRY_STRATEGY)(this.retries),r.origin&&(r.origin.application&&(t.validateOrigin("application",r.origin.application),this.headers["AV-Origin-App"]="".concat(r.origin.application.name,":").concat(r.origin.application.version)),r.origin.sdk&&(t.validateOrigin("sdk",r.origin.sdk),this.headers["AV-Origin-Sdk"]="".concat(r.origin.sdk.name,":").concat(r.origin.sdk.version)))}return t.prototype.onProgress=function(t){this.onProgressCallbacks.push(t)},t.prototype.onPlayable=function(t){this.onPlayableCallbacks.push(t)},t.prototype.waitForPlayable=function(t){var e;return n(this,void 0,void 0,(function(){var r,n;return o(this,(function(o){switch(o.label){case 0:r=null===(e=t.assets)||void 0===e?void 0:e.hls,o.label=1;case 1:return[4,this.sleep(500)];case 2:return o.sent(),[4,fetch(r)];case 3:return 202===(n=o.sent()).status?[3,1]:[4,n.text()];case 4:return 0===o.sent().length?[3,1]:[3,5];case 5:return this.onPlayableCallbacks.forEach((function(e){return e(t)})),[2]}}))}))},t.prototype.parseErrorResponse=function(t){try{var e=JSON.parse(t.response);return r({status:t.status,raw:t.response},e)}catch(t){}return{status:t.status,raw:t.response,reason:"UNKWOWN"}},t.prototype.apiResponseToVideoUploadResponse=function(t){var e=r(r({},t),{_public:t.public,publishedAt:t.publishedAt?new Date(t.publishedAt):void 0,createdAt:t.createdAt?new Date(t.createdAt):void 0,updatedAt:t.updatedAt?new Date(t.updatedAt):void 0});return delete e.public,e},t.prototype.sleep=function(t){return new Promise((function(e,r){setTimeout((function(){return e()}),t)}))},t.prototype.xhrWithRetrier=function(t){var e=this;return this.withRetrier((function(r){return e.createXhrPromise(t,r)}))},t.prototype.createFormData=function(t,e,r,n){var o=r||n?t.slice(r,n):t,i=new FormData;return this.videoId&&i.append("videoId",this.videoId),i.append("file",o,e),i},t.prototype.doRefreshToken=function(){var t=this;return new Promise((function(e,r){var n=new window.XMLHttpRequest;n.open("POST","https://".concat(t.apiHost,"/auth/refresh"));for(var o=0,i=Object.keys(t.headers);o<i.length;o++){var a=i[o];"Authorization"!==a&&n.setRequestHeader(a,t.headers[a])}n.onreadystatechange=function(e){4===n.readyState&&n.status>=400&&r(t.parseErrorResponse(n))},n.onload=function(o){var i=JSON.parse(n.response);if(i.refresh_token&&i.access_token)return t.headers.Authorization="Bearer ".concat(i.access_token),t.refreshToken=i.refresh_token,void e();r(t.parseErrorResponse(n))},n.send(JSON.stringify({refreshToken:t.refreshToken}))}))},t.prototype.createXhrPromise=function(t,e){var r=this;return new Promise((function(n,o){var i=new window.XMLHttpRequest;i.open("POST","".concat(r.uploadEndpoint),!0),e.signal.addEventListener("abort",(function(){i.abort(),o({status:void 0,raw:void 0,reason:"ABORTED"})})),t.parts&&i.setRequestHeader("Content-Range","part ".concat(t.parts.currentPart,"/").concat(t.parts.totalParts));for(var a=0,s=Object.keys(r.headers);a<s.length;a++){var u=s[a];i.setRequestHeader(u,r.headers[u])}t.onProgress&&(i.upload.onprogress=function(e){return t.onProgress(e)}),i.onreadystatechange=function(a){if(4===i.readyState){if(401===i.status&&r.refreshToken)return r.doRefreshToken().then((function(){return r.createXhrPromise(t,e)})).then((function(t){return n(t)})).catch((function(t){return o(t)}));if(i.status>=400)return void o(r.parseErrorResponse(i))}},i.onerror=function(t){o({status:void 0,raw:void 0,reason:"NETWORK_ERROR"})},i.ontimeout=function(t){o({status:void 0,raw:void 0,reason:"NETWORK_TIMEOUT"})},i.onload=function(t){i.status<400&&n(r.apiResponseToVideoUploadResponse(JSON.parse(i.response)))},i.send(t.body)}))},t.prototype.withRetrier=function(t){var e=this,r=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),i=new AbortController;return this.abortControllers[r]=i,{cancel:function(){e.abortControllers[r].abort(),delete e.abortControllers[r]},result:new Promise((function(r,a){return n(e,void 0,void 0,(function(){var e,n,s,u;return o(this,(function(o){switch(o.label){case 0:e=0,o.label=1;case 1:o.label=2;case 2:return o.trys.push([2,4,,6]),[4,t(i)];case 3:return n=o.sent(),r(n),[2];case 4:return"ABORTED"===(s=o.sent()).reason||null===(u=this.retryStrategy(e,s))?(a(s),[2]):(console.log("video upload: ".concat(s.reason||"ERROR",", will be retried in ").concat(u," ms")),[4,this.sleep(u)]);case 5:return o.sent(),e++,[3,6];case 6:return[3,1];case 7:return[2]}}))}))}))}},t.validateOrigin=function(t,e){if(!e.name)throw new Error("".concat(t," name is required"));if(!e.version)throw new Error("".concat(t," version is required"));if(!/^[\w-]{1,50}$/.test(e.name))throw new Error("Invalid ".concat(t," name value. Allowed characters: A-Z, a-z, 0-9, '-', '_'. Max length: 50."));if(!/^\d{1,3}(\.\d{1,3}(\.\d{1,3})?)?$/.test(e.version))throw new Error("Invalid ".concat(t," version value. The version should match the xxx[.yyy][.zzz] pattern."))},t}();e.AbstractUploader=a},3607:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,o)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]});e.__esModule=!0,e.UploaderStaticWrapper=e.MAX_CHUNK_SIZE=e.MIN_CHUNK_SIZE=e.ProgressiveUploader=e.VideoUploader=void 0,n(e,r(3368),"VideoUploader"),n(e,r(9213),"ProgressiveUploader");var o=r(6909);n(e,o,"MIN_CHUNK_SIZE"),n(e,o,"MAX_CHUNK_SIZE"),n(e,r(944),"UploaderStaticWrapper")},9213:function(t,e,r){"use strict";var n,o=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),i=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};e.__esModule=!0,e.ProgressiveUploader=void 0;var s=r(6909),u=r(3828),c=function(t){function e(e){var r,n=this;return(n=t.call(this,e)||this).currentPartNum=1,n.currentPartBlobs=[],n.currentPartBlobsSize=0,n.queue=new u.PromiseQueue,n.canceled=!1,n.preventEmptyParts=e.preventEmptyParts||!1,n.fileName=e.videoName||"file",n.mergeSmallPartsBeforeUpload=null===(r=e.mergeSmallPartsBeforeUpload)||void 0===r||r,n}return o(e,t),e.prototype.uploadPart=function(t){var e,r=this;if(!this.mergeSmallPartsBeforeUpload&&t.size<s.MIN_CHUNK_SIZE)throw new Error("Each part must have a minimal size of 5MB. The current part has a size of ".concat(this.currentPartBlobsSize/1024/1024,"MB."));return this.currentPartBlobsSize+=t.size,this.currentPartBlobs.push(t),this.preventEmptyParts&&this.currentPartBlobsSize-t.size>=s.MIN_CHUNK_SIZE||!this.preventEmptyParts&&this.currentPartBlobsSize>=s.MIN_CHUNK_SIZE||!this.mergeSmallPartsBeforeUpload?(this.preventEmptyParts?(e=this.currentPartBlobs.slice(0,-1),this.currentPartBlobs=this.currentPartBlobs.slice(-1),this.currentPartBlobsSize=0===this.currentPartBlobs.length?0:this.currentPartBlobs[0].size):(e=this.currentPartBlobs,this.currentPartBlobs=[],this.currentPartBlobsSize=0),this.queue.add((function(){if(e.length>0){var t=r.upload(new Blob(e));r.currentChunkCancel=t.cancel;var n=t.result.then((function(t){return r.videoId=t.videoId,t}));return r.currentPartNum++,n}return new Promise((function(t){return t()}))}))):Promise.resolve()},e.prototype.cancel=function(){this.canceled=!0,this.currentChunkCancel&&this.currentChunkCancel()},e.prototype.uploadLastPart=function(t){return i(this,void 0,void 0,(function(){var e,r=this;return a(this,(function(n){switch(n.label){case 0:return this.currentPartBlobs.push(t),[4,this.queue.add((function(){var t=r.upload(new Blob(r.currentPartBlobs),!0);return r.currentChunkCancel=t.cancel,t.result}))];case 1:return e=n.sent(),this.onPlayableCallbacks.length>0&&this.waitForPlayable(e),[2,e]}}))}))},e.prototype.upload=function(t,e){var r=this;void 0===e&&(e=!1);var n=t.size,o=this.currentPartNum;if(this.canceled)throw new Error("Upload canceled");return this.xhrWithRetrier({body:this.createFormData(t,this.fileName),parts:{currentPart:o,totalParts:e?o:"*"},onProgress:function(t){return r.onProgressCallbacks.forEach((function(e){return e({part:o,uploadedBytes:t.loaded,totalBytes:n})}))}})},e}(s.AbstractUploader);e.ProgressiveUploader=c},3828:(t,e)=>{"use strict";e.__esModule=!0,e.PromiseQueue=void 0;var r=function(){function t(){this.working=!1,this.queue=[]}return t.prototype.add=function(t){var e=this;return new Promise((function(r,n){var o={provider:t,callback:function(t,e){return e?n(e):r(t)}};e.queue=e.queue.concat(o),e.working||(e.working=!0,e.dequeue())}))},t.prototype.dequeue=function(){var t=this;if(0!==this.queue.length){var e=this.queue.shift();e.provider.call(this).then((function(r){e.callback(r),t.dequeue()})).catch((function(r){e.callback(void 0,r),t.dequeue()}))}else this.working=!1},t}();e.PromiseQueue=r},944:function(t,e,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},n.apply(this,arguments)},o=this&&this.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function s(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,s)}u((n=n.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};e.__esModule=!0,e.UploaderStaticWrapper=void 0;var a=r(9213),s=r(3368),u=function(){function t(){}return t.setApplicationName=function(t,e){this.application={name:t,version:e}},t.setSdkName=function(t,e){this.sdk={name:t,version:e}},t.setChunkSize=function(t){this.chunkSize=t},t.createProgressiveUploadWithUploadTokenSession=function(t,e,r){return this.progressiveUploadCreationHelper({sessionId:t,uploadToken:e,videoId:r||void 0})},t.createProgressiveUploadWithApiKeySession=function(t,e,r){return this.progressiveUploadCreationHelper({s