PageSourceSearch

https://circleofangels.nl/wp-content/plugins/bp-better-messages/assets/js/modules/files/tus.min.js

js circleofangels.nl collected 2026-09-30 15:05:59 UTC 67,853 bytes, 2 lines download raw bytes

1/*! For license information please see tus.min.js.LICENSE.txt */
2"use strict";(this.webpackChunkBetterMessages=this.webpackChunkBetterMessages||[]).push([["uppy-tus"],{14683:(t,r,o)=>{o(48598),o(44114),o(27495),o(25440);var i=Object.prototype.hasOwnProperty;function decode(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function encode(t){try{return encodeURIComponent(t)}catch(t){return null}}r.stringify=function querystringify(t,r){r=r||"";var o,a,l=[];for(a in"string"!=typeof r&&(r="?"),t)if(i.call(t,a)){if((o=t[a])||null!=o&&!isNaN(o)||(o=""),a=encode(a),o=encode(o),null===a||null===o)continue;l.push(a+"="+o)}return l.length?r+l.join("&"):""},r.parse=function querystring(t){for(var r,o=/([^=?#&]+)=?([^&]*)/g,i={};r=o.exec(t);){var a=decode(r[1]),l=decode(r[2]);null===a||null===l||a in i||(i[a]=l)}return i}},27385:(t,r,o)=>{o.r(r),o.d(r,{DefaultHttpStack:()=>I,DetailedError:()=>i,Upload:()=>M,canStoreURLs:()=>G,defaultOptions:()=>B,enableDebugLog:()=>enableDebugLog,isSupported:()=>K});o(52675),o(89463),o(2259),o(45700),o(16280),o(76918),o(2008),o(51629),o(23792),o(44114),o(89572),o(94170),o(2892),o(59904),o(67945),o(84185),o(83851),o(81278),o(40875),o(79432),o(63548),o(10287),o(26099),o(60825),o(47764),o(98992),o(54520),o(3949),o(23500),o(62953),o(28706),o(25276),o(23288),o(36033),o(38781);function _typeof(t){return _typeof="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},_typeof(t)}function _defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_toPropertyKey(i.key),i)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(r)?r:r+""}function _callSuper(t,r,o){return r=_getPrototypeOf(r),function _possibleConstructorReturn(t,r){if(r&&("object"===_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_isNativeReflectConstruct()?Reflect.construct(r,o||[],_getPrototypeOf(t).constructor):r.apply(t,o))}function _wrapNativeSuper(t){var r="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function _wrapNativeSuper(t){if(null===t||!function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(r){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,Wrapper)}function Wrapper(){return function _construct(t,r,o){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,r);var a=new(t.bind.apply(t,i));return o&&_setPrototypeOf(a,o.prototype),a}(t,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(t.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,t)},_wrapNativeSuper(t)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _setPrototypeOf(t,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){return t.__proto__=r,t},_setPrototypeOf(t,r)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}const i=function(t){function DetailedError(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,DetailedError),(r=_callSuper(this,DetailedError,[t])).originalRequest=i,r.originalResponse=a,r.causingError=o,null!=o&&(t+=", caused by ".concat(o.toString())),null!=i){var l=i.getHeader("X-Request-ID")||"n/a",u=i.getMethod(),c=i.getURL(),p=a?a.getStatus():"n/a",h=a?a.getBody()||"":"n/a";t+=", originated from request (method: ".concat(u,", url: ").concat(c,", response code: ").concat(p,", response text: ").concat(h,", request id: ").concat(l,")")}return r.message=t,r}return function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&_setPrototypeOf(t,r)}(DetailedError,t),function _createClass(t,r,o){return r&&_defineProperties(t.prototype,r),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(DetailedError)}(_wrapNativeSuper(Error));var a=!1;function enableDebugLog(){a=!0}function log(t){a&&console.log(t)}o(3362);function noopUrlStorage_typeof(t){return noopUrlStorage_typeof="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},noopUrlStorage_typeof(t)}function noopUrlStorage_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,noopUrlStorage_toPropertyKey(i.key),i)}}function noopUrlStorage_toPropertyKey(t){var r=function noopUrlStorage_toPrimitive(t,r){if("object"!=noopUrlStorage_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=noopUrlStorage_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
2(t,"string");return"symbol"==noopUrlStorage_typeof(r)?r:r+""}var l=function(){return function noopUrlStorage_createClass(t,r,o){return r&&noopUrlStorage_defineProperties(t.prototype,r),o&&noopUrlStorage_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(function NoopUrlStorage(){!function noopUrlStorage_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,NoopUrlStorage)},[{key:"listAllUploads",value:function listAllUploads(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function findUploadsByFingerprint(t){return Promise.resolve([])}},{key:"removeUpload",value:function removeUpload(t){return Promise.resolve()}},{key:"addUpload",value:function addUpload(t,r){return Promise.resolve(null)}}])}();o(23418),o(74423),o(64346),o(48598),o(62062),o(94490),o(34782),o(62010),o(40150),o(25843),o(5506),o(27495),o(90906),o(81454),o(76031);const u="function"==typeof btoa,c="function"==typeof Buffer,p=("function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder?new TextEncoder:void 0),h=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),d=((t=>{let r={};t.forEach((t,o)=>r[t]=o)})(h),String.fromCharCode.bind(String)),y=("function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),t=>t.replace(/=/g,"").replace(/[+\/]/g,t=>"+"==t?"-":"_")),btoaPolyfill=t=>{let r,o,i,a,l="";const u=t.length%3;for(let u=0;u<t.length;){if((o=t.charCodeAt(u++))>255||(i=t.charCodeAt(u++))>255||(a=t.charCodeAt(u++))>255)throw new TypeError("invalid character found");r=o<<16|i<<8|a,l+=h[r>>18&63]+h[r>>12&63]+h[r>>6&63]+h[63&r]}return u?l.slice(0,u-3)+"===".substring(u):l},v=u?t=>btoa(t):c?t=>Buffer.from(t,"binary").toString("base64"):btoaPolyfill,m=c?t=>Buffer.from(t).toString("base64"):t=>{let r=[];for(let o=0,i=t.length;o<i;o+=4096)r.push(d.apply(null,t.subarray(o,o+4096)));return v(r.join(""))},cb_utob=t=>{if(t.length<2)return(r=t.charCodeAt(0))<128?t:r<2048?d(192|r>>>6)+d(128|63&r):d(224|r>>>12&15)+d(128|r>>>6&63)+d(128|63&r);var r=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return d(240|r>>>18&7)+d(128|r>>>12&63)+d(128|r>>>6&63)+d(128|63&r)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=t=>t.replace(_,cb_utob),g=c?t=>Buffer.from(t,"utf8").toString("base64"):p?t=>m(p.encode(t)):t=>v(utob(t)),encode=(t,r=!1)=>r?y(g(t)):g(t),b=encode;var w=o(92229),S=o.n(w);o(25440);function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,o){t[r]=o.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",p=l.toStringTag||"@@toStringTag";function define(t,r,o){return Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,o){return t[r]=o}}function wrap(t,r,o,i){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(i||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,o,c)}),u}function tryCatch(t,r,o){try{return{type:"normal",arg:t.call(r,o)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",d="suspendedYield",y="executing",v="completed",m={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var _={};define(_,u,function(){return this});var g=Object.getPrototypeOf,b=g&&g(g(values([])));b&&b!==o&&i.call(b,u)&&(_=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(_);function defineIteratorMethods(t){["next","throw","return"].forEach(function(r){define(t,r,function(t){return this._invoke(r,t)})})}function AsyncIterator(t,r){function invoke(o,a,l,u){var c=tryCatch(t[o],t,a);if("throw"!==c.type){var p=c.arg,h=p.value;return h&&"object"==upload_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then(function(t){invoke("next",t,l,u)},function(t){invoke("throw",t,l,u)}):r.resolve(h).then(function(t){p.value=t,l(p)},function(t){return invoke("throw",t,l,u)})}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r(function(r,o){invoke(t,
vendor: 5,357 bytes, line 2
2i,r,o)})}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,o,i){var a=h;return function(l,u){if(a===y)throw Error("Generator is already running");if(a===v){if("throw"===l)throw u;return{value:t,done:!0}}for(i.method=l,i.arg=u;;){var c=i.delegate;if(c){var p=maybeInvokeDelegate(c,i);if(p){if(p===m)continue;return p}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(a===h)throw a=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a=y;var _=tryCatch(r,o,i);if("normal"===_.type){if(a=i.done?v:d,_.arg===m)continue;return{value:_.arg,done:i.done}}"throw"===_.type&&(a=v,i.method="throw",i.arg=_.arg)}}}function maybeInvokeDelegate(r,o){var i=o.method,a=r.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&r.iterator.return&&(o.method="return",o.arg=t,maybeInvokeDelegate(r,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+i+"' method")),m;var l=tryCatch(a,r.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,m;var u=l.arg;return u?u.done?(o[r.resultName]=u.value,o.next=r.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,m):u:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,m)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var o=r[u];if(o)return o.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,l=function next(){for(;++a<r.length;)if(i.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(upload_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,p,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,p,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this}),r.AsyncIterator=AsyncIterator,r.async=function(t,o,i,a,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(t,o,i,a),l);return r.isGeneratorFunction(o)?u:u.next().then(function(t){return t.done?t.value:u.next()})},defineIteratorMethods(w),define(w,p,"Generator"),define(w,u,function(){return this}),define(w,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),o=[];for(var i in r)o.push(i);return o.reverse(),function next(){for(;o.length;){var t=o.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var o in this)"t"===o.charAt(0)&&i.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var o=this;function handle(i,a){return u.type="throw",u.arg=r,o.next=i,a&&(o.method="next",o.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var c=i.call(l,"catchLoc"),p=i.call(l,"finallyLoc");if(c&&p){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!p)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var l=a;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,m):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),resetTryEntry(o),m}}
2,"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc===t){var i=o.completion;if("throw"===i.type){var a=i.arg;resetTryEntry(o)}return a}}throw Error("illegal catch attempt")},delegateYield:function delegateYield(r,o,i){return this.delegate={iterator:values(r),resultName:o,nextLoc:i},"next"===this.method&&(this.arg=t),m}},r}function asyncGeneratorStep(t,r,o,i,a,l,u){try{var c=t[l](u),p=c.value}catch(t){return void o(t)}c.done?r(p):Promise.resolve(p).then(i,a)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i,a,l,u,c=[],p=!0,h=!1;try{if(l=(o=o.call(t)).next,0===r){if(Object(o)!==o)return;p=!1}else for(;!(p=(i=l.call(o)).done)&&(c.push(i.value),c.length!==r);p=!0);}catch(t){h=!0,a=t}finally{try{if(!p&&null!=o.return&&(u=o.return(),Object(u)!==u))return}finally{if(h)throw a}}return c}}(t,r)||_unsupportedIterableToArray(t,r)||function _nonIterableRest(){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 upload_typeof(t){return upload_typeof="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},upload_typeof(t)}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,i=new Array(r);o<r;o++)i[o]=t[o];return i}function ownKeys(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,i)}return o}function _objectSpread(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(o),!0).forEach(function(r){_defineProperty(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))})}return t}function _defineProperty(t,r,o){return(r=upload_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function upload_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,upload_toPropertyKey(i.key),i)}}function upload_toPropertyKey(t){var r=function upload_toPrimitive(t,r){if("object"!=upload_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=upload_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==upload_typeof(r)?r:r+""}var P="tus-v1",U="ietf-draft-03",k="ietf-draft-05",x={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:defaultOnShouldRetry,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:P},O=function(){function BaseUpload(t,r){!function upload_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,BaseUpload),"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 upload_createClass(t,r,o){return r&&upload_defineProperties(t.prototype,r),o&&upload_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(BaseUpload,[{key:"findPreviousUploads",value:function findPreviousUploads(){var t=this;return this.options.fingerprint(this.file,this.options).then(function(r){return t._urlStorage.findUploadsByFingerprint(r)})}},{key:"resumeFromPreviousUpload",value:function resumeFromPreviousUpload(t){this.url=t.uploadUrl||null,this._parallelUploadUrls=t.parallelUploadUrls||null,this._urlStorageKey=t.urlStorageKey}},{key:"start",value:function start(){var t=this,r=this.file;if(r)if([P,U,k].includes(this.options.protocol))if(this.options.endpoint||this.options.uploadUrl||this.url){var o=this.options.retryDelays;if(null==o||"[object Array]"===Object.prototype.toString.call(o)){if(this.options.parallelUploads>1)for(var i=0,a=["uploadUrl","uploadSize","uploadLengthDeferred"];i<a.length;i++){var l=a[i];if(this.options[l])return void this._emitError(new Error("tus: cannot use the ".concat(l," 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(r,this.options).then(function(o){return log(null==o?"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.":"Calculated fingerprint: ".concat(o)),t._fingerprint=o,t._source?t._source:t.options.fileReader.openFile(r,t.options.chunkSize)}).then(function(r){if(t._source=r,t.options.uploadLengthDeferred)t._size=null;else if(null!=t.options.uploadSize){if(t._size=Number(t.options.uploadSize),Number.isNaN(t._size))return void t._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(t._size=t._source.size,null==t._size)return void t._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));t.options.parallelUploads>1||null!=t._parallelUploadUrls?t._startParallelUpload():t._startSingleUpload()}).catch(function(r){t._emitError(r)})}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 _startParallelUpload(){var t,r=this,o=this._size,i=0;this._parallelUploads=[];var a=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,l=null!==(t=this.options.parallelUploadBoundaries)&&void 0!==t?t:function splitSizeIntoParts(t,r){for(var o=Math.floor(t/r),i=[],a=0;a<r;a++)i.push({start:o*a,end:o*(a+1)});return i[r-1].end=t,i}(this._source.size,a);this._parallelUploadUrls&&l.forEach(function(t,o){t.uploadUrl=r._parallelUploadUrls[o]||null}),this._parallelUploadUrls=new Array(l.length);var u,c=l.map(function(t,a){var u=0;return r._source.slice(t.start,t.end).then(function(c){var p=c.value;return new Promise(function(c,h){var d=_objectSpread(_objectSpread({},r.options),{},{uploadUrl:t.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:r.options.metadataForPartialUploads,headers:_objectSpread(_objectSpread({},r.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:c,onError:h,onProgress:function onProgress(t){i=i-u+t,u=t,r._emitProgress(i,o)},onUploadUrlAvailable:function onUploadUrlAvailable(){r._parallelUploadUrls[a]=y.url,r._parallelUploadUrls.filter(function(t){return Boolean(t)}).length===l.length&&r._saveUploadInUrlStorage()}}),y=new BaseUpload(p,d);y.start(),r._parallelUploads.push(y)})})});Promise.all(c).then(function(){(u=r._openRequest("POST",r.options.endpoint)).setHeader("Upload-Concat","final;".concat(r._parallelUploadUrls.join(" ")));var t=encodeMetadata(r.options.metadata);return""!==t&&u.setHeader("Upload-Metadata",t),r._sendRequest(u,null)}).then(function(t){if(inStatusCategory(t.getStatus(),200)){var o=t.getHeader("Location");null!=o?(r.url=resolveUrl(r.options.endpoint,o),log("Created upload at ".concat(r.url)),r._emitSuccess(t)):r._emitHttpError(u,t,"tus: invali
2d or missing Location header")}else r._emitHttpError(u,t,"tus: unexpected response while creating upload")}).catch(function(t){r._emitError(t)})}},{key:"_startSingleUpload",value:function _startSingleUpload(){return this._aborted=!1,null!=this.url?(log("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?(log("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):(log("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function abort(t){var r=this;if(null!=this._parallelUploads){var o,i=function _createForOfIteratorHelper(t,r){var o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){o&&(t=o);var i=0,a=function F(){};return{s:a,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},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 l,u=!0,c=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==o.return||o.return()}finally{if(c)throw l}}}}(this._parallelUploads);try{for(i.s();!(o=i.n()).done;){o.value.abort(t)}}catch(t){i.e(t)}finally{i.f()}}return null!==this._req&&this._req.abort(),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?BaseUpload.terminate(this.url,this.options).then(function(){return r._removeFromUrlStorage()}):Promise.resolve()}},{key:"_emitHttpError",value:function _emitHttpError(t,r,o,a){this._emitError(new i(o,a,t,r))}},{key:"_emitError",value:function _emitError(t){var r=this;if(!this._aborted){if(null!=this.options.retryDelays)if(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),shouldRetry(t,this._retryAttempt,this.options)){var o=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout(function(){r.start()},o))}if("function"!=typeof this.options.onError)throw t;this.options.onError(t)}}},{key:"_emitSuccess",value:function _emitSuccess(t){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess({lastResponse:t})}},{key:"_emitProgress",value:function _emitProgress(t,r){"function"==typeof this.options.onProgress&&this.options.onProgress(t,r)}},{key:"_emitChunkComplete",value:function _emitChunkComplete(t,r,o){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(t,r,o)}},{key:"_createUpload",value:function _createUpload(){var t=this;if(this.options.endpoint){var r=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?r.setHeader("Upload-Defer-Length","1"):r.setHeader("Upload-Length","".concat(this._size));var o,i=encodeMetadata(this.options.metadata);""!==i&&r.setHeader("Upload-Metadata",i),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,o=this._addChunkToRequest(r)):(this.options.protocol!==U&&this.options.protocol!==k||r.setHeader("Upload-Complete","?0"),o=this._sendRequest(r,null)),o.then(function(o){if(inStatusCategory(o.getStatus(),200)){var i=o.getHeader("Location");if(null!=i){if(t.url=resolveUrl(t.options.endpoint,i),log("Created upload at ".concat(t.url)),"function"==typeof t.options.onUploadUrlAvailable&&t.options.onUploadUrlAvailable(),0===t._size)return t._emitSuccess(o),void t._source.close();t._saveUploadInUrlStorage().then(function(){t.options.uploadDataDuringCreation?t._handleUploadResponse(r,o):(t._offset=0,t._performUpload())})}else t._emitHttpError(r,o,"tus: invalid or missing Location header")}else t._emitHttpError(r,o,"tus: unexpected response while creating upload")}).catch(function(o){t._emitHttpError(r,null,"tus: failed to create upload",o)})}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function _resumeUpload(){var t=this,r=this._openRequest("HEAD",this.url);
2this._sendRequest(r,null).then(function(o){var i=o.getStatus();if(!inStatusCategory(i,200))return 423===i?void t._emitHttpError(r,o,"tus: upload is currently locked; retry later"):(inStatusCategory(i,400)&&t._removeFromUrlStorage(),t.options.endpoint?(t.url=null,void t._createUpload()):void t._emitHttpError(r,o,"tus: unable to resume upload (new upload cannot be created without an endpoint)"));var a=Number.parseInt(o.getHeader("Upload-Offset"),10);if(Number.isNaN(a))t._emitHttpError(r,o,"tus: invalid or missing offset value");else{var l=Number.parseInt(o.getHeader("Upload-Length"),10);!Number.isNaN(l)||t.options.uploadLengthDeferred||t.options.protocol!==P?("function"==typeof t.options.onUploadUrlAvailable&&t.options.onUploadUrlAvailable(),t._saveUploadInUrlStorage().then(function(){if(a===l)return t._emitProgress(l,l),void t._emitSuccess(o);t._offset=a,t._performUpload()})):t._emitHttpError(r,o,"tus: invalid or missing length value")}}).catch(function(o){t._emitHttpError(r,null,"tus: failed to resume upload",o)})}},{key:"_performUpload",value:function _performUpload(){var t,r=this;this._aborted||(this.options.overridePatchMethod?(t=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):t=this._openRequest("PATCH",this.url),t.setHeader("Upload-Offset","".concat(this._offset)),this._addChunkToRequest(t).then(function(o){inStatusCategory(o.getStatus(),200)?r._handleUploadResponse(t,o):r._emitHttpError(t,o,"tus: unexpected response while uploading chunk")}).catch(function(o){r._aborted||r._emitHttpError(t,null,"tus: failed to upload chunk at offset ".concat(r._offset),o)}))}},{key:"_addChunkToRequest",value:function _addChunkToRequest(t){var r=this,o=this._offset,i=this._offset+this.options.chunkSize;return t.setProgressHandler(function(t){r._emitProgress(o+t,r._size)}),this.options.protocol===P?t.setHeader("Content-Type","application/offset+octet-stream"):this.options.protocol===k&&t.setHeader("Content-Type","application/partial-upload"),(i===Number.POSITIVE_INFINITY||i>this._size)&&!this.options.uploadLengthDeferred&&(i=this._size),this._source.slice(o,i).then(function(o){var i=o.value,a=o.done,l=null!=i&&i.size?i.size:0;r.options.uploadLengthDeferred&&a&&(r._size=r._offset+l,t.setHeader("Upload-Length","".concat(r._size)));var u=r._offset+l;return!r.options.uploadLengthDeferred&&a&&u!==r._size?Promise.reject(new Error("upload was configured with a size of ".concat(r._size," bytes, but the source is done after ").concat(u," bytes"))):null===i?r._sendRequest(t):(r.options.protocol!==U&&r.options.protocol!==k||t.setHeader("Upload-Complete",a?"?1":"?0"),r._emitProgress(r._offset,r._size),r._sendRequest(t,i))})}},{key:"_handleUploadResponse",value:function _handleUploadResponse(t,r){var o=Number.parseInt(r.getHeader("Upload-Offset"),10);if(Number.isNaN(o))this._emitHttpError(t,r,"tus: invalid or missing offset value");else{if(this._emitProgress(o,this._size),this._emitChunkComplete(o-this._offset,o,this._size),this._offset=o,o===this._size)return this._emitSuccess(r),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function _openRequest(t,r){var o=openRequest(t,r,this.options);return this._req=o,o}},{key:"_removeFromUrlStorage",value:function _removeFromUrlStorage(){var t=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(r){t._emitError(r)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function _saveUploadInUrlStorage(){var t=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||null!==this._urlStorageKey)return Promise.resolve();var r={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};return this._parallelUploads?r.parallelUploadUrls=this._parallelUploadUrls:r.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,r).then(function(r){t._urlStorageKey=r})}},{key:"_sendRequest",value:function _sendRequest(t){return sendRequest(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],[{key:"terminate",value:function terminate(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=openRequest("DELETE",t,r);return sendRequest(o,null,r).then(function(t){if(204!==t.getStatus())throw new i("tus: unexpected response while terminating upload",null,o,t)}
2).catch(function(a){if(a instanceof i||(a=new i("tus: failed to terminate upload",a,o,null)),!shouldRetry(a,0,r))throw a;var l=r.retryDelays[0],u=r.retryDelays.slice(1),c=_objectSpread(_objectSpread({},r),{},{retryDelays:u});return new Promise(function(t){return setTimeout(t,l)}).then(function(){return BaseUpload.terminate(t,c)})})}}])}();function encodeMetadata(t){return Object.entries(t).map(function(t){var r=_slicedToArray(t,2),o=r[0],i=r[1];return"".concat(o," ").concat(b(String(i)))}).join(",")}function inStatusCategory(t,r){return t>=r&&t<r+100}function openRequest(t,r,o){var i=o.httpStack.createRequest(t,r);o.protocol===U?i.setHeader("Upload-Draft-Interop-Version","5"):o.protocol===k?i.setHeader("Upload-Draft-Interop-Version","6"):i.setHeader("Tus-Resumable","1.0.0");for(var a=o.headers||{},l=0,u=Object.entries(a);l<u.length;l++){var c=_slicedToArray(u[l],2),p=c[0],h=c[1];i.setHeader(p,h)}if(o.addRequestId){var d=function uuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=16*Math.random()|0;return("x"===t?r:3&r|8).toString(16)})}();i.setHeader("X-Request-ID",d)}return i}function sendRequest(_x,t,r){return _sendRequest2.apply(this,arguments)}function _sendRequest2(){return _sendRequest2=function _asyncToGenerator(t){return function(){var r=this,o=arguments;return new Promise(function(i,a){var l=t.apply(r,o);function _next(t){asyncGeneratorStep(l,i,a,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(l,i,a,_next,_throw,"throw",t)}_next(void 0)})}}(_regeneratorRuntime().mark(function _callee(t,r,o){var i;return _regeneratorRuntime().wrap(function _callee$(a){for(;;)switch(a.prev=a.next){case 0:if("function"!=typeof o.onBeforeRequest){a.next=3;break}return a.next=3,o.onBeforeRequest(t);case 3:return a.next=5,t.send(r);case 5:if(i=a.sent,"function"!=typeof o.onAfterResponse){a.next=9;break}return a.next=9,o.onAfterResponse(t,i);case 9:return a.abrupt("return",i);case 10:case"end":return a.stop()}},_callee)})),_sendRequest2.apply(this,arguments)}function shouldRetry(t,r,o){return!(null==o.retryDelays||r>=o.retryDelays.length||null==t.originalRequest)&&(o&&"function"==typeof o.onShouldRetry?o.onShouldRetry(t,r,o):defaultOnShouldRetry(t))}function defaultOnShouldRetry(t){var r=t.originalResponse?t.originalResponse.getStatus():0;return(!inStatusCategory(r,400)||409===r||423===r)&&function isOnline(){var t=!0;return"undefined"!=typeof navigator&&!1===navigator.onLine&&(t=!1),t}()}function resolveUrl(t,r){return new(S())(r,t).toString()}O.defaultOptions=x;const E=O;o(25428);const R=function isReactNative(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()};function uriToBlob(t){return new Promise(function(r,o){var i=new XMLHttpRequest;i.responseType="blob",i.onload=function(){var t=i.response;r(t)},i.onerror=function(t){o(t)},i.open("GET",t),i.send()})}const C=function isCordova(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)};o(54743),o(11745),o(38309),o(21489),o(48140),o(81630),o(72170),o(75044),o(69539),o(31694),o(89955),o(21903),o(91134),o(33206),o(44496),o(66651),o(12887),o(19369),o(66812),o(8995),o(31575),o(36072),o(88747),o(28845),o(29423),o(57301),o(373),o(86614),o(41405),o(33684),o(43250),o(10149),o(24082);function FileSource_typeof(t){return FileSource_typeof="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},FileSource_typeof(t)}function FileSource_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,FileSource_toPropertyKey(i.key),i)}}function FileSource_toPropertyKey(t){var r=function FileSource_toPrimitive(t,r){if("object"!=FileSource_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=FileSource_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
2(t,"string");return"symbol"==FileSource_typeof(r)?r:r+""}var j=function(){return function FileSource_createClass(t,r,o){return r&&FileSource_defineProperties(t.prototype,r),o&&FileSource_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(function FileSource(t){!function FileSource_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,FileSource),this._file=t,this.size=t.size},[{key:"slice",value:function slice(t,r){if(C())return function readAsByteArray(t){return new Promise(function(r,o){var i=new FileReader;i.onload=function(){var t=new Uint8Array(i.result);r({value:t})},i.onerror=function(t){o(t)},i.readAsArrayBuffer(t)})}(this._file.slice(t,r));var o=this._file.slice(t,r),i=r>=this.size;return Promise.resolve({value:o,done:i})}},{key:"close",value:function close(){}}])}();function StreamSource_typeof(t){return StreamSource_typeof="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},StreamSource_typeof(t)}function StreamSource_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,StreamSource_toPropertyKey(i.key),i)}}function StreamSource_toPropertyKey(t){var r=function StreamSource_toPrimitive(t,r){if("object"!=StreamSource_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=StreamSource_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==StreamSource_typeof(r)?r:r+""}function len(t){return void 0===t?0:void 0!==t.size?t.size:t.length}var L=function(){return function StreamSource_createClass(t,r,o){return r&&StreamSource_defineProperties(t.prototype,r),o&&StreamSource_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(function StreamSource(t){!function StreamSource_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,StreamSource),this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1},[{key:"slice",value:function slice(t,r){return t<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(t,r)}},{key:"_readUntilEnoughDataOrDone",value:function _readUntilEnoughDataOrDone(t,r){var o=this,i=r<=this._bufferOffset+len(this._buffer);if(this._done||i){var a=this._getDataFromBuffer(t,r),l=null==a&&this._done;return Promise.resolve({value:a,done:l})}return this._reader.read().then(function(i){var a=i.value;return i.done?o._done=!0:void 0===o._buffer?o._buffer=a:o._buffer=function concat(t,r){if(t.concat)return t.concat(r);if(t instanceof Blob)return new Blob([t,r],{type:t.type});if(t.set){var o=new t.constructor(t.length+r.length);return o.set(t),o.set(r,t.length),o}throw new Error("Unknown data type")}(o._buffer,a),o._readUntilEnoughDataOrDone(t,r)})}},{key:"_getDataFromBuffer",value:function _getDataFromBuffer(t,r){t>this._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var o=0===len(this._buffer);return this._done&&o?null:this._buffer.slice(0,r-t)}},{key:"close",value:function close(){this._reader.cancel&&this._reader.cancel()}}])}();function fileReader_typeof(t){return fileReader_typeof="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},fileReader_typeof(t)}function fileReader_regeneratorRuntime(){fileReader_regeneratorRuntime=function _regeneratorRuntime(){return r};var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,o){t[r]=o.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",p=l.toStringTag||"@@toStringTag";function define(t,r,o){return Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{define({},"")}catch(t){define=function define(t,r,o){return t[r]=o}}function wrap(t,r,o,i){var l=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(l.prototype),c=new Context(i||[]);return a(u,"_invoke",{value:makeInvokeMethod(t,o,c)}),u}function tryCatch(t,r,o){try{return{type:"normal",arg:t.call(r,o)}}catch(t){return{type:"throw",arg:t}}}r.wrap=wrap;var h="suspendedStart",d="suspendedYield",y="executing",v="completed",m={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var _={};define(_,u,function(){return this});var g=Object.getPrototypeOf,b=g&&g(g(values([])));b&&b!==o&&i.call(b,u)&&(_=b);var w=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(_);function defineIteratorMethods(t){["next","throw","return"].forEach(function(r){define(t,r,function(t){return this._invoke(r,t)})})}function AsyncIterator(t,r){function invoke(o,a,l,u){var c=tryCatch(t[o],t,a);if("throw"!==c.type){var p=c.arg,h=p.value;return h&&"object"==fileReader_typeof(h)&&i.call(h,"__await")?r.resolve(h.__await).then(function(t){invoke("next",t,l,u)}
vendor: 5,620 bytes, line 2
2,function(t){invoke("throw",t,l,u)}):r.resolve(h).then(function(t){p.value=t,l(p)},function(t){return invoke("throw",t,l,u)})}u(c.arg)}var o;a(this,"_invoke",{value:function value(t,i){function callInvokeWithMethodAndArg(){return new r(function(r,o){invoke(t,i,r,o)})}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(r,o,i){var a=h;return function(l,u){if(a===y)throw Error("Generator is already running");if(a===v){if("throw"===l)throw u;return{value:t,done:!0}}for(i.method=l,i.arg=u;;){var c=i.delegate;if(c){var p=maybeInvokeDelegate(c,i);if(p){if(p===m)continue;return p}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(a===h)throw a=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);a=y;var _=tryCatch(r,o,i);if("normal"===_.type){if(a=i.done?v:d,_.arg===m)continue;return{value:_.arg,done:i.done}}"throw"===_.type&&(a=v,i.method="throw",i.arg=_.arg)}}}function maybeInvokeDelegate(r,o){var i=o.method,a=r.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&r.iterator.return&&(o.method="return",o.arg=t,maybeInvokeDelegate(r,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+i+"' method")),m;var l=tryCatch(a,r.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,m;var u=l.arg;return u?u.done?(o[r.resultName]=u.value,o.next=r.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,m):u:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,m)}function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(r){if(r||""===r){var o=r[u];if(o)return o.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,l=function next(){for(;++a<r.length;)if(i.call(r,a))return next.value=r[a],next.done=!1,next;return next.value=t,next.done=!0,next};return l.next=l}}throw new TypeError(fileReader_typeof(r)+" is not iterable")}return GeneratorFunction.prototype=GeneratorFunctionPrototype,a(w,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),a(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,p,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,p,"GeneratorFunction")),t.prototype=Object.create(w),t},r.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this}),r.AsyncIterator=AsyncIterator,r.async=function(t,o,i,a,l){void 0===l&&(l=Promise);var u=new AsyncIterator(wrap(t,o,i,a),l);return r.isGeneratorFunction(o)?u:u.next().then(function(t){return t.done?t.value:u.next()})},defineIteratorMethods(w),define(w,p,"Generator"),define(w,u,function(){return this}),define(w,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),o=[];for(var i in r)o.push(i);return o.reverse(),function next(){for(;o.length;){var t=o.pop();if(t in r)return next.value=t,next.done=!1,next}return next.done=!0,next}},r.values=values,Context.prototype={constructor:Context,reset:function reset(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!r)for(var o in this)"t"===o.charAt(0)&&i.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=t)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(r){if(this.done)throw r;var o=this;function handle(i,a){return u.type="throw",u.arg=r,o.next=i,a&&(o.method="next",o.arg=t),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return handle("end");if(l.tryLoc<=this.prev){var c=i.call(l,"catchLoc"),p=i.call(l,"finallyLoc");if(c&&p){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0);if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return handle(l.catchLoc,!0)}else{if(!p)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return handle(l.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var l=a;break}}l&&("break"===t||"continue"===t)&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var u=l?l.completion:{};return u.type=t,u.arg=r,l?(this.method="next",this.next=l.finallyLoc,m):this.complete(u)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),resetTryEntry(o),m}}
2,"catch":function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc===t){var i=o.completion;if("throw"===i.type){var a=i.arg;resetTryEntry(o)}return a}}throw Error("illegal catch attempt")},delegateYield:function delegateYield(r,o,i){return this.delegate={iterator:values(r),resultName:o,nextLoc:i},"next"===this.method&&(this.arg=t),m}},r}function fileReader_asyncGeneratorStep(t,r,o,i,a,l,u){try{var c=t[l](u),p=c.value}catch(t){return void o(t)}c.done?r(p):Promise.resolve(p).then(i,a)}function fileReader_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,fileReader_toPropertyKey(i.key),i)}}function fileReader_toPropertyKey(t){var r=function fileReader_toPrimitive(t,r){if("object"!=fileReader_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=fileReader_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==fileReader_typeof(r)?r:r+""}var T=function(){return function fileReader_createClass(t,r,o){return r&&fileReader_defineProperties(t.prototype,r),o&&fileReader_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(function FileReader(){!function fileReader_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,FileReader)},[{key:"openFile",value:(t=function fileReader_asyncToGenerator(t){return function(){var r=this,o=arguments;return new Promise(function(i,a){var l=t.apply(r,o);function _next(t){fileReader_asyncGeneratorStep(l,i,a,_next,_throw,"next",t)}function _throw(t){fileReader_asyncGeneratorStep(l,i,a,_next,_throw,"throw",t)}_next(void 0)})}}(fileReader_regeneratorRuntime().mark(function _callee(t,r){var o;return fileReader_regeneratorRuntime().wrap(function _callee$(i){for(;;)switch(i.prev=i.next){case 0:if(!R()||!t||void 0===t.uri){i.next=11;break}return i.prev=1,i.next=4,uriToBlob(t.uri);case 4:return o=i.sent,i.abrupt("return",new j(o));case 8:throw i.prev=8,i.t0=i.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(i.t0));case 11:if("function"!=typeof t.slice||void 0===t.size){i.next=13;break}return i.abrupt("return",Promise.resolve(new j(t)));case 13:if("function"!=typeof t.read){i.next=18;break}if(r=Number(r),Number.isFinite(r)){i.next=17;break}return i.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return i.abrupt("return",Promise.resolve(new L(t,r)));case 18:return i.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 i.stop()}},_callee,null,[[1,8]])})),function openFile(_x,r){return t.apply(this,arguments)})}]);var t}();o(60739),o(33110);function httpStack_typeof(t){return httpStack_typeof="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},httpStack_typeof(t)}function httpStack_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function httpStack_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,httpStack_toPropertyKey(i.key),i)}}function httpStack_createClass(t,r,o){return r&&httpStack_defineProperties(t.prototype,r),o&&httpStack_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function httpStack_toPropertyKey(t){var r=function httpStack_toPrimitive(t,r){if("object"!=httpStack_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=httpStack_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}
2(t,"string");return"symbol"==httpStack_typeof(r)?r:r+""}var I=function(){return httpStack_createClass(function XHRHttpStack(){httpStack_classCallCheck(this,XHRHttpStack)},[{key:"createRequest",value:function createRequest(t,r){return new A(t,r)}},{key:"getName",value:function getName(){return"XHRHttpStack"}}])}(),A=function(){return httpStack_createClass(function Request(t,r){httpStack_classCallCheck(this,Request),this._xhr=new XMLHttpRequest,this._xhr.open(t,r,!0),this._method=t,this._url=r,this._headers={}},[{key:"getMethod",value:function getMethod(){return this._method}},{key:"getURL",value:function getURL(){return this._url}},{key:"setHeader",value:function setHeader(t,r){this._xhr.setRequestHeader(t,r),this._headers[t]=r}},{key:"getHeader",value:function getHeader(t){return this._headers[t]}},{key:"setProgressHandler",value:function setProgressHandler(t){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(r){r.lengthComputable&&t(r.loaded)})}},{key:"send",value:function send(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise(function(o,i){t._xhr.onload=function(){o(new N(t._xhr))},t._xhr.onerror=function(t){i(t)},t._xhr.send(r)})}},{key:"abort",value:function abort(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function getUnderlyingObject(){return this._xhr}}])}(),N=function(){return httpStack_createClass(function Response(t){httpStack_classCallCheck(this,Response),this._xhr=t},[{key:"getStatus",value:function getStatus(){return this._xhr.status}},{key:"getHeader",value:function getHeader(t){return this._xhr.getResponseHeader(t)}},{key:"getBody",value:function getBody(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function getUnderlyingObject(){return this._xhr}}])}();function urlStorage_typeof(t){return urlStorage_typeof="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},urlStorage_typeof(t)}function urlStorage_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,urlStorage_toPropertyKey(i.key),i)}}function urlStorage_toPropertyKey(t){var r=function urlStorage_toPrimitive(t,r){if("object"!=urlStorage_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=urlStorage_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==urlStorage_typeof(r)?r:r+""}var D=!1;try{D="localStorage"in window;var q="tusSupport",H=localStorage.getItem(q);localStorage.setItem(q,H),null===H&&localStorage.removeItem(q)}catch(t){if(t.code!==t.SECURITY_ERR&&t.code!==t.QUOTA_EXCEEDED_ERR)throw t;D=!1}var G=D,z=function(){return function urlStorage_createClass(t,r,o){return r&&urlStorage_defineProperties(t.prototype,r),o&&urlStorage_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(function WebStorageUrlStorage(){!function urlStorage_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,WebStorageUrlStorage)},[{key:"findAllUploads",value:function findAllUploads(){var t=this._findEntries("tus::");return Promise.resolve(t)}},{key:"findUploadsByFingerprint",value:function findUploadsByFingerprint(t){var r=this._findEntries("tus::".concat(t,"::"));return Promise.resolve(r)}},{key:"removeUpload",value:function removeUpload(t){return localStorage.removeItem(t),Promise.resolve()}},{key:"addUpload",value:function addUpload(t,r){var o=Math.round(1e12*Math.random()),i="tus::".concat(t,"::").concat(o);return localStorage.setItem(i,JSON.stringify(r)),Promise.resolve(i)}},{key:"_findEntries",value:function _findEntries(t){for(var r=[],o=0;o<localStorage.length;o++){var i=localStorage.key(o);if(0===i.indexOf(t))try{var a=JSON.parse(localStorage.getItem(i));a.urlStorageKey=i,r.push(a)}catch(t){}}return r}}])}();function browser_typeof(t){return browser_typeof="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},browser_typeof(t)}function browser_defineProperties(t,r){for(var o=0;o<r.length;o++){var i=r[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,browser_toPropertyKey(i.key),i)}}function browser_callSuper(t,r,o){return r=browser_getPrototypeOf(r),function browser_possibleConstructorReturn(t,r){if(r&&("object"===browser_typeof(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function browser_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,browser_isNativeReflectConstruct()?Reflect.construct(r,o||[],browser_getPrototypeOf(t).constructor):r.apply(t,o))}function browser_isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(browser_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function browser_getPrototypeOf(t){return browser_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},browser_getPrototypeOf(t)}function browser_setPrototypeOf(t,r){return browser_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){return t.__proto__=r,t},browser_setPrototypeOf(t,r)}function browser_ownKeys(t,r){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);r&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),o.push.apply(o,i)}return o}function browser_objectSpread(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};
vendor: 8,254 bytes, line 2
2r%2?browser_ownKeys(Object(o),!0).forEach(function(r){browser_defineProperty(t,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):browser_ownKeys(Object(o)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(o,r))})}return t}function browser_defineProperty(t,r,o){return(r=browser_toPropertyKey(r))in t?Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[r]=o,t}function browser_toPropertyKey(t){var r=function browser_toPrimitive(t,r){if("object"!=browser_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,r||"default");if("object"!=browser_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==browser_typeof(r)?r:r+""}var B=browser_objectSpread(browser_objectSpread({},E.defaultOptions),{},{httpStack:new I,fileReader:new T,urlStorage:G?new z:new l,fingerprint:function fingerprint(t,r){return R()?Promise.resolve(function reactNativeFingerprint(t,r){var o=t.exif?function hashCode(t){var r=0;if(0===t.length)return r;for(var o=0;o<t.length;o++){r=(r<<5)-r+t.charCodeAt(o),r&=r}return r}(JSON.stringify(t.exif)):"noexif";return["tus-rn",t.name||"noname",t.size||"nosize",o,r.endpoint].join("/")}(t,r)):Promise.resolve(["tus-br",t.name,t.type,t.size,t.lastModified,r.endpoint].join("-"))}}),M=function(t){function Upload(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function browser_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Upload),browser_callSuper(this,Upload,[t,r=browser_objectSpread(browser_objectSpread({},B),r)])}return function browser_inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&browser_setPrototypeOf(t,r)}(Upload,t),function browser_createClass(t,r,o){return r&&browser_defineProperties(t.prototype,r),o&&browser_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(Upload,null,[{key:"terminate",value:function terminate(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r=browser_objectSpread(browser_objectSpread({},B),r),E.terminate(t,r)}}])}(E),K="function"==typeof XMLHttpRequest&&"function"==typeof Blob&&"function"==typeof Blob.prototype.slice},78490:t=>{t.exports=function required(t,r){if(r=r.split(":")[0],!(t=+t))return!1;switch(r){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}},92229:(t,r,o)=>{var i=o(1339);o(76918),o(28706),o(25276),o(48598),o(8921),o(44114),o(34782),o(54554),o(13609),o(23288),o(26099),o(27495),o(90906),o(38781),o(25440),o(43359),o(88267),o(13611);var a=o(78490),l=o(14683),u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,c=/[\n\r\t]/g,p=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,h=/:\d+$/,d=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,y=/^[a-zA-Z]:/;function trimLeft(t){return(t||"").toString().replace(u,"")}var v=[["#","hash"],["?","query"],function sanitize(t,r){return isSpecial(r.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],m={hash:1,query:1};function lolcation(t){var r,a=("undefined"!=typeof window?window:void 0!==o.g?o.g:"undefined"!=typeof self?self:{}).location||{},l={},u=i(t=t||a);if("blob:"===t.protocol)l=new Url(unescape(t.pathname),{});else if("string"===u)for(r in l=new Url(t,{}),m)delete l[r];else if("object"===u){for(r in t)r in m||(l[r]=t[r]);void 0===l.slashes&&(l.slashes=p.test(t.href))}return l}function isSpecial(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function extractProtocol(t,r){t=(t=trimLeft(t)).replace(c,""),r=r||{};var o,i=d.exec(t),a=i[1]?i[1].toLowerCase():"",l=!!i[2],u=!!i[3],p=0;return l?u?(o=i[2]+i[3]+i[4],p=i[2].length+i[3].length):(o=i[2]+i[4],p=i[2].length):u?(o=i[3]+i[4],p=i[3].length):o=i[4],"file:"===a?p>=2&&(o=o.slice(2)):isSpecial(a)?o=i[4]:a?l&&(o=o.slice(2)):p>=2&&isSpecial(r.protocol)&&(o=i[4]),{protocol:a,slashes:l||isSpecial(a),slashesCount:p,rest:o}}function Url(t,r,o){if(t=(t=trimLeft(t)).replace(c,""),!(this instanceof Url))return new Url(t,r,o);var u,p,h,d,m,_,g=v.slice(),b=i(r),w=this,S=0;for("object"!==b&&"string"!==b&&(o=r,r=null),o&&"function"!=typeof o&&(o=l.parse),u=!(p=extractProtocol(t||"",r=lolcation(r))).protocol&&!p.slashes,w.slashes=p.slashes||u&&r.slashes,w.protocol=p.protocol||r.protocol||"",t=p.rest,("file:"===p.protocol&&(2!==p.slashesCount||y.test(t))||!p.slashes&&(p.protocol||p.slashesCount<2||!isSpecial(w.protocol)))&&(g[3]=[/(.*)/,"pathname"]);S<g.length;S++)"function"!=typeof(d=g[S])?(h=d[0],_=d[1],h!=h?w[_]=t:"string"==typeof h?~(m="@"===h?t.lastIndexOf(h):t.indexOf(h))&&("number"==typeof d[2]?(w[_]=t.slice(0,m),t=t.slice(m+d[2])):(w[_]=t.slice(m),t=t.slice(0,m))):(m=h.exec(t))&&(w[_]=m[1],t=t.slice(0,m.index)),w[_]=w[_]||u&&d[3]&&r[_]||"",d[4]&&(w[_]=w[_].toLowerCase())):t=d(t,w);o&&(w.query=o(w.query)),u&&r.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==r.pathname)&&(w.pathname=function resolve(t,r){if(""===t)return r;for(var o=(r||"/").split("/").slice(0,-1).concat(t.split("/")),i=o.length,a=o[i-1],l=!1,u=0;i--;)"."===o[i]?o.splice(i,1):".."===o[i]?(o.splice(i,1),u++):u&&(0===i&&(l=!0),o.splice(i,1),u--);return l&&o.unshift(""),"."!==a&&".."!==a||o.push(""),o.join("/")}(w.pathname,r.pathname)),"/"!==w.pathname.charAt(0)&&isSpecial(w.protocol)&&(w.pathname="/"+w.pathname),a(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(m=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,m),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(m+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&isSpecial(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}Url.prototype={set:function set(t,r,o){var i=this;switch(t){case"query":"string"==typeof r&&r.length&&(r=(o||l.parse)(r)),i[t]=r;break;case"port":i[t]=r,a(r,i.protocol)?r&&(i.host=i.hostname+":"+r):(i.host=i.hostname,i[t]="");break;case"hostname":i[t]=r,i.port&&(r+=":"+i.port),i.host=r;break;case"host":i[t]=r,h.test(r)?(r=r.split(":"),i.port=r.pop(),i.hostname=r.join(":")):(i.hostname=r,i.port="");break;case"protocol":i.protocol=r.toLowerCase(),i.slashes=!o;break;case"pathname":case"hash":if(r){var u="pathname"===t?"/":"#";i[t]=r.charAt(0)!==u?u+r:r}else i[t]=r;break;case"username":case"password":i[t]=encodeURIComponent(r);break;case"auth":var c=r.indexOf(":");~c?(i.username=r.slice(0,c),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=r.slice(c+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(r))}for(var p=0;p<v.length;p++){var d=v[p];d[4]&&(i[d[1]]=i[d[1]].toLowerCase())}return i.auth=i.password?i.username+":"+i.password:i.username,i.origin="file:"!==i.protocol&&isSpecial(i.protocol)&&i.host?i.protocol+"//"+i.host:"null",i.href=i.toString(),i},toString:function toString(t){t&&"function"==typeof t||(t=l.stringify);var r,o=this,a=o.host,u=o.protocol;u&&":"!==u.charAt(u.length-1)&&(u+=":");var c=u+(o.protocol&&o.slashes||isSpecial(o.protocol)?"//":"");return o.username?(c+=o.username,o.password&&(c+=":"+o.password),c+="@"):o.password?(c+=":"+o.password,c+="@"):"file:"!==o.protocol&&isSpecial(o.protocol)&&!a&&"/"!==o.pathname&&(c+="@"),(":"===a[a.length-1]||h.test(o.hostname)&&!o.port)&&(a+=":"),c+=a+o.pathname,(r="object"===i(o.query)?t(o.query):o.query)&&(c+="?"!==r.charAt(0)?"?"+r:r),o.hash&&(c+=o.hash),c}},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=l,t.exports=Url}}]);

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.