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