(this.webpackJsonpLivePlayer=this.webpackJsonpLivePlayer||[]).push([[2],{92:function(e,t,r){var n;n=()=>{return n={561:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,o.default)("/******/ (() => { // webpackBootstrap\nvar __webpack_exports__ = {};\n(function () {\n  let statsURL = null;\n  let sendTime = 60000;\n  let jsonTable = {};\n  let sendingInterval = null;\n\n  self.addEventListener(\n    'message',\n    function (e) {\n      let data = e.data;\n      //Get command parameter to identify operation\n      const { command, commandObj } = data;\n      switch (command) {\n        case 'start':\n          statsURL = commandObj\n            .replace(/ws:/, 'http:')\n            .replace(/wss:/, 'https:')\n            .replace(/mse_ld/, 'sessions');\n          start();\n          break;\n        case 'time':\n          correctSendTime(commandObj);\n          break;\n        case 'stop':\n          stop();\n          break;\n        case 'add':\n          addToTable(commandObj);\n          break;\n        default:\n          break;\n      }\n    },\n    false\n  );\n\n  function correctSendTime(time) {\n    sendTime = time;\n  }\n\n  function start() {\n    sendingInterval = this.setInterval(() => {\n      post();\n    }, sendTime);\n  }\n\n  function stop() {\n    post();\n    clearInterval(sendingInterval);\n  }\n\n  function addToTable(data) {\n    jsonTable = { ...jsonTable, ...data };\n\n    if (data.event && data.event === 'play_stop') {\n      stop();\n    }\n  }\n\n  // function roughSizeOfObject(object) {\n  //   let objectList = [];\n  //   let stack = [object];\n  //   let bytes = 0;\n\n  //   while (stack.length) {\n  //     let value = stack.pop();\n\n  //     if (typeof value === 'boolean') {\n  //       bytes += 4;\n  //     } else if (typeof value === 'string') {\n  //       bytes += value.length * 2;\n  //     } else if (typeof value === 'number') {\n  //       bytes += 8;\n  //     } else if (typeof value === 'object' && objectList.indexOf(value) === -1) {\n  //       objectList.push(value);\n\n  //       for (let i in value) {\n  //         stack.push(value[i]);\n  //       }\n  //     }\n  //   }\n  //   return bytes;\n  // }\n\n  function post() {\n    if (!jsonTable.started_at) {\n      return;\n    }\n\n    const { source_id } = jsonTable;\n    const newUrl = statsURL.replace(/sessions/, `sessions/${source_id ? `${source_id}` : ''}`);\n    fetch(newUrl, {\n      headers: {\n        Accept: 'application/json',\n        'Content-Type': 'application/json',\n      },\n      method: 'PUT',\n      body: JSON.stringify(jsonTable),\n    });\n  }\n})();\n\n/******/ })()\n;","Worker",void 0,r.p+"stats.worker.js")};var n,o=(n=r(477))&&n.__esModule?n:{default:n};e.exports=t.default},713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return(0,o.default)("/******/ (() => { // webpackBootstrap\nvar __webpack_exports__ = {};\n(function () {\n  //Define WebSocket and protocol variables\n  let websocket = null;\n  let mustStop = false;\n\n  //Receive message from WebSocketController\n  self.addEventListener(\n    'message',\n    function (e) {\n      let data = e.data;\n      //Get command parameter to identify operation\n      let command = data.command;\n\n      if (command === 'start') {\n        //Establish WebSocket connection\n        start(data.commandObj);\n      } else if (command === 'disconnect') {\n        //Terminate WebSocket connection\n        disconnect();\n      } else if (command === 'send') {\n        sendOMMmessage(data.commandObj);\n      }\n    },\n    false\n  );\n\n  /* -----------------  Application events functions  ----------------- */\n\n  //Establish WebSocket connection\n  function start(wsURL) {\n    websocket = new WebSocket(wsURL);\n    websocket.binaryType = 'arraybuffer';\n    websocket.onopen = onOpen;\n    websocket.onmessage = onMessage;\n    websocket.onerror = onError;\n    websocket.onclose = onClose;\n  }\n\n  function disconnect() {\n    if (websocket) {\n      websocket.close();\n    }\n    mustStop = true;\n    const disconnect_response = {\n      command: 'disconnect',\n      msg: 'Disconnected',\n    };\n    self.postMessage(disconnect_response);\n  }\n\n  //Send message to ADS WebSocket\n  function sendOMMmessage(commandObj) {\n    websocket.send(commandObj);\n  }\n\n  /* -----------------  WS events  ----------------- */\n\n  //Establish WebSocket connection success\n  function onOpen() {\n    const onOpen_response = {\n      command: 'connect',\n      msg: 'Connected',\n    };\n    self.postMessage(onOpen_response);\n  }\n\n  //Receives incoming message from WebSocket\n  function onMessage(event) {\n    const rawData = event.data;\n    const isDataAB = rawData instanceof ArrayBuffer;\n    const parsedData = !isDataAB ? JSON.parse(rawData) : void 0;\n    self.postMessage({ rawData, parsedData, isDataAB });\n  }\n\n  function onError(event) {\n    const onError_response = {\n      command: 'error',\n      msg: JSON.stringify(event),\n    };\n    self.postMessage(onError_response);\n  }\n\n  function onClose(e) {\n    if (mustStop) {\n      return;\n    }\n    const { code, reason } = e;\n    const onClose_response = {\n      command: 'close',\n      data: { code, reason },\n    };\n    self.postMessage(onClose_response);\n  }\n})();\n\n/******/ })()\n;","Worker",void 0,r.p+"ws.worker.js")};var n,o=(n=r(477))&&n.__esModule?n:{default:n};e.exports=t.default},264:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;r=((r=r(85))&&r.__esModule?r:{default:r}).default;t.default=r,e.exports=t.default},29:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(976),p=r(357),i=r(545),a=r(114);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(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,function(e){e=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===s(e)?e:String(e)}(n.key),n)}}var l="segments",r=function(){function n(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=this,r=n;if(!(t instanceof r))throw new TypeError("Cannot call a class as a function");p.logger.log("create BuffersController"),this.media=e.media,this.init(e),this.doArrayBuffer=o.doArrayBuffer.bind(this),this.maybeAppend=this.maybeAppend.bind(this),this.onSBUpdateEnd=this.onSBUpdateEnd.bind(this),this.onAudioSBUpdateEnd=this.onAudioSBUpdateEnd.bind(this)}var e,t,r;return e=n,(t=[{key:"init",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.flushRange=[],this.appended=0,this.mediaSource=e.mediaSource,this.segmentsVideo=[],this.segmentsAudio=[],this.sourceBuffer={},this.totalBytesCollected=0}},{key:"setMediaSource",value:function(e){this.mediaSource=e}},{key:"createSourceBuffers",value:function(e){var n=this,o=this.sourceBuffer;e.tracks.forEach(function(e){var t=e.content===i.VIDEO,r=t?'video/mp4; codecs="avc1.4d401f"':'audio/mp4; codecs="mp4a.40.2"',r=(e.mime_type&&(r=e.mime_type),o[e.content]=n.mediaSource.addSourceBuffer(r),o[e.content].mode=l,o[e.content]);t?r.addEventListener(a.BUFFER_UPDATE_END,n.onSBUpdateEnd):r.addEventListener(a.BUFFER_UPDATE_END,n.onAudioSBUpdateEnd)})}},{key:"onSBUpdateEnd",value:function(){var e,t;this._needsEos&&this.checkEos(),!this._needsFlush&&this.segmentsVideo.length&&(e=this.sourceBuffer.video)&&!e.updating&&(t=this.segmentsVideo[0],e.appendBuffer(t.data),this.segmentsVideo.shift(),this.videoBufferSize=this.videoBufferSize-t.data.byteLength,this.appended++)}},{key:"onAudioSBUpdateEnd",value:function(){var e,t;this._needsEos&&this.checkEos(),!this._needsFlush&&this.segmentsAudio.length&&(e=this.sourceBuffer.audio)&&!e.updating&&(t=this.segmentsAudio[0],e.appendBuffer(t.data),this.segmentsAudio.shift(),this.appended++)}},{key:"createTracks",value:function(e){var r=this;e.forEach(function(e){var t=(0,o.base64ToArrayBuffer)(e.payload),e={type:r.getTypeBytrackId(e.id),isInit:!0,data:t};r.maybeAppend(e)})}},{key:"maybeAppend",value:function(e){var t;this._needsFlush||(!this.media||this.media.error?("audio"===e.type?this.segmentsAudio=[]:this.segmentsVideo=[],p.logger.error("trying to append although a media error occured, flush segment and abort"),this.media.error&&p.logger.error("Error code:",this.media.error)):(t=this.sourceBuffer[e.type])&&!t.updating&&(t.appendBuffer(e.data),("audio"===e.type?this.segmentsAudio:this.segmentsVideo).shift(),this.appended++))}},{key:"setTracksByType",value:function(e){var r=this,t=e.tracks?"tracks":"streams";1===e[t].length&&(this.audioTrackId=null),e[t].forEach(function(e,t){r[e.content===i.VIDEO?"videoTrackId":"audioTrackId"]={index:t,id:e.id}})}},{key:"getTypeBytrackId",value:function(e){return this.audioTrackId&&this.audioTrackId.id===e?i.AUDIO:i.VIDEO}},{key:"procArrayBuffer",value:function(e){e=this.rawDataToSegmnet(e);("audio"===e.type?this.segmentsAudio:this.segmentsVideo).push(e),this.totalBytesCollected=this.totalBytesCollected+e.data.byteLength,this.doArrayBuffer(e),this.sourceBuffer&&(this.sourceBuffer.video&&!this.sourceBuffer.video.updating&&this.onSBUpdateEnd(),this.audioTrackId)&&this.sourceBuffer.audio&&!this.sourceBuffer.audio.updating&&this.onAudioSBUpdateEnd()}},{key:"seek",value:function(){for(var e in this.sourceBuffer)this.sourceBuffer[e].abort(),this.sourceBuffer[e].mode=l}},{key:"isBuffered",value:function(){var e,t=0,r=this.sourceBuffer;for(e in r)t+=r[e].buffered.length;return 0<t}},{key:"doFlush",value:function(){for(;this.flushRange.length;){var e=this.flushRange[0];if(!this.flushBuffer(e.start,e.end,e.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var t=0,r=this.sourceBuffer;try{for(var n in r)t+=r[n].buffered.length}catch(e){p.logger.error("error while accessing sourceBuffer.buffered")}this.appended=t,this._setTracksFlag=!1}}},{key:"flushBuffer",value:function(e,t,r){var n,o,i,a,s,c,l=this.sourceBuffer;if(Object.keys(l).length){if(p.logger.log("flushBuffer,pos/start/end: ".concat(this.media.currentTime.toFixed(3),"/").concat(e,"/").concat(t)),this.flushBufferCounter<this.appended){for(var u in l)if(!r||u===r){if((n=l[u]).ended=!1,n.updating)return p.logger.warn("cannot flush, sb updating in progress"),!1;try{for(o=0;o<n.buffered.length;o++)if(i=n.buffered.start(o),a=n.buffered.end(o),c=-1!==navigator.userAgent.toLowerCase().indexOf("firefox")&&t===Number.POSITIVE_INFINITY?(s=e,t):(s=Math.max(i,e),Math.min(a,t)),.5<Math.min(c,a)-s)return this.flushBufferCounter++,p.logger.log("flush ".concat(u," [").concat(s,",").concat(c,"], of [").concat(i,",").concat(a,"], pos:").concat(this.media.currentTime)),n.remove(s,c),!1}catch(e){p.logger.warn("exception while accessing sourcebuffer, it might have been removed from MediaSource")}}}else p.logger.warn("abort flushing too many retries");p.logger.log("buffer flushed")}return!0}},{key:"rawDataToSegmnet",value:function(e){var e=new Uint8Array(e),t=(0,o.getTrackId)(e);return{type:this.getTypeBytrackId(t),data:e}}},{key:"onBufferEos",value:function(){var e,t=this.sourceBuffer,r=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).type;for(e in t)r&&e!==r||t[e].ended||(t[e].ended=!0,p.logger.log("".concat(e," sourceBuffer now EOS")));this.checkEos()}},{key:"checkEos",value:function(){var e=this.sourceBuffer,t=this.mediaSource;if(t&&"open"===t.readyState){for(var r in e){r=e[r];if(!r.ended)return;if(r.updating)return void(this._needsEos=!0)}p.logger.log("all media data available, signal endOfStream() to MediaSource and stop loading fragment");try{t.endOfStream()}catch(e){p.logger.warn("exception while calling mediaSource.endOfStream()")}}this._needsEos=!1}},{key:"addSourceBuffer",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"audio",t=this.sourceBuffer,t=(t[e]=this.mediaSource.addSourceBuffer("video"===e?'video/mp4; codecs="avc1.4d401f"':'audio/mp4; codecs="mp4a.40.2"'),t[e].mode=l,t[e]);"video"===e?t.addEventListener(a.BUFFER_UPDATE_END,this.onSBUpdateEnd):t.addEventListener(a.BUFFER_UPDATE_END,this.onAudioSBUpdateEnd)}},{key:"removeSourceBuffer",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"audio",t=this.sourceBuffer[e];"audio"===e?t.removeEventListener(a.BUFFER_UPDATE_END,this.onAudioSBUpdateEnd):t.removeEventListener(a.BUFFER_UPDATE_END,this.onSBUpdateEnd),this.mediaSource.removeSourceBuffer(t),delete this.sourceBuffer[e]}},{key:"destroy",value:function(){this.init()}}])&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),n}();t.default=r,e.exports=t.default},150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.getWSURL=c;var u=n(r(317)),o=n(r(713)),p=r(357);function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(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,function(e){e=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===i(e)?e:String(e)}(n.key),n)}}var f="live",r=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.opts=e,this.init(),this.onwso=this.open.bind(this),this.onwsm=this.handleReceiveMessage.bind(this),this.onwse=this.handleError.bind(this),this.onwsc=this.onWSClose.bind(this)}var e,r,n;return e=t,(r=[{key:"init",value:function(){this.wsWorker&&delete this.wsWorker,this.opened=!1,this.connectionPromise=void 0,clearTimeout(this.reconnect),this.reconnect=void 0,window.Worker&&(this.wsWorker=new o.default,this.wsWorker.onmessage=this.onWorkerMessage.bind(this))}},{key:"onWorkerMessage",value:function(e){var t=e.data;switch(t.command){case"connect":this.open();break;case"close":this.onWSClose(t);break;case"error":this.handleError(t);break;default:this.handleReceiveMessage(t)}}},{key:"start",value:function(n,o){var i=this,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"";return this.connectionPromise=new Promise(function(e,t){i.socketURL={url:n,time:o,videoTrack:a,audioTack:s};var r=c(n,0,a,s);i.wsWorker.postMessage({command:"start",commandObj:r}),i._openingResolve=e,i._openingReject=t}),this.connectionPromise}},{key:"open",value:function(){this.opened||(this.opened=!0,this.paused=!0,this._openingResolve())}},{key:"send",value:function(e){this.wsWorker.postMessage({command:"send",commandObj:e})}},{key:"resume",value:function(){clearTimeout(this.reconnect),p.logger.log("ws: send resume"),this.send("resume"),this.paused=!1}},{key:"pause",value:function(){p.logger.log("ws: send pause"),this.send("pause"),this.paused=!0}},{key:"seek",value:function(e){var t=e===f?"":"play_from=";p.logger.log("".concat(t).concat(e)),this.send("".concat(t).concat(e))}},{key:"setTracks",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;this.send("set_tracks=".concat(e).concat(t))}},{key:"sendStats",value:function(e){e=JSON.stringify(e);this.send(e)}},{key:"handleReceiveMessage",value:function(e){this.opts.message(e)}},{key:"handleError",value:function(){var e;this.opts.error&&(e=this.opts).error.apply(e,arguments)}},{key:"onWSClose",value:function(e){var t,r,n,o,i=this;p.logger.log("WebSocket lost connection with code ",e.code+" and reason: "+e.reason),this.opts.error&&this.opts.error({error:"WebSocket lost connection",err:"WebSocket lost connection with code ".concat(e.code," and reason: ").concat(e.reason),code:e.code}),this.opts.wsReconnect&&(e.wasClean&&1e3!==e.code&&1006!==e.code?(p.logger.log("Clean websocket stop"),this.destroy()):(t=this.socketURL,r=t.url,n=t.videoTrack,o=t.audioTack,this.reconnect=setTimeout(function(){i.start(r,n,o).then(function(){clearTimeout(i.reconnect)}).catch(function(){i.destroy()})},5e3))),this.opts.closed&&this.opts.closed(e)}},{key:"destroy",value:function(){this.wsWorker.postMessage({command:"disconnect"}),clearTimeout(this.reconnect),this.reconnect=void 0,this.init()}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function c(e,t,r,n){var o,i,a,s,c,l=t=f;return l||r||n?((i=(o="",u.default)({url:e})).query&&(o=i.query.split("&").map(function(e){return e.split("=")}).filter(function(e){return"from"!==e[0]&&"tracks"!==e[0]}).map(function(e){return e.join("=")}).join("&"),p.logger.log(o)),i="".concat(i.protocol,"//").concat(i.host).concat(i.pathname,"?"),s=(a=!!r||!!n)&&l&&l!==f?"&":"",c=t===f?"":"from=".concat(Math.floor(l)),t||(c=""),"".concat(i).concat(a?"tracks=".concat(r).concat(n):"")+"".concat(s).concat(c)+"".concat((a||l&&l!==f)&&o?"&":"").concat(o)):e}t.default=r},545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIDEO=t.AUDIO=void 0;t.VIDEO="video";t.AUDIO="audio"},114:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={MEDIA_SOURCE_SOURCE_OPEN:"sourceopen",MEDIA_SOURCE_SOURCE_ENDED:"sourceended",MEDIA_SOURCE_SOURCE_CLOSE:"sourceclose",MEDIA_ELEMENT_PLAY:"play",MEDIA_ELEMENT_PAUSE:"pause",MEDIA_ELEMENT_PROGRESS:"progress",MEDIA_ELEMENT_EMPTIED:"emptied",MEDIA_ELEMENT_SUSPEND:"suspend",MEDIA_ELEMENT_STALLED:"stalled",MEDIA_ELEMENT_WAITING:"waiting",MEDIA_ELEMENT_RATECHANGE:"ratechange",MEDIA_ELEMENT_PLAYING:"playing",WS_OPEN:"open",WS_MESSAGE:"message",WS_ERROR:"error",WS_CLOSE:"close",BUFFER_UPDATE_END:"updateend",BUFFER_ERROR:"onerror",BUFFER_ABORT:"onabort"},e.exports=t.default},409:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={NOT_HTML_MEDIA_ELEMENT:"media should be an HTMLMediaElement instance"},e.exports=t.default},493:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSE_MEDIA_SEGMENT=t.MSE_INIT_SEGMENT=t.EVENT_SEGMENT=void 0;t.EVENT_SEGMENT="event",t.MSE_INIT_SEGMENT="mse_init_segment";t.MSE_MEDIA_SEGMENT="mse_media_segment"},85:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=o(a(150)),l=o(a(29)),u=o(a(561)),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==M(e)&&"function"!=typeof e)return{default:e};t=c(t);if(t&&t.has(e))return t.get(e);var r,n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(r in e){var i;"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&((i=o?Object.getOwnPropertyDescriptor(e,r):null)&&(i.get||i.set)?Object.defineProperty(n,r,i):n[r]=e[r])}n.default=e,t&&t.set(e,n);return n}(a(976)),f=a(357),h=a(493),r=a(545),d=o(a(114)),n=o(a(409));function c(e){var t,r;return"function"!=typeof WeakMap?null:(t=new WeakMap,r=new WeakMap,(c=function(e){return e?r:t})(e))}function o(e){return e&&e.__esModule?e:{default:e}}function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function y(n){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?i(Object(o),!0).forEach(function(e){var t,r;t=n,r=o[e=e],(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function A(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */A=function(){return a};var c,a={},e=Object.prototype,l=e.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag";function i(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(c){i=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o,i,a,s,t=t&&t.prototype instanceof g?t:g,t=Object.create(t.prototype),n=new j(n||[]);return u(t,"_invoke",{value:(o=e,i=r,a=n,s=f,function(e,t){if(s===d)throw new Error("Generator is already running");if(s===y){if("throw"===e)throw t;return{value:c,done:!0}}for(a.method=e,a.arg=t;;){var r=a.delegate;if(r){r=function e(t,r){var n=r.method,o=t.iterator[n];if(o===c)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=c,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;n=p(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}(r,a);if(r){if(r===m)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===f)throw s=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=d;r=p(o,i,a);if("normal"===r.type){if(s=a.done?y:h,r.arg===m)continue;return{value:r.arg,done:a.done}}"throw"===r.type&&(s=y,a.method="throw",a.arg=r.arg)}})}),t}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var f="suspendedStart",h="suspendedYield",d="executing",y="completed",m={};function g(){}function v(){}function b(){}var t={},S=(i(t,n,function(){return this}),Object.getPrototypeOf),S=S&&S(S(T([]))),E=(S&&S!==e&&l.call(S,n)&&(t=S),b.prototype=g.prototype=Object.create(t));function w(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function _(a,s){var t;u(this,"_invoke",{value:function(r,n){function e(){return new s(function(e,t){!function t(e,r,n,o){var i,e=p(a[e],a,r);if("throw"!==e.type)return(r=(i=e.arg).value)&&"object"==M(r)&&l.call(r,"__await")?s.resolve(r.__await).then(function(e){t("next",e,n,o)},function(e){t("throw",e,n,o)}):s.resolve(r).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,o)});o(e.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}})}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function T(t){if(t||""===t){var r,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(e=function e(){for(;++r<t.length;)if(l.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=c,e.done=!0,e}).next=e}throw new TypeError(M(t)+" is not iterable")}return u(E,"constructor",{value:v.prototype=b,configurable:!0}),u(b,"constructor",{value:v,configurable:!0}),v.displayName=i(b,o,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,i(e,o,"GeneratorFunction")),e.prototype=Object.create(E),e},a.awrap=function(e){return{__await:e}},w(_.prototype),i(_.prototype,r,function(){return this}),a.AsyncIterator=_,a.async=function(e,t,r,n,o){void 0===o&&(o=Promise);var i=new _(s(e,t,r,n),o);return a.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},w(E),i(E,o,"Generator"),i(E,n,function(){return this}),i(E,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t,r=Object(e),n=[];for(t in r)n.push(t);return n.reverse(),function e(){for(;n.length;){var t=n.pop();if(t in r)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=T,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function e(e,t){return i.type="throw",i.arg=r,n.next=e,t&&(n.method="next",n.arg=c),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=l.call(o,"catchLoc"),s=l.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&l.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}var i=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var r,n,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(r=o.completion).type&&(n=r.arg,O(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:T(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=c),m}},a}function m(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function g(s){return function(){var e=this,a=arguments;return new Promise(function(t,r){var n=s.apply(e,a);function o(e){m(n,t,r,o,i,"next",e)}function i(e){m(n,t,r,o,i,"throw",e)}o(void 0)})}}function v(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,b(n.key),n)}}function b(e){e=function(e,t){if("object"!==M(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!==M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(e,"string");return"symbol"===M(e)?e:String(e)}var S=r.VIDEO,E=r.AUDIO,r=function(){function c(e,t){var r=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=this,i=c;if(!(o instanceof i))throw new TypeError("Cannot call a class as a function");if(n.debug&&((0,f.enableLogs)(!0),window.humanTime=p.humanTime),f.logger.info("[mse-player]:",c.version),this.opts=n||{},this.media=e,this.url=t,this.firstStart=!0,this.opts.progressUpdateTime=this.opts.progressUpdateTime||500,this.opts.errorsBeforeStop=this.opts.errorsBeforeStop||1,"number"!=typeof this.opts.errorsBeforeStop||isNaN(this.opts.errorsBeforeStop))throw new Error("invalid errorsBeforeStop param, should be number");if(this.opts.connectionRetries=this.opts.connectionRetries||0,"number"!=typeof this.opts.connectionRetries||isNaN(this.opts.connectionRetries))throw new Error("invalid connectionRetries param, should be number");if(this.opts.wsReconnect=this.opts.wsReconnect||!1,"boolean"!=typeof this.opts.wsReconnect)throw new Error("invalid wsReconnect param, should be boolean");if(this.opts.preferHQ=this.opts.preferHQ||!1,"boolean"!=typeof this.opts.preferHQ)throw new Error("invalid preferHQ param, should be boolean");if(this.opts.onCrashTryVideoOnly=this.opts.onCrashTryVideoOnly||!0,"boolean"!=typeof this.opts.onCrashTryVideoOnly)throw new Error("invalid onCrashTryVideoOnly param, should be boolean");if(this.retry=0,this.retryConnectionTimer,this.opts.retryMuted=this.opts.retryMuted||!1,"boolean"!=typeof this.opts.retryMuted)throw new Error("invalid retryMuted param, should be boolean");this.opts.maxBufferDelay=this.opts.maxBufferDelay||2;o=navigator.userAgent;if((/Edge/.test(o)||/trident.*rv:1\d/i.test(o))&&(this.opts.maxBufferDelay=10),"number"!=typeof this.opts.maxBufferDelay)throw new Error("invalid maxBufferDelay param, should be number");if(this.opts.videoQuality){if("string"!=typeof this.opts.videoQuality)throw new Error("invalid videoQuality param, should be string");if("highest"!==this.opts.videoQuality&&"lowest"!==this.opts.videoQuality)throw new Error("invalid videoQuality param, should be highest or lowest")}try{this.Sentry=a(Object(function(){var e=new Error("Cannot find module '@sentry/browser'");throw e.code="MODULE_NOT_FOUND",e}()))}catch(e){this.noSentry=!0}if(this.opts.sentryConfig=this.opts.sentryConfig||"","string"!=typeof this.opts.sentryConfig)throw new Error("invalid sentryConfig param, should be string");if(this.opts.sentryConfig.length&&!this.noSentry&&(this.Sentry.init({dsn:this.opts.sentryConfig,environment:"production",release:"Mse Player@"+c.version}),document.onerror=function(e){r.Sentry.captureException(e)}),"number"!=typeof this.opts.maxBufferDelay)throw new Error("invalid maxBufferDelay param, should be number");if(this.opts.statsSendEnable=!("statsSendEnable"in this.opts&&"boolean"==typeof this.opts.statsSendEnable&&!1===this.opts.statsSendEnable),window.Worker&&this.opts.statsSendEnable){if(this.statsWorker=new u.default,this.statsWorker.onmessage=this.onStatsWorkerMessage.bind(this),this.opts.statsSendTime){if("number"!=typeof this.opts.statsSendTime)throw new Error("invalid statsSendTime param, should be number");this.statsWorker.postMessage({command:"time",commandObj:1e3*this.opts.statsSendTime})}this.statsWorker.postMessage({command:"start",commandObj:this.url}),this.statsWorkerStarted=!0}this.resetStats=function(){r.playerStatsObject={proto:"mseld",user_agent:navigator.userAgent,bytes:0,application:{application_name:"mseld_player",application_version:c.version,stall_count:0,pause_count:0,error_count:0,reconnect_count:0,bitrate_change_count:0,live_duration:0,stall_duration:0,pause_duration:0,total_video_frames:0,dropped_video_frames:0,corrupted_video_frames:0}},r.addStat(r.playerStatsObject),!r.statsWorkerStarted&&r.opts.statsSendEnable&&(r.statsWorker.postMessage({command:"start",commandObj:r.url}),r.statsWorkerStarted=!0)},this.onProgress=n&&n.onProgress,n&&n.onDisconnect?this.onDisconnect=n&&n.onDisconnect:this.onDisconnect=function(e){f.logger.log("[websocket status]:",e)},this.onMediaInfo=n&&n.onMediaInfo,this.onError=n&&n.onError,this.onEventCallback=n&&n.onEvent,this.onAutoplay=n&&n.onAutoplay,this.onMuted=n&&n.onMuted,this.onStats=n&&n.onStats,this.onMessage=n&&n.onMessage,this.onPause=n&&n.onPause,this.onResume=n&&n.onResume,e instanceof HTMLMediaElement&&(e.WebKitPlaysInline=!0,e.controls=!1),this.ws=new s.default({message:this.dispatchMessage.bind(this),closed:this.onDisconnect.bind(this),error:this.onError,wsReconnect:this.opts.wsReconnect}),this.sb=new l.default({media:e}),this.messageTime=Date.now(),this.init()}var e,t,r;return e=c,r=[{key:"version",get:function(){return"23.9.2"}},{key:"replaceHttpByWS",value:function(e){return p.replaceHttpByWS(e)}},{key:"isSupported",value:function(){return p.isSupportedMSE()}}],(t=[{key:"play",value:function(e,t){var r=this;if(f.logger.log("[mse-player]: play()"),this.playing)f.logger.log("MSE is already playing");else{if(!this.ws||!this.ws.websocket||this._pause)return this._play(e,t).then(function(){r.playing=!0,r._stop=!1,r.pendingTracks&&(r.setTracks(r.pendingTracks),r.pendingTracks=void 0)}).catch(function(e){r.onPlayerError(e),f.logger.error("[mse-player]: got error on play",e),r.playing=!1});f.logger.log("[mse-player]: websocket already opened")}}},{key:"stop",value:function(){var t=this;this.playPromise?(this.onEvent({key:Date.now(),data:{event:"play_stop"}}),this.playerStatsObject.closed_at=Date.now(),this.addStat({closed_at:this.playerStatsObject.closed_at}),this.opts.statsSendEnable&&(this.statsWorkerStarted=!1),this.playPromise.catch(g(A().mark(function e(){return A().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.resetTimer&&(clearTimeout(t.resetTimer),t.resetTimer=void 0),t._stop)return f.logger.log("[mse-player]: already stopped"),e.abrupt("return");e.next=4;break;case 4:return e.next=6,t.onMediaDetaching();case 6:case"end":return e.stop()}},e)}))).finally(g(A().mark(function e(){return A().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.resetTimer&&(clearTimeout(t.resetTimer),t.resetTimer=void 0),t._stop)return f.logger.log("[mse-player]: already stopped"),e.abrupt("return");e.next=4;break;case 4:return e.next=6,t.onMediaDetaching();case 6:case"end":return e.stop()}},e)})))):(this.resetTimer&&(clearTimeout(this.resetTimer),this.resetTimer=void 0),this.endProgressTimer(),f.logger.log("[mse-player]: no playPromise exists, nothing to stop")),this.firstStart=!0,delete this.uuid}},{key:"pause",value:function(){if(!function(){return!(!(!this._pause&&this.playing&&this.media&&this.ws&&this.mediaSource)||this.mediaSource&&"open"!==this.mediaSource.readyState||!this.playPromise)}.bind(this)())return f.logger.log("[mse:playback] can not do pause");var e=function(){if(this.ws.pause(),this.media.pause(),this._pause=!0,this.playing=!1,this.addPlayerStat("pause_count"),this.pauseStarted=Date.now(),this.onPause)try{this.onPause()}catch(e){f.logger.error("Error "+e.name+":"+e.message+"\n"+e.stack)}}.bind(this);this.playPromise.then(e,e).catch(e,e)}},{key:"restart",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0]?void 0:this.sb.lastLoadedUTC;this.playing=!1,this.ws.destroy(),this.ws.init(),this.ws.start(this.url,e,this.videoTrack,this.audioTrack),this.addPlayerStat("reconnect_count"),this.onEndStalling()}},{key:"retryConnection",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;this.retry>=this.opts.connectionRetries?clearInterval(this.retryConnectionTimer):(f.logger.log("%cconnectionRetry:","background: orange;","Retrying ".concat(this.retry+1)),this.mediaSource=void 0,this.init(),this.ws.destroy(),this.sb.destroy(),this.play(t,r).then(function(){e.onEndStalling()}),this.retry=this.retry+1)}},{key:"setTracks",value:function(e){var r,t,n,o,i,a=this;if(this.mediaInfo){if("lowest"===e)e=this.autoTrackSelection(!1);else if("highest"===e)e=this.autoTrackSelection(!0);else if(!Array.isArray(e))return void f.logger.error('tracks should be an Array instance: ["v1", "a1"]');this.playing?(r=this.mediaInfo.streams?"streams":"tracks",t=e.filter(function(t){var e=a.mediaInfo[r].find(function(e){return t===e.track_id});return!!e&&e.content===S}).join(""),(n=e.filter(function(t){var e=a.mediaInfo[r].find(function(e){return t===e.track_id});return e?!!e&&e.content===E:null}).join("")).length||t.length||(f.logger.warn("No such stream tracks! Setting to default parameters"),o=this.getVideoTracks(),(i=this.getAudioTracks()).length?n=i[0].track_id:f.logger.warn("No audio tracks"),o.length?t=o[0].track_id:f.logger.warn("No video tracks")),n.length||(this.sb.sourceBuffer.audio&&this.sb.removeSourceBuffer(),this.media.muted=!0,f.logger.warn("No audio tracks")),t.length&&n.length&&this.mediaSource.sourceBuffers.length<=1&&(this.stop(),this.media.muted=!1,this.play()),this.onStartStalling(),this.ws.setTracks(t,n),this.addPlayerStat("bitrate_change_count"),this.videoTrack=t,this.audioTrack=n,this._setTracksFlag=!0,this.waitForInitFrame=!0):this.pendingTracks=e}else f.logger.warn("Media info did not loaded. Should try after onMediaInfo triggered or inside.")}},{key:"autoTrackSelection",value:function(e){var t,r,n,o,i,a,s,c,l;if(this.mediaInfo)return t=this.getVideoTracks(),r=this.getAudioTracks(),e?(t[0].bitrate?i="bitrate":t[0].pixel_width&&(i="pixel_width"),o=t[0][i],n=t[0].track_id,t.forEach(function(e){e[i]>o&&(o=e[i],n=e.track_id)}),r.length&&(l=r[0].track_id,r.forEach(function(e){e.sample_rate>o&&(l=e.track_id)}))):(t[0].bitrate?s="bitrate":t[0].pixel_width&&(s="pixel_width"),a=t[0][s],n=t[0].track_id,t.forEach(function(e){e[s]<a&&(a=e[s],n=e.track_id)}),r.length&&(c=r[0].sample_rate,l=r[0].track_id,r.forEach(function(e){e.sample_rate<c&&(c=e.sample_rate,l=e.track_id)}))),e=[],n&&n.length&&e.push(n),l&&l.length&&e.push(l),e;f.logger.warn("Media info did not loaded. Should try after onMediaInfo triggered or inside.")}},{key:"_play",value:function(n,o){var i=this;return this.liveError=!1,new Promise(function(e,t){var r;return f.logger.log("_play",n,o),i.playing?(f.logger.log(r="[mse-player] _play: terminate because already has been playing"),e({message:r})):i._pause?i.ws&&!1===i.ws.opened?(f.logger.log("WebSocket Closed, trying to restart it"),i._pause=!1,void i.restart(!0)):(f.logger.log("WebSocket is in opened state, resuming"),i._pause=!1,i._resume(),i.pauseStarted&&(r=i.playerStatsObject.application)&&(r=r.pause_duration,r+=Date.now()-i.pauseStarted,i.addPlayerStat("pause_duration",!1,r),delete i.pauseStarted),i.playPromise=i.media.play(),f.logger.log("_play: terminate because _paused and should resume"),i.playPromise):(i.resetStats(),i.playerStatsObject.opened_at=Date.now(),i.uuid=i.generateUUID(),i.addStat({opened_at:i.playerStatsObject.opened_at,id:i.uuid}),i.videoTrack=n,i.audioTrack=o,i._pause=!1,i.mediaSource||i.onAttachMedia({media:i.media}).then(function(){i.onsoa=i._play.bind(i,n,o),i.sb.setMediaSource(i.mediaSource),i.mediaSource.addEventListener(d.default.MEDIA_SOURCE_SOURCE_OPEN,i.onsoa),f.logger.warn("mediaSource did not create"),i.resolveThenMediaSourceOpen=i.resolveThenMediaSourceOpen||e,i.rejectThenMediaSourceOpen=i.rejectThenMediaSourceOpen||t}),void(i.mediaSource&&"open"!==i.mediaSource.readyState?(f.logger.warn('readyState is not "open", it\'s currently ',i.mediaSource.readyState),i.shouldPlay=!0,i.resolveThenMediaSourceOpen=i.resolveThenMediaSourceOpen||e,i.rejectThenMediaSourceOpen=i.rejectThenMediaSourceOpen||t):new Promise(function(e,t){return!i.media.autoplay||!0===i.media.muted||i.opts.retryMuted?e():!i.onAutoplay||function(){var e=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod","Safari"];if(navigator.platform)for(;e.length;)if(navigator.platform===e.pop())return!0;return!1}()?(i.media.muted=!0,e()):(i.onAutoplay(function(){return i.media.muted=!1,e()}),void t())}).then(function(){i.ws.start(i.url,i.playTime,i.videoTrack,i.audioTrack).then(function(){return i.playPromise=i.media.play(),i.playPromise.then(function(){i.onStartStalling(),i.startProgressTimer(),i.resolveThenMediaSourceOpen&&(i._stop=!1,i.resolveThenMediaSourceOpen(),i.resolveThenMediaSourceOpen=void 0,i.rejectThenMediaSourceOpen=void 0,clearInterval(i.retryConnectionTimer),i.retry=0),i.onEvent({key:Date.now(),data:{event:"play_started"}})}).catch(function(e){f.logger.log("playPromise rejection.",e),i.ws.connectionPromise&&i.ws.connectionPromise.then(function(){return i.ws.destroy()}),i.opts.retryMuted&&0==i.media.muted&&(i.onMuted&&i.onMuted(),i.media.muted=!0,i._play(n,o)),i.onPlayerError({error:"play_promise_reject",err:e}),i.rejectThenMediaSourceOpen&&(i.rejectThenMediaSourceOpen(),i.resolveThenMediaSourceOpen=void 0,i.rejectThenMediaSourceOpen=void 0),i.opts.retryMuted||i.stop(),i.opts.onCrashTryVideoOnly&&(e=i.mediaInfo.activeStreams.video)&&i._play(e)}),i.playPromise})})))})}},{key:"init",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this._pause=!1,this.playing=!1,this.shouldPlay=!1,this.audioTrack="",this.videoTrack="",this.endProgressTimer(),e||this.onEvent({key:Date.now(),data:{event:"play_init",userInfo:window.navigator.userAgent,playerInfo:"MSEPlayer".concat(c.version?"@".concat(c.version):"")}})}},{key:"_resume",value:function(){this.ws.resume(),this.onEvent({key:Date.now(),data:{event:"play_websocket_resume"}})}},{key:"onMediaDetaching",value:function(){var e=this;if(this.stopRunning)f.logger.warn("stop is running.");else{if(this.stopRunning=!0,this.handlerMediaDetaching.bind(this),!this.playPromise)return this.handlerMediaDetaching();this.playPromise.catch(function(){return e.handlerMediaDetaching()}).finally(function(){return e.handlerMediaDetaching()})}}},{key:"handlerMediaDetaching",value:function(){var r=this;return f.logger.info("media source detaching"),new Promise(function(e,t){if(r.removeMediaSource(),!r.media)return t("no media to detach");r.removeListeners(),r.oncvp=null,r.mediaSource=null,r.init(!0),r.ws.destroy(),r.sb.destroy(),r.media.onemptied=function(){return f.logger.log("[mse-player]: media emptied"),r.stopRunning=!1,r._stop=!0,delete r.playPromise,e()}})}},{key:"removeMediaSource",value:function(){var e=this,t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(e){f.logger.warn("onMediaDetaching:".concat(e.message," while calling endOfStream"))}t.removeEventListener(d.default.MEDIA_SOURCE_SOURCE_OPEN,this.onmso),t.removeEventListener(d.default.MEDIA_SOURCE_SOURCE_ENDED,this.onmse),t.removeEventListener(d.default.MEDIA_SOURCE_SOURCE_CLOSE,this.onmsc),this.onmso=null,this.onmse=null,this.onmsc=null}function r(){e.media.src="",e.media.load(),e.resetTimer&&(clearTimeout(e.resetTimer),e.resetTimer=void 0)}this.playPromise&&this.playPromise.then(function(){r()}).catch(function(){r()})}},{key:"onMediaElementEmptied",value:function(e){return this.onMediaElementEmptied&&this.media&&(this.media.removeEventListener(d.default.MEDIA_ELEMENT_EMPTIED,this.onMediaElementEmptied),this._onmee=void 0),e}},{key:"onAttachMedia",value:function(e){var t=this,e=(this.media=e.media,this.media);if(!(e instanceof HTMLMediaElement))throw new Error(n.default.NOT_HTML_MEDIA_ELEMENT);if(e){var r=this.mediaSource=new MediaSource;if(this.onmse=this.onMediaSourceEnded.bind(this),this.onmsc=this.onMediaSourceClose.bind(this),r.addEventListener(d.default.MEDIA_SOURCE_SOURCE_ENDED,this.onmse),r.addEventListener(d.default.MEDIA_SOURCE_SOURCE_CLOSE,this.onmsc),e.src=URL.createObjectURL(r),this.eventLog=function(e){t.onEvent&&t.onEvent(e)},this.addListeners(),!this.liveError)return new Promise(function(e){t.onmso=t.onMediaSourceOpen.bind(t,e),r.addEventListener(d.default.MEDIA_SOURCE_SOURCE_OPEN,t.onmso)});this.player=void 0}}},{key:"onMediaSourceOpen",value:function(e){e();e=this.mediaSource;e&&e.removeEventListener(d.default.MEDIA_SOURCE_SOURCE_OPEN,this.onmso),URL.revokeObjectURL(this.media.src),this.shouldPlay&&(this.shouldPlay=!1,f.logger.info("readyState now is ".concat(this.mediaSource.readyState,", and will be played"),this.videoTrack,this.audioTrack),this._play(this.videoTrack,this.audioTrack))}},{key:"onDisconnect",value:function(e){this.onEvent({key:Date.now(),data:{event:"play_diconnected"}}),this.opts.onDisconnect&&this.opts.onDisconnect(e)}},{key:"dispatchMessage",value:function(e){var t=this;if(!this.stopRunning){this.playerStatsObject.first_byte_at||(this.playerStatsObject.first_byte_at=Date.now(),this.addStat({first_byte_at:this.playerStatsObject.first_byte_at}));var r,n=e.rawData,o=e.parsedData,e=e.isDataAB;try{if(e){if(this.waitForInitFrame)return f.logger.log("old frames");this.sb.procArrayBuffer(n)}if(o&&o.type===h.EVENT_SEGMENT){var i=o[h.EVENT_SEGMENT];switch(f.logger.log("%c ".concat(o.type," ").concat("event"===o.type?o.event:"mse_init_segment"),"background: aquamarine;",o),i){case"resumed":this._pause&&!this.playing&&this.onStartStalling(),this.onResume&&this.onResume();break;case"paused":break;case"seeked":case"switched_to_live":if(this.seekValue=void 0,this.opts.onSeeked)try{this.opts.onSeeked()}catch(e){f.logger.error(e)}break;case"recordings_ended":this._eos=!0,this.sb.onBufferEos();break;case"stream_unavailable":"static"in o&&0==o.static?(f.logger.info("Stream is on on demand mode, waiting for init segment"),this.onStartStalling()):(f.logger.warn("do playPromise reject with error"),this.ws.connectionPromise&&this.ws.connectionPromise.then(function(){return t.ws.pause()}),this.liveError||(this.onPlayerError({error:"playPromise reject - stream unavaible"}),this.liveError=!0),this.rejectThenMediaSourceOpen&&(this.rejectThenMediaSourceOpen(),this.resolveThenMediaSourceOpen=void 0,this.rejectThenMediaSourceOpen=void 0),this.playPromise=Promise.reject("stream unavaible"),this.mediaSource.endOfStream());break;case"tracks_switched":break;default:this.opts.onEvent&&this.opts.onEvent({error:"unhandled_event",event:i}),f.logger.warn("unknown type of event",i)}}else if(o&&o.type===h.MSE_INIT_SEGMENT)return this.procInitSegment(n)}catch(e){p.showDispatchError.bind(this)(e);try{this.media.error?(this.onPlayerError({error:"Media error",mediaError:this.media.error}),this.stop()):this.mediaInfo&&this.mediaInfo.activeStreams&&(r=this.mediaInfo.activeStreams,this.setTracks([r.video||"",r.audio||""]))}catch(e){this.ws.pause()}}}}},{key:"procInitSegment",value:function(e){var r=this,e=JSON.parse(e);if(e.type!==h.MSE_INIT_SEGMENT)return f.logger.warn("type is not ".concat(h.MSE_INIT_SEGMENT));this.waitForInitFrame&&(this.waitForInitFrame=!1),this.resetTimer&&(clearTimeout(this.resetTimer),this.resetTimer=void 0),this.sb.isBuffered()&&(this.sb.doFlush(),this.sb.seek()),this.sb.setTracksByType(e);var t=y(y({},e.metadata),{},{tracks:e.metadata.streams||e.metadata.tracks,streams:e.metadata.streams||e.metadata.tracks}),n=e.metadata.streams,o=(e.metadata.tracks&&(n=e.metadata.tracks),{}),i=this.sb.videoTrackId&&this.sb.videoTrackId.id-1;if(n[i]&&n[i].track_id){if(n[i].bitrate&&0===n[i].bitrate||0===n[i].height||0===n[i].width)return void this.onPlayerError({error:"Video track error"});o.video=n[i].track_id}var a,s,i=this.sb.audioTrackId&&this.sb.audioTrackId.id-1,n=(i&&n[i]&&n[i].track_id&&(n[i].bitrate&&0===n[i].bitrate?(this.onPlayerError({error:"Audio track error"}),e.tracks.forEach(function(e,t){e.id===r.sb.audioTrackId.id&&(a=t)}),e.tracks.splice(a,1),this.sb.sourceBuffer.audio&&(this.mediaSource.removeSourceBuffer(this.sb.sourceBuffer.audio),delete this.sb.sourceBuffer.audio)):o.audio=n[i].track_id),y(y({},t),{},{activeStreams:o,version:c.version}));if(this.playerStatsObject.source_id=e.session_id,this.addStat({source_id:this.playerStatsObject.source_id}),this.doMediaInfo(n),f.logger.log("%cprocInitSegment:","background: lightpink;",e),this.onEvent({key:Date.now(),data:y({event:"play_metadata"},n)}),this.mediaSource&&!this.mediaSource.sourceBuffers.length&&(this.sb.setMediaSource(this.mediaSource),this.sb.createSourceBuffers(e)),this.liveError||this.sb.createTracks(e.tracks),this.opts.videoQuality&&this.firstStart){if("lowest"===this.opts.videoQuality?s=this.autoTrackSelection(!1):"highest"===this.opts.videoQuality&&(s=this.autoTrackSelection(!0)),s[0]!==o.video||o.audio&&s[1]!==o.audio)return void this.ws.setTracks(s[0]||"",s[1]||"");this.firstStart=!1}this.opts.preferHQ&&f.logger.info("[MSE]: preferHQ option is depricated. Use videoQuality(lowest/highest) instead"),this.ws.resume()}},{key:"doMediaInfo",value:function(e){if(f.logger.log("%cmediaInfo:","background: orange;",e),this.mediaInfo=e,this.onMediaInfo)try{this.onMediaInfo(e)}catch(e){f.logger.error(p.errorMsg(e))}}},{key:"getVideoTracks",value:function(){var e;if(this.mediaInfo)return e=this.mediaInfo.streams?"streams":"tracks",this.mediaInfo[e].filter(function(e){return e.content===S})}},{key:"getAudioTracks",value:function(){var e;if(this.mediaInfo)return e=this.mediaInfo.streams?"streams":"tracks",this.mediaInfo[e].filter(function(e){return e.content===E})}},{key:"immediateLevelSwitchEnd",value:function(){var e=this,t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,this.previouslyPaused||(this.playPromise=t.play(),this.playPromise.then(function(){e._pause=!1,e.playing=!0})))}},{key:"onStartStalling",value:function(){var e=this;this._pause||(this.resetTimer||(this.resetTimer=setTimeout(function(){e.restart()},6e4)),this._stalling)||(this.opts.onStartStalling&&this.opts.onStartStalling(),this._stalling=!0,f.logger.log("onStartStalling"),this.playerStatsObject.started_at&&(this.addPlayerStat("stall_count"),this.startStallingTime=Date.now()),this.onEvent({key:Date.now(),data:{event:"play_stalled"}}))}},{key:"onEndStalling",value:function(){var e;this._stalling&&(this.opts.onEndStalling&&this.opts.onEndStalling(),this._stalling=!1,f.logger.log("onEndStalling"),clearTimeout(this.resetTimer),this.resetTimer=void 0,this.startStallingTime&&(e=this.playerStatsObject.application)&&(e=e.stall_duration,e+=Date.now()-this.startStallingTime,this.startStallingTime=null,this.addPlayerStat("stall_duration",!1,e)),this.onEvent({key:Date.now(),data:{event:"play_resumed"}}))}},{key:"startProgressTimer",value:function(){this.timer=setInterval(this.onTimer.bind(this),this.opts.progressUpdateTime)}},{key:"endProgressTimer",value:function(){clearInterval(this.timer),this.timer=void 0}},{key:"onTimer",value:function(){if(this._eos)return f.logger.log("nothing to play");if(this.immediateSwitch&&this.immediateLevelSwitchEnd(),this.sb.lastLoadedUTC!==this.utcPrev&&!this._stalling&&(this.utcPrev=this.sb.lastLoadedUTC,this.onProgress))try{this.onProgress(this.sb.lastLoadedUTC)}catch(e){f.logger.error(p.errorMsg(e))}}},{key:"onMediaSourceEnded",value:function(){f.logger.log("media source ended");try{this.opts.onEOS&&this.opts.onEOS()}catch(e){f.logger.error("error while proccessing onEOS")}}},{key:"onMediaSourceClose",value:function(){f.logger.log("media source closed")}},{key:"onConnectionRetry",value:function(){var e=this;this.retryConnectionTimer||this._stop?this.retry>=this.opts.connectionRetries&&clearInterval(this.retryConnectionTimer):this.retry<this.opts.connectionRetries&&(this.retryConnectionTimer=setInterval(function(){return e.retryConnection()},5e3))}},{key:"loadingIndication",value:function(e){e=e.type;"playing"===e?(this.playing=!0,this.onEndStalling(),this.playerStatsObject.started_at||(this.playerStatsObject.started_at=Date.now(),this.addStat({started_at:this.playerStatsObject.started_at}))):"waiting"===e&&(this.playing=!1,this.onStartStalling())}},{key:"onEvent",value:function(e){this.onEventCallback&&this.onEventCallback(e)}},{key:"onPlayerError",value:function(e){this.playerStatsObject&&this.addPlayerStat("error_count"),this.onError&&this.onError(e)}},{key:"addListeners",value:function(){this.media&&(this.oncvp=p.checkVideoProgress(this.media,this).bind(this),this.media.addEventListener(d.default.MEDIA_ELEMENT_PROGRESS,this.oncvp),this.media.addEventListener(d.default.MEDIA_ELEMENT_PLAYING,this.loadingIndication.bind(this)),this.media.addEventListener(d.default.MEDIA_ELEMENT_WAITING,this.loadingIndication.bind(this)))}},{key:"removeListeners",value:function(){this.media&&(this.media.removeEventListener(d.default.MEDIA_ELEMENT_PROGRESS,this.oncvp),this.media.removeEventListener(d.default.MEDIA_ELEMENT_PLAYING,this.loadingIndication),this.media.removeEventListener(d.default.MEDIA_ELEMENT_WAITING,this.loadingIndication))}},{key:"generateUUID",value:function(){var r=(new Date).getTime(),n="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random();return 0<r?(t=(r+t)%16|0,r=Math.floor(r/16)):(t=(n+t)%16|0,n=Math.floor(n/16)),("x"===e?t:3&t|8).toString(16)})}},{key:"addPlayerStat",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=this.playerStatsObject.application;n&&(r?n[e]=Math.round(r):t&&n[e]++,this.playerStatsObject.application=n,this.addStat({application:n}))}},{key:"addStat",value:function(e){this.statsWorker&&this.statsWorker.postMessage({command:"add",commandObj:e})}},{key:"getStats",value:function(){return y(y({},this.playerStatsObject),{},{id:this.uuid})}},{key:"onStatsWorkerMessage",value:function(){var e;this.playerStatsObject.started_at&&this.opts.statsSendEnable&&(e=(this.playerStatsObject&&this.playerStatsObject.source_id||{}).source_id,e=this.url.replace(/sessions/,"sessions/".concat(e?"".concat(e):"")),fetch(e,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"PUT",body:JSON.stringify(this.getStats())}))}}])&&v(e.prototype,t),r&&v(e,r),Object.defineProperty(e,"prototype",{writable:!1}),c}();t.default=r,e.exports=t.default},357:(e,t,s)=>{"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.logger=t.enableLogs=void 0;var o={trace:n,debug:n,log:n,warn:n,info:n,error:n},i=o;function a(i){var a=s.g.console[i];return a?function(){for(var e,t,r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];n[0]&&(n[0]=(e=i,t=n[0],t="["+e+"] > "+t)),n&&a.apply(s.g.console,n)}:n}t.enableLogs=function(e){if(!0===e||"object"===r(e)){!function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];r.forEach(function(e){i[e]=t[e]?t[e].bind(t):a(e)})}(e,"trace","debug","log","info","warn","error");try{i.log()}catch(e){i=o}}else i=o};var c=i;t.logger=c},976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RawDataToUint8Array=function(e){return new Uint8Array(e)},t.base64ToArrayBuffer=function(e){return Uint8Array.from(atob(e),function(e){return e.charCodeAt(0)})},t.checkVideoProgress=void 0,t.debugData=s,t.doArrayBuffer=function(e){e.isInit||(this.utc=a(e.data),this.lastLoadedUTC=this.utc)},t.errorMsg=void 0,t.getMediaSource=n,t.getRealUtcFromData=a,t.getTrackId=i,t.humanTime=function(e){var t,r,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];return 0<e?(e=e,(t=new Date).setTime(1e3*e),n=(e=!(!1===n))?t.getHours():t.getUTCHours(),r=e?t.getMinutes():t.getUTCMinutes(),e=e?t.getSeconds():t.getUTCSeconds(),l(n)+":"+l(r)+":"+l(e)):""},t.isAndroid=o,t.isSupportedMSE=function(){if(o())return!1;var e=n(),t=window.SourceBuffer||window.WebKitSourceBuffer,e=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.4d401f,mp4a.40.2"'),t=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!e&&!!t},t.logDM=function(e,t){t&&m.logger.log("%c ".concat(t.type," ").concat("event"===t.type?t.event:"mse_init_segment"),"background: aquamarine;",t)},t.pad2=l,t.replaceHttpByWS=void 0,t.showDispatchError=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";"data"in e&&e.data instanceof ArrayBuffer&&m.logger.error("Data:",s(e.data));m.logger.error(c(e),t),this.media&&"error"in this.media&&m.logger.error("MediaError:",this.media.error);++u>=this.opts.errorsBeforeStop&&(u=0,this.stopPromise=this.stop());this.onError&&this.onError(t,e)};var m=r(357);function n(){if("undefined"!=typeof window)return window.MediaSource||window.WebKitMediaSource}function o(){return-1!==navigator.userAgent.indexOf("Android")}function i(e){return e[47]}function a(e){return(e[92]<<24|e[93]<<16|e[94]<<8|e[95])+(e[96]<<24|e[97]<<16|e[98]<<8|e[99])/1e6}function s(e){e=new Uint8Array(e);return{trackId:e[47],utc:a(e),view:e}}t.checkVideoProgress=function(d,y){return function(){var e,t,r,n,o,i=d.currentTime,a=d.buffered,s=d.buffered.length;if(y)for(var c=y.sb.sourceBuffer,l=Object.keys(c),u=i-30,p=l.length-1;0<=p;p--){var f,h=l[p],h=c[h];h&&0<(f=h.buffered).length&&u>f.start(0)&&(function(e,t,r){try{for(var n=0;n<e.buffered.length;n++){var o=e.buffered.start(n),i=e.buffered.end(n),a=Math.max(o,t),s=Math.min(i,r);if(.5<Math.min(s,i)-a)return e.updating||e.remove(a,s)}}catch(e){m.logger.warn("removeBufferRange failed",e)}}(h,0,u),0,0)}y.media.readyState<=2&&2===y.media.networkState?y.onStartStalling():2<y.media.readyState&&y.onEndStalling(),s&&(a=a.end(s-1),e=Math.abs(a-i),y.playerStatsObject&&(y.playerStatsObject.bytes=y.sb.totalBytesCollected,y.playerStatsObject.updated_at=Date.now(),y.playing&&(y.playbackSegmentStart&&(o=y.playerStatsObject.application)&&(t=(n=y.media.getVideoPlaybackQuality()).corruptedVideoFrames,r=n.droppedVideoFrames,n=n.totalVideoFrames,o=o.live_duration,o+=y.playerStatsObject.updated_at-y.playbackSegmentStart,y.addPlayerStat("live_duration",!1,o),y.addPlayerStat("total_video_frames",!1,n),y.addPlayerStat("dropped_video_frames",!1,r),y.addPlayerStat("corrupted_video_frames",!1,t)),y.playbackSegmentStart=y.playerStatsObject.updated_at),y.addStat({updated_at:y.playerStatsObject.updated_at,bytes:y.sb.totalBytesCollected})),e<=y.opts.maxBufferDelay||(m.logger.log("nudge",i,"->",s?a:"-",i-a),d.currentTime=a-.2))}};t.replaceHttpByWS=function(e){return e.replace(/^http/,"ws")};var c=function(e){return"Error ".concat(e.name,": ").concat(e.message,"\n").concat(e.stack)};function l(e){return e<=9?"0"+e:""+e}t.errorMsg=c;var u=0},924:(e,t,r)=>{"use strict";var n=r(210),o=r(559),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){t=n(e,!!t);return"function"==typeof t&&-1<i(e,".prototype.")?o(t):t}},559:(e,t,r)=>{"use strict";var n=r(612),r=r(210),o=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||n.call(i,o),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=a(n,i,arguments);return s&&c&&s(t,"length").configurable&&c(t,"length",{value:1+l(0,e.length-(arguments.length-1))}),t};function u(){return a(n,o,arguments)}c?c(e.exports,"apply",{value:u}):e.exports.apply=u},648:e=>{"use strict";var c=Array.prototype.slice,l=Object.prototype.toString;e.exports=function(t){var r=this;if("function"!=typeof r||"[object Function]"!==l.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var n,e,o=c.call(arguments,1),i=Math.max(0,r.length-o.length),a=[],s=0;s<i;s++)a.push("$"+s);return n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){var e;return this instanceof n?(e=r.apply(this,o.concat(c.call(arguments))),Object(e)===e?e:this):r.apply(t,o.concat(c.call(arguments)))}),r.prototype&&((e=function(){}).prototype=r.prototype,n.prototype=new e,e.prototype=null),n}},612:(e,t,r)=>{"use strict";r=r(648);e.exports=Function.prototype.bind||r},210:(e,t,r)=>{"use strict";var n,f=SyntaxError,o=Function,h=TypeError,i=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch(e){d=null}function a(){throw new h}var s=d?function(){try{return a}catch(e){try{return d(arguments,"callee").get}catch(e){return a}}}():a,c=r(405)(),l=r(185)(),u=Object.getPrototypeOf||(l?function(e){return e.__proto__}:null),y={},l="undefined"!=typeof Uint8Array&&u?u(Uint8Array):n,m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":c&&u?u([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&u?u(u([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c&&u?u((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c&&u?u((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&u?u(""[Symbol.iterator]()):n,"%Symbol%":c?Symbol:n,"%SyntaxError%":f,"%ThrowTypeError%":s,"%TypedArray%":l,"%TypeError%":h,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(u)try{null.error}catch(e){c=u(u(e));m["%Error.prototype%"]=c}function g(e){var t,r;return"%AsyncFunction%"===e?t=i("async function () {}"):"%GeneratorFunction%"===e?t=i("function* () {}"):"%AsyncGeneratorFunction%"===e?t=i("async function* () {}"):"%AsyncGenerator%"===e?(r=g("%AsyncGeneratorFunction%"))&&(t=r.prototype):"%AsyncIteratorPrototype%"===e&&(r=g("%AsyncGenerator%"))&&u&&(t=u(r.prototype)),m[e]=t}var v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},s=r(612),b=r(642),S=s.call(Function.call,Array.prototype.concat),E=s.call(Function.apply,Array.prototype.splice),w=s.call(Function.call,String.prototype.replace),_=s.call(Function.call,String.prototype.slice),k=s.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g;e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new h("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new h('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new f("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=_(e,0,1),r=_(e,-1);if("%"===t&&"%"!==r)throw new f("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new f("invalid intrinsic syntax, expected opening `%`");var o=[];return w(e,O,function(e,t,r,n){o[o.length]=r?w(n,j,"$1"):t||e}),o}(e),n=0<r.length?r[0]:"",o=function(e,t){var r,n=e;if(b(v,n)&&(n="%"+(r=v[n])[0]+"%"),b(m,n)){var o=m[n];if(void 0!==(o=o===y?g(n):o)||t)return{alias:r,name:n,value:o};throw new h("intrinsic "+e+" exists, but is not available. Please file an issue!")}throw new f("intrinsic "+e+" does not exist!")}("%"+n+"%",t),i=(o.name,o.value),a=!1,o=o.alias;o&&(n=o[0],E(r,S([0,1],o)));for(var s=1,c=!0;s<r.length;s+=1){var l=r[s],u=_(l,0,1),p=_(l,-1);if(('"'===u||"'"===u||"`"===u||'"'===p||"'"===p||"`"===p)&&u!==p)throw new f("property names with quotes must have matching quotes");if("constructor"!==l&&c||(a=!0),b(m,u="%"+(n+="."+l)+"%"))i=m[u];else if(null!=i){if(!(l in i)){if(t)return;throw new h("base intrinsic for "+e+" exists, but the property is not available.")}i=d&&s+1>=r.length?(c=!!(p=d(i,l)))&&"get"in p&&!("originalValue"in p.get)?p.get:i[l]:(c=b(i,l),i[l]),c&&!a&&(m[u]=i)}}return i}},185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},405:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(419);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"!=typeof Symbol.iterator){var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){r=Object.getOwnPropertyDescriptor(e,t);if(42!==r.value||!0!==r.enumerable)return!1}}return!0}},642:(e,t,r)=>{"use strict";r=r(612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},631:(r,n,i)=>{var e="function"==typeof Map&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,b=e&&t&&"function"==typeof t.get?t.get:null,S=e&&Map.prototype.forEach,t="function"==typeof Set&&Set.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,E=t&&e&&"function"==typeof e.get?e.get:null,w=t&&Set.prototype.forEach,_="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,k="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,O="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Y=Boolean.prototype.valueOf,a=Object.prototype.toString,K=Function.prototype.toString,Z=String.prototype.match,j=String.prototype.slice,T=String.prototype.replace,s=String.prototype.toUpperCase,M=String.prototype.toLowerCase,u=RegExp.prototype.test,A=Array.prototype.concat,P=Array.prototype.join,X=Array.prototype.slice,o=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,p=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,D="function"==typeof Symbol&&"object"==typeof Symbol.iterator,B="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,U=("function"==typeof Reflect?Reflect:Object).getPrototypeOf||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function L(e,t){if(e===1/0||e===-1/0||e!=e||e&&-1e3<e&&e<1e3||u.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-o(-e):o(e);if(n!==e)return e=String(n),n=j.call(t,e.length+1),T.call(e,r,"$&_")+"."+T.call(T.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}return T.call(t,r,"$&_")}var N=i(654),e=N.custom,C=V(e)?e:null;function F(e,t,r){r="double"===(r.quoteStyle||t)?'"':"'";return r+e+r}function W(e){return!("[object Array]"!==H(e)||B&&"object"==typeof e&&B in e)}function G(e){return!("[object RegExp]"!==H(e)||B&&"object"==typeof e&&B in e)}function V(e){if(D)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return 1;if(e&&"object"==typeof e&&I)try{return I.call(e),1}catch(e){}}r.exports=function n(r,e,o,i){var a=e||{};if(q(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');e=!q(a,"customInspect")||a.customInspect;if("boolean"!=typeof e&&"symbol"!==e)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&0<a.indent))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var t=a.numericSeparator;if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return function e(t,r){if(t.length>r.maxStringLength)return n=t.length-r.maxStringLength,n="... "+n+" more character"+(1<n?"s":""),e(j.call(t,0,r.maxStringLength),r)+n;var n=T.call(T.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,te);return F(n,"single",r)}(r,a);if("number"==typeof r)return 0===r?0<1/0/r?"0":"-0":(d=String(r),t?L(r,d):d);if("bigint"==typeof r)return d=String(r)+"n",t?L(r,d):d;t=void 0===a.depth?5:a.depth;if(t<=(o=void 0===o?0:o)&&0<t&&"object"==typeof r)return W(r)?"[Array]":"[Object]";var s,c,l,u,p,f,h,d=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&0<e.indent))return null;r=P.call(Array(e.indent+1)," ")}return{base:r,prev:P.call(Array(t+1),r)}}(a,o);if(void 0===i)i=[];else if(0<=ee(i,r))return"[Circular]";function y(e,t,r){return t&&(i=X.call(i)).push(t),r?(t={depth:a.depth},q(a,"quoteStyle")&&(t.quoteStyle=a.quoteStyle),n(e,t,o+1,i)):n(e,a,o+1,i)}if("function"==typeof r&&!G(r))return"[Function"+((c=function(e){if(e.name)return e.name;e=Z.call(K.call(e),/^function\s*([\w$]+)/);if(e)return e[1];return null}(r))?": "+c:" (anonymous)")+"]"+(0<(c=J(r,y)).length?" { "+P.call(c,", ")+" }":"");if(V(r))return c=D?T.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(r),"object"!=typeof r||D?c:Q(c);if(function(e){if(!e||"object"!=typeof e)return;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return 1;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(r)){for(var m="<"+M.call(String(r.nodeName)),g=r.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+F((s=g[v].value,T.call(String(s),/"/g,"&quot;")),"double",a);return m+=">",r.childNodes&&r.childNodes.length&&(m+="..."),m+="</"+M.call(String(r.nodeName))+">"}if(W(r))return 0===r.length?"[]":(c=J(r,y),d&&!function(e){for(var t=0;t<e.length;t++)if(0<=ee(e[t],"\n"))return;return 1}(c)?"["+z(c,d)+"]":"[ "+P.call(c,", ")+" ]");if(!("[object Error]"!==H(c=r)||B&&"object"==typeof c&&B in c))return p=J(r,y),"cause"in Error.prototype||!("cause"in r)||R.call(r,"cause")?0===p.length?"["+String(r)+"]":"{ ["+String(r)+"] "+P.call(p,", ")+" }":"{ ["+String(r)+"] "+P.call(A.call("[cause]: "+y(r.cause),p),", ")+" }";if("object"==typeof r&&e){if(C&&"function"==typeof r[C]&&N)return N(r,{depth:t-o});if("symbol"!==e&&"function"==typeof r.inspect)return r.inspect()}return function(e){if(b&&e&&"object"==typeof e)try{b.call(e);try{E.call(e)}catch(e){return 1}return e instanceof Map}catch(e){}return}(r)?(l=[],S&&S.call(r,function(e,t){l.push(y(t,r,!0)+" => "+y(e,r))}),re("Map",b.call(r),l,d)):function(e){if(E&&e&&"object"==typeof e)try{E.call(e);try{b.call(e)}catch(e){return 1}return e instanceof Set}catch(e){}return}(r)?(u=[],w&&w.call(r,function(e){u.push(y(e,r))}),re("Set",E.call(r),u,d)):function(e){if(_&&e&&"object"==typeof e)try{_.call(e,_);try{k.call(e,k)}catch(e){return 1}return e instanceof WeakMap}catch(e){}return}(r)?$("WeakMap"):function(e){if(k&&e&&"object"==typeof e)try{k.call(e,k);try{_.call(e,_)}catch(e){return 1}return e instanceof WeakSet}catch(e){}return}(r)?$("WeakSet"):function(e){if(O&&e&&"object"==typeof e)try{return O.call(e),1}catch(e){}return}(r)?$("WeakRef"):"[object Number]"!==H(p=r)||B&&"object"==typeof p&&B in p?function(e){if(e&&"object"==typeof e&&x)try{return x.call(e),1}catch(e){}return}(r)?Q(y(x.call(r))):"[object Boolean]"!==H(t=r)||B&&"object"==typeof t&&B in t?"[object String]"!==H(e=r)||B&&"object"==typeof e&&B in e?("[object Date]"!==H(t=r)||B&&"object"==typeof t&&B in t)&&!G(r)?(e=J(r,y),t=U?U(r)===Object.prototype:r instanceof Object||r.constructor===Object,f=r instanceof Object?"":"null prototype",h=!t&&B&&Object(r)===r&&B in r?j.call(H(r),8,-1):f?"Object":"",t=(!t&&"function"==typeof r.constructor&&r.constructor.name?r.constructor.name+" ":"")+(h||f?"["+P.call(A.call([],h||[],f||[]),": ")+"] ":""),0===e.length?t+"{}":d?t+"{"+z(e,d)+"}":t+"{ "+P.call(e,", ")+" }"):String(r):Q(y(String(r))):Q(Y.call(r)):Q(y(Number(r)))};var c=Object.prototype.hasOwnProperty||function(e){return e in this};function q(e,t){return c.call(e,t)}function H(e){return a.call(e)}function ee(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function te(e){var e=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+s.call(e.toString(16))}function Q(e){return"Object("+e+")"}function $(e){return e+" { ? }"}function re(e,t,r,n){return e+" ("+t+") {"+(n?z(r,n):P.call(r,", "))+"}"}function z(e,t){var r;return 0===e.length?"":(r="\n"+t.prev+t.base)+P.call(e,","+r)+"\n"+t.prev}function J(e,t){var r=W(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=q(e,o)?t(e[o],e):""}var i,a="function"==typeof p?p(e):[];if(D)for(var s={},c=0;c<a.length;c++)s["$"+a[c]]=a[c];for(i in e)!q(e,i)||r&&String(Number(i))===i&&i<e.length||D&&s["$"+i]instanceof Symbol||(u.call(/[^\w$]/,i)?n.push(t(i,e)+": "+t(e[i],e)):n.push(i+": "+t(e[i],e)));if("function"==typeof p)for(var l=0;l<a.length;l++)R.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}},317:(e,t,r)=>{"use strict";
/*!
 * parseurl
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2014-2017 Douglas Christopher Wilson
 * MIT Licensed
 */var r=r(575),a=r.parse,s=r.Url;function n(e){var t,r=e.url;if(void 0!==r)return i(r,t=e._parsedUrl)?t:((t=o(r))._raw=r,e._parsedUrl=t)}function o(e){if("string"!=typeof e||47!==e.charCodeAt(0))return a(e);for(var t=e,r=null,n=null,o=1;o<e.length;o++)switch(e.charCodeAt(o)){case 63:null===n&&(t=e.substring(0,o),r=e.substring(o+1),n=e.substring(o));break;case 9:case 10:case 12:case 13:case 32:case 35:case 160:case 65279:return a(e)}var i=void 0!==s?new s:{};return i.path=e,i.href=e,i.pathname=t,null!==n&&(i.query=r,i.search=n),i}function i(e,t){return"object"==typeof t&&null!==t&&(void 0===s||t instanceof s)&&t._raw===e}e.exports=n,e.exports.original=function(e){var t=e.originalUrl;if("string"!=typeof t)return n(e);var r=e._parsedOriginalUrl;if(i(t,r))return r;return(r=o(t))._raw=t,e._parsedOriginalUrl=r}},478:(e,t,r)=>{"use strict";function s(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r}var n=r(210),o=r(924),c=r(631),l=n("%TypeError%"),u=n("%WeakMap%",!0),p=n("%Map%",!0),f=o("WeakMap.prototype.get",!0),h=o("WeakMap.prototype.set",!0),d=o("WeakMap.prototype.has",!0),y=o("Map.prototype.get",!0),m=o("Map.prototype.set",!0),g=o("Map.prototype.has",!0);e.exports=function(){var o,i,a,t={assert:function(e){if(!t.has(e))throw new l("Side channel does not contain "+c(e))},get:function(e){if(u&&e&&("object"==typeof e||"function"==typeof e)){if(o)return f(o,e)}else if(p){if(i)return y(i,e)}else{var t;if(a)return(t=s(t=a,e))&&t.value}},has:function(e){if(u&&e&&("object"==typeof e||"function"==typeof e)){if(o)return d(o,e)}else if(p){if(i)return g(i,e)}else if(a)return!!s(a,e);return!1},set:function(e,t){var r,n;u&&e&&("object"==typeof e||"function"==typeof e)?(o=o||new u,h(o,e,t)):p?(i=i||new p,m(i,e,t)):(t=t,(n=s(r=a=a||{key:{},next:null},e=e))?n.value=t:r.next={key:e,next:r.next,value:t})}};return t}},511:function(e,t,r){var n,o,m,g,v,i,a,s,c,l,u,p,b,S;/*! https://mths.be/punycode v1.4.1 by @mathias */function E(e){throw new RangeError(u[e])}function f(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function h(e,t){var r=e.split("@"),n="",r=(1<r.length&&(n=r[0]+"@",e=r[1]),(e=e.replace(l,".")).split("."));return n+f(r,t).join(".")}function w(e){for(var t,r,n=[],o=0,i=e.length;o<i;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<i?56320==(64512&(r=e.charCodeAt(o++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),o--):n.push(t);return n}function d(e){return f(e,function(e){var t="";return 65535<e&&(t+=S((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=S(e)}).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,r){var n=0;for(e=r?b(e/a):e>>1,e+=b(e/t);p*v>>1<e;n+=g)e=b(e/p);return b(n+(p+1)*e/(e+i))}function y(e){var t,r,n,o,i,a,s,c=[],l=e.length,u=0,p=128,f=72,h=e.lastIndexOf("-");for(h<0&&(h=0),r=0;r<h;++r)128<=e.charCodeAt(r)&&E("not-basic"),c.push(e.charCodeAt(r));for(n=0<h?h+1:0;n<l;){for(o=u,i=1,a=g;l<=n&&E("invalid-input"),s=e.charCodeAt(n++),(g<=(s=s-48<10?s-22:s-65<26?s-65:s-97<26?s-97:g)||s>b((m-u)/i))&&E("overflow"),u+=s*i,!(s<(s=a<=f?1:f+v<=a?v:a-f));a+=g)i>b(m/(s=g-s))&&E("overflow"),i*=s;f=k(u-o,t=c.length+1,0==o),b(u/t)>m-p&&E("overflow"),p+=b(u/t),u%=t,c.splice(u++,0,p)}return d(c)}function O(e){for(var t,r,n,o,i,a,s,c,l,u,p=[],f=(e=w(e)).length,h=128,d=72,y=t=0;y<f;++y)(s=e[y])<128&&p.push(S(s));for(r=n=p.length,n&&p.push("-");r<f;){for(o=m,y=0;y<f;++y)h<=(s=e[y])&&s<o&&(o=s);for(o-h>b((m-t)/(c=r+1))&&E("overflow"),t+=(o-h)*c,h=o,y=0;y<f;++y)if((s=e[y])<h&&++t>m&&E("overflow"),s==h){for(i=t,a=g;!(i<(l=a<=d?1:d+v<=a?v:a-d));a+=g)p.push(S(_(l+(u=i-l)%(l=g-l),0))),i=b(u/l);p.push(S(_(i,0))),d=k(t,c,r==n),t=0,++r}++t,++h}return p.join("")}e=r.nmd(e),t&&t.nodeType,e&&e.nodeType,(n="object"==typeof r.g&&r.g).global!==n&&n.window!==n&&n.self,m=2147483647,v=26,i=38,a=700,s=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,u={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=(g=36)-1,b=Math.floor,S=String.fromCharCode,o={version:"1.4.1",ucs2:{decode:w,encode:d},decode:y,encode:O,toASCII:function(e){return h(e,function(e){return c.test(e)?"xn--"+O(e):e})},toUnicode:function(e){return h(e,function(e){return s.test(e)?y(e.slice(4).toLowerCase()):e})}},void 0!==(n=function(){return o}.call(t,r,t,e))&&(e.exports=n)},532:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:o}},984:(e,t,r)=>{"use strict";var n=r(730),o=r(325),r=r(532);e.exports={formats:r,parse:o,stringify:n}},325:(e,t,r)=>{"use strict";function c(e,t){var r,n,o,i,a={__proto__:null},e=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,c=e.split(t.delimiter,s),l=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<c.length;++r)0===c[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===c[r]?u="utf-8":"utf8=%26%2310003%3B"===c[r]&&(u="iso-8859-1"),l=r,r=c.length);for(r=0;r<c.length;++r)r!==l&&((i=-1===(i=-1===(i=(n=c[r]).indexOf("]="))?n.indexOf("="):i+1)?(o=t.decoder(n,h.decoder,u,"key"),t.strictNullHandling?null:""):(o=t.decoder(n.slice(0,i),h.decoder,u,"key"),p.maybeMap(v(n.slice(i+1),t),function(e){return t.decoder(e,h.decoder,u,"value")})))&&t.interpretNumericEntities&&"iso-8859-1"===u&&(i=i.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),-1<n.indexOf("[]=")&&(i=f(i)?[i]:i),g.call(a,o)?a[o]=p.combine(a[o],i):a[o]=i);return a}function l(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=0<r.depth&&/(\[[^[\]]*])/.exec(o),e=a?o.slice(0,a.index):o,s=[];if(e){if(!r.plainObjects&&g.call(Object.prototype,e)&&!r.allowPrototypes)return;s.push(e)}for(var c=0;0<r.depth&&null!==(a=i.exec(o))&&c<r.depth;){if(c+=1,!r.plainObjects&&g.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(a[1])}a&&s.push("["+o.slice(a.index)+"]");for(var l=s,e=t,u=r,p=n?e:v(e,u),f=l.length-1;0<=f;--f){var h,d,y,m=l[f];"[]"===m&&u.parseArrays?h=[].concat(p):(h=u.plainObjects?Object.create(null):{},d="["===m.charAt(0)&&"]"===m.charAt(m.length-1)?m.slice(1,-1):m,y=parseInt(d,10),u.parseArrays||""!==d?!isNaN(y)&&m!==d&&String(y)===d&&0<=y&&u.parseArrays&&y<=u.arrayLimit?(h=[])[y]=p:"__proto__"!==d&&(h[d]=p):h={0:p}),p=h}return p}}var p=r(368),g=Object.prototype.hasOwnProperty,f=Array.isArray,h={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:p.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},v=function(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e};e.exports=function(e,t){var r=function(e){if(!e)return h;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=(void 0===e.charset?h:e).charset;return{allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,allowPrototypes:("boolean"==typeof e.allowPrototypes?e:h).allowPrototypes,allowSparse:("boolean"==typeof e.allowSparse?e:h).allowSparse,arrayLimit:("number"==typeof e.arrayLimit?e:h).arrayLimit,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:h).charsetSentinel,comma:("boolean"==typeof e.comma?e:h).comma,decoder:("function"==typeof e.decoder?e:h).decoder,delimiter:("string"==typeof e.delimiter||p.isRegExp(e.delimiter)?e:h).delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:h.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:("boolean"==typeof e.interpretNumericEntities?e:h).interpretNumericEntities,parameterLimit:("number"==typeof e.parameterLimit?e:h).parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:("boolean"==typeof e.plainObjects?e:h).plainObjects,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:h).strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?c(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a)var s=i[a],s=l(s,n[s],r,"string"==typeof e),o=p.merge(o,s,r);return!0===r.allowSparse?o:p.compact(o)}},730:(e,t,r)=>{"use strict";function A(e,t){n.apply(e,D(t)?t:[t])}function P(e,t,r,n,o,i,a,s,c,l,u,p,f,h,d,y){for(var m=e,g=y,v=0,b=!1;void 0!==(g=g.get(R))&&!b;){var S=g.get(e);if(v+=1,void 0!==S){if(S===v)throw new RangeError("Cyclic object value");b=!0}void 0===g.get(R)&&(v=0)}if("function"==typeof s?m=s(t,m):m instanceof Date?m=u(m):"comma"===r&&D(m)&&(m=I.maybeMap(m,function(e){return e instanceof Date?u(e):e})),null===m){if(o)return a&&!h?a(t,B.encoder,d,"key",p):t;m=""}if("string"==typeof(w=m)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||I.isBuffer(m))return a?[f(h?t:a(t,B.encoder,d,"key",p))+"="+f(a(m,B.encoder,d,"value",p))]:[f(t)+"="+f(String(m))];var E=[];if(void 0!==m)for(var w,_,_="comma"===r&&D(m)?[{value:0<(m=h&&a?I.maybeMap(m,a):m).length?m.join(",")||null:void 0}]:D(s)?s:(w=Object.keys(m),c?w.sort(c):w),k=n&&D(m)&&1===m.length?t+"[]":t,O=0;O<_.length;++O){var j,T=_[O],M="object"==typeof T&&void 0!==T.value?T.value:m[T];i&&null===M||(T=D(m)?"function"==typeof r?r(k,T):k:k+(l?"."+T:"["+T+"]"),y.set(e,v),(j=x()).set(R,y),A(E,P(M,T,r,n,o,i,"comma"===r&&h&&D(m)?null:a,s,c,l,u,p,f,h,d,j)))}return E}var x=r(478),I=r(368),p=r(532),f=Object.prototype.hasOwnProperty,h={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},D=Array.isArray,n=Array.prototype.push,o=Date.prototype.toISOString,r=p.default,B={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:I.encode,encodeValuesOnly:!1,format:r,formatter:p.formatters[r],indices:!1,serializeDate:function(e){return o.call(e)},skipNulls:!1,strictNullHandling:!1},R={};e.exports=function(e,t){var r=e,n=function(e){if(!e)return B;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||B.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=p.default;if(void 0!==e.format){if(!f.call(p.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=p.formatters[r],o=B.filter;return"function"!=typeof e.filter&&!D(e.filter)||(o=e.filter),{addQueryPrefix:("boolean"==typeof e.addQueryPrefix?e:B).addQueryPrefix,allowDots:void 0===e.allowDots?B.allowDots:!!e.allowDots,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:B).charsetSentinel,delimiter:(void 0===e.delimiter?B:e).delimiter,encode:("boolean"==typeof e.encode?e:B).encode,encoder:("function"==typeof e.encoder?e:B).encoder,encodeValuesOnly:("boolean"==typeof e.encodeValuesOnly?e:B).encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:("function"==typeof e.serializeDate?e:B).serializeDate,skipNulls:("boolean"==typeof e.skipNulls?e:B).skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:B).strictNullHandling}}(t),o=("function"==typeof n.filter?r=(0,n.filter)("",r):D(n.filter)&&(s=n.filter),[]);if("object"!=typeof r||null===r)return"";var e=t&&t.arrayFormat in h?t.arrayFormat:!(t&&"indices"in t)||t.indices?"indices":"repeat",i=h[e];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a="comma"===i&&t&&t.commaRoundTrip,s=s||Object.keys(r);n.sort&&s.sort(n.sort);for(var c=x(),l=0;l<s.length;++l){var u=s[l];n.skipNulls&&null===r[u]||A(o,P(r[u],u,i,a,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}e=o.join(n.delimiter),t=!0===n.addQueryPrefix?"?":"";return n.charsetSentinel&&("iso-8859-1"===n.charset?t+="utf8=%26%2310003%3B&":t+="utf8=%E2%9C%93&"),0<e.length?t+e:""}},368:(e,t,r)=>{"use strict";function s(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r}var l=r(532),c=Object.prototype.hasOwnProperty,y=Array.isArray,u=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();e.exports={arrayToObject:s,assign:function(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var c=a[s],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:c}),r.push(l))}for(var u=t;1<u.length;){var p=u.pop(),f=p.obj[p.prop];if(y(f)){for(var h=[],d=0;d<f.length;++d)void 0!==f[d]&&h.push(f[d]);p.obj[p.prop]=h}}return e},decode:function(t,e,r){t=t.replace(/\+/g," ");if("iso-8859-1"===r)return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch(e){return t}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",s=0;s<i.length;++s){var c=i.charCodeAt(s);45===c||46===c||95===c||126===c||48<=c&&c<=57||65<=c&&c<=90||97<=c&&c<=122||o===l.RFC1738&&(40===c||41===c)?a+=i.charAt(s):c<128?a+=u[c]:c<2048?a+=u[192|c>>6]+u[128|63&c]:c<55296||57344<=c?a+=u[224|c>>12]+u[128|c>>6&63]+u[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(s)),a+=u[240|c>>18]+u[128|c>>12&63]+u[128|c>>6&63]+u[128|63&c])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(y(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function n(o,i,a){if(!i)return o;if("object"!=typeof i){if(y(o))o.push(i);else{if(!o||"object"!=typeof o)return[o,i];(a&&(a.plainObjects||a.allowPrototypes)||!c.call(Object.prototype,i))&&(o[i]=!0)}return o}var e;return o&&"object"==typeof o?(y(e=o)&&!y(i)&&(e=s(o,a)),y(o)&&y(i)?(i.forEach(function(e,t){var r;c.call(o,t)?(r=o[t])&&"object"==typeof r&&e&&"object"==typeof e?o[t]=n(r,e,a):o.push(e):o[t]=e}),o):Object.keys(i).reduce(function(e,t){var r=i[t];return c.call(e,t)?e[t]=n(e[t],r,a):e[t]=r,e},e)):[o].concat(i)}}},575:(e,t,r)=>{"use strict";var _=r(511);function E(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var k=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,O=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),j=["'"].concat(o),T=["%","/","?",";","#"].concat(j),M=["/","?","#"],A=/^[+a-z0-9A-Z_-]{0,63}$/,P=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},I={javascript:!0,"javascript:":!0},D={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},B=r(984);function i(e,t,r){var n;return e&&"object"==typeof e&&e instanceof E?e:((n=new E).parse(e,t,r),n)}E.prototype.parse=function(e,t,r){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),n=-1!==n&&n<e.indexOf("#")?"?":"#",o=e.split(n);o[0]=o[0].replace(/\\/g,"/");var i=(i=e=o.join(n)).trim();if(!r&&1===e.split("#").length){o=O.exec(i);if(o)return this.path=i,this.href=i,this.pathname=o[1],o[2]?(this.search=o[2],this.query=t?B.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var a,n=k.exec(i);if(n&&(a=(n=n[0]).toLowerCase(),this.protocol=a,i=i.substr(n.length)),!(r||n||i.match(/^\/\/[^@/]+@[^@/]+/))||!(S="//"===i.substr(0,2))||n&&I[n]||(i=i.substr(2),this.slashes=!0),!I[n]&&(S||n&&!D[n])){for(var s=-1,c=0;c<M.length;c++)-1!==(l=i.indexOf(M[c]))&&(-1===s||l<s)&&(s=l);-1!==(e=-1===s?i.lastIndexOf("@"):i.lastIndexOf("@",s))&&(o=i.slice(0,e),i=i.slice(e+1),this.auth=decodeURIComponent(o));for(var l,s=-1,c=0;c<T.length;c++)-1!==(l=i.indexOf(T[c]))&&(-1===s||l<s)&&(s=l);-1===s&&(s=i.length),this.host=i.slice(0,s),i=i.slice(s),this.parseHost(),this.hostname=this.hostname||"";r="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!r)for(var u=this.hostname.split(/\./),c=0,p=u.length;c<p;c++){var f=u[c];if(f&&!f.match(A)){for(var h="",d=0,y=f.length;d<y;d++)127<f.charCodeAt(d)?h+="x":h+=f[d];if(!h.match(A)){var m=u.slice(0,c),g=u.slice(c+1),v=f.match(P);v&&(m.push(v[1]),g.unshift(v[2])),g.length&&(i="/"+g.join(".")+i),this.hostname=m.join(".");break}}}255<this.hostname.length?this.hostname="":this.hostname=this.hostname.toLowerCase(),r||(this.hostname=_.toASCII(this.hostname));var b=this.port?":"+this.port:"",S=this.hostname||"";this.host=S+b,this.href+=this.host,r&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0])&&(i="/"+i)}if(!x[a])for(c=0,p=j.length;c<p;c++){var E,w=j[c];-1!==i.indexOf(w)&&((E=encodeURIComponent(w))===w&&(E=escape(w)),i=i.split(w).join(E))}n=i.indexOf("#"),-1!==n&&(this.hash=i.substr(n),i=i.slice(0,n)),e=i.indexOf("?");return-1!==e?(this.search=i.substr(e),this.query=i.substr(e+1),t&&(this.query=B.parse(this.query)),i=i.slice(0,e)):t&&(this.search="",this.query={}),i&&(this.pathname=i),D[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),(this.pathname||this.search)&&(b=this.pathname||"",o=this.search||"",this.path=b+o),this.href=this.format(),this},E.prototype.format=function(){var e=this.auth||"",t=(e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@"),this.protocol||""),r=this.pathname||"",n=this.hash||"",o=!1,i="",e=(this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port)&&(o+=":"+this.port),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=B.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1})),this.search||i&&"?"+i||"");return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||D[t])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o=o||"",n&&"#"!==n.charAt(0)&&(n="#"+n),e&&"?"!==e.charAt(0)&&(e="?"+e),t+o+(r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(e=e.replace("#","%23"))+n},E.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},E.prototype.resolveObject=function(e){"string"==typeof e&&((f=new E).parse(e,!1,!0),e=f);for(var t=new E,r=Object.keys(this),n=0;n<r.length;n++){var o=r[n];t[o]=this[o]}if(t.hash=e.hash,""!==e.href)if(e.slashes&&!e.protocol){for(var i=Object.keys(e),a=0;a<i.length;a++){var s=i[a];"protocol"!==s&&(t[s]=e[s])}D[t.protocol]&&t.hostname&&!t.pathname&&(t.pathname="/",t.path=t.pathname)}else if(e.protocol&&e.protocol!==t.protocol)if(D[e.protocol]){if(t.protocol=e.protocol,e.host||I[e.protocol])t.pathname=e.pathname;else{for(var c=(e.pathname||"").split("/");c.length&&!(e.host=c.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==c[0]&&c.unshift(""),c.length<2&&c.unshift(""),t.pathname=c.join("/")}t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,(t.pathname||t.search)&&(f=t.pathname||"",h=t.search||"",t.path=f+h),t.slashes=t.slashes||e.slashes}else for(var l=Object.keys(e),u=0;u<l.length;u++){var p=l[u];t[p]=e[p]}else{var f=t.pathname&&"/"===t.pathname.charAt(0),h=e.host||e.pathname&&"/"===e.pathname.charAt(0),f=h||f||t.host&&e.pathname,d=f,y=t.pathname&&t.pathname.split("/")||[],c=e.pathname&&e.pathname.split("/")||[],m=t.protocol&&!D[t.protocol];if(m&&(t.hostname="",t.port=null,t.host&&(""===y[0]?y[0]=t.host:y.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host=null),f=f&&(""===c[0]||""===y[0])),h)t.host=(e.host||""===e.host?e:t).host,t.hostname=(e.hostname||""===e.hostname?e:t).hostname,t.search=e.search,t.query=e.query,y=c;else if(c.length)(y=y||[]).pop(),y=y.concat(c),t.search=e.search,t.query=e.query;else if(null!=e.search)return m&&(t.host=y.shift(),t.hostname=t.host,S=!!(t.host&&0<t.host.indexOf("@"))&&t.host.split("@"))&&(t.auth=S.shift(),t.hostname=S.shift(),t.host=t.hostname),t.search=e.search,t.query=e.query,null===t.pathname&&null===t.search||(t.path=(t.pathname||"")+(t.search||"")),t.href=t.format(),t;if(y.length){for(var g=y.slice(-1)[0],h=(t.host||e.host||1<y.length)&&("."===g||".."===g)||""===g,v=0,b=y.length;0<=b;b--)"."===(g=y[b])?y.splice(b,1):".."===g?(y.splice(b,1),v++):v&&(y.splice(b,1),v--);if(!f&&!d)for(;v--;)y.unshift("..");!f||""===y[0]||y[0]&&"/"===y[0].charAt(0)||y.unshift(""),h&&"/"!==y.join("/").substr(-1)&&y.push("");var S,d=""===y[0]||y[0]&&"/"===y[0].charAt(0);m&&(t.hostname=!d&&y.length?y.shift():"",t.host=t.hostname,S=!!(t.host&&0<t.host.indexOf("@"))&&t.host.split("@"))&&(t.auth=S.shift(),t.hostname=S.shift(),t.host=t.hostname),(f=f||t.host&&y.length)&&!d&&y.unshift(""),0<y.length?t.pathname=y.join("/"):(t.pathname=null,t.path=null),null===t.pathname&&null===t.search||(t.path=(t.pathname||"")+(t.search||"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes}else t.pathname=null,t.search?t.path="/"+t.search:t.path=null}return t.href=t.format(),t},E.prototype.parseHost=function(){var e=this.host,t=n.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.parse=i,t.resolve=function(e,t){return i(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},t.format=function(e){return(e="string"==typeof e?i(e):e)instanceof E?e.format():E.prototype.format.call(e)},t.Url=E},477:e=>{"use strict";e.exports=function(t,r,n,o){var i,a=self||window;try{try{try{i=new a.Blob([t])}catch(e){(i=new(a.BlobBuilder||a.WebKitBlobBuilder||a.MozBlobBuilder||a.MSBlobBuilder)).append(t),i=i.getBlob()}var e=a.URL||a.webkitURL,s=e.createObjectURL(i),c=new a[r](s,n);return e.revokeObjectURL(s),c}catch(e){return new a[r]("data:application/javascript,".concat(encodeURIComponent(t)),n)}}catch(e){if(o)return new a[r](o,n);throw Error("Inline worker is not supported")}}},654:()=>{}},o={},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="",r(264);function r(e){var t=o[e];return void 0!==t||(t=o[e]={id:e,loaded:!1,exports:{}},n[e].call(t.exports,t,t.exports,r),t.loaded=!0),t.exports}var n,o},e.exports=n()}}]);