1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="05e21676-7de4-56ba-ae7f-0a3f659e1c4d")}catch(e){}}(); 3(self.webpackChunkniche_spa=self.webpackChunkniche_spa||[]).push([[208],{10208:(_e,re,L)=>{function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function W(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,he(n.key),n)}}function he(e){var t=function we(e,t){if("object"!=N(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==N(t)?t:t+""}function $(e){var t="function"==typeof Map?new Map:void 0;return $=function(n){if(null===n||!function De(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch{return"function"==typeof e}}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,a)}function a(){return function Ce(e,t,r){if(q())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var a=new(e.bind.apply(e,n));return r&&ne(a,r.prototype),a}(n,arguments,F(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),ne(a,n)},$(e)}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(q=function(){return!!e})()}function ne(e,t){return(ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n})(e,t)}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}L.r(re),L.d(re,{DefaultHttpStack:()=>Gt,DetailedError:()=>oe,Upload:()=>sn,canStoreURLs:()=>Xt,defaultOptions:()=>tt,enableDebugLog:()=>v,isSupported:()=>fn});const oe=function(e){function t(r){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function G(e,t,r){return t=F(t),function Y(e,t){if(t&&("object"===N(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function j(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,q()?Reflect.construct(t,r||[],F(e).constructor):t.apply(e,r))}(this,t,[r])).originalRequest=l,n.originalResponse=c,n.causingError=a,null!=a&&(r+=", caused by ".concat(a.toString())),null!=l){var g=l.getHeader("X-Request-ID")||"n/a",d=l.getMethod(),_=l.getURL(),U=c?c.getStatus():"n/a",I=c?c.getBody()||"":"n/a";r+=", originated from request (method: ".concat(d,", url: ").concat(_,", response code: ").concat(U,", response text: ").concat(I,", request id: ").concat(g,")")}return n.message=r,n}return function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ne(e,t)}(t,e),function pe(e,t,r){return t&&W(e.prototype,t),r&&W(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(t)}($(Error));var m=!1;function v(){m=!0}function y(e){m&&console.log(e)}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function P(e){var t=function X(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}var Se=function(){return function R(e,t,r){return t&&S(e.prototype,t),r&&S(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(r){return Promise.resolve([])}},{key:"removeUpload",value:function(r){return Promise.resolve()}},{key:"addUpload",value:function(r,n){return Promise.resolve(null)}}])}();const $t="function"==typeof btoa,de="function"==typeof Buffer,it=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),Pe=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
3+/="),T=((e=>{let t={};e.forEach((r,n)=>t[r]=n)})(Pe),String.fromCharCode.bind(String)),ut=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_")),qe=$t?e=>btoa(e):de?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,r,n,a,l="";const c=e.length%3;for(let g=0;g<e.length;){if((r=e.charCodeAt(g++))>255||(n=e.charCodeAt(g++))>255||(a=e.charCodeAt(g++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|a,l+=Pe[t>>18&63]+Pe[t>>12&63]+Pe[t>>6&63]+Pe[63&t]}return c?l.slice(0,c-3)+"===".substring(c):l},Ge=de?e=>Buffer.from(e).toString("base64"):e=>{let r=[];for(let n=0,a=e.length;n<a;n+=4096)r.push(T.apply(null,e.subarray(n,n+4096)));return qe(r.join(""))},Qt=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?T(192|t>>>6)+T(128|63&t):T(224|t>>>12&15)+T(128|t>>>6&63)+T(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return T(240|t>>>18&7)+T(128|t>>>12&63)+T(128|t>>>6&63)+T(128|63&t)},er=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,ct=de?e=>Buffer.from(e,"utf8").toString("base64"):it?e=>Ge(it.encode(e)):e=>qe((e=>e.replace(er,Qt))(e)),ir_encode=(e,t=!1)=>t?ut(ct(e)):ct(e);var ar=L(23028),ur=L.n(ar);function Xe(){Xe=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(u,o,i){u[o]=i.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",g=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function _(u,o,i){return Object.defineProperty(u,o,{value:i,enumerable:!0,configurable:!0,writable:!0}),u[o]}try{_({},"")}catch{_=function(i,s,h){return i[s]=h}}function U(u,o,i,s){var f=Object.create((o&&o.prototype instanceof J?o:J).prototype),w=new fe(s||[]);return a(f,"_invoke",{value:rt(u,i,w)}),f}function I(u,o,i){try{return{type:"normal",arg:u.call(o,i)}}catch(s){return{type:"throw",arg:s}}}t.wrap=U;var te="suspendedStart",Le="suspendedYield",ue="executing",Z="completed",k={};function J(){}function M(){}function C(){}var V={};_(V,c,function(){return this});var le=Object.getPrototypeOf,Q=le&&le(le(ce([])));Q&&Q!==r&&n.call(Q,c)&&(V=Q);var K=C.prototype=J.prototype=Object.create(V);function Ae(u){["next","throw","return"].forEach(function(o){_(u,o,function(i){return this._invoke(o,i)})})}function ee(u,o){function i(h,f,w,O){var E=I(u[h],u,f);if("throw"!==E.type){var B=E.arg,D=B.value;return D&&"object"==ie(D)&&n.call(D,"__await")?o.resolve(D.__await).then(function(H){i("next",H,w,O)},function(H){i("throw",H,w,O)}):o.resolve(D).then(function(H){B.value=H,w(B)},function(H){return i("throw",H,w,O)})}O(E.arg)}var s;a(this,"_invoke",{value:function(f,w){function O(){return new o(function(E,B){i(f,w,E,B)})}return s=s?s.then(O,O):O()}})}function rt(u,o,i){var s=te;return function(h,f){if(s===ue)throw Error("Generator is already running");if(s===Z){if("throw"===h)throw f;return{value:e,done:!0}}for(i.method=h,i.arg=f;;){var w=i.delegate;if(w){var O=Te(w,i);if(O){if(O===k)continue;return O}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(s===te)throw s=Z,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s=ue;var E=I(u,o,i);if("normal"===E.type){if(s=i.done?Z:Le,E.arg===k)continue;return{value:E.arg,done:i.done}}"throw"===E.type&&(s=Z,i.method="throw",i.arg=E.arg)}}}function Te(u,o){var i=o.method,s=u.iterator[i];if(s===e)return o.delegate=null,"throw"===i&&u.iterator.return&&(o.method="return",o.arg=e,Te(u,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+i+"' method")),k;var h=I(s,u.iterator,o.arg);if("throw"===h.type)return o.method="throw",o.arg=h.arg,o.delegate=null,k;var f=h.arg;return f?f.done?(o[u.resultName]=f.value,o.next=u.nextLoc,"return"!==o.method&&(o.method="next",o.arg=e),o.delegate=null,k):f:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,k)}function nt(u){var o={tryLoc:u[0]};1 in u&&(o.catchLoc=u[1]),2 in u&&(o.finallyLoc=u[2],o.afterLoc=u[3]),this.tryEntries.push(o)}function se(u){var o=u.completion||{};o.type="normal",delete o.arg,u.completion=o}function fe(u){this.tryEntries=[{tryLoc:"root"}],u.forEach(nt,this),this.reset(!0)}function ce(u){if(u||""===u){var o=u[c];if(o)return o.call(u);if("function"==typeof u.next)return u;if(!isNaN(u.length)){var i=-1,s=function h(){for(;++i<u.length;)if(n.call(u,i))return h.value=u[i],h.done=!1,h;return h.value=e,h.done=!0,h};return s.next=s}}throw new TypeError(ie(u)+" is not iterable")}return M.prototype=C,a(K,"constructor",{value:C,configurable:!0}),a(C,"constructor",{value:M,configurable:!0}),M.displayName=_(C,d,"GeneratorFunction"),t.isGeneratorFunction=function(u){var o="function"==typeof u&&u.constructor;return!!o&&(o===M||"GeneratorFunction"===(o.displayName||o.name))},t.mark=function(u){return Object.setPrototypeOf?Object.setPrototypeOf(u,C):(u.__proto__=C,_(u,d,"GeneratorFunction")),u.prototype=Object.create(K),u},t.awrap=function(u){return{__await:u}},Ae(ee.prototype),_(ee.prototype,g,function(){return this}),t.AsyncIterator=ee,t.async=function(u,o,i,s,h){void 0===h&&(h=Promise);var f=new ee(U(u,o,i,s),h);return t.isGeneratorFunction(o)?f:f.next().then(function(w){return w.done?w.value:f.next()})},Ae(K),_(K,d,"Generator"),_(K,c,function(){return this}),_(K,"toString",function(){return"[object Generator]"}),t.keys=function(u){var o=Object(u),i=[];for(var s in o)i.push(s);return i.reverse(),function h(){for(;i.length;){var f=i.pop();if(f in o)return h.value=f,h.done=!1,h}return h.done=!0,h}}
3,t.values=ce,fe.prototype={constructor:fe,reset:function(o){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(se),!o)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var o=this.tryEntries[0].completion;if("throw"===o.type)throw o.arg;return this.rval},dispatchException:function(o){if(this.done)throw o;var i=this;function s(B,D){return w.type="throw",w.arg=o,i.next=B,D&&(i.method="next",i.arg=e),!!D}for(var h=this.tryEntries.length-1;h>=0;--h){var f=this.tryEntries[h],w=f.completion;if("root"===f.tryLoc)return s("end");if(f.tryLoc<=this.prev){var O=n.call(f,"catchLoc"),E=n.call(f,"finallyLoc");if(O&&E){if(this.prev<f.catchLoc)return s(f.catchLoc,!0);if(this.prev<f.finallyLoc)return s(f.finallyLoc)}else if(O){if(this.prev<f.catchLoc)return s(f.catchLoc,!0)}else{if(!E)throw Error("try statement without catch or finally");if(this.prev<f.finallyLoc)return s(f.finallyLoc)}}}},abrupt:function(o,i){for(var s=this.tryEntries.length-1;s>=0;--s){var h=this.tryEntries[s];if(h.tryLoc<=this.prev&&n.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var f=h;break}}f&&("break"===o||"continue"===o)&&f.tryLoc<=i&&i<=f.finallyLoc&&(f=null);var w=f?f.completion:{};return w.type=o,w.arg=i,f?(this.method="next",this.next=f.finallyLoc,k):this.complete(w)},complete:function(o,i){if("throw"===o.type)throw o.arg;return"break"===o.type||"continue"===o.type?this.next=o.arg:"return"===o.type?(this.rval=this.arg=o.arg,this.method="return",this.next="end"):"normal"===o.type&&i&&(this.next=i),k},finish:function(o){for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i];if(s.finallyLoc===o)return this.complete(s.completion,s.afterLoc),se(s),k}},catch:function(o){for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i];if(s.tryLoc===o){var h=s.completion;if("throw"===h.type){var f=h.arg;se(s)}return f}}throw Error("illegal catch attempt")},delegateYield:function(o,i,s){return this.delegate={iterator:ce(o),resultName:i,nextLoc:s},"next"===this.method&&(this.arg=e),k}},t}function wt(e,t,r,n,a,l,c){try{var g=e[l](c),d=g.value}catch(_){return void r(_)}g.done?t(d):Promise.resolve(d).then(n,a)}function St(e,t){return function pr(e){if(Array.isArray(e))return e}(e)||function cr(e,t){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,l,c,g=[],d=!0,_=!1;try{if(l=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;d=!1}else for(;!(d=(n=l.call(r)).done)&&(g.push(n.value),g.length!==t);d=!0);}catch(U){_=!0,a=U}finally{try{if(!d&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(_)throw a}}return g}}(e,t)||Ut(e,t)||function fr(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ut(e,t){if(e){if("string"==typeof e)return xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xt(e,t)}}function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(r),!0).forEach(function(n){dr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dr(e,t,r){return(t=Et(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ot(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Et(n.key),n)}}function Et(e){var t=function vr(e,t){if("object"!=ie(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ie(t)?t:t+""}var Ne="tus-v1",Be="ietf-draft-03",Oe="ietf-draft-05",gr={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:Tt,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,
3storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:Ne},Rt=function(){function e(t,r){(function yr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return function mr(e,t,r){return t&&Ot(e.prototype,t),r&&Ot(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"findPreviousUploads",value:function(){var r=this;return this.options.fingerprint(this.file,this.options).then(function(n){return r._urlStorage.findUploadsByFingerprint(n)})}},{key:"resumeFromPreviousUpload",value:function(r){this.url=r.uploadUrl||null,this._parallelUploadUrls=r.parallelUploadUrls||null,this._urlStorageKey=r.urlStorageKey}},{key:"start",value:function(){var r=this,n=this.file;if(n)if([Ne,Be,Oe].includes(this.options.protocol))if(this.options.endpoint||this.options.uploadUrl||this.url){var a=this.options.retryDelays;if(null==a||"[object Array]"===Object.prototype.toString.call(a)){if(this.options.parallelUploads>1)for(var l=0,c=["uploadUrl","uploadSize","uploadLengthDeferred"];l<c.length;l++){var g=c[l];if(this.options[g])return void this._emitError(new Error("tus: cannot use the ".concat(g," option when parallelUploads is enabled")))}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1)return void this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length)return void this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"))}this.options.fingerprint(n,this.options).then(function(d){return y(null==d?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(d)),r._fingerprint=d,r._source?r._source:r.options.fileReader.openFile(n,r.options.chunkSize)}).then(function(d){if(r._source=d,r.options.uploadLengthDeferred)r._size=null;else if(null!=r.options.uploadSize){if(r._size=Number(r.options.uploadSize),Number.isNaN(r._size))return void r._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(r._size=r._source.size,null==r._size)return void r._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));r.options.parallelUploads>1||null!=r._parallelUploadUrls?r._startParallelUpload():r._startSingleUpload()}).catch(function(d){r._emitError(d)})}else this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var r,n=this,a=this._size,l=0;this._parallelUploads=[];var g=null!==(r=this.options.parallelUploadBoundaries)&&void 0!==r?r:function _r(e,t){for(var r=Math.floor(e/t),n=[],a=0;a<t;a++)n.push({start:r*a,end:r*(a+1)});return n[t-1].end=e,n}(this._source.size,null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads);this._parallelUploadUrls&&g.forEach(function(U,I){U.uploadUrl=n._parallelUploadUrls[I]||null}),this._parallelUploadUrls=new Array(g.length);var _,d=g.map(function(U,I){var te=0;return n._source.slice(U.start,U.end).then(function(Le){var ue=Le.value;return new Promise(function(Z,k){var J=me(me({},n.options),{},{uploadUrl:U.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:n.options.metadataForPartialUploads,headers:me(me({},n.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:Z,onError:k,onProgress:function(V){l=l-te+V,te=V,n._emitProgress(l,a)},onUploadUrlAvailable:function(){n._parallelUploadUrls[I]=M.url,n._parallelUploadUrls.filter(function(V){return!!V}).length===g.length&&n._saveUploadInUrlStorage()}}),M=new e(ue,J);M.start(),n._parallelUploads.push(M)})})});Promise.all(d).then(function(){(_=n._openRequest("POST",n.options.endpoint)).setHeader("Upload-Concat","final;".concat(n._parallelUploadUrls.join(" ")));var U=kt(n.options.metadata);return""!==U&&_.setHeader("Upload-Metadata",U),n._sendRequest(_,null)}
3).then(function(U){if(ve(U.getStatus(),200)){var I=U.getHeader("Location");null!=I?(n.url=Ct(n.options.endpoint,I),y("Created upload at ".concat(n.url)),n._emitSuccess(U)):n._emitHttpError(_,U,"tus: invalid or missing Location header")}else n._emitHttpError(_,U,"tus: unexpected response while creating upload")}).catch(function(U){n._emitError(U)})}},{key:"_startSingleUpload",value:function(){return this._aborted=!1,null!=this.url?(y("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(y("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):(y("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(r){var n=this;if(null!=this._parallelUploads){var l,a=function hr(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ut(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(_){throw _},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var g,l=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var _=r.next();return l=_.done,_},e:function(_){c=!0,g=_},f:function(){try{!l&&null!=r.return&&r.return()}finally{if(c)throw g}}}}(this._parallelUploads);try{for(a.s();!(l=a.n()).done;)l.value.abort(r)}catch(g){a.e(g)}finally{a.f()}}return null!==this._req&&this._req.abort(),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),r&&null!=this.url?e.terminate(this.url,this.options).then(function(){return n._removeFromUrlStorage()}):Promise.resolve()}},{key:"_emitHttpError",value:function(r,n,a,l){this._emitError(new oe(a,l,r,n))}},{key:"_emitError",value:function(r){var n=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),At(r,this._retryAttempt,this.options))){var l=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout(function(){n.start()},l))}if("function"!=typeof this.options.onError)throw r;this.options.onError(r)}}},{key:"_emitSuccess",value:function(r){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess({lastResponse:r})}},{key:"_emitProgress",value:function(r,n){"function"==typeof this.options.onProgress&&this.options.onProgress(r,n)}},{key:"_emitChunkComplete",value:function(r,n,a){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(r,n,a)}},{key:"_createUpload",value:function(){var r=this;if(this.options.endpoint){var n=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?n.setHeader("Upload-Defer-Length","1"):n.setHeader("Upload-Length","".concat(this._size));var l,a=kt(this.options.metadata);""!==a&&n.setHeader("Upload-Metadata",a),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,l=this._addChunkToRequest(n)):((this.options.protocol===Be||this.options.protocol===Oe)&&n.setHeader("Upload-Complete","?0"),l=this._sendRequest(n,null)),l.then(function(c){if(ve(c.getStatus(),200)){var g=c.getHeader("Location");if(null!=g)return r.url=Ct(r.options.endpoint,g),y("Created upload at ".concat(r.url)),"function"==typeof r.options.onUploadUrlAvailable&&r.options.onUploadUrlAvailable(),0===r._size?(r._emitSuccess(c),void r._source.close()):void r._saveUploadInUrlStorage().then(function(){r.options.uploadDataDuringCreation?r._handleUploadResponse(n,c):(r._offset=0,r._performUpload())});r._emitHttpError(n,c,"tus: invalid or missing Location header")}else r._emitHttpError(n,c,"tus: unexpected response while creating upload")}).catch(function(c){r._emitHttpError(n,null,"tus: failed to create upload",c)})}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var r=this,n=this._openRequest("HEAD",this.url);this._sendRequest(n,null).then(function(l){var c=l.getStatus();if(!ve(c,200))return 423===c?void r._emitHttpError(n,l,"tus: upload is currently locked; retry later"):(ve(c,400)&&r._removeFromUrlStorage(),r.options.endpoint?(r.url=null,void r._
3createUpload()):void r._emitHttpError(n,l,"tus: unable to resume upload (new upload cannot be created without an endpoint)"));var g=Number.parseInt(l.getHeader("Upload-Offset"),10);if(Number.isNaN(g))r._emitHttpError(n,l,"tus: invalid or missing offset value");else{var d=Number.parseInt(l.getHeader("Upload-Length"),10);!Number.isNaN(d)||r.options.uploadLengthDeferred||r.options.protocol!==Ne?("function"==typeof r.options.onUploadUrlAvailable&&r.options.onUploadUrlAvailable(),r._saveUploadInUrlStorage().then(function(){if(g===d)return r._emitProgress(d,d),void r._emitSuccess(l);r._offset=g,r._performUpload()})):r._emitHttpError(n,l,"tus: invalid or missing length value")}}).catch(function(l){r._emitHttpError(n,null,"tus: failed to resume upload",l)})}},{key:"_performUpload",value:function(){var n,r=this;this._aborted||(this.options.overridePatchMethod?(n=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):n=this._openRequest("PATCH",this.url),n.setHeader("Upload-Offset","".concat(this._offset)),this._addChunkToRequest(n).then(function(l){ve(l.getStatus(),200)?r._handleUploadResponse(n,l):r._emitHttpError(n,l,"tus: unexpected response while uploading chunk")}).catch(function(l){r._aborted||r._emitHttpError(n,null,"tus: failed to upload chunk at offset ".concat(r._offset),l)}))}},{key:"_addChunkToRequest",value:function(r){var n=this,a=this._offset,l=this._offset+this.options.chunkSize;return r.setProgressHandler(function(c){n._emitProgress(a+c,n._size)}),this.options.protocol===Ne?r.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===Oe&&r.setHeader("Content-Type","application/partial-upload"),(l===Number.POSITIVE_INFINITY||l>this._size)&&!this.options.uploadLengthDeferred&&(l=this._size),this._source.slice(a,l).then(function(c){var g=c.value,d=c.done,_=null!=g&&g.size?g.size:0;n.options.uploadLengthDeferred&&d&&(n._size=n._offset+_,r.setHeader("Upload-Length","".concat(n._size)));var U=n._offset+_;return!n.options.uploadLengthDeferred&&d&&U!==n._size?Promise.reject(new Error("upload was configured with a size of ".concat(n._size," bytes, but the source is done after ").concat(U," bytes"))):null===g?n._sendRequest(r):((n.options.protocol===Be||n.options.protocol===Oe)&&r.setHeader("Upload-Complete",d?"?1":"?0"),n._emitProgress(n._offset,n._size),n._sendRequest(r,g))})}},{key:"_handleUploadResponse",value:function(r,n){var a=Number.parseInt(n.getHeader("Upload-Offset"),10);if(!Number.isNaN(a))return this._emitProgress(a,this._size),this._emitChunkComplete(a-this._offset,a,this._size),this._offset=a,a===this._size?(this._emitSuccess(n),void this._source.close()):void this._performUpload();this._emitHttpError(r,n,"tus: invalid or missing offset value")}},{key:"_openRequest",value:function(r,n){var a=jt(r,n,this.options);return this._req=a,a}},{key:"_removeFromUrlStorage",value:function(){var r=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(n){r._emitError(n)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var r=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||null!==this._urlStorageKey)return Promise.resolve();var n={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};return this._parallelUploads?n.parallelUploadUrls=this._parallelUploadUrls:n.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,n).then(function(a){r._urlStorageKey=a})}},{key:"_sendRequest",value:function(r){return Lt(r,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],[{key:"terminate",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=jt("DELETE",r,n);return Lt(a,null,n).then(function(l){if(204!==l.getStatus())throw new oe("tus: unexpected response while terminating upload",null,a,l)}).catch(function(l){if(l instanceof oe||(l=new oe("tus: failed to terminate upload",l,a,null)),!At(l,0,n))throw l;var c=n.retryDelays[0],g=n.retryDelays.slice(1),d=me(me({},n),{},{retryDelays:g});return new Promise(function(_){return setTimeout(_,c)}).then(function(){return e.terminate(r,d)})})}}])}();function kt(e){return Object.entries(e).map(function(t){var r=St(t,2),a=r[1];return"".concat(r[0]," ").concat(ir_encode(String(a)))}).join(",")}function ve(e,t){return e>=t&&e<t+100}function jt(e,t,r){var n=r.httpStack.createRequest(e,t);r.protocol===Be?n.setHeader("Upload-Draft-Interop-Version","5"):r.protocol===Oe?n.setHeader("Upload-Draft-Interop-Version","6"):n.setHeader("Tus-Resumable","1.0.0");for(var l=0,c=Object.entries(r.headers||{});l<c.length;l++){var g=St(c[l],2);n.setHeader(g[0],g[1])}if(r.addRequestId){var U=function lr(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}();n.setHeader("X-Request-ID",U)}return n}function Lt(e,t,r){return Ve.apply(this,arguments)}function Ve(){return Ve=function sr(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var l=e.apply(t,r);function c(d){wt(l,n,a,c,g,"next",d)}function g(d){wt(l,n,a,c,g,"throw",d)}c(void 0)})}}(Xe().mark(function e(t,r,n){var a;return Xe().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if("function"!=typeof n.onBeforeRequest){c.next=3;break}return c.next=3,n.onBeforeRequest(t);case 3:return c.next=5,t.send(r);case 5:if(a=c.sent,"function"!=typeof n.onAfterResponse){c.next=9;break}return c.next=9,n.onAfterResponse(t,a);case 9:return c.abrupt("return",a);case 10:case"end":return c.stop()}},e)})),Ve.apply(this,arguments)}function At(e,t,r){return!(null==r.retryDelays||t>=r.retryDelays.length||null==e.originalRequest)&&(r&&"function"==typeof r.onShouldRetry?r.onShouldRetry(e,t,r):Tt(e))}function Tt(e){var t=e.originalResponse?e.originalResponse.getStatus():0;return(!ve(t,400)||409===t||423===t)&&function br(){var e=!0;return typeof navigator<"u"&&!1===navigator.onLine&&(e=!1),e}()}function Ct(e,t){return new(ur())(t,e).toString()}Rt.defaultOptions=gr;const Ye=Rt,Dt=function(){return typeof navigator<"u"&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};function Sr(e){return new Promise(function(t,r){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){t(n.response)},n.onerror=function(a){r(a)},n.open("GET",e),n.send()})}function Ee(e){return(Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ft(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rr
3(n.key),n)}}function Rr(e){var t=function kr(e,t){if("object"!=Ee(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Ee(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ee(t)?t:t+""}var It=function(){return function Er(e,t,r){return t&&Ft(e.prototype,t),r&&Ft(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){(function Or(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._file=t,this.size=t.size},[{key:"slice",value:function(r,n){if(typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u"))return function Pr(e){return new Promise(function(t,r){var n=new FileReader;n.onload=function(){var a=new Uint8Array(n.result);t({value:a})},n.onerror=function(a){r(a)},n.readAsArrayBuffer(e)})}(this._file.slice(r,n));var a=this._file.slice(r,n);return Promise.resolve({value:a,done:n>=this.size})}},{key:"close",value:function(){}}])}();function Re(e){return(Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Nt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ar(n.key),n)}}function Ar(e){var t=function Tr(e,t){if("object"!=Re(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=Re(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Re(t)?t:t+""}function Bt(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var Dr=function(){return function Lr(e,t,r){return t&&Nt(e.prototype,t),r&&Nt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(t){(function jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1},[{key:"slice",value:function(r,n){return r<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(r,n)}},{key:"_readUntilEnoughDataOrDone",value:function(r,n){var a=this,l=n<=this._bufferOffset+Bt(this._buffer);if(this._done||l){var c=this._getDataFromBuffer(r,n);return Promise.resolve({value:c,done:null==c&&this._done})}return this._reader.read().then(function(d){var _=d.value;return d.done?a._done=!0:a._buffer=void 0===a._buffer?_:function Cr(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}throw new Error("Unknown data type")}(a._buffer,_),a._readUntilEnoughDataOrDone(r,n)})}},{key:"_getDataFromBuffer",value:function(r,n){r>this._bufferOffset&&(this._buffer=this._buffer.slice(r-this._bufferOffset),this._bufferOffset=r);var a=0===Bt(this._buffer);return this._done&&a?null:this._buffer.slice(0,n-r)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])}();function ae(e){return(ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Ze(){Ze=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(u,o,i){u[o]=i.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",g=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function _(u,o,i){return Object.defineProperty(u,o,{value:i,enumerable:!0,configurable:!0,writable:!0}),u[o]}try{_({},"")}catch{_=function(i,s,h){return i[s]=h}}function U(u,o,i,s){var f=Object.create((o&&o.prototype instanceof J?o:J).prototype),w=new fe(s||[]);return a(f,"_invoke",{value:rt(u,i,w)}),f}function I(u,o,i){try{return{type:"normal",arg:u.call(o,i)}}catch(s){return{type:"throw",arg:s}}}t.wrap=U;var te="suspendedStart",Le="suspendedYield",ue="executing",Z="completed",k={};function J(){}function M(){}function C(){}var V={};_(V,c,function(){return this});var le=Object.getPrototypeOf,Q=le&&le(le(ce([])));Q&&Q!==r&&n.call(Q,c)&&(V=Q);var K=C.prototype=J.prototype=Object.create(V);function Ae(u){["next","throw","return"].forEach(function(o){_(u,o,function(i){return this._invoke(o,i)})})}function ee(u,o){function i(h,f,w,O){var E=I(u[h],u,f);if("throw"!==E.type){var B=E.arg,D=B.value;return D&&"object"==ae(D)&&n.call(D,"__await")?o.resolve(D.__await).then(function(H){i("next",H,w,O)},function(H){i("throw",H,w,O)}):o.resolve(D).then(function(H){B.value=H,w(B)},function(H){return i("throw",H,w,O)})}O(E.arg)}var s;a(this,"_invoke",{value:function(f,w){function O(){return new o(function(E,B){i(f,w,E,B)})}return s=s?s.then(O,O):O()}})}function rt(u,o,i){var s=te;return function(h,f){if(s===ue)throw Error("Generator is already running");if(s===Z){if("throw"===h)throw f;return{value:e,done:!0}}for(i.method=h,i.arg=f;;){var w=i.delegate;if(w){var O=Te(w,i);if(O){if(O===k)continue;return O}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(s===te)throw s=Z,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s=ue;var E=I(u,o,i);
3if("normal"===E.type){if(s=i.done?Z:Le,E.arg===k)continue;return{value:E.arg,done:i.done}}"throw"===E.type&&(s=Z,i.method="throw",i.arg=E.arg)}}}function Te(u,o){var i=o.method,s=u.iterator[i];if(s===e)return o.delegate=null,"throw"===i&&u.iterator.return&&(o.method="return",o.arg=e,Te(u,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+i+"' method")),k;var h=I(s,u.iterator,o.arg);if("throw"===h.type)return o.method="throw",o.arg=h.arg,o.delegate=null,k;var f=h.arg;return f?f.done?(o[u.resultName]=f.value,o.next=u.nextLoc,"return"!==o.method&&(o.method="next",o.arg=e),o.delegate=null,k):f:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,k)}function nt(u){var o={tryLoc:u[0]};1 in u&&(o.catchLoc=u[1]),2 in u&&(o.finallyLoc=u[2],o.afterLoc=u[3]),this.tryEntries.push(o)}function se(u){var o=u.completion||{};o.type="normal",delete o.arg,u.completion=o}function fe(u){this.tryEntries=[{tryLoc:"root"}],u.forEach(nt,this),this.reset(!0)}function ce(u){if(u||""===u){var o=u[c];if(o)return o.call(u);if("function"==typeof u.next)return u;if(!isNaN(u.length)){var i=-1,s=function h(){for(;++i<u.length;)if(n.call(u,i))return h.value=u[i],h.done=!1,h;return h.value=e,h.done=!0,h};return s.next=s}}throw new TypeError(ae(u)+" is not iterable")}return M.prototype=C,a(K,"constructor",{value:C,configurable:!0}),a(C,"constructor",{value:M,configurable:!0}),M.displayName=_(C,d,"GeneratorFunction"),t.isGeneratorFunction=function(u){var o="function"==typeof u&&u.constructor;return!!o&&(o===M||"GeneratorFunction"===(o.displayName||o.name))},t.mark=function(u){return Object.setPrototypeOf?Object.setPrototypeOf(u,C):(u.__proto__=C,_(u,d,"GeneratorFunction")),u.prototype=Object.create(K),u},t.awrap=function(u){return{__await:u}},Ae(ee.prototype),_(ee.prototype,g,function(){return this}),t.AsyncIterator=ee,t.async=function(u,o,i,s,h){void 0===h&&(h=Promise);var f=new ee(U(u,o,i,s),h);return t.isGeneratorFunction(o)?f:f.next().then(function(w){return w.done?w.value:f.next()})},Ae(K),_(K,d,"Generator"),_(K,c,function(){return this}),_(K,"toString",function(){return"[object Generator]"}),t.keys=function(u){var o=Object(u),i=[];for(var s in o)i.push(s);return i.reverse(),function h(){for(;i.length;){var f=i.pop();if(f in o)return h.value=f,h.done=!1,h}return h.done=!0,h}},t.values=ce,fe.prototype={constructor:fe,reset:function(o){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(se),!o)for(var i in this)"t"===i.charAt(0)&&n.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=e)},stop:function(){this.done=!0;var o=this.tryEntries[0].completion;if("throw"===o.type)throw o.arg;return this.rval},dispatchException:function(o){if(this.done)throw o;var i=this;function s(B,D){return w.type="throw",w.arg=o,i.next=B,D&&(i.method="next",i.arg=e),!!D}for(var h=this.tryEntries.length-1;h>=0;--h){var f=this.tryEntries[h],w=f.completion;if("root"===f.tryLoc)return s("end");if(f.tryLoc<=this.prev){var O=n.call(f,"catchLoc"),E=n.call(f,"finallyLoc");if(O&&E){if(this.prev<f.catchLoc)return s(f.catchLoc,!0);if(this.prev<f.finallyLoc)return s(f.finallyLoc)}else if(O){if(this.prev<f.catchLoc)return s(f.catchLoc,!0)}else{if(!E)throw Error("try statement without catch or finally");if(this.prev<f.finallyLoc)return s(f.finallyLoc)}}}},abrupt:function(o,i){for(var s=this.tryEntries.length-1;s>=0;--s){var h=this.tryEntries[s];if(h.tryLoc<=this.prev&&n.call(h,"finallyLoc")&&this.prev<h.finallyLoc){var f=h;break}}f&&("break"===o||"continue"===o)&&f.tryLoc<=i&&i<=f.finallyLoc&&(f=null);var w=f?f.completion:{};return w.type=o,w.arg=i,f?(this.method="next",this.next=f.finallyLoc,k):this.complete(w)},complete:function(o,i){if("throw"===o.type)throw o.arg;return"break"===o.type||"continue"===o.type?this.next=o.arg:"return"===o.type?(this.rval=this.arg=o.arg,this.method="return",this.next="end"):"normal"===o.type&&i&&(this.next=i),k},finish:function(o){for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i];if(s.finallyLoc===o)return this.complete(s.completion,s.afterLoc),se(s),k}},catch:function(o){for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i];if(s.tryLoc===o){var h=s.completion;if("throw"===h.type){var f=h.arg;se(s)}return f}}throw Error("illegal catch attempt")},delegateYield:function(o,i,s){return this.delegate={iterator:ce(o),resultName:i,nextLoc:s},"next"===this.method&&(this.arg=e),k}},t}function Ht(e,t,r,n,a,l,c){try{var g=e[l](c),d=g.value}catch(_){return void r(_)}g.done?t(d):Promise.resolve(d).then(n,a)}function zt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Br(n.key),n)}}function Br(e){var t=function Hr(e,t){if("object"!=ae(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ae(t)?t:t+""}var zr=function(){return function Nr(e,t,r){return t&&zt(e.prototype,t),r&&zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function Ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},[{key:"openFile",value:(t=function Fr(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var l=e.apply(t,r);function c(d){Ht(l,n,a,c,g,"next",d)}function g(d){Ht(l,n,a,c,g,"throw",d)}c(void 0)})}}(Ze().mark(function n(a,l){return Ze().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!(Dt()&&a&&typeof a.uri<"u")){d.next=11;break}return d.prev=1,d.next=4,Sr(a.uri);case 4:return d.abrupt("return",new It(d.sent));case 8:throw d.prev=8,d.t0=d.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(d.t0));case 11:if(!("function"==typeof a.slice&&typeof a.size<"u")){d.next=13;break}return d.abrupt("return",Promise.resolve(new It(a)));case 13:if("function"!=typeof a.read){d.next=18;break}if(l=Number(l),Number.isFinite(l)){d.next=17;break}return d.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return d.abrupt("return",Promise.resolve(new Dr(a,l)));case 18:return d.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return d.stop()}},n,null,[[1,8]])})),function r(n,a){return t.apply(this,arguments)})}]);var t}();function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Kr(n.key),n)}}function $e(e,t,r){return t&&qt(e.prototype,t),r&&qt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kr(e){var t=function Xr(e,t){if("object"!=ke(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ke(t)?t:t+""}var Gt=function(){return $e(function e(){We(this,e)},[{key:"createRequest",value:function(r,n){return new Vr(r,n)}},{key:"getName",value:function(){return"XHRHttpStack"}}])}(),Vr=function(){return $e(function e(t,r){We(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,r,!0),this._method=t,this._url=r,this._headers={}},[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(r,n){this._xhr.setRequestHeader(r,n),this._headers[r]=n}},{key:"getHeader",value:function(r){return this._headers[r]}},{key:"setProgressHandler",value:function(r){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(n){n.lengthComputable&&r(n.loaded)})}},{key:"send",value:function(){var r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise(function(a,l){r._xhr.onload=function(){a(new Yr(r._xhr))},r._xhr.onerror=function(c){l(c)},r._xhr.send(n)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}(),Yr=function(){return $e(function e(t){We(this,e),this._xhr=t},[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(r){return this._xhr.getResponseHeader(r)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}();function je(e){return(je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Mt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$r(n.key),n)}}function $r(e){var t=function Jr(e,t){if("object"!=je(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=je(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==je(t)?t:t+""}var Je=!1;try{Je="localStorage"in window;var Qe="tusSupport",Kt=localStorage.getItem(Qe);localStorage.setItem(Qe,Kt),null===Kt&&localStorage.removeItem(Qe)}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;Je=!1}var Xt=Je,Qr=function(){return function Wr(e,t,r){return t&&Mt(e.prototype,t),r&&Mt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function Zr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},[{key:"findAllUploads",value:function(){var r=this._findEntries("tus::");return Promise.resolve(r)}},{key:"findUploadsByFingerprint",value:function(r){var n=this._findEntries("tus::".concat(r,"::"));return Promise.resolve(n)}},{key:"removeUpload",value:function(r){return localStorage.removeItem(r),Promise.resolve()}},{key:"addUpload",value:function(r,n){var a=Math.round(1e12*Math.random()),l="tus::".concat(r,"::").concat(a);return localStorage.setItem(l,JSON.stringify(n)),Promise.resolve(l)}},{key:"_findEntries",value:function(r){for(var n=[],a=0;a<localStorage.length;a++){var l=localStorage.key(a);if(0===l.indexOf(r))try{var c=JSON.parse(localStorage.getItem(l));c.urlStorageKey=l,n.push(c)}catch{}}return n}}])}();function ge(e){return(ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function Vt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Wt(n.key),n)}}function Yt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yt=function(){return!!e})()}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}function et(e,t){return(et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n})(e,t)}function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
3t%2?Zt(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function un(e,t,r){return(t=Wt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wt(e){var t=function ln(e,t){if("object"!=ge(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ge(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ge(t)?t:t+""}var tt=be(be({},Ye.defaultOptions),{},{httpStack:new Gt,fileReader:new zr,urlStorage:Xt?new Qr:new Se,fingerprint:function qr(e,t){return Dt()?Promise.resolve(function Gr(e,t){var r=e.exif?function Mr(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",r,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}}),sn=function(e){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function en(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function rn(e,t,r){return t=He(t),function nn(e,t){if(t&&("object"===ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function on(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Yt()?Reflect.construct(t,r||[],He(e).constructor):t.apply(e,r))}(this,t,[r,n=be(be({},tt),n)])}return function an(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&et(e,t)}(t,e),function tn(e,t,r){return t&&Vt(e.prototype,t),r&&Vt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,null,[{key:"terminate",value:function(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a=be(be({},tt),a),Ye.terminate(n,a)}}])}(Ye),fn="function"==typeof XMLHttpRequest&&"function"==typeof Blob&&"function"==typeof Blob.prototype.slice},23028:(_e,re,L)=>{var N=L(25979),W=L(77308),pe=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,he=/[\n\r\t]/g,we=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,z=/:\d+$/,G=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,Y=/^[a-zA-Z]:/;function j(m){return(m||"").toString().replace(pe,"")}var A=[["#","hash"],["?","query"],function(v,y){return q(y.protocol)?v.replace(/\\/g,"/"):v},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],$={hash:1,query:1};function Ce(m){var v;v=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var S,p={},x=typeof(m=m||v.location||{});if("blob:"===m.protocol)p=new F(unescape(m.pathname),{});else if("string"===x)for(S in p=new F(m,{}),$)delete p[S];else if("object"===x){for(S in m)S in $||(p[S]=m[S]);void 0===p.slashes&&(p.slashes=we.test(m.href))}return p}function q(m){return"file:"===m||"ftp:"===m||"http:"===m||"https:"===m||"ws:"===m||"wss:"===m}function De(m,v){m=(m=j(m)).replace(he,""),v=v||{};var P,y=G.exec(m),p=y[1]?y[1].toLowerCase():"",x=!!y[2],S=!!y[3],R=0;return x?S?(P=y[2]+y[3]+y[4],R=y[2].length+y[3].length):(P=y[2]+y[4],R=y[2].length):S?(P=y[3]+y[4],R=y[3].length):P=y[4],"file:"===p?R>=2&&(P=P.slice(2)):q(p)?P=y[4]:p?x&&(P=P.slice(2)):R>=2&&q(v.protocol)&&(P=y[4]),{protocol:p,slashes:x||q(p),slashesCount:R,rest:P}}function F(m,v,y){if(m=(m=j(m)).replace(he,""),!(this instanceof F))return new F(m,v,y);var p,x,S,R,P,X,Se=A.slice(),Ue=typeof v,b=this,xe=0;for("object"!==Ue&&"string"!==Ue&&(y=v,v=null),y&&"function"!=typeof y&&(y=W.parse),p=!(x=De(m||"",v=Ce(v))).protocol&&!x.slashes,b.slashes=x.slashes||p&&v.slashes,b.protocol=x.protocol||v.protocol||"",m=x.rest,("file:"===x.protocol&&(2!==x.slashesCount||Y.test(m))||!x.slashes&&(x.protocol||x.slashesCount<2||!q(b.protocol)))&&(Se[3]=[/(.*)/,"pathname"]);xe<Se.length;xe++)"function"!=typeof(R=Se[xe])?(X=R[1],(S=R[0])!=S?b[X]=m:"string"==typeof S?~(P="@"===S?m.lastIndexOf(S):m.indexOf(S))&&("number"==typeof R[2]?(b[X]=m.slice(0,P),m=m.slice(P+R[2])):(b[X]=m.slice(P),m=m.slice(0,P))):(P=S.exec(m))&&(b[X]=P[1],m=m.slice(0,P.index)),b[X]=b[X]||p&&R[3]&&v[X]||"",R[4]&&(b[X]=b[X].toLowerCase())):m=R(m,b);y&&(b.query=y(b.query)),p&&v.slashes&&"/"!==b.pathname.charAt(0)&&(""!==b.pathname||""!==v.pathname)&&(b.pathname=function ne(m,v){if(""===m)return v;for(var y=(v||"/").split("/").slice(0,-1).concat(m.split("/")),p=y.length,x=y[p-1],S=!1,R=0;p--;)"."===y[p]?y.splice(p,1):".."===y[p]?(y.splice(p,1),R++):R&&(0===p&&(S=!0),y.splice(p,1),R--);return S&&y.unshift(""),("."===x||".."===x)&&y.push(""),y.join("/")}(b.pathname,v.pathname)),"/"!==b.pathname.charAt(0)&&q(b.protocol)&&(b.pathname="/"+b.pathname),N(b.port,b.protocol)||(b.host=b.hostname,b.port=""),b.username=b.password="",b.auth&&(~(P=b.auth.indexOf(":"))?(b.username=b.auth.slice(0,P),b.username=encodeURIComponent(decodeURIComponent(b.username)),b.password=b.auth.slice(P+1),b.password=encodeURIComponent(decodeURIComponent(b.password))):b.username=encodeURIComponent(decodeURIComponent(b.auth)),b.auth=b.password?b.username+":"+b.password:b.username),b.origin="file:"!==b.protocol&&q(b.protocol)&&b.host?b.protocol+"//"+b.host:"null",b.href=b.toString()}F.prototype={set:function ze(m,v,y){var p=this;switch(m){case"query":"string"==typeof v&&v.length&&(v=(y||W.parse)(v)),p[m]=v;break;case"port":p[m]=v,N(v,p.protocol)?v&&(p.host=p.hostname+":"+v):(p.host=p.hostname,p[m]="");break;case"hostname":p[m]=v,p.port&&(v+=":"+p.port),p.host=v;break;case"host":p[m]=v,z.test(v)?(v=v.split(":"),p.port=v.pop(),p.hostname=v.join(":")):(p.hostname=v,p.port="");break;case"protocol":p.protocol=v.toLowerCase(),p.slashes=!y;break;case"pathname":case"hash":if(v){var x="pathname"===m?"/":"#";p[m]=v.charAt(0)!==x?x+v:v}else p[m]=v;break;case"username":case"password":p[m]=encodeURIComponent(v);break;case"auth":var S=v.indexOf(":");~S?(p.username=v.slice(0,S),p.username=encodeURIComponent(decodeURIComponent(p.username)),p.password=v.slice(S+1),p.password=encodeURIComponent(decodeURIComponent(p.password))):p.username=encodeURIComponent(decodeURIComponent(v))}for(var R=0;R<A.length;R++){var P=A[R];P[4]&&(p[P[1]]=p[P[1]].toLowerCase())}return p.auth=p.password?p.username+":"+p.password:p.username,p.origin="file:"!==p.protocol&&q(p.protocol)&&p.host?p.protocol+"//"+p.host:"null",p.href=p.toString(),p},toString:function oe(m){(!m||"function"!=typeof m)&&(m=W.stringify);var v,y=this,p=y.host,x=y.protocol;
3x&&":"!==x.charAt(x.length-1)&&(x+=":");var S=x+(y.protocol&&y.slashes||q(y.protocol)?"//":"");return y.username?(S+=y.username,y.password&&(S+=":"+y.password),S+="@"):y.password?(S+=":"+y.password,S+="@"):"file:"!==y.protocol&&q(y.protocol)&&!p&&"/"!==y.pathname&&(S+="@"),(":"===p[p.length-1]||z.test(y.hostname)&&!y.port)&&(p+=":"),S+=p+y.pathname,(v="object"==typeof y.query?m(y.query):y.query)&&(S+="?"!==v.charAt(0)?"?"+v:v),y.hash&&(S+=y.hash),S}},F.extractProtocol=De,F.location=Ce,F.trimLeft=j,F.qs=W,_e.exports=F},25979:_e=>{_e.exports=function(L,N){if(N=N.split(":")[0],!(L=+L))return!1;switch(N){case"http":case"ws":return 80!==L;case"https":case"wss":return 443!==L;case"ftp":return 21!==L;case"gopher":return 70!==L;case"file":return!1}return 0!==L}},77308:(_e,re)=>{var L=Object.prototype.hasOwnProperty;function W(z){try{return decodeURIComponent(z.replace(/\+/g," "))}catch{return null}}function pe(z){try{return encodeURIComponent(z)}catch{return null}}re.stringify=function we(z,G){G=G||"";var j,A,Y=[];for(A in"string"!=typeof G&&(G="?"),z)if(L.call(z,A)){if(!(j=z[A])&&(null==j||isNaN(j))&&(j=""),A=pe(A),j=pe(j),null===A||null===j)continue;Y.push(A+"="+j)}return Y.length?G+Y.join("&"):""},re.parse=function he(z){for(var j,G=/([^=?#&]+)=?([^&]*)/g,Y={};j=G.exec(z);){var A=W(j[1]),$=W(j[2]);null===A||null===$||A in Y||(Y[A]=$)}return Y}}}]); 4//# sourceMappingURL=208.23668f9ae9814fb2.js.map 5//# debugId=05e21676-7de4-56ba-ae7f-0a3f659e1c4d
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.