Socket
Socket
Sign inDemoInstall

@api.video/video-uploader

Package Overview
Dependencies
1
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.8 to 1.0.9

3

CHANGELOG.md
# Changelog
All changes to this project will be documented in this file.
## [1.0.9] - 2022-05-24
- Progressive upload: prevent last part to be empty
## [1.0.8] - 2022-04-27

@@ -5,0 +8,0 @@ - Create a AbstractUploader

2

dist/index.js

@@ -1,1 +0,1 @@

!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(7854),o=r(614),i=r(6330),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(7854),o=r(4411),i=r(6330),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(7854),o=r(614),i=n.String,a=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),o=r(30),i=r(3070),a=n("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),t.exports=function(t){u[a][t]=!0}},5787:(t,e,r)=>{var n=r(7854),o=r(7976),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(7854),o=r(111),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(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 u,s=n(e),c=i(s),f=o(a,c);if(t&&r!=r){for(;c>f;)if((u=s[f++])!=u)return!0}else for(;c>f;f++)if((t||f in s)&&s[f]===r)return t||f||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(1702),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,r)=>{var n=r(7854),o=r(1694),i=r(614),a=r(4326),u=r(5112)("toStringTag"),s=n.Object,c="Arguments"==a(function(){return arguments}());t.exports=o?a: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),u))?r:c?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},7741:(t,e,r)=>{var n=r(1702),o=Error,i=n("".replace),a=String(o("zxcasd").stack),u=/\n\s*at [^:]*:[^\n]*/,s=u.test(a);t.exports=function(t,e){if(s&&"string"==typeof t&&!o.prepareStackTrace)for(;e--;)t=i(t,u,"");return t}},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 u=o(e),s=a.f,c=i.f,f=0;f<u.length;f++){var p=u[f];n(t,p)||r&&n(r,p)||s(t,p,c(e,p))}}},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}))},4994:(t,e,r)=>{"use strict";var n=r(3383).IteratorPrototype,o=r(30),i=r(9114),a=r(8003),u=r(7497),s=function(){return this};t.exports=function(t,e,r,c){var f=e+" Iterator";return t.prototype=o(n,{next:i(+!c,r)}),a(t,f,!1,!0),u[f]=s,t}},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}}},654:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(1913),a=r(6530),u=r(614),s=r(4994),c=r(9518),f=r(7674),p=r(8003),l=r(8880),v=r(1320),h=r(5112),d=r(7497),y=r(3383),b=a.PROPER,g=a.CONFIGURABLE,m=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,x=h("iterator"),S="keys",P="values",O="entries",_=function(){return this};t.exports=function(t,e,r,a,h,y,E){s(r,e,a);var T,j,k,I=function(t){if(t===h&&U)return U;if(!w&&t in R)return R[t];switch(t){case S:case P:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},A=e+" Iterator",C=!1,R=t.prototype,N=R[x]||R["@@iterator"]||h&&R[h],U=!w&&N||I(h),L="Array"==e&&R.entries||N;if(L&&(T=c(L.call(new t)))!==Object.prototype&&T.next&&(i||c(T)===m||(f?f(T,m):u(T[x])||v(T,x,_)),p(T,A,!0,!0),i&&(d[A]=_)),b&&h==P&&N&&N.name!==P&&(!i&&g?l(R,"name",P):(C=!0,U=function(){return o(N,this)})),h)if(j={values:I(P),keys:y?U:I(S),entries:I(O)},E)for(k in j)(w||C||!(k in R))&&v(R,k,j[k]);else n({target:e,proto:!0,forced:w||C},j);return i&&!E||R[x]===U||v(R,x,U,{name:h}),d[e]=U,j}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},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=>{t.exports="object"==typeof window&&"object"!=typeof Deno},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),u=i.process,s=i.Deno,c=u&&u.versions||s&&s.version,f=c&&c.v8;f&&(o=(n=f.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"]},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(1320),u=r(3505),s=r(9920),c=r(4705);t.exports=function(t,e){var r,f,p,l,v,h=t.target,d=t.global,y=t.stat;if(r=d?n:y?n[h]||u(h,{}):(n[h]||{}).prototype)for(f in e){if(l=e[f],p=t.noTargetGet?(v=o(r,f))&&v.value:r[f],!c(d?f:h+(y?".":"#")+f,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;s(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),a(r,f,l,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,u=o(i,"name"),s=u&&"something"===function(){}.name,c=u&&(!n||n&&a(i,"name").configurable);t.exports={EXISTS:u,PROPER:s,CONFIGURABLE:c}},1702:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.bind,a=o.call,u=n&&i.bind(a,a);t.exports=n?function(t){return t&&u(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},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(7497),a=r(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},8554:(t,e,r)=>{var n=r(7854),o=r(6916),i=r(9662),a=r(9670),u=r(6330),s=r(1246),c=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?s(t):e;if(i(r))return a(o(r,t));throw c(u(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662);t.exports=function(t,e){var r=t[e];return null==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(7854),o=r(1702),i=r(7293),a=r(4326),u=n.Object,s=o("".split);t.exports=i((function(){return!u("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?s(t,""):u(t)}:u},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(8536),u=r(7854),s=r(1702),c=r(111),f=r(8880),p=r(2597),l=r(5465),v=r(6200),h=r(3501),d="Object already initialized",y=u.TypeError,b=u.WeakMap;if(a||l.state){var g=l.state||(l.state=new b),m=s(g.get),w=s(g.has),x=s(g.set);n=function(t,e){if(w(g,t))throw new y(d);return e.facade=t,x(g,t,e),e},o=function(t){return m(g,t)||{}},i=function(t){return w(g,t)}}else{var S=v("state");h[S]=!0,n=function(t,e){if(p(t,S))throw new y(d);return e.facade=t,f(t,S,e),e},o=function(t){return p(t,S)?t[S]:{}},i=function(t){return p(t,S)}}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(!c(e)||(r=o(e)).type!==t)throw y("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=>{t.exports=function(t){return"function"==typeof t}},4411:(t,e,r)=>{var n=r(1702),o=r(7293),i=r(614),a=r(648),u=r(5005),s=r(2788),c=function(){},f=[],p=u("Reflect","construct"),l=/^\s*(?:class|function)\b/,v=n(l.exec),h=!l.exec(c),d=function(t){if(!i(t))return!1;try{return p(c,f,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 h||!!v(l,s(t))}catch(t){return!0}};y.sham=!0,t.exports=!p||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=s[u(t)];return r==f||r!=c&&(o(e)?n(e):!!e)},u=a.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=a.data={},c=a.NATIVE="N",f=a.POLYFILL="P";t.exports=a},111:(t,e,r)=>{var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},2190:(t,e,r)=>{var n=r(7854),o=r(5005),i=r(614),a=r(7976),u=r(3307),s=n.Object;t.exports=u?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,s(t))}},408:(t,e,r)=>{var n=r(7854),o=r(9974),i=r(6916),a=r(9670),u=r(6330),s=r(7659),c=r(6244),f=r(7976),p=r(8554),l=r(1246),v=r(9212),h=n.TypeError,d=function(t,e){this.stopped=t,this.result=e},y=d.prototype;t.exports=function(t,e,r){var n,b,g,m,w,x,S,P=r&&r.that,O=!(!r||!r.AS_ENTRIES),_=!(!r||!r.IS_ITERATOR),E=!(!r||!r.INTERRUPTED),T=o(e,P),j=function(t){return n&&v(n,"normal",t),new d(!0,t)},k=function(t){return O?(a(t),E?T(t[0],t[1],j):T(t[0],t[1])):E?T(t,j):T(t)};if(_)n=t;else{if(!(b=l(t)))throw h(u(t)+" is not iterable");if(s(b)){for(g=0,m=c(t);m>g;g++)if((w=k(t[g]))&&f(y,w))return w;return new d(!1)}n=p(t,b)}for(x=n.next;!(S=i(x,n)).done;){try{w=k(S.value)}catch(t){v(n,"throw",t)}if("object"==typeof w&&w&&f(y,w))return w}return new d(!1)}},9212:(t,e,r)=>{var n=r(6916),o=r(9670),i=r(8173);t.exports=function(t,e,r){var a,u;o(t);try{if(!(a=i(t,"return"))){if("throw"===e)throw r;return r}a=n(a,t)}catch(t){u=!0,a=t}if("throw"===e)throw r;if(u)throw a;return o(a),r}},3383:(t,e,r)=>{"use strict";var n,o,i,a=r(7293),u=r(614),s=r(30),c=r(9518),f=r(1320),p=r(5112),l=r(1913),v=p("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(n=o):h=!0),null==n||a((function(){var t={};return n[v].call(t)!==t}))?n={}:l&&(n=s(n)),u(n[v])||f(n,v,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},5948:(t,e,r)=>{var n,o,i,a,u,s,c,f,p=r(7854),l=r(9974),v=r(1236).f,h=r(261).set,d=r(6833),y=r(1528),b=r(1036),g=r(5268),m=p.MutationObserver||p.WebKitMutationObserver,w=p.document,x=p.process,S=p.Promise,P=v(p,"queueMicrotask"),O=P&&P.value;O||(n=function(){var t,e;for(g&&(t=x.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&&S&&S.resolve?((c=S.resolve(void 0)).constructor=S,f=l(c.then,c),a=function(){f(n)}):g?a=function(){x.nextTick(n)}:(h=l(h,p),a=function(){h(n)}):(u=!0,s=w.createTextNode(""),new m(n).observe(s,{characterData:!0}),a=function(){s.data=u=!u})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},133:(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}))},8536:(t,e,r)=>{var n=r(7854),o=r(614),i=r(2788),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:(t,e,r)=>{"use strict";var n=r(9662),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(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),u=r(3501),s=r(490),c=r(317),f=r(6200)("IE_PROTO"),p=function(){},l=function(t){return"<script>"+t+"<\/script>"},v=function(t){t.write(l("")),t.close();var e=t.parentWindow.Object;return t=null,e},h=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;h="undefined"!=typeof document?document.domain&&n?v(n):((e=c("iframe")).style.display="none",s.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(l("document.F=Object")),t.close(),t.F):v(n);for(var r=a.length;r--;)delete h.prototype[a[r]];return h()};u[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=t):r=h(),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),u=r(5656),s=r(1956);e.f=n&&!o?Object.defineProperties:function(t,e){a(t);for(var r,n=u(e),o=s(e),c=o.length,f=0;c>f;)i.f(t,r=o[f++],n[r]);return t}},3070:(t,e,r)=>{var n=r(7854),o=r(9781),i=r(4664),a=r(3353),u=r(9670),s=r(4948),c=n.TypeError,f=Object.defineProperty,p=Object.getOwnPropertyDescriptor;e.f=o?a?function(t,e,r){if(u(t),e=s(e),u(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=p(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 f(t,e,r)}:f:function(t,e,r){if(u(t),e=s(e),u(r),i)try{return f(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("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),u=r(5656),s=r(4948),c=r(2597),f=r(4664),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=u(t),e=s(e),f)try{return p(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(7854),o=r(2597),i=r(614),a=r(7908),u=r(6200),s=r(8544),c=u("IE_PROTO"),f=n.Object,p=f.prototype;t.exports=s?f.getPrototypeOf:function(t){var e=a(t);if(o(e,c))return e[c];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof f?p: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,u=r(3501),s=n([].push);t.exports=function(t,e){var r,n=i(t),c=0,f=[];for(r in n)!o(u,r)&&o(n,r)&&s(f,r);for(;e.length>c;)o(n,r=e[c++])&&(~a(f,r)||s(f,r));return f}},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(7854),o=r(6916),i=r(614),a=r(111),u=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!a(n=o(r,t)))return n;if(i(r=t.valueOf)&&!a(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!a(n=o(r,t)))return n;throw u("Can't convert object to primitive value")}},3887:(t,e,r)=>{var n=r(5005),o=r(1702),i=r(8006),a=r(5181),u=r(9670),s=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(u(t)),r=a.f;return r?s(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),u=r(2788),s=r(5112),c=r(7871),f=r(1913),p=r(7392),l=o&&o.prototype,v=s("species"),h=!1,d=i(n.PromiseRejectionEvent),y=a("Promise",(function(){var t=u(o),e=t!==String(o);if(!e&&66===p)return!0;if(f&&(!l.catch||!l.finally))return!0;if(p>=51&&/native code/.test(t))return!1;var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[v]=n,!(h=r.then((function(){}))instanceof n)||!e&&c&&!d}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:d,SUBCLASSING:h}},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},2248:(t,e,r)=>{var n=r(1320);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},1320:(t,e,r)=>{var n=r(7854),o=r(614),i=r(2597),a=r(8880),u=r(3505),s=r(2788),c=r(9909),f=r(6530).CONFIGURABLE,p=c.get,l=c.enforce,v=String(String).split("String");(t.exports=function(t,e,r,s){var c,p=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet,y=s&&void 0!==s.name?s.name:e;o(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||f&&r.name!==y)&&a(r,"name",y),(c=l(r)).source||(c.source=v.join("string"==typeof y?y:""))),t!==n?(p?!d&&t[e]&&(h=!0):delete t[e],h?t[e]=r:a(t,e,r)):h?t[e]=r:u(e,r)})(Function.prototype,"toString",(function(){return o(this)&&p(this).source||s(this)}))},4488:(t,e,r)=>{var n=r(7854).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},3505:(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}},6340:(t,e,r)=>{"use strict";var n=r(5005),o=r(3070),i=r(5112),a=r(9781),u=i("species");t.exports=function(t){var e=n(t),r=o.f;a&&e&&!e[u]&&r(e,u,{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(3505),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.22.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,r)=>{var n=r(9670),o=r(9483),i=r(5112)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?e:o(r)}},8710:(t,e,r)=>{var n=r(1702),o=r(9303),i=r(1340),a=r(4488),u=n("".charAt),s=n("".charCodeAt),c=n("".slice),f=function(t){return function(e,r){var n,f,p=i(a(e)),l=o(r),v=p.length;return l<0||l>=v?t?"":void 0:(n=s(p,l))<55296||n>56319||l+1===v||(f=s(p,l+1))<56320||f>57343?t?u(p,l):n:t?c(p,l,l+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},261:(t,e,r)=>{var n,o,i,a,u=r(7854),s=r(2104),c=r(9974),f=r(614),p=r(2597),l=r(7293),v=r(490),h=r(206),d=r(317),y=r(8053),b=r(6833),g=r(5268),m=u.setImmediate,w=u.clearImmediate,x=u.process,S=u.Dispatch,P=u.Function,O=u.MessageChannel,_=u.String,E=0,T={};try{n=u.location}catch(t){}var j=function(t){if(p(T,t)){var e=T[t];delete T[t],e()}},k=function(t){return function(){j(t)}},I=function(t){j(t.data)},A=function(t){u.postMessage(_(t),n.protocol+"//"+n.host)};m&&w||(m=function(t){y(arguments.length,1);var e=f(t)?t:P(t),r=h(arguments,1);return T[++E]=function(){s(e,void 0,r)},o(E),E},w=function(t){delete T[t]},g?o=function(t){x.nextTick(k(t))}:S&&S.now?o=function(t){S.now(k(t))}:O&&!b?(a=(i=new O).port2,i.port1.onmessage=I,o=c(a.postMessage,a)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!l(A)?(o=A,u.addEventListener("message",I,!1)):o="onreadystatechange"in d("script")?function(t){v.appendChild(d("script")).onreadystatechange=function(){v.removeChild(this),j(t)}}:function(t){setTimeout(k(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=>{var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!=n||0===n?0:(n>0?r:e)(n)}},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(7854),o=r(4488),i=n.Object;t.exports=function(t){return i(o(t))}},7593:(t,e,r)=>{var n=r(7854),o=r(6916),i=r(111),a=r(2190),u=r(8173),s=r(2140),c=r(5112),f=n.TypeError,p=c("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,n=u(t,p);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||a(r))return r;throw f("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(7854),o=r(648),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:(t,e,r)=>{var n=r(7854).String;t.exports=function(t){try{return n(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(133);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,e,r)=>{var n=r(7854).TypeError;t.exports=function(t,e){if(t<e)throw n("Not enough arguments");return t}},5112:(t,e,r)=>{var n=r(7854),o=r(2309),i=r(2597),a=r(9711),u=r(133),s=r(3307),c=o("wks"),f=n.Symbol,p=f&&f.for,l=s?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(c,t)||!u&&"string"!=typeof c[t]){var e="Symbol."+t;u&&i(f,t)?c[t]=f[t]:c[t]=s&&p?p(e):l(e)}return c[t]}},6967:(t,e,r)=>{"use strict";var n=r(2109),o=r(7854),i=r(7976),a=r(9518),u=r(7674),s=r(9920),c=r(30),f=r(8880),p=r(9114),l=r(7741),v=r(8340),h=r(408),d=r(6277),y=r(5112),b=r(2914),g=y("toStringTag"),m=o.Error,w=[].push,x=function(t,e){var r,n=arguments.length>2?arguments[2]:void 0,o=i(S,this);u?r=u(new m,o?a(this):S):(r=o?this:c(S),f(r,g,"Error")),void 0!==e&&f(r,"message",d(e)),b&&f(r,"stack",l(r.stack,1)),v(r,n);var s=[];return h(t,w,{that:s}),f(r,"errors",s),r};u?u(x,m):s(x,m,{name:!0});var S=x.prototype=c(m.prototype,{constructor:p(1,x),message:p(1,""),name:p(1,"AggregateError")});n({global:!0},{AggregateError:x})},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),u=r(3070).f,s=r(654),c=r(1913),f=r(9781),p="Array Iterator",l=a.set,v=a.getterFor(p);t.exports=s(Array,"Array",(function(t,e){l(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,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");var h=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!c&&f&&"values"!==h.name)try{u(h,"name",{value:"values"})}catch(t){}},1539:(t,e,r)=>{var n=r(1694),o=r(1320),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),u=r(2534),s=r(408);n({target:"Promise",stat:!0},{allSettled:function(t){var e=this,r=a.f(e),n=r.resolve,c=r.reject,f=u((function(){var r=i(e.resolve),a=[],u=0,c=1;s(t,(function(t){var i=u++,s=!1;c++,o(r,e,t).then((function(t){s||(s=!0,a[i]={status:"fulfilled",value:t},--c||n(a))}),(function(t){s||(s=!0,a[i]={status:"rejected",reason:t},--c||n(a))}))})),--c||n(a)}));return f.error&&c(f.value),r.promise}})},821:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(8523),u=r(2534),s=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,f=u((function(){var r=i(e.resolve),a=[],u=0,f=1;s(t,(function(t){var i=u++,s=!1;f++,o(r,e,t).then((function(t){s||(s=!0,a[i]=t,--f||n(a))}),c)})),--f||n(a)}));return f.error&&c(f.value),r.promise}})},4668:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(9662),a=r(5005),u=r(8523),s=r(2534),c=r(408),f="No one promise resolved";n({target:"Promise",stat:!0},{any:function(t){var e=this,r=a("AggregateError"),n=u.f(e),p=n.resolve,l=n.reject,v=s((function(){var n=i(e.resolve),a=[],u=0,s=1,v=!1;c(t,(function(t){var i=u++,c=!1;s++,o(n,e,t).then((function(t){c||v||(v=!0,p(t))}),(function(t){c||v||(c=!0,a[i]=t,--s||l(new r(a,f)))}))})),--s||l(new r(a,f))}));return v.error&&l(v.value),n.promise}})},4164:(t,e,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(3702).CONSTRUCTOR,a=r(2492),u=r(5005),s=r(614),c=r(1320),f=a&&a.prototype;if(n({target:"Promise",proto:!0,forced:i,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&s(a)){var p=u("Promise").prototype.catch;f.catch!==p&&c(f,"catch",p,{unsafe:!0})}},3401:(t,e,r)=>{"use strict";var n,o,i,a=r(2109),u=r(1913),s=r(5268),c=r(7854),f=r(6916),p=r(1320),l=r(2248),v=r(7674),h=r(8003),d=r(6340),y=r(9662),b=r(614),g=r(111),m=r(5787),w=r(6707),x=r(261).set,S=r(5948),P=r(842),O=r(2534),_=r(8572),E=r(9909),T=r(2492),j=r(3702),k=r(8523),I="Promise",A=j.CONSTRUCTOR,C=j.REJECTION_EVENT,R=j.SUBCLASSING,N=E.getterFor(I),U=E.set,L=T&&T.prototype,M=T,F=L,z=c.TypeError,D=c.document,H=c.process,B=k.f,G=B,K=!!(D&&D.createEvent&&c.dispatchEvent),q="unhandledrejection",V=function(t){var e;return!(!g(t)||!b(e=t.then))&&e},Z=function(t,e){var r,n,o,i=e.value,a=1==e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,p=t.domain;try{u?(a||(2===e.rejection&&Q(e),e.rejection=1),!0===u?r=i:(p&&p.enter(),r=u(i),p&&(p.exit(),o=!0)),r===t.promise?c(z("Promise-chain cycle")):(n=V(r))?f(n,r,s,c):s(r)):c(i)}catch(t){p&&!o&&p.exit(),c(t)}},X=function(t,e){t.notified||(t.notified=!0,S((function(){for(var r,n=t.reactions;r=n.get();)Z(r,t);t.notified=!1,e&&!t.rejection&&J(t)})))},W=function(t,e,r){var n,o;K?((n=D.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!C&&(o=c["on"+t])?o(n):t===q&&P("Unhandled promise rejection",r)},J=function(t){f(x,c,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=O((function(){s?H.emit("unhandledRejection",n,r):W(q,r,n)})),t.rejection=s||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){f(x,c,(function(){var e=t.facade;s?H.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},$=function(t,e,r){return function(n){t(e,n,r)}},tt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,X(t,!0))},et=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw z("Promise can't be resolved itself");var n=V(e);n?S((function(){var r={done:!1};try{f(n,e,$(et,r,t),$(tt,r,t))}catch(e){tt(r,e,t)}})):(t.value=e,t.state=1,X(t,!1))}catch(e){tt({done:!1},e,t)}}};if(A&&(F=(M=function(t){m(this,F),y(t),f(n,this);var e=N(this);try{t($(et,e),$(tt,e))}catch(t){tt(e,t)}}).prototype,(n=function(t){U(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new _,rejection:!1,state:0,value:void 0})}).prototype=l(F,{then:function(t,e){var r=N(this),n=B(w(this,M));return r.parent=!0,n.ok=!b(t)||t,n.fail=b(e)&&e,n.domain=s?H.domain:void 0,0==r.state?r.reactions.add(n):S((function(){Z(n,r)})),n.promise}}),o=function(){var t=new n,e=N(t);this.promise=t,this.resolve=$(et,e),this.reject=$(tt,e)},k.f=B=function(t){return t===M||void 0===t?new o(t):G(t)},!u&&b(T)&&L!==Object.prototype)){i=L.then,R||p(L,"then",(function(t,e){var r=this;return new M((function(t,e){f(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete L.constructor}catch(t){}v&&v(L,F)}a({global:!0,wrap:!0,forced:A},{Promise:M}),h(M,I,!1,!0),d(I)},7727:(t,e,r)=>{"use strict";var n=r(2109),o=r(1913),i=r(2492),a=r(7293),u=r(5005),s=r(614),c=r(6707),f=r(9478),p=r(1320),l=i&&i.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){l.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,u("Promise")),r=s(t);return this.then(r?function(r){return f(e,t()).then((function(){return r}))}:t,r?function(r){return f(e,t()).then((function(){throw r}))}:t)}}),!o&&s(i)){var v=u("Promise").prototype.finally;l.finally!==v&&p(l,"finally",v,{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),u=r(2534),s=r(408);n({target:"Promise",stat:!0,forced:r(612)},{race:function(t){var e=this,r=a.f(e),n=r.reject,c=u((function(){var a=i(e.resolve);s(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),u=r(3702).CONSTRUCTOR,s=r(9478),c=o("Promise"),f=i&&!u;n({target:"Promise",stat:!0,forced:i||u},{resolve:function(t){return s(f&&this===c?a:this,t)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,o=r(1340),i=r(9909),a=r(654),u="String Iterator",s=i.set,c=i.getterFor(u);a(String,"String",(function(t){s(this,{type:u,string:o(t),index:0})}),(function(){var t,e=c(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},3948:(t,e,r)=>{var n=r(7854),o=r(8324),i=r(8509),a=r(6992),u=r(8880),s=r(5112),c=s("iterator"),f=s("toStringTag"),p=a.values,l=function(t,e){if(t){if(t[c]!==p)try{u(t,c,p)}catch(e){t[c]=p}if(t[f]||u(t,f,e),o[e])for(var r in a)if(t[r]!==a[r])try{u(t,r,a[r])}catch(e){t[r]=a[r]}}};for(var v in o)l(n[v]&&n[v].prototype,v);l(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{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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,u])}}};e.__esModule=!0,e.AbstractUploader=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=5,e.DEFAULT_API_HOST="ws.api.video";var i="";try{i="1.0.8"}catch(t){}var a=function(){function t(t){if(this.headers={},this.onProgressCallbacks=[],this.apiHost=t.apiHost||e.DEFAULT_API_HOST,t.hasOwnProperty("uploadToken")){var r=t;r.videoId&&(this.videoId=r.videoId),this.uploadEndpoint="https://".concat(this.apiHost,"/upload?token=").concat(r.uploadToken)}else if(t.hasOwnProperty("accessToken")){var n=t;if(!n.videoId)throw new Error("'videoId' is missing");this.refreshToken=n.refreshToken,this.uploadEndpoint="https://".concat(this.apiHost,"/videos/").concat(n.videoId,"/source"),this.headers.Authorization="Bearer ".concat(n.accessToken)}else{if(!t.hasOwnProperty("apiKey"))throw new Error("You must provide either an accessToken, an uploadToken or an API key");var o=t;if(!o.videoId)throw new Error("'videoId' is missing");this.uploadEndpoint="https://".concat(this.apiHost,"/videos/").concat(o.videoId,"/source"),this.headers.Authorization="Basic ".concat(btoa(o.apiKey+":"))}this.headers["AV-Origin-Client"]="typescript-uploader:"+i,this.retries=t.retries||e.DEFAULT_RETRIES}return t.prototype.onProgress=function(t){this.onProgressCallbacks.push(t)},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(){return e.createXhrPromise(t)}))},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")),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){var e=this;return new Promise((function(r,n){var o=new window.XMLHttpRequest;o.open("POST","".concat(e.uploadEndpoint),!0),t.parts&&o.setRequestHeader("Content-Range","part ".concat(t.parts.currentPart,"/").concat(t.parts.totalParts));for(var i=0,a=Object.keys(e.headers);i<a.length;i++){var u=a[i];o.setRequestHeader(u,e.headers[u])}t.onProgress&&(o.upload.onprogress=function(e){return t.onProgress(e)}),o.onreadystatechange=function(i){if(4===o.readyState){if(401===o.status&&e.refreshToken)return e.doRefreshToken().then((function(){return e.createXhrPromise(t)})).then((function(t){return r(t)})).catch((function(t){return n(t)}));if(o.status>=400)return void n(e.parseErrorResponse(o))}},o.onload=function(t){o.status<400&&r(e.apiResponseToVideoUploadResponse(JSON.parse(o.response)))},o.send(t.body)}))},t.prototype.withRetrier=function(t){return n(this,void 0,void 0,(function(){var e=this;return o(this,(function(r){return[2,new Promise((function(r,i){return n(e,void 0,void 0,(function(){var e,n,a;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()];case 3:return n=o.sent(),r(n),[2];case 4:return 401===(a=o.sent()).status||e>=this.retries?(i(a),[2]):[4,this.sleep(200+500*e)];case 5:return o.sent(),e++,[3,6];case 6:return[3,1];case 7:return[2]}}))}))}))]}))}))},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.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")},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{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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,u])}}};e.__esModule=!0,e.ProgressiveUploader=void 0;var u=r(6909),s=r(3828),c=function(t){function e(e){var r=t.call(this,e)||this;return r.currentPartNum=1,r.currentPartBlobs=[],r.currentPartBlobsSize=0,r.queue=new s.PromiseQueue,r}return o(e,t),e.prototype.uploadPart=function(t){var e=this;return this.currentPartBlobsSize+=t.size,this.currentPartBlobs.push(t),this.currentPartBlobsSize>=u.MIN_CHUNK_SIZE?this.queue.add((function(){var t=e.upload(new Blob(e.currentPartBlobs)).then((function(t){e.videoId=t.videoId}));return e.currentPartNum++,e.currentPartBlobs=[],e.currentPartBlobsSize=0,t})):Promise.resolve()},e.prototype.uploadLastPart=function(t){var e=this;return this.currentPartBlobs.push(t),this.queue.add((function(){return e.upload(new Blob(e.currentPartBlobs),!0)}))},e.prototype.upload=function(t,e){return void 0===e&&(e=!1),i(this,void 0,void 0,(function(){var r,n=this;return a(this,(function(o){return r=t.size,[2,this.xhrWithRetrier({body:this.createFormData(t,"file"),parts:{currentPart:this.currentPartNum,totalParts:e?this.currentPartNum:"*"},onProgress:function(t){return n.onProgressCallbacks.forEach((function(e){return e({uploadedBytes:t.loaded,totalBytes:r})}))}})]}))}))},e}(u.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},3368: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{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((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:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){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,u])}}};e.__esModule=!0,e.VideoUploader=void 0;var u=r(6909),s=function(t){function e(e){var r=t.call(this,e)||this;if(!e.file)throw new Error("'file' is missing");if(e.chunkSize&&(e.chunkSize<u.MIN_CHUNK_SIZE||e.chunkSize>u.MAX_CHUNK_SIZE))throw new Error("Invalid chunk size. Minimal allowed value: ".concat(u.MIN_CHUNK_SIZE/1024/1024,"MB, maximum allowed value: ").concat(u.MAX_CHUNK_SIZE/1024/1024,"MB."));return r.chunkSize=e.chunkSize||u.DEFAULT_CHUNK_SIZE,r.file=e.file,r.fileSize=r.file.size,r.fileName=r.file.name,r.chunksCount=Math.ceil(r.fileSize/r.chunkSize),r}return o(e,t),e.prototype.upload=function(){return i(this,void 0,void 0,(function(){var t,e;return a(this,(function(r){switch(r.label){case 0:e=0,r.label=1;case 1:return e<this.chunksCount?[4,this.uploadCurrentChunk(e)]:[3,4];case 2:t=r.sent(),this.videoId=t.videoId,r.label=3;case 3:return e++,[3,1];case 4:return[2,t]}}))}))},e.prototype.uploadCurrentChunk=function(t){var e=this,r=t*this.chunkSize,n=(t+1)*this.chunkSize,o=n>this.fileSize?this.fileSize:n,i=Math.ceil(this.fileSize/this.chunkSize);return this.xhrWithRetrier({onProgress:function(n){return e.onProgressCallbacks.forEach((function(o){return o(function(n){return{uploadedBytes:n.loaded+r,totalBytes:e.fileSize,chunksCount:e.chunksCount,chunksBytes:e.chunkSize,currentChunk:t+1,currentChunkUploadedBytes:n.loaded}}(n))}))},body:this.createFormData(this.file,this.fileName,r,o),parts:{currentPart:t+1,totalParts:i}})},e}(u.AbstractUploader);e.VideoUploader=s}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(1150),r(3607)})()));
!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(7854),o=r(614),i=r(6330),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a function")}},9483:(t,e,r)=>{var n=r(7854),o=r(4411),i=r(6330),a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(t)+" is not a constructor")}},6077:(t,e,r)=>{var n=r(7854),o=r(614),i=n.String,a=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw a("Can't set "+i(t)+" as a prototype")}},1223:(t,e,r)=>{var n=r(5112),o=r(30),i=r(3070),a=n("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),t.exports=function(t){s[a][t]=!0}},5787:(t,e,r)=>{var n=r(7854),o=r(7976),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},9670:(t,e,r)=>{var n=r(7854),o=r(111),i=n.String,a=n.TypeError;t.exports=function(t){if(o(t))return t;throw a(i(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),f=o(a,c);if(t&&r!=r){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===r)return t||f||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(1702),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},648:(t,e,r)=>{var n=r(7854),o=r(1694),i=r(614),a=r(4326),s=r(5112)("toStringTag"),u=n.Object,c="Arguments"==a(function(){return arguments}());t.exports=o?a: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=u(t),s))?r:c?a(e):"Object"==(n=a(e))&&i(e.callee)?"Arguments":n}},7741:(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}},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,f=0;f<s.length;f++){var p=s[f];n(t,p)||r&&n(r,p)||u(t,p,c(e,p))}}},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}))},4994:(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 f=e+" Iterator";return t.prototype=o(n,{next:i(+!c,r)}),a(t,f,!1,!0),s[f]=u,t}},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}}},654:(t,e,r)=>{"use strict";var n=r(2109),o=r(6916),i=r(1913),a=r(6530),s=r(614),u=r(4994),c=r(9518),f=r(7674),p=r(8003),l=r(8880),h=r(1320),v=r(5112),d=r(7497),y=r(3383),b=a.PROPER,g=a.CONFIGURABLE,m=y.IteratorPrototype,w=y.BUGGY_SAFARI_ITERATORS,x=v("iterator"),S="keys",P="values",O="entries",E=function(){return this};t.exports=function(t,e,r,a,v,y,_){u(r,e,a);var T,j,k,I=function(t){if(t===v&&U)return U;if(!w&&t in R)return R[t];switch(t){case S:case P:case O:return function(){return new r(this,t)}}return function(){return new r(this)}},A=e+" Iterator",C=!1,R=t.prototype,N=R[x]||R["@@iterator"]||v&&R[v],U=!w&&N||I(v),M="Array"==e&&R.entries||N;if(M&&(T=c(M.call(new t)))!==Object.prototype&&T.next&&(i||c(T)===m||(f?f(T,m):s(T[x])||h(T,x,E)),p(T,A,!0,!0),i&&(d[A]=E)),b&&v==P&&N&&N.name!==P&&(!i&&g?l(R,"name",P):(C=!0,U=function(){return o(N,this)})),v)if(j={values:I(P),keys:y?U:I(S),entries:I(O)},_)for(k in j)(w||C||!(k in R))&&h(R,k,j[k]);else n({target:e,proto:!0,forced:w||C},j);return i&&!_||R[x]===U||h(R,x,U,{name:v}),d[e]=U,j}},9781:(t,e,r)=>{var n=r(7293);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},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=>{t.exports="object"==typeof window&&"object"!=typeof Deno},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,f=c&&c.v8;f&&(o=(n=f.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"]},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(1320),s=r(3505),u=r(9920),c=r(4705);t.exports=function(t,e){var r,f,p,l,h,v=t.target,d=t.global,y=t.stat;if(r=d?n:y?n[v]||s(v,{}):(n[v]||{}).prototype)for(f in e){if(l=e[f],p=t.noTargetGet?(h=o(r,f))&&h.value:r[f],!c(d?f:v+(y?".":"#")+f,t.forced)&&void 0!==p){if(typeof l==typeof p)continue;u(l,p)}(t.sham||p&&p.sham)&&i(l,"sham",!0),a(r,f,l,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}},1702:(t,e,r)=>{var n=r(4374),o=Function.prototype,i=o.bind,a=o.call,s=n&&i.bind(a,a);t.exports=n?function(t){return t&&s(t)}:function(t){return t&&function(){return a.apply(t,arguments)}}},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(7497),a=r(5112)("iterator");t.exports=function(t){if(null!=t)return o(t,a)||o(t,"@@iterator")||i[n(t)]}},8554:(t,e,r)=>{var n=r(7854),o=r(6916),i=r(9662),a=r(9670),s=r(6330),u=r(1246),c=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?u(t):e;if(i(r))return a(o(r,t));throw c(s(t)+" is not iterable")}},8173:(t,e,r)=>{var n=r(9662);t.exports=function(t,e){var r=t[e];return null==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(7854),o=r(1702),i=r(7293),a=r(4326),s=n.Object,u=o("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==a(t)?u(t,""):s(t)}:s},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(8536),s=r(7854),u=r(1702),c=r(111),f=r(8880),p=r(2597),l=r(5465),h=r(6200),v=r(3501),d="Object already initialized",y=s.TypeError,b=s.WeakMap;if(a||l.state){var g=l.state||(l.state=new b),m=u(g.get),w=u(g.has),x=u(g.set);n=function(t,e){if(w(g,t))throw new y(d);return e.facade=t,x(g,t,e),e},o=function(t){return m(g,t)||{}},i=function(t){return w(g,t)}}else{var S=h("state");v[S]=!0,n=function(t,e){if(p(t,S))throw new y(d);return e.facade=t,f(t,S,e),e},o=function(t){return p(t,S)?t[S]:{}},i=function(t){return p(t,S)}}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(!c(e)||(r=o(e)).type!==t)throw y("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=>{t.exports=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(){},f=[],p=s("Reflect","construct"),l=/^\s*(?:class|function)\b/,h=n(l.exec),v=!l.exec(c),d=function(t){if(!i(t))return!1;try{return p(c,f,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(l,u(t))}catch(t){return!0}};y.sham=!0,t.exports=!p||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==f||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",f=a.POLYFILL="P";t.exports=a},111:(t,e,r)=>{var n=r(614);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},1913:t=>{t.exports=!1},2190:(t,e,r)=>{var n=r(7854),o=r(5005),i=r(614),a=r(7976),s=r(3307),u=n.Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&a(e.prototype,u(t))}},408:(t,e,r)=>{var n=r(7854),o=r(9974),i=r(6916),a=r(9670),s=r(6330),u=r(7659),c=r(6244),f=r(7976),p=r(8554),l=r(1246),h=r(9212),v=n.TypeError,d=function(t,e){this.stopped=t,this.result=e},y=d.prototype;t.exports=function(t,e,r){var n,b,g,m,w,x,S,P=r&&r.that,O=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),_=!(!r||!r.INTERRUPTED),T=o(e,P),j=function(t){return n&&h(n,"normal",t),new d(!0,t)},k=function(t){return O?(a(t),_?T(t[0],t[1],j):T(t[0],t[1])):_?T(t,j):T(t)};if(E)n=t;else{if(!(b=l(t)))throw v(s(t)+" is not iterable");if(u(b)){for(g=0,m=c(t);m>g;g++)if((w=k(t[g]))&&f(y,w))return w;return new d(!1)}n=p(t,b)}for(x=n.next;!(S=i(x,n)).done;){try{w=k(S.value)}catch(t){h(n,"throw",t)}if("object"==typeof w&&w&&f(y,w))return w}return new d(!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}},3383:(t,e,r)=>{"use strict";var n,o,i,a=r(7293),s=r(614),u=r(30),c=r(9518),f=r(1320),p=r(5112),l=r(1913),h=p("iterator"),v=!1;[].keys&&("next"in(i=[].keys())?(o=c(c(i)))!==Object.prototype&&(n=o):v=!0),null==n||a((function(){var t={};return n[h].call(t)!==t}))?n={}:l&&(n=u(n)),s(n[h])||f(n,h,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:v}},7497:t=>{t.exports={}},6244:(t,e,r)=>{var n=r(7466);t.exports=function(t){return n(t.length)}},5948:(t,e,r)=>{var n,o,i,a,s,u,c,f,p=r(7854),l=r(9974),h=r(1236).f,v=r(261).set,d=r(6833),y=r(1528),b=r(1036),g=r(5268),m=p.MutationObserver||p.WebKitMutationObserver,w=p.document,x=p.process,S=p.Promise,P=h(p,"queueMicrotask"),O=P&&P.value;O||(n=function(){var t,e;for(g&&(t=x.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&&S&&S.resolve?((c=S.resolve(void 0)).constructor=S,f=l(c.then,c),a=function(){f(n)}):g?a=function(){x.nextTick(n)}:(v=l(v,p),a=function(){v(n)}):(s=!0,u=w.createTextNode(""),new m(n).observe(u,{characterData:!0}),a=function(){u.data=s=!s})),t.exports=O||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},133:(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}))},8536:(t,e,r)=>{var n=r(7854),o=r(614),i=r(2788),a=n.WeakMap;t.exports=o(a)&&/native code/.test(i(a))},8523:(t,e,r)=>{"use strict";var n=r(9662),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(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),f=r(6200)("IE_PROTO"),p=function(){},l=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(l("")),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(l("document.F=Object")),t.close(),t.F):h(n);for(var r=a.length;r--;)delete v.prototype[a[r]];return v()};s[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=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,f=0;c>f;)i.f(t,r=o[f++],n[r]);return t}},3070:(t,e,r)=>{var n=r(7854),o=r(9781),i=r(4664),a=r(3353),s=r(9670),u=r(4948),c=n.TypeError,f=Object.defineProperty,p=Object.getOwnPropertyDescriptor;e.f=o?a?function(t,e,r){if(s(t),e=u(e),s(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=p(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 f(t,e,r)}:f:function(t,e,r){if(s(t),e=u(e),s(r),i)try{return f(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("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),f=r(4664),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=s(t),e=u(e),f)try{return p(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(7854),o=r(2597),i=r(614),a=r(7908),s=r(6200),u=r(8544),c=s("IE_PROTO"),f=n.Object,p=f.prototype;t.exports=u?f.getPrototypeOf:function(t){var e=a(t);if(o(e,c))return e[c];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof f?p: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,f=[];for(r in n)!o(s,r)&&o(n,r)&&u(f,r);for(;e.length>c;)o(n,r=e[c++])&&(~a(f,r)||u(f,r));return f}},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(7854),o=r(6916),i=r(614),a=r(111),s=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!a(n=o(r,t)))return n;if(i(r=t.valueOf)&&!a(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!a(n=o(r,t)))return n;throw s("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),f=r(1913),p=r(7392),l=o&&o.prototype,h=u("species"),v=!1,d=i(n.PromiseRejectionEvent),y=a("Promise",(function(){var t=s(o),e=t!==String(o);if(!e&&66===p)return!0;if(f&&(!l.catch||!l.finally))return!0;if(p>=51&&/native code/.test(t))return!1;var r=new o((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[h]=n,!(v=r.then((function(){}))instanceof n)||!e&&c&&!d}));t.exports={CONSTRUCTOR:y,REJECTION_EVENT:d,SUBCLASSING:v}},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},2248:(t,e,r)=>{var n=r(1320);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},1320:(t,e,r)=>{var n=r(7854),o=r(614),i=r(2597),a=r(8880),s=r(3505),u=r(2788),c=r(9909),f=r(6530).CONFIGURABLE,p=c.get,l=c.enforce,h=String(String).split("String");(t.exports=function(t,e,r,u){var c,p=!!u&&!!u.unsafe,v=!!u&&!!u.enumerable,d=!!u&&!!u.noTargetGet,y=u&&void 0!==u.name?u.name:e;o(r)&&("Symbol("===String(y).slice(0,7)&&(y="["+String(y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||f&&r.name!==y)&&a(r,"name",y),(c=l(r)).source||(c.source=h.join("string"==typeof y?y:""))),t!==n?(p?!d&&t[e]&&(v=!0):delete t[e],v?t[e]=r:a(t,e,r)):v?t[e]=r:s(e,r)})(Function.prototype,"toString",(function(){return o(this)&&p(this).source||u(this)}))},4488:(t,e,r)=>{var n=r(7854).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},3505:(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}},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(3505),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.22.1",mode:n?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE",source:"https://github.com/zloirock/core-js"})},6707:(t,e,r)=>{var n=r(9670),o=r(9483),i=r(5112)("species");t.exports=function(t,e){var r,a=n(t).constructor;return void 0===a||null==(r=n(a)[i])?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),f=function(t){return function(e,r){var n,f,p=i(a(e)),l=o(r),h=p.length;return l<0||l>=h?t?"":void 0:(n=u(p,l))<55296||n>56319||l+1===h||(f=u(p,l+1))<56320||f>57343?t?s(p,l):n:t?c(p,l,l+2):f-56320+(n-55296<<10)+65536}};t.exports={codeAt:f(!1),charAt:f(!0)}},261:(t,e,r)=>{var n,o,i,a,s=r(7854),u=r(2104),c=r(9974),f=r(614),p=r(2597),l=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,x=s.process,S=s.Dispatch,P=s.Function,O=s.MessageChannel,E=s.String,_=0,T={};try{n=s.location}catch(t){}var j=function(t){if(p(T,t)){var e=T[t];delete T[t],e()}},k=function(t){return function(){j(t)}},I=function(t){j(t.data)},A=function(t){s.postMessage(E(t),n.protocol+"//"+n.host)};m&&w||(m=function(t){y(arguments.length,1);var e=f(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){x.nextTick(k(t))}:S&&S.now?o=function(t){S.now(k(t))}:O&&!b?(a=(i=new O).port2,i.port1.onmessage=I,o=c(a.postMessage,a)):s.addEventListener&&f(s.postMessage)&&!s.importScripts&&n&&"file:"!==n.protocol&&!l(A)?(o=A,s.addEventListener("message",I,!1)):o="onreadystatechange"in d("script")?function(t){h.appendChild(d("script")).onreadystatechange=function(){h.removeChild(this),j(t)}}:function(t){setTimeout(k(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=>{var e=Math.ceil,r=Math.floor;t.exports=function(t){var n=+t;return n!=n||0===n?0:(n>0?r:e)(n)}},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(7854),o=r(4488),i=n.Object;t.exports=function(t){return i(o(t))}},7593:(t,e,r)=>{var n=r(7854),o=r(6916),i=r(111),a=r(2190),s=r(8173),u=r(2140),c=r(5112),f=n.TypeError,p=c("toPrimitive");t.exports=function(t,e){if(!i(t)||a(t))return t;var r,n=s(t,p);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||a(r))return r;throw f("Can't convert object to primitive value")}return void 0===e&&(e="number"),u(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(7854),o=r(648),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},6330:(t,e,r)=>{var n=r(7854).String;t.exports=function(t){try{return n(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(133);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,e,r)=>{var n=r(7854).TypeError;t.exports=function(t,e){if(t<e)throw n("Not enough arguments");return t}},5112:(t,e,r)=>{var n=r(7854),o=r(2309),i=r(2597),a=r(9711),s=r(133),u=r(3307),c=o("wks"),f=n.Symbol,p=f&&f.for,l=u?f:f&&f.withoutSetter||a;t.exports=function(t){if(!i(c,t)||!s&&"string"!=typeof c[t]){var e="Symbol."+t;s&&i(f,t)?c[t]=f[t]:c[t]=u&&p?p(e):l(e)}return c[t]}},6967:(t,e,r)=>{"use strict";var n=r(2109),o=r(7854),i=r(7976),a=r(9518),s=r(7674),u=r(9920),c=r(30),f=r(8880),p=r(9114),l=r(7741),h=r(8340),v=r(408),d=r(6277),y=r(5112),b=r(2914),g=y("toStringTag"),m=o.Error,w=[].push,x=function(t,e){var r,n=arguments.length>2?arguments[2]:void 0,o=i(S,this);s?r=s(new m,o?a(this):S):(r=o?this:c(S),f(r,g,"Error")),void 0!==e&&f(r,"message",d(e)),b&&f(r,"stack",l(r.stack,1)),h(r,n);var u=[];return v(t,w,{that:u}),f(r,"errors",u),r};s?s(x,m):u(x,m,{name:!0});var S=x.prototype=c(m.prototype,{constructor:p(1,x),message:p(1,""),name:p(1,"AggregateError")});n({global:!0},{AggregateError:x})},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(654),c=r(1913),f=r(9781),p="Array Iterator",l=a.set,h=a.getterFor(p);t.exports=u(Array,"Array",(function(t,e){l(this,{type:p,target:n(t),index:0,kind:e})}),(function(){var t=h(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");var v=i.Arguments=i.Array;if(o("keys"),o("values"),o("entries"),!c&&f&&"values"!==v.name)try{s(v,"name",{value:"values"})}catch(t){}},1539:(t,e,r)=>{var n=r(1694),o=r(1320),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,f=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 f.error&&c(f.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,f=s((function(){var r=i(e.resolve),a=[],s=0,f=1;u(t,(function(t){var i=s++,u=!1;f++,o(r,e,t).then((function(t){u||(u=!0,a[i]=t,--f||n(a))}),c)})),--f||n(a)}));return f.error&&c(f.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),f="No one promise resolved";n({target:"Promise",stat:!0},{any:function(t){var e=this,r=a("AggregateError"),n=s.f(e),p=n.resolve,l=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,p(t))}),(function(t){c||h||(c=!0,a[i]=t,--u||l(new r(a,f)))}))})),--u||l(new r(a,f))}));return h.error&&l(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(1320),f=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 p=s("Promise").prototype.catch;f.catch!==p&&c(f,"catch",p,{unsafe:!0})}},3401:(t,e,r)=>{"use strict";var n,o,i,a=r(2109),s=r(1913),u=r(5268),c=r(7854),f=r(6916),p=r(1320),l=r(2248),h=r(7674),v=r(8003),d=r(6340),y=r(9662),b=r(614),g=r(111),m=r(5787),w=r(6707),x=r(261).set,S=r(5948),P=r(842),O=r(2534),E=r(8572),_=r(9909),T=r(2492),j=r(3702),k=r(8523),I="Promise",A=j.CONSTRUCTOR,C=j.REJECTION_EVENT,R=j.SUBCLASSING,N=_.getterFor(I),U=_.set,M=T&&T.prototype,L=T,z=M,B=c.TypeError,F=c.document,H=c.process,D=k.f,G=D,K=!!(F&&F.createEvent&&c.dispatchEvent),q="unhandledrejection",V=function(t){var e;return!(!g(t)||!b(e=t.then))&&e},Z=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,p=t.domain;try{s?(a||(2===e.rejection&&Q(e),e.rejection=1),!0===s?r=i:(p&&p.enter(),r=s(i),p&&(p.exit(),o=!0)),r===t.promise?c(B("Promise-chain cycle")):(n=V(r))?f(n,r,u,c):u(r)):c(i)}catch(t){p&&!o&&p.exit(),c(t)}},X=function(t,e){t.notified||(t.notified=!0,S((function(){for(var r,n=t.reactions;r=n.get();)Z(r,t);t.notified=!1,e&&!t.rejection&&J(t)})))},W=function(t,e,r){var n,o;K?((n=F.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!C&&(o=c["on"+t])?o(n):t===q&&P("Unhandled promise rejection",r)},J=function(t){f(x,c,(function(){var e,r=t.facade,n=t.value;if(Y(t)&&(e=O((function(){u?H.emit("unhandledRejection",n,r):W(q,r,n)})),t.rejection=u||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){f(x,c,(function(){var e=t.facade;u?H.emit("rejectionHandled",e):W("rejectionhandled",e,t.value)}))},$=function(t,e,r){return function(n){t(e,n,r)}},tt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,X(t,!0))},et=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw B("Promise can't be resolved itself");var n=V(e);n?S((function(){var r={done:!1};try{f(n,e,$(et,r,t),$(tt,r,t))}catch(e){tt(r,e,t)}})):(t.value=e,t.state=1,X(t,!1))}catch(e){tt({done:!1},e,t)}}};if(A&&(z=(L=function(t){m(this,z),y(t),f(n,this);var e=N(this);try{t($(et,e),$(tt,e))}catch(t){tt(e,t)}}).prototype,(n=function(t){U(this,{type:I,done:!1,notified:!1,parent:!1,reactions:new E,rejection:!1,state:0,value:void 0})}).prototype=l(z,{then:function(t,e){var r=N(this),n=D(w(this,L));return r.parent=!0,n.ok=!b(t)||t,n.fail=b(e)&&e,n.domain=u?H.domain:void 0,0==r.state?r.reactions.add(n):S((function(){Z(n,r)})),n.promise}}),o=function(){var t=new n,e=N(t);this.promise=t,this.resolve=$(et,e),this.reject=$(tt,e)},k.f=D=function(t){return t===L||void 0===t?new o(t):G(t)},!s&&b(T)&&M!==Object.prototype)){i=M.then,R||p(M,"then",(function(t,e){var r=this;return new L((function(t,e){f(i,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete M.constructor}catch(t){}h&&h(M,z)}a({global:!0,wrap:!0,forced:A},{Promise:L}),v(L,I,!1,!0),d(I)},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),f=r(9478),p=r(1320),l=i&&i.prototype;if(n({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){l.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),r=u(t);return this.then(r?function(r){return f(e,t()).then((function(){return r}))}:t,r?function(r){return f(e,t()).then((function(){throw r}))}:t)}}),!o&&u(i)){var h=s("Promise").prototype.finally;l.finally!==h&&p(l,"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"),f=i&&!s;n({target:"Promise",stat:!0,forced:i||s},{resolve:function(t){return u(f&&this===c?a:this,t)}})},8783:(t,e,r)=>{"use strict";var n=r(8710).charAt,o=r(1340),i=r(9909),a=r(654),s="String Iterator",u=i.set,c=i.getterFor(s);a(String,"String",(function(t){u(this,{type:s,string:o(t),index:0})}),(function(){var t,e=c(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!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"),f=u("toStringTag"),p=a.values,l=function(t,e){if(t){if(t[c]!==p)try{s(t,c,p)}catch(e){t[c]=p}if(t[f]||s(t,f,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)l(n[h]&&n[h].prototype,h);l(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_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=5,e.DEFAULT_API_HOST="ws.api.video";var i="";try{i="1.0.9"}catch(t){}var a=function(){function t(t){if(this.headers={},this.onProgressCallbacks=[],this.apiHost=t.apiHost||e.DEFAULT_API_HOST,t.hasOwnProperty("uploadToken")){var r=t;r.videoId&&(this.videoId=r.videoId),this.uploadEndpoint="https://".concat(this.apiHost,"/upload?token=").concat(r.uploadToken)}else if(t.hasOwnProperty("accessToken")){var n=t;if(!n.videoId)throw new Error("'videoId' is missing");this.refreshToken=n.refreshToken,this.uploadEndpoint="https://".concat(this.apiHost,"/videos/").concat(n.videoId,"/source"),this.headers.Authorization="Bearer ".concat(n.accessToken)}else{if(!t.hasOwnProperty("apiKey"))throw new Error("You must provide either an accessToken, an uploadToken or an API key");var o=t;if(!o.videoId)throw new Error("'videoId' is missing");this.uploadEndpoint="https://".concat(this.apiHost,"/videos/").concat(o.videoId,"/source"),this.headers.Authorization="Basic ".concat(btoa(o.apiKey+":"))}this.headers["AV-Origin-Client"]="typescript-uploader:"+i,this.retries=t.retries||e.DEFAULT_RETRIES}return t.prototype.onProgress=function(t){this.onProgressCallbacks.push(t)},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(){return e.createXhrPromise(t)}))},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")),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){var e=this;return new Promise((function(r,n){var o=new window.XMLHttpRequest;o.open("POST","".concat(e.uploadEndpoint),!0),t.parts&&o.setRequestHeader("Content-Range","part ".concat(t.parts.currentPart,"/").concat(t.parts.totalParts));for(var i=0,a=Object.keys(e.headers);i<a.length;i++){var s=a[i];o.setRequestHeader(s,e.headers[s])}t.onProgress&&(o.upload.onprogress=function(e){return t.onProgress(e)}),o.onreadystatechange=function(i){if(4===o.readyState){if(401===o.status&&e.refreshToken)return e.doRefreshToken().then((function(){return e.createXhrPromise(t)})).then((function(t){return r(t)})).catch((function(t){return n(t)}));if(o.status>=400)return void n(e.parseErrorResponse(o))}},o.onload=function(t){o.status<400&&r(e.apiResponseToVideoUploadResponse(JSON.parse(o.response)))},o.send(t.body)}))},t.prototype.withRetrier=function(t){return n(this,void 0,void 0,(function(){var e=this;return o(this,(function(r){return[2,new Promise((function(r,i){return n(e,void 0,void 0,(function(){var e,n,a;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()];case 3:return n=o.sent(),r(n),[2];case 4:return 401===(a=o.sent()).status||e>=this.retries?(i(a),[2]):[4,this.sleep(200+500*e)];case 5:return o.sent(),e++,[3,6];case 6:return[3,1];case 7:return[2]}}))}))}))]}))}))},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.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")},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=t.call(this,e)||this;return r.currentPartNum=1,r.currentPartBlobs=[],r.currentPartBlobsSize=0,r.queue=new u.PromiseQueue,r.preventEmptyParts=e.preventEmptyParts||!1,r}return o(e,t),e.prototype.uploadPart=function(t){var e,r=this;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.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)).then((function(t){r.videoId=t.videoId}));return r.currentPartNum++,t}return new Promise((function(t){return t()}))}))):Promise.resolve()},e.prototype.uploadLastPart=function(t){var e=this;return this.currentPartBlobs.push(t),this.queue.add((function(){return e.upload(new Blob(e.currentPartBlobs),!0)}))},e.prototype.upload=function(t,e){return void 0===e&&(e=!1),i(this,void 0,void 0,(function(){var r,n=this;return a(this,(function(o){return r=t.size,[2,this.xhrWithRetrier({body:this.createFormData(t,"file"),parts:{currentPart:this.currentPartNum,totalParts:e?this.currentPartNum:"*"},onProgress:function(t){return n.onProgressCallbacks.forEach((function(e){return e({uploadedBytes:t.loaded,totalBytes:r})}))}})]}))}))},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},3368: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.VideoUploader=void 0;var s=r(6909),u=function(t){function e(e){var r=t.call(this,e)||this;if(!e.file)throw new Error("'file' is missing");if(e.chunkSize&&(e.chunkSize<s.MIN_CHUNK_SIZE||e.chunkSize>s.MAX_CHUNK_SIZE))throw new Error("Invalid chunk size. Minimal allowed value: ".concat(s.MIN_CHUNK_SIZE/1024/1024,"MB, maximum allowed value: ").concat(s.MAX_CHUNK_SIZE/1024/1024,"MB."));return r.chunkSize=e.chunkSize||s.DEFAULT_CHUNK_SIZE,r.file=e.file,r.fileSize=r.file.size,r.fileName=r.file.name,r.chunksCount=Math.ceil(r.fileSize/r.chunkSize),r}return o(e,t),e.prototype.upload=function(){return i(this,void 0,void 0,(function(){var t,e;return a(this,(function(r){switch(r.label){case 0:e=0,r.label=1;case 1:return e<this.chunksCount?[4,this.uploadCurrentChunk(e)]:[3,4];case 2:t=r.sent(),this.videoId=t.videoId,r.label=3;case 3:return e++,[3,1];case 4:return[2,t]}}))}))},e.prototype.uploadCurrentChunk=function(t){var e=this,r=t*this.chunkSize,n=(t+1)*this.chunkSize,o=n>this.fileSize?this.fileSize:n,i=Math.ceil(this.fileSize/this.chunkSize);return this.xhrWithRetrier({onProgress:function(n){return e.onProgressCallbacks.forEach((function(o){return o(function(n){return{uploadedBytes:n.loaded+r,totalBytes:e.fileSize,chunksCount:e.chunksCount,chunksBytes:e.chunkSize,currentChunk:t+1,currentChunkUploadedBytes:n.loaded}}(n))}))},body:this.createFormData(this.file,this.fileName,r,o),parts:{currentPart:t+1,totalParts:i}})},e}(s.AbstractUploader);e.VideoUploader=u}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r(1150),r(3607)})()));
import { AbstractUploader, CommonOptions, VideoUploadResponse, WithAccessToken, WithApiKey, WithUploadToken } from "./abstract-uploader";
export interface ProgressiveUploaderOptionsWithUploadToken extends CommonOptions, WithUploadToken {
export interface ProgressiveUploadCommonOptions {
preventEmptyParts?: boolean;
}
export interface ProgressiveUploaderOptionsWithAccessToken extends CommonOptions, WithAccessToken {
export interface ProgressiveUploaderOptionsWithUploadToken extends ProgressiveUploadCommonOptions, CommonOptions, WithUploadToken {
}
export interface ProgressiveUploaderOptionsWithApiKey extends CommonOptions, WithApiKey {
export interface ProgressiveUploaderOptionsWithAccessToken extends ProgressiveUploadCommonOptions, CommonOptions, WithAccessToken {
}
export interface ProgressiveUploaderOptionsWithApiKey extends ProgressiveUploadCommonOptions, CommonOptions, WithApiKey {
}
export interface ProgressiveUploadProgressEvent {

@@ -21,2 +24,3 @@ uploadedBytes: number;

private queue;
private preventEmptyParts;
constructor(options: ProgressiveUploaderOptionsWithAccessToken | ProgressiveUploaderOptionsWithUploadToken | ProgressiveUploaderOptionsWithApiKey);

@@ -23,0 +27,0 @@ uploadPart(file: Blob): Promise<void>;

{
"name": "@api.video/video-uploader",
"version": "1.0.8",
"version": "1.0.9",
"description": "api.video video uploader",

@@ -5,0 +5,0 @@ "repository": {

@@ -279,6 +279,7 @@ [![badge](https://img.shields.io/twitter/follow/api_video?style=social)](https://twitter.com/intent/follow?screen_name=api_video) &nbsp; [![badge](https://img.shields.io/github/stars/apivideo/api.video-typescript-uploader?style=social)](https://github.com/apivideo/api.video-typescript-uploader) &nbsp; [![badge](https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video)](https://community.api.video)

| Option name | Mandatory | Type | Description |
| ----------: | --------- | ------ | ----------------------------------------------------- |
| apiHost | no | string | api.video host (default: ws.api.video) |
| retries | no | number | number of retries when an API call fails (default: 5) |
| Option name | Mandatory | Type | Description |
| ----------------: | --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| apiHost | no | string | api.video host (default: ws.api.video) |
| retries | no | number | number of retries when an API call fails (default: 5) |
| preventEmptyParts | no | boolean | if true, the upload will succeed even if an empty Blob is passed to uploadLastPart(). This may alter performances a bit in some cases (default: false) |

@@ -285,0 +286,0 @@

import { AbstractUploader, CommonOptions, MIN_CHUNK_SIZE, VideoUploadResponse, WithAccessToken, WithApiKey, WithUploadToken } from "./abstract-uploader";
import { PromiseQueue } from "./promise-queue";
export interface ProgressiveUploadCommonOptions {
preventEmptyParts?: boolean;
}
export interface ProgressiveUploaderOptionsWithUploadToken extends CommonOptions, WithUploadToken { }
export interface ProgressiveUploaderOptionsWithAccessToken extends CommonOptions, WithAccessToken { }
export interface ProgressiveUploaderOptionsWithApiKey extends CommonOptions, WithApiKey { }
export interface ProgressiveUploaderOptionsWithUploadToken extends ProgressiveUploadCommonOptions, CommonOptions, WithUploadToken { }
export interface ProgressiveUploaderOptionsWithAccessToken extends ProgressiveUploadCommonOptions, CommonOptions, WithAccessToken { }
export interface ProgressiveUploaderOptionsWithApiKey extends ProgressiveUploadCommonOptions, CommonOptions, WithApiKey { }

@@ -24,5 +27,7 @@ export interface ProgressiveUploadProgressEvent {

private queue = new PromiseQueue();
private preventEmptyParts: boolean;
constructor(options: ProgressiveUploaderOptionsWithAccessToken | ProgressiveUploaderOptionsWithUploadToken | ProgressiveUploaderOptionsWithApiKey) {
super(options);
this.preventEmptyParts = options.preventEmptyParts || false;
}

@@ -34,11 +39,25 @@

if (this.currentPartBlobsSize >= MIN_CHUNK_SIZE) {
return this.queue.add(() => {
const promise = this.upload(new Blob(this.currentPartBlobs)).then(res => {
this.videoId = res.videoId;
});
this.currentPartNum++;
if ((this.preventEmptyParts && (this.currentPartBlobsSize - file.size >= MIN_CHUNK_SIZE))
|| (!this.preventEmptyParts && (this.currentPartBlobsSize >= MIN_CHUNK_SIZE))) {
let toSend: any[];
if(this.preventEmptyParts) {
toSend = this.currentPartBlobs.slice(0, -1);
this.currentPartBlobs = this.currentPartBlobs.slice(-1);
this.currentPartBlobsSize = this.currentPartBlobs.length === 0 ? 0 : this.currentPartBlobs[0].size;
} else {
toSend = this.currentPartBlobs;
this.currentPartBlobs = [];
this.currentPartBlobsSize = 0;
return promise;
}
return this.queue.add(() => {
if (toSend.length > 0) {
const promise = this.upload(new Blob(toSend)).then(res => {
this.videoId = res.videoId;
});
this.currentPartNum++;
return promise;
}
return new Promise(resolve => resolve());
});

@@ -45,0 +64,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc