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.7 to 1.0.8

dist/src/abstract-uploader.d.ts

5

CHANGELOG.md
# Changelog
All changes to this project will be documented in this file.
## [1.0.8] - 2022-04-27
- Create a AbstractUploader
- Add origin header
- Add the possibility to provide a refresh token
## [1.0.7] - 2022-04-26

@@ -5,0 +10,0 @@ - Don't retry on 401 errors

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),g=a.PROPER,b=a.CONFIGURABLE,m=y.IteratorPrototype,x=y.BUGGY_SAFARI_ITERATORS,w=h("iterator"),S="keys",E="values",P="entries",O=function(){return this};t.exports=function(t,e,r,a,h,y,T){s(r,e,a);var _,j,k,I=function(t){if(t===h&&U)return U;if(!x&&t in R)return R[t];switch(t){case S:case E:case P:return function(){return new r(this,t)}}return function(){return new r(this)}},C=e+" Iterator",A=!1,R=t.prototype,N=R[w]||R["@@iterator"]||h&&R[h],U=!x&&N||I(h),L="Array"==e&&R.entries||N;if(L&&(_=c(L.call(new t)))!==Object.prototype&&_.next&&(i||c(_)===m||(f?f(_,m):u(_[w])||v(_,w,O)),p(_,C,!0,!0),i&&(d[C]=O)),g&&h==E&&N&&N.name!==E&&(!i&&b?l(R,"name",E):(A=!0,U=function(){return o(N,this)})),h)if(j={values:I(E),keys:y?U:I(S),entries:I(P)},T)for(k in j)(x||A||!(k in R))&&v(R,k,j[k]);else n({target:e,proto:!0,forced:x||A},j);return i&&!T||R[w]===U||v(R,w,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,g=u.WeakMap;if(a||l.state){var b=l.state||(l.state=new g),m=s(b.get),x=s(b.has),w=s(b.set);n=function(t,e){if(x(b,t))throw new y(d);return e.facade=t,w(b,t,e),e},o=function(t){return m(b,t)||{}},i=function(t){return x(b,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,g,b,m,x,w,S,E=r&&r.that,P=!(!r||!r.AS_ENTRIES),O=!(!r||!r.IS_ITERATOR),T=!(!r||!r.INTERRUPTED),_=o(e,E),j=function(t){return n&&v(n,"normal",t),new d(!0,t)},k=function(t){return P?(a(t),T?_(t[0],t[1],j):_(t[0],t[1])):T?_(t,j):_(t)};if(O)n=t;else{if(!(g=l(t)))throw h(u(t)+" is not iterable");if(s(g)){for(b=0,m=c(t);m>b;b++)if((x=k(t[b]))&&f(y,x))return x;return new d(!1)}n=p(t,g)}for(w=n.next;!(S=i(w,n)).done;){try{x=k(S.value)}catch(t){v(n,"throw",t)}if("object"==typeof x&&x&&f(y,x))return x}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),g=r(1036),b=r(5268),m=p.MutationObserver||p.WebKitMutationObserver,x=p.document,w=p.process,S=p.Promise,E=v(p,"queueMicrotask"),P=E&&E.value;P||(n=function(){var t,e;for(b&&(t=w.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||b||g||!m||!x?!y&&S&&S.resolve?((c=S.resolve(void 0)).constructor=S,f=l(c.then,c),a=function(){f(n)}):b?a=function(){w.nextTick(n)}:(h=l(h,p),a=function(){h(n)}):(u=!0,s=x.createTextNode(""),new m(n).observe(s,{characterData:!0}),a=function(){s.data=u=!u})),t.exports=P||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),g=r(6833),b=r(5268),m=u.setImmediate,x=u.clearImmediate,w=u.process,S=u.Dispatch,E=u.Function,P=u.MessageChannel,O=u.String,T=0,_={};try{n=u.location}catch(t){}var j=function(t){if(p(_,t)){var e=_[t];delete _[t],e()}},k=function(t){return function(){j(t)}},I=function(t){j(t.data)},C=function(t){u.postMessage(O(t),n.protocol+"//"+n.host)};m&&x||(m=function(t){y(arguments.length,1);var e=f(t)?t:E(t),r=h(arguments,1);return _[++T]=function(){s(e,void 0,r)},o(T),T},x=function(t){delete _[t]},b?o=function(t){w.nextTick(k(t))}:S&&S.now?o=function(t){S.now(k(t))}:P&&!g?(a=(i=new P).port2,i.port1.onmessage=I,o=c(a.postMessage,a)):u.addEventListener&&f(u.postMessage)&&!u.importScripts&&n&&"file:"!==n.protocol&&!l(C)?(o=C,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:x}},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),g=r(2914),b=y("toStringTag"),m=o.Error,x=[].push,w=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,b,"Error")),void 0!==e&&f(r,"message",d(e)),g&&f(r,"stack",l(r.stack,1)),v(r,n);var s=[];return h(t,x,{that:s}),f(r,"errors",s),r};u?u(w,m):s(w,m,{name:!0});var S=w.prototype=c(m.prototype,{constructor:p(1,w),message:p(1,""),name:p(1,"AggregateError")});n({global:!0},{AggregateError:w})},9170:(t,e,r)=>{r(6967)},6992:(t,e,r)=>{"use strict";var n=r(5656),o=r(1223),i=r(7497),a=r(9909),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),g=r(614),b=r(111),m=r(5787),x=r(6707),w=r(261).set,S=r(5948),E=r(842),P=r(2534),O=r(8572),T=r(9909),_=r(2492),j=r(3702),k=r(8523),I="Promise",C=j.CONSTRUCTOR,A=j.REJECTION_EVENT,R=j.SUBCLASSING,N=T.getterFor(I),U=T.set,L=_&&_.prototype,M=_,F=L,D=c.TypeError,H=c.document,z=c.process,B=k.f,q=B,G=!!(H&&H.createEvent&&c.dispatchEvent),K="unhandledrejection",V=function(t){var e;return!(!b(t)||!g(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&&Y(e),e.rejection=1),!0===u?r=i:(p&&p.enter(),r=u(i),p&&(p.exit(),o=!0)),r===t.promise?c(D("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;G?((n=H.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),c.dispatchEvent(n)):n={promise:e,reason:r},!A&&(o=c["on"+t])?o(n):t===K&&E("Unhandled promise rejection",r)},J=function(t){f(w,c,(function(){var e,r=t.facade,n=t.value;if(Q(t)&&(e=P((function(){s?z.emit("unhandledRejection",n,r):W(K,r,n)})),t.rejection=s||Q(t)?2:1,e.error))throw e.value}))},Q=function(t){return 1!==t.rejection&&!t.parent},Y=function(t){f(w,c,(function(){var e=t.facade;s?z.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 D("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(C&&(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 O,rejection:!1,state:0,value:void 0})}).prototype=l(F,{then:function(t,e){var r=N(this),n=B(x(this,M));return r.parent=!0,n.ok=!g(t)||t,n.fail=g(e)&&e,n.domain=s?z.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):q(t)},!u&&g(_)&&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:C},{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},3200: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)};e.__esModule=!0,e.parseUserConfig=e.parseErrorResponse=e.apiResponseToVideoUploadResponse=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",e.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},e.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"}},e.parseUserConfig=function(t){var n=t.apiHost||e.DEFAULT_API_HOST;if(t.uploadToken)return r(r({},t.videoId?{videoId:t.videoId}:{}),{uploadEndpoint:"https://".concat(n,"/upload?token=").concat(t.uploadToken)});if(t.accessToken){if(!t.videoId)throw new Error("'videoId' is missing");return{uploadEndpoint:"https://".concat(n,"/videos/").concat(t.videoId,"/source"),authHeader:"Bearer ".concat(t.accessToken)}}if(t.apiKey){if(!t.videoId)throw new Error("'videoId' is missing");return{uploadEndpoint:"https://".concat(n,"/videos/").concat(t.videoId,"/source"),authHeader:"Basic ".concat(btoa(t.apiKey+":"))}}throw new Error("You must provide either an accessToken, an uploadToken or an API key")}},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(3200);n(e,o,"MIN_CHUNK_SIZE"),n(e,o,"MAX_CHUNK_SIZE")},9213:function(t,e,r){"use strict";var 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.ProgressiveUploader=void 0;var i=r(3200),a=r(3828),u=function(){function t(t){this.onProgressCallbacks=[],this.headers={},this.currentPartNum=1,this.currentPartBlobs=[],this.currentPartBlobsSize=0,this.queue=new a.PromiseQueue;var e=(0,i.parseUserConfig)(t);this.uploadEndpoint=e.uploadEndpoint,this.videoId=e.videoId,e.authHeader&&(this.headers.Authorization=e.authHeader),this.retries=t.retries||i.DEFAULT_RETRIES}return t.prototype.onProgress=function(t){this.onProgressCallbacks.push(t)},t.prototype.uploadPart=function(t){var e=this;return this.currentPartBlobsSize+=t.size,this.currentPartBlobs.push(t),this.currentPartBlobsSize>=i.MIN_CHUNK_SIZE?this.queue.add((function(){var t=e.upload(new Blob(e.currentPartBlobs)).then((function(t){e.videoId=t.videoId}));return e.currentPartBlobs=[],e.currentPartBlobsSize=0,t})):Promise.resolve()},t.prototype.uploadLastPart=function(t){var e=this;return this.currentPartBlobs.push(t),this.queue.add((function(){return e.upload(new Blob(e.currentPartBlobs),!0)}))},t.prototype.createFormData=function(t){var e=t,r=new FormData;return this.videoId&&r.append("videoId",this.videoId),r.append("file",e,"file"),r},t.prototype.sleep=function(t){return new Promise((function(e,r){setTimeout((function(){return e()}),t)}))},t.prototype.upload=function(t,e){var r=this;return void 0===e&&(e=!1),new Promise((function(a,u){return n(r,void 0,void 0,(function(){var n,s,c,f;return o(this,(function(o){switch(o.label){case 0:s=0,c=this.currentPartNum,this.currentPartNum++,o.label=1;case 1:o.label=2;case 2:return o.trys.push([2,4,,6]),[4,(p=c,new Promise((function(n,o){var a=t.size,u="part ".concat(p,"/").concat(e?p:"*"),s=new window.XMLHttpRequest;s.open("POST","".concat(r.uploadEndpoint),!0),s.setRequestHeader("Content-Range",u);for(var c=0,f=Object.keys(r.headers);c<f.length;c++){var l=f[c];s.setRequestHeader(l,r.headers[l])}s.onreadystatechange=function(t){4===s.readyState&&s.status>=400&&o((0,i.parseErrorResponse)(s))},s.onload=function(t){return n((0,i.apiResponseToVideoUploadResponse)(s.response))},s.upload.onprogress=function(t){return r.onProgressCallbacks.forEach((function(e){return e({uploadedBytes:t.loaded,totalBytes:a})}))},s.send(r.createFormData(t))})))];case 3:return n=o.sent(),a(n),[2];case 4:return 401!==(f=o.sent()).status&&s>=this.retries?(u(f),[2]):[4,this.sleep(200+500*s)];case 5:return o.sent(),s++,[3,6];case 6:return[3,1];case 7:return[2]}var p}))}))}))},t}();e.ProgressiveUploader=u},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=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.VideoUploader=void 0;var i=r(3200),a=r(3828),u=function(){function t(t){if(this.currentChunk=0,this.onProgressCallbacks=[],this.headers={},this.queue=new a.PromiseQueue,!t.file)throw new Error("'file' is missing");var e=(0,i.parseUserConfig)(t);if(this.uploadEndpoint=e.uploadEndpoint,this.videoId=e.videoId,e.authHeader&&(this.headers.Authorization=e.authHeader),t.chunkSize&&(t.chunkSize<i.MIN_CHUNK_SIZE||t.chunkSize>i.MAX_CHUNK_SIZE))throw new Error("Invalid chunk size. Minimal allowed value: ".concat(i.MIN_CHUNK_SIZE/1024/1024,"MB, maximum allowed value: ").concat(i.MAX_CHUNK_SIZE/1024/1024,"MB."));this.chunkSize=t.chunkSize||i.DEFAULT_CHUNK_SIZE,this.retries=t.retries||i.DEFAULT_RETRIES,this.file=t.file,this.fileSize=this.file.size,this.fileName=this.file.name,this.chunksCount=Math.ceil(this.fileSize/this.chunkSize)}return t.prototype.onProgress=function(t){this.onProgressCallbacks.push(t)},t.prototype.upload=function(){var t=this;return this.queue.add((function(){return new Promise((function(e,r){return n(t,void 0,void 0,(function(){var t,n,a;return o(this,(function(o){switch(o.label){case 0:n=0,o.label=1;case 1:if(!(this.currentChunk<this.chunksCount))return[3,7];o.label=2;case 2:return o.trys.push([2,4,,6]),[4,this.uploadCurrentChunk()];case 3:return t=o.sent(),this.videoId=t.videoId,this.currentChunk++,[3,6];case 4:return 401===(a=o.sent()).status||n>=this.retries?(r(a),[2]):[4,this.sleep(200+500*n)];case 5:return o.sent(),n++,[3,6];case 6:return[3,1];case 7:return e((0,i.apiResponseToVideoUploadResponse)(t)),[2]}}))}))}))}))},t.prototype.sleep=function(t){return new Promise((function(e,r){setTimeout((function(){return e()}),t)}))},t.prototype.createFormData=function(t,e){var r=this.file.slice(t,e),n=new FormData;return this.videoId&&n.append("videoId",this.videoId),n.append("file",r,this.fileName),n},t.prototype.uploadCurrentChunk=function(){var t=this;return new Promise((function(e,r){var n=t.currentChunk*t.chunkSize,o=(t.currentChunk+1)*t.chunkSize,a=o>t.fileSize?t.fileSize:o,u=Math.ceil(t.fileSize/t.chunkSize),s="part ".concat(t.currentChunk+1,"/").concat(u),c=new window.XMLHttpRequest;c.open("POST","".concat(t.uploadEndpoint),!0),c.setRequestHeader("Content-Range",s);for(var f=0,p=Object.keys(t.headers);f<p.length;f++){var l=p[f];c.setRequestHeader(l,t.headers[l])}c.onreadystatechange=function(t){4===c.readyState&&c.status>=400&&r((0,i.parseErrorResponse)(c))},c.onload=function(t){return e(JSON.parse(c.response))},c.upload.onprogress=function(e){return t.onProgressCallbacks.forEach((function(r){return r({uploadedBytes:e.loaded+n,totalBytes:t.fileSize,chunksCount:t.chunksCount,chunksBytes:t.chunkSize,currentChunk:t.currentChunk+1,currentChunkUploadedBytes:e.loaded})}))},c.send(t.createFormData(n,a))}))},t}();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)})()));
!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)})()));
export { UploadProgressEvent, VideoUploader, VideoUploaderOptionsWithAccessToken, VideoUploaderOptionsWithUploadToken } from "./video-uploader";
export { ProgressiveUploadProgressEvent, ProgressiveUploader, ProgressiveUploaderOptionsWithAccessToken, ProgressiveUploaderOptionsWithUploadToken } from './progressive-video-uploader';
export { VideoUploadResponse, MIN_CHUNK_SIZE, MAX_CHUNK_SIZE } from './common';
export { VideoUploadResponse, MIN_CHUNK_SIZE, MAX_CHUNK_SIZE } from './abstract-uploader';

@@ -1,18 +0,8 @@

import { VideoUploadResponse } from "./common";
export interface ProgressiveUploaderOptionsWithUploadToken extends Options {
uploadToken: string;
videoId?: string;
import { AbstractUploader, CommonOptions, VideoUploadResponse, WithAccessToken, WithApiKey, WithUploadToken } from "./abstract-uploader";
export interface ProgressiveUploaderOptionsWithUploadToken extends CommonOptions, WithUploadToken {
}
export interface ProgressiveUploaderOptionsWithAccessToken extends Options {
accessToken: string;
videoId: string;
export interface ProgressiveUploaderOptionsWithAccessToken extends CommonOptions, WithAccessToken {
}
export interface ProgressiveUploaderOptionsWithApiKey extends Options {
apiKey: string;
videoId: string;
export interface ProgressiveUploaderOptionsWithApiKey extends CommonOptions, WithApiKey {
}
interface Options {
apiHost?: string;
retries?: number;
}
export interface ProgressiveUploadProgressEvent {

@@ -26,8 +16,3 @@ uploadedBytes: number;

}
export declare class ProgressiveUploader {
private uploadEndpoint;
private videoId?;
private retries;
private onProgressCallbacks;
private headers;
export declare class ProgressiveUploader extends AbstractUploader<ProgressiveProgressEvent> {
private currentPartNum;

@@ -38,9 +23,5 @@ private currentPartBlobs;

constructor(options: ProgressiveUploaderOptionsWithAccessToken | ProgressiveUploaderOptionsWithUploadToken | ProgressiveUploaderOptionsWithApiKey);
onProgress(cb: (e: ProgressiveProgressEvent) => void): void;
uploadPart(file: Blob): Promise<void>;
uploadLastPart(file: Blob): Promise<VideoUploadResponse>;
private createFormData;
private sleep;
private upload;
}
export {};

@@ -1,19 +0,11 @@

import { VideoUploadResponse } from "./common";
export interface VideoUploaderOptionsWithUploadToken extends Options {
uploadToken: string;
videoId?: string;
import { AbstractUploader, CommonOptions, VideoUploadResponse, WithAccessToken, WithApiKey, WithUploadToken } from "./abstract-uploader";
interface UploadOptions {
file: File;
chunkSize?: number;
}
export interface VideoUploaderOptionsWithAccessToken extends Options {
accessToken: string;
videoId: string;
export interface VideoUploaderOptionsWithUploadToken extends CommonOptions, UploadOptions, WithUploadToken {
}
export interface VideoUploaderOptionsWithApiKey extends Options {
apiKey: string;
videoId: string;
export interface VideoUploaderOptionsWithAccessToken extends CommonOptions, UploadOptions, WithAccessToken {
}
interface Options {
file: File;
chunkSize?: number;
apiHost?: string;
retries?: number;
export interface VideoUploaderOptionsWithApiKey extends CommonOptions, UploadOptions, WithApiKey {
}

@@ -28,22 +20,12 @@ export interface UploadProgressEvent {

}
export declare class VideoUploader {
export declare class VideoUploader extends AbstractUploader<UploadProgressEvent> {
private file;
private chunkSize;
private uploadEndpoint;
private currentChunk;
private chunksCount;
private fileSize;
private fileName;
private videoId?;
private retries;
private onProgressCallbacks;
private headers;
private queue;
constructor(options: VideoUploaderOptionsWithAccessToken | VideoUploaderOptionsWithUploadToken | VideoUploaderOptionsWithApiKey);
onProgress(cb: (e: UploadProgressEvent) => void): void;
upload(): Promise<VideoUploadResponse>;
private sleep;
private createFormData;
private uploadCurrentChunk;
}
export {};
{
"name": "@api.video/video-uploader",
"version": "1.0.7",
"version": "1.0.8",
"description": "api.video video uploader",

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

@@ -158,7 +158,8 @@ [![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 |
| ----------------------------: | --------- | ------ | ----------------------- |
| accessToken | **yes** | string | your access token |
| videoId | **yes** | string | id of an existing video |
| _common options (see bellow)_ | | | |
| Option name | Mandatory | Type | Description |
| ----------------------------: | --------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| accessToken | **yes** | string | your access token |
| refreshToken | **no** | string | your refresh token (please not that if you don't provide a refresh token, your upload may fails due to the access token lifetime of 60 minutes) |
| videoId | **yes** | string | id of an existing video |
| _common options (see bellow)_ | | | |

@@ -165,0 +166,0 @@

@@ -5,2 +5,2 @@ import { VideoUploader } from "./video-uploader";

export { ProgressiveUploadProgressEvent, ProgressiveUploader, ProgressiveUploaderOptionsWithAccessToken, ProgressiveUploaderOptionsWithUploadToken } from './progressive-video-uploader';
export { VideoUploadResponse, MIN_CHUNK_SIZE, MAX_CHUNK_SIZE } from './common';
export { VideoUploadResponse, MIN_CHUNK_SIZE, MAX_CHUNK_SIZE } from './abstract-uploader';

@@ -1,21 +0,9 @@

import { apiResponseToVideoUploadResponse, DEFAULT_API_HOST, DEFAULT_RETRIES, MIN_CHUNK_SIZE, parseErrorResponse, parseUserConfig, VideoUploadResponse } from "./common";
import { AbstractUploader, CommonOptions, MIN_CHUNK_SIZE, VideoUploadResponse, WithAccessToken, WithApiKey, WithUploadToken } from "./abstract-uploader";
import { PromiseQueue } from "./promise-queue";
export interface ProgressiveUploaderOptionsWithUploadToken extends Options {
uploadToken: string;
videoId?: string;
}
export interface ProgressiveUploaderOptionsWithAccessToken extends Options {
accessToken: string;
videoId: string;
}
export interface ProgressiveUploaderOptionsWithApiKey extends Options {
apiKey: string;
videoId: string;
}
interface Options {
apiHost?: string;
retries?: number;
}
export interface ProgressiveUploaderOptionsWithUploadToken extends CommonOptions, WithUploadToken { }
export interface ProgressiveUploaderOptionsWithAccessToken extends CommonOptions, WithAccessToken { }
export interface ProgressiveUploaderOptionsWithApiKey extends CommonOptions, WithApiKey { }
export interface ProgressiveUploadProgressEvent {

@@ -26,3 +14,2 @@ uploadedBytes: number;

export interface ProgressiveProgressEvent {

@@ -33,9 +20,3 @@ uploadedBytes: number;

export class ProgressiveUploader {
private uploadEndpoint: string;
private videoId?: string;
private retries: number;
private onProgressCallbacks: ((e: ProgressiveProgressEvent) => void)[] = [];
private headers: { [name: string]: string } = {};
export class ProgressiveUploader extends AbstractUploader<ProgressiveProgressEvent> {
private currentPartNum = 1;

@@ -47,17 +28,5 @@ private currentPartBlobs: Blob[] = [];

constructor(options: ProgressiveUploaderOptionsWithAccessToken | ProgressiveUploaderOptionsWithUploadToken | ProgressiveUploaderOptionsWithApiKey) {
const parsedCondig = parseUserConfig(options);
this.uploadEndpoint = parsedCondig.uploadEndpoint;
this.videoId = parsedCondig.videoId;
if(parsedCondig.authHeader) {
this.headers.Authorization = parsedCondig.authHeader;
}
this.retries = options.retries || DEFAULT_RETRIES;
super(options);
}
public onProgress(cb: (e: ProgressiveProgressEvent) => void) {
this.onProgressCallbacks.push(cb);
}
public uploadPart(file: Blob): Promise<void> {

@@ -67,3 +36,3 @@ this.currentPartBlobsSize += file.size;

if(this.currentPartBlobsSize >= MIN_CHUNK_SIZE) {
if (this.currentPartBlobsSize >= MIN_CHUNK_SIZE) {
return this.queue.add(() => {

@@ -73,2 +42,3 @@ const promise = this.upload(new Blob(this.currentPartBlobs)).then(res => {

});
this.currentPartNum++;
this.currentPartBlobs = [];

@@ -87,66 +57,17 @@ this.currentPartBlobsSize = 0;

private createFormData(blob: Blob): FormData {
const chunk = blob;
const chunkForm = new FormData();
if (this.videoId) {
chunkForm.append("videoId", this.videoId);
}
chunkForm.append("file", chunk, "file");
return chunkForm;
}
private sleep(duration: number): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(), duration);
private async upload(file: Blob, isLast: boolean = false): Promise<VideoUploadResponse> {
const fileSize = file.size;
return this.xhrWithRetrier({
body: this.createFormData(file, "file"),
parts: {
currentPart: this.currentPartNum,
totalParts: isLast ? this.currentPartNum : '*'
},
onProgress: (event: ProgressEvent) => this.onProgressCallbacks.forEach(cb => cb({
uploadedBytes: event.loaded,
totalBytes: fileSize,
})),
})
}
private upload(file: Blob, isLast: boolean = false): Promise<VideoUploadResponse> {
const doUpload = (partNum: number): Promise<VideoUploadResponse> => new Promise((resolve, reject) => {
const fileSize = file.size;
const contentRange = `part ${partNum}/${isLast ? partNum : '*'}`;
const xhr = new window.XMLHttpRequest();
xhr.open("POST", `${this.uploadEndpoint}`, true);
xhr.setRequestHeader("Content-Range", contentRange);
for (const headerName of Object.keys(this.headers)) {
xhr.setRequestHeader(headerName, this.headers[headerName]);
}
xhr.onreadystatechange = (_) => {
if (xhr.readyState === 4) { // DONE
if (xhr.status >= 400) {
reject(parseErrorResponse(xhr));
}
}
};
xhr.onload = (_) => resolve(apiResponseToVideoUploadResponse(xhr.response))
xhr.upload.onprogress = (e) => this.onProgressCallbacks.forEach(cb => cb({
uploadedBytes: e.loaded,
totalBytes: fileSize,
}));
xhr.send(this.createFormData(file));
});
return new Promise(async (resolve, reject) => {
let response;
let retriesCount = 0;
const thisPart = this.currentPartNum;
this.currentPartNum++;
while(true) {
try {
response = await doUpload(thisPart);
resolve(response);
return;
} catch (e: any) {
if(e.status !== 401 && retriesCount >= this.retries) {
reject(e);
return;
}
await this.sleep(200 + retriesCount * 500);
retriesCount++;
}
}
});
}
}

@@ -1,23 +0,12 @@

import { apiResponseToVideoUploadResponse, DEFAULT_API_HOST, DEFAULT_CHUNK_SIZE, DEFAULT_RETRIES, MAX_CHUNK_SIZE, MIN_CHUNK_SIZE, parseErrorResponse, parseUserConfig, VideoUploadError, VideoUploadResponse } from "./common";
import { PromiseQueue } from "./promise-queue";
import { AbstractUploader, CommonOptions, DEFAULT_CHUNK_SIZE, MAX_CHUNK_SIZE, MIN_CHUNK_SIZE, VideoUploadResponse, WithAccessToken, WithApiKey, WithUploadToken } from "./abstract-uploader";
export interface VideoUploaderOptionsWithUploadToken extends Options {
uploadToken: string;
videoId?: string;
}
export interface VideoUploaderOptionsWithAccessToken extends Options {
accessToken: string;
videoId: string;
}
export interface VideoUploaderOptionsWithApiKey extends Options {
apiKey: string;
videoId: string;
}
interface Options {
interface UploadOptions {
file: File;
chunkSize?: number;
apiHost?: string;
retries?: number;
}
export interface VideoUploaderOptionsWithUploadToken extends CommonOptions, UploadOptions, WithUploadToken { }
export interface VideoUploaderOptionsWithAccessToken extends CommonOptions, UploadOptions, WithAccessToken { }
export interface VideoUploaderOptionsWithApiKey extends CommonOptions, UploadOptions, WithApiKey { }
export interface UploadProgressEvent {

@@ -32,17 +21,12 @@ uploadedBytes: number;

export class VideoUploader {
export class VideoUploader extends AbstractUploader<UploadProgressEvent> {
private file: File;
private chunkSize: number;
private uploadEndpoint: string;
private currentChunk: number = 0;
private chunksCount: number;
private fileSize: number;
private fileName: string;
private videoId?: string;
private retries: number;
private onProgressCallbacks: ((e: UploadProgressEvent) => void)[] = [];
private headers: { [name: string]: string } = {};
private queue = new PromiseQueue();
constructor(options: VideoUploaderOptionsWithAccessToken | VideoUploaderOptionsWithUploadToken | VideoUploaderOptionsWithApiKey) {
super(options);
if (!options.file) {

@@ -52,11 +36,3 @@ throw new Error("'file' is missing");

const parsedCondig = parseUserConfig(options);
this.uploadEndpoint = parsedCondig.uploadEndpoint;
this.videoId = parsedCondig.videoId;
if(parsedCondig.authHeader) {
this.headers.Authorization = parsedCondig.authHeader;
}
if(options.chunkSize && (options.chunkSize < MIN_CHUNK_SIZE || options.chunkSize > MAX_CHUNK_SIZE)) {
if (options.chunkSize && (options.chunkSize < MIN_CHUNK_SIZE || options.chunkSize > MAX_CHUNK_SIZE)) {
throw new Error(`Invalid chunk size. Minimal allowed value: ${MIN_CHUNK_SIZE / 1024 / 1024}MB, maximum allowed value: ${MAX_CHUNK_SIZE / 1024 / 1024}MB.`);

@@ -66,3 +42,2 @@ }

this.chunkSize = options.chunkSize || DEFAULT_CHUNK_SIZE;
this.retries = options.retries || DEFAULT_RETRIES;
this.file = options.file;

@@ -75,80 +50,38 @@ this.fileSize = this.file.size;

public onProgress(cb: (e: UploadProgressEvent) => void) {
this.onProgressCallbacks.push(cb);
}
public upload(): Promise<VideoUploadResponse> {
return this.queue.add(() => new Promise(async (resolve, reject) => {
let response;
let retriesCount = 0;
while (this.currentChunk < this.chunksCount) {
try {
response = await this.uploadCurrentChunk();
this.videoId = response.videoId;
this.currentChunk++;
} catch (e: any) {
if (e.status === 401 || retriesCount >= this.retries) {
reject(e);
return;
}
await this.sleep(200 + retriesCount * 500);
retriesCount++;
}
}
resolve(apiResponseToVideoUploadResponse(response));
}));
}
private sleep(duration: number): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(), duration);
})
}
private createFormData(startByte: number, endByte: number): FormData {
const chunk = this.file.slice(startByte, endByte);
const chunkForm = new FormData();
if (this.videoId) {
chunkForm.append("videoId", this.videoId);
public async upload(): Promise<VideoUploadResponse> {
let res: VideoUploadResponse;
for(let i = 0; i < this.chunksCount; i++) {
res = await this.uploadCurrentChunk(i);
this.videoId = res.videoId;
}
chunkForm.append("file", chunk, this.fileName);
return chunkForm;
return res!;
}
private uploadCurrentChunk(): Promise<any> {
return new Promise((resolve, reject) => {
const firstByte = this.currentChunk * this.chunkSize;
const computedLastByte = (this.currentChunk + 1) * this.chunkSize;
const lastByte = (computedLastByte > this.fileSize ? this.fileSize : computedLastByte);
const chunksCount = Math.ceil(this.fileSize / this.chunkSize);
private uploadCurrentChunk(chunkNumber: number): Promise<VideoUploadResponse> {
const firstByte = chunkNumber * this.chunkSize;
const computedLastByte = (chunkNumber + 1) * this.chunkSize;
const lastByte = (computedLastByte > this.fileSize ? this.fileSize : computedLastByte);
const chunksCount = Math.ceil(this.fileSize / this.chunkSize);
const contentRange = `part ${this.currentChunk + 1}/${chunksCount}`;
const xhr = new window.XMLHttpRequest();
xhr.open("POST", `${this.uploadEndpoint}`, true);
xhr.setRequestHeader("Content-Range", contentRange);
for (const headerName of Object.keys(this.headers)) {
xhr.setRequestHeader(headerName, this.headers[headerName]);
}
xhr.onreadystatechange = (_) => {
if (xhr.readyState === 4) { // DONE
if (xhr.status >= 400) {
reject(parseErrorResponse(xhr));
}
}
};
xhr.onload = (_) => resolve(JSON.parse(xhr.response));
xhr.upload.onprogress = (e) => this.onProgressCallbacks.forEach(cb => cb({
uploadedBytes: e.loaded + firstByte,
const progressEventToUploadProgressEvent = (event: ProgressEvent): UploadProgressEvent => {
return {
uploadedBytes: event.loaded + firstByte,
totalBytes: this.fileSize,
chunksCount: this.chunksCount,
chunksBytes: this.chunkSize,
currentChunk: this.currentChunk + 1,
currentChunkUploadedBytes: e.loaded,
}));
xhr.send(this.createFormData(firstByte, lastByte));
currentChunk: chunkNumber + 1,
currentChunkUploadedBytes: event.loaded,
};
};
return this.xhrWithRetrier({
onProgress: (event) => this.onProgressCallbacks.forEach(cb => cb(progressEventToUploadProgressEvent(event))),
body: this.createFormData(this.file, this.fileName, firstByte, lastByte),
parts: {
currentPart: chunkNumber + 1,
totalParts: chunksCount
}
});
}
}
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