addsearch-js-client
Version:
AddSearch API JavaScript client
2 lines • 117 kB
JavaScript
/*! addsearch-js-client 1.2.1 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AddSearchClient=e():t.AddSearchClient=e()}(this,(()=>(()=>{var t={507:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(s,i){function o(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}u((r=r.apply(t,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:!0}),e.putSentimentClick=e.executeAiAnswersNonStreamingFetch=e.executeAiAnswersStreamingFetch=void 0,n(542);const s=n(972);e.executeAiAnswersStreamingFetch=(t,e,n,r)=>{l(t,e,n,r)};e.executeAiAnswersNonStreamingFetch=(t,e,n,r)=>{h(t,e,n,r)};class i{constructor(t){this.cb=t,this.lastCallbackTime=0,this.throttleTimeout=null,this.pendingCallback=!1}callImmediate(t){this.cleanup(),this.lastCallbackTime=Date.now(),this.cb(t)}callThrottled(t){this.throttle(t)}cleanup(){this.throttleTimeout&&(clearTimeout(this.throttleTimeout),this.throttleTimeout=null),this.pendingCallback=!1}throttle(t){const e=Date.now(),n=e-this.lastCallbackTime;n>=i.THROTTLE_MS?(this.lastCallbackTime=e,this.pendingCallback=!1,this.cb(t)):this.scheduleCallback(t,i.THROTTLE_MS-n)}scheduleCallback(t,e){this.pendingCallback=!0,this.throttleTimeout&&clearTimeout(this.throttleTimeout),this.throttleTimeout=setTimeout((()=>{this.pendingCallback&&(this.lastCallbackTime=Date.now(),this.pendingCallback=!1,this.cb(t))}),e)}}i.THROTTLE_MS=100;class o{constructor(){this.conversationId="",this.answer="",this.sources=[],this.completedNormally=!1}getCurrentResponse(t){return{conversation_id:this.conversationId,answer:this.answer,sources:this.sources,is_streaming_complete:t}}}const a=t=>{if(!t.startsWith("data: "))return null;const e=t.substring(6).trim();try{return JSON.parse(e)}catch(t){throw console.error("AI Answers: Error parsing Streaming event:",t,"Data:",e),new Error("Streaming request failed: "+t)}},u=(t,e,n)=>{switch(t.type){case"metadata":return e.conversationId=t.conversation_id||"",n.callImmediate(e.getCurrentResponse(!1)),!1;case"token":return e.answer+=t.content||"",n.callThrottled(e.getCurrentResponse(!1)),!1;case"sources":return e.sources=t.sources||[],n.callImmediate(e.getCurrentResponse(!1)),!1;case"done":return e.completedNormally=!0,n.callImmediate(e.getCurrentResponse(!0)),!0;default:return!1}},c=(t,e,n)=>{for(const r of t){const t=a(r);if(t){if(u(t,e,n))return!0}}return!1},l=(t,e,n,a)=>{const u="https://".concat(t,"/v2/indices/").concat(e,"/conversations"),c=new i(a),l=new o;fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:null==n?void 0:n.keyword,filter:null==n?void 0:n.aiAnswersFilterObject,streaming:!0})}).then((t=>r(void 0,void 0,void 0,(function*(){var e;if(!t.ok)throw new Error("HTTP error! status: ".concat(t.status));const n=null===(e=t.body)||void 0===e?void 0:e.getReader();if(!n)throw new Error("No response body reader available");yield f(n,l,c),l.completedNormally||(console.warn("AI Answers: Stream ended unexpectedly, returning partial data"),c.cleanup(),a({conversation_id:l.conversationId||"",answer:l.answer,sources:l.sources,is_streaming_complete:!0,error:{response:s.RESPONSE_SERVER_ERROR,message:"Connection closed unexpectedly. Partial response returned."}}))})))).catch((t=>{console.error("AI Answers streaming error:",t),c.cleanup(),a({conversation_id:"",answer:"",sources:[],is_streaming_complete:!0,error:{response:s.RESPONSE_SERVER_ERROR,message:"Streaming request failed: "+t.message}})}))},f=(t,e,n)=>r(void 0,void 0,void 0,(function*(){const r=new TextDecoder;let s="",i=!1;for(;!i;){const{value:o,done:a}=yield t.read();if(i=a,o){s+=r.decode(o,{stream:!0});const t=s.split("\n");s=t.pop()||"";try{c(t,e,n)&&(i=!0)}catch(t){throw n.cleanup(),t}}}})),h=(t,e,n,r)=>{fetch("https://".concat(t,"/v2/indices/").concat(e,"/conversations"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:null==n?void 0:n.keyword,filter:null==n?void 0:n.aiAnswersFilterObject})}).then((t=>{if(!t.ok)throw new Error("HTTP error! status: ".concat(t.status));return t.json()})).then((t=>{t.response?r({conversation_id:t.response.conversation_id,answer:t.response.answer,sources:t.response.sources}):r({conversation_id:"",answer:"",sources:[],is_streaming_complete:!0,error:{response:s.RESPONSE_SERVER_ERROR,message:"Could not get ai-answers response in the expected data format"}})})).catch((t=>{console.error(t),r({conversation_id:"",answer:"",sources:[],is_streaming_complete:!0,error:{response:s.RESPONSE_SERVER_ERROR,message:"invalid server response"}})}))},d=t=>"positive"===t?1:"negative"===t?-1:0;e.putSentimentClick=(t,e,n,r)=>new Promise(((i,o)=>{s.aiAnswersInteractionsInstance.put("https://".concat(t,"/v2/indices/").concat(e,"/conversations/").concat(n,"/rating"),{value:d(r)}).then((t=>{200===t.status?i(!0):o(new Error(JSON.stringify({type:s.RESPONSE_SERVER_ERROR,message:"Unable to put sentiment click value."})))})).catch((t=>{console.error(t),o(new Error(JSON.stringify({type:s.RESPONSE_SERVER_ERROR,message:"Unable to put sentiment click value."})))}))}))},972:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RESPONSE_SERVER_ERROR=e.RESPONSE_BAD_REQUEST=e.setRequestInterceptor=e.aiAnswersInteractionsInstance=e.statsInstance=e.apiInstance=void 0;const s=r(n(425)),i=s.default.create();e.apiInstance=i;const o=s.default.create();e.statsInstance=o;const a=s.default.create();e.aiAnswersInteractionsInstance=a;e.RESPONSE_BAD_REQUEST=400;e.RESPONSE_SERVER_ERROR=500;e.setRequestInterceptor=(t,e)=>{("searchApi"===e?i:o).interceptors.request.use((e=>{const n=t({url:e.url,headers:e.headers});return e=Object.assign(Object.assign({},e),n)}),(t=>Promise.reject(new Error(JSON.stringify(t)))))}},650:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(542);const r=n(972),s=n(570),i=n(507),o=function(t,e){return null!=t&&""!==t?"&"+e+"="+t:""},a=function(t,e,n,u,c,l,f,h){var d,p,g,y,m,b,w,v;if("search"!==n&&"ai-answers"!==n&&"suggest"!==n&&"autocomplete"!==n&&"recommend"!==n)return void c({error:{response:r.RESPONSE_BAD_REQUEST,message:"invalid query type"}});let E="",O="",S={},A=null,R=null;if("search"===n){R=n,E=null==u?void 0:u.keyword,E=(null==u?void 0:u.enableLogicalOperators)?E.replaceAll(" and "," AND ").replaceAll(" or "," OR ").replaceAll(" not "," NOT "):E.replaceAll(" AND "," and ").replaceAll(" OR "," or ").replaceAll(" NOT "," not "),E=encodeURIComponent(E);let r=null==u?void 0:u.fuzzy;if("retry"===r&&(r=!0===l),O=o(null==u?void 0:u.lang,"lang")+o(r,"fuzzy")+o(null==u?void 0:u.collectAnalytics,"collectAnalytics")+o(null==u?void 0:u.postfixWildcard,"postfixWildcard")+o(null==u?void 0:u.categories,"categories")+o(null==u?void 0:u.priceFromCents,"priceFromCents")+o(null==u?void 0:u.priceToCents,"priceToCents")+o(null==u?void 0:u.dateFrom,"dateFrom")+o(null==u?void 0:u.dateTo,"dateTo")+o(null==u?void 0:u.paging.page,"page")+o(null==u?void 0:u.paging.pageSize,"limit")+o(null==u?void 0:u.shuffleAndLimitTo,"shuffleAndLimitTo")+o(null==u?void 0:u.jwt,"jwt")+o(null==u?void 0:u.resultType,"resultType")+o(null==u?void 0:u.userToken,"userToken")+o(null==u?void 0:u.numFacets,"numFacets")+o(null==u?void 0:u.cacheResponseTime,"cacheResponseWithTtlSeconds")+o(null==u?void 0:u.searchOperator,"defaultOperator")+o(null==u?void 0:u.analyticsTag,"analyticsTag"),S=Object.assign(Object.assign({},S),{language:null==u?void 0:u.lang,fuzzy:!0!==r&&!1!==r?r:JSON.stringify(r),collectAnalytics:null==u?void 0:u.collectAnalytics,postfixWildcard:null==u?void 0:u.postfixWildcard,categories:(null==u?void 0:u.categories)?null==u?void 0:u.categories.split(","):void 0,priceFromCents:(null==u?void 0:u.priceFromCents)?Number.parseInt(null==u?void 0:u.priceFromCents,10):void 0,priceToCents:(null==u?void 0:u.priceToCents)?Number.parseInt(null==u?void 0:u.priceToCents,10):void 0,dateFrom:null==u?void 0:u.dateFrom,dateTo:null==u?void 0:u.dateTo,paging:{page:null!==(d=null==u?void 0:u.paging.page)&&void 0!==d?d:1,pageSize:null!==(p=null==u?void 0:u.paging.pageSize)&&void 0!==p?p:10,shuffleAndLimitTo:null!==(g=null==u?void 0:u.shuffleAndLimitTo)&&void 0!==g?g:void 0,sortByField:null==u?void 0:u.paging.sortBy,sortOrder:null==u?void 0:u.paging.sortOrder},jwt:null==u?void 0:u.jwt,resultType:null==u?void 0:u.resultType,userToken:null!==(y=null==u?void 0:u.userToken)&&void 0!==y?y:void 0,numFacets:null==u?void 0:u.numFacets,cacheResponseWithTtlSeconds:null!==(m=null==u?void 0:u.cacheResponseTime)&&void 0!==m?m:void 0,defaultOperator:null!==(b=null==u?void 0:u.searchOperator)&&void 0!==b?b:void 0,analyticsTag:null==u?void 0:u.analyticsTag}),Array.isArray(null==u?void 0:u.paging.sortBy)&&(null==u?void 0:u.paging.sortBy.length)>1)for(const[t,e]of u.paging.sortBy.entries())O+=o(e,"sort")+o(u.paging.sortOrder[t],"order");else O+=o(null==u?void 0:u.paging.sortBy,"sort")+o(null==u?void 0:u.paging.sortOrder,"order");if(null==u?void 0:u.customFieldFilters){const t={};for(let e=0;e<(null==u?void 0:u.customFieldFilters.length);e++){O=O+"&customField="+(null==u?void 0:u.customFieldFilters[e]);const n=decodeURIComponent(null==u?void 0:u.customFieldFilters[e]).split("="),r=n[0],s=n[1];t[r]=s}S=Object.assign(Object.assign({},S),{customField:(0,s.isEmptyObject)(t)?void 0:t})}if(null==u?void 0:u.facetFields){const t=[];for(let e=0;e<(null==u?void 0:u.facetFields.length);e++)O=O+"&facet="+(null==u?void 0:u.facetFields[e]),t.push(null==u?void 0:u.facetFields[e]);S=Object.assign(Object.assign({},S),{facet:t.length>0?t:void 0})}if((null==u?void 0:u.rangeFacets)&&(O=O+"&rangeFacets="+encodeURIComponent(JSON.stringify(null==u?void 0:u.rangeFacets)),S=Object.assign(Object.assign({},S),{rangeFacets:null==u?void 0:u.rangeFacets})),(null==u?void 0:u.hierarchicalFacetSetting)&&(O=O+"&hierarchicalFacets="+encodeURIComponent(JSON.stringify(null==u?void 0:u.hierarchicalFacetSetting)),S=Object.assign(Object.assign({},S),{hierarchicalFacets:null==u?void 0:u.hierarchicalFacetSetting})),null==u?void 0:u.statsFields){const t=[];for(let e=0;e<(null==u?void 0:u.statsFields.length);e++)O=O+"&fieldStat="+(null==u?void 0:u.statsFields[e]),t.push(null==u?void 0:u.statsFields[e]);S=Object.assign(Object.assign({},S),{statsFields:t})}if((null==u?void 0:u.personalizationEvents)&&Array.isArray(null==u?void 0:u.personalizationEvents)){const t=[];for(let e=0;e<(null==u?void 0:u.personalizationEvents.length);e++){const n=null==u?void 0:u.personalizationEvents[e],r=Object.keys(n)[0];O=O+"&personalizationEvent="+encodeURIComponent(r+"="+n[r]),t.push(n)}S=Object.assign(Object.assign({},S),{personalizationEvents:t})}f?(O=O+"&filter="+encodeURIComponent(JSON.stringify(f)),S=Object.assign(Object.assign({},S),{filter:f})):(null==u?void 0:u.filterObject)&&(O=O+"&filter="+encodeURIComponent(JSON.stringify(null==u?void 0:u.filterObject)),S=Object.assign(Object.assign({},S),{filter:(0,s.isEmptyObject)(null==u?void 0:u.filterObject)||null==u?void 0:u.filterObject})),A="https://"+t+"/v1/"+R+"/"+e+"?term="+E+O}else{if("ai-answers"===n)return void((null==u?void 0:u.useAiAnswersStream)?(0,i.executeAiAnswersStreamingFetch)(t,e,u,c):(0,i.executeAiAnswersNonStreamingFetch)(t,e,u,c));"suggest"===n?(R=n,O=o(null==u?void 0:u.suggestionsSize,"size")+o(null==u?void 0:u.lang,"language"),S=Object.assign(Object.assign({},S),{size:null==u?void 0:u.suggestionsSize,language:null==u?void 0:u.lang}),E=null==u?void 0:u.suggestionsPrefix,A="https://"+t+"/v1/"+R+"/"+e+"?term="+E+O):"autocomplete"===n?(R="autocomplete/document-field",O=o(null==u?void 0:u.autocomplete.field,"source")+o(null==u?void 0:u.autocomplete.size,"size"),E=(null==u?void 0:u.autocomplete.prefix)||"",A="https://"+t+"/v1/"+R+"/"+e+"?term="+E+O,S=Object.assign(Object.assign({},S),{source:null==u?void 0:u.autocomplete.field,size:null==u?void 0:u.autocomplete.size})):"recommend"===n&&("RELATED_ITEMS"===(null==h?void 0:h.type)?(O=o(h.itemId,"itemId"),R="recommendations/index/"+e+"/block/"+h.blockId+"?"+O,S=Object.assign(Object.assign({},S),{itemId:null!==(w=h.itemId)&&void 0!==w?w:void 0,blockId:h.blockId})):"FREQUENTLY_BOUGHT_TOGETHER"===(null==h?void 0:h.type)&&(O=o(h.itemId,"itemId"),R="recommendations/"+e+"?configurationKey="+h.configurationKey+O,S=Object.assign(Object.assign({},S),{itemId:null!==(v=h.itemId)&&void 0!==v?v:void 0,configurationKey:h.configurationKey})),A="https://"+t+"/v1/"+R)}const T=function(r){var s,i,o;const f=r.data;"search"===n&&"retry"===(null==u?void 0:u.fuzzy)&&0===f.total_hits&&!0!==l?a(t,e,n,u,c,!0):(!0===l&&(f.total_hits=Math.min(null!==(s=f.total_hits)&&void 0!==s?s:1/0,null!==(o=null===(i=null==u?void 0:u.paging)||void 0===i?void 0:i.pageSize)&&void 0!==o?o:1/0)),c(f))},_=function(t){console.error(t),c({error:{response:r.RESPONSE_SERVER_ERROR,message:"invalid server response"}})};if("POST"===(null==u?void 0:u.apiMethod)&&["search","suggest","autocomplete"].includes(n)){A="https://"+t+"/v1/"+R+"/"+e;const s="search"===n?decodeURIComponent(E):E;S=Object.assign({term:s},S),r.apiInstance.post(A,S).then(T).catch(_)}else r.apiInstance.get(A).then(T).catch(_)};e.default=a},168:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteCookie=e.getCookie=e.setCookie=void 0;const r=n(232);e.setCookie=(t,e,n)=>{if("undefined"==typeof document)return;const s=new Date;s.setTime(s.getTime()+24*n*60*60*1e3),document.cookie=(0,r.serialize)(t,e,{expires:s,path:"/"})};e.getCookie=t=>{if("undefined"!=typeof document)try{return(0,r.parse)(document.cookie)[t]}catch(t){return void console.debug("Error parsing cookies:",t)}};e.deleteCookie=t=>{"undefined"!=typeof document&&(document.cookie=(0,r.serialize)(t,"",{expires:new Date(0),path:"/"}))}},740:function(t,e,n){"use strict";var r,s=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,s)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||(r=function(t){return r=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[e.length]=n);return e},r(t)},function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n=r(t),o=0;o<n.length;o++)"default"!==n[o]&&s(e,t,n[o]);return i(e,t),e}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};const u=a(n(650)),c=n(104),l=a(n(515)),f=n(507),h=a(n(219)),d=o(n(570)),p=a(n(718)),g=o(n(168)),y=n(972),m="api.addsearch.com",b="addsearchUserToken";let w=!1,v=!1,E=180;t.exports=class{constructor(t,e){this.useStatsSessionId=!1,this.sitekey=t,this.privatekey=e||"",this.apiHostname=m,this.statsApiHostname=m,this.settings=new h.default,this.sessionId="a-".concat(1e8*Math.random()).substring(0,10),this.userTokenInPersonalization=g.getCookie(b)||d.generateUUID()}search(t,e){var n;let r=null,s=null;if("string"==typeof t&&"function"==typeof e)r=t,s=e;else if("function"!=typeof t||e){if(!this.settings.getSettings().callback)throw new Error("Illegal search parameters. Should be (keyword, callbackFunction) or (callbackFunction)");r=this.settings.getSettings().keyword||null,s=this.settings.getSettings().callback}else r=this.settings.getSettings().keyword||null,s=t;this.settings.setCallback((()=>s)),this.settings.setKeyword(r),null!==(n=this.throttledSearchFetch)&&void 0!==n||(this.throttledSearchFetch=(0,p.default)(this.settings.getSettings().throttleTimeMs,u.default)),this.throttledSearchFetch(this.apiHostname,this.sitekey,"search",this.settings.getSettings(),s)}aiAnswers(t,e){var n;this.settings.setCallback((()=>e)),this.settings.setKeyword(t),null!==(n=this.throttledAiAnswersFetch)&&void 0!==n||(this.throttledAiAnswersFetch=(0,p.default)(this.settings.getSettings().throttleTimeMs,u.default)),this.throttledAiAnswersFetch(this.apiHostname,this.sitekey,"ai-answers",this.settings.getSettings(),e)}putSentimentClick(t,e){return(0,f.putSentimentClick)(this.apiHostname,this.sitekey,t,e)}suggestions(t,e){var n;if(!t||!e||!d.isFunction(e))throw new Error("Illegal suggestions parameters. Should be (prefix, callbackFunction)");this.settings.setSuggestionsPrefix(t),null!==(n=this.throttledSuggestionsFetch)&&void 0!==n||(this.throttledSuggestionsFetch=(0,p.default)(this.settings.getSettings().throttleTimeMs,u.default)),this.throttledSuggestionsFetch(this.apiHostname,this.sitekey,"suggest",this.settings.getSettings(),e)}autocomplete(t,e,n){var r;if(!(t&&e&&n&&d.isFunction(n)))throw new Error("Illegal autocomplete parameters. Should be (field, prefix, callbackFunction)");this.settings.setAutocompleteParams(t,e),null!==(r=this.throttledAutocompleteFetch)&&void 0!==r||(this.throttledAutocompleteFetch=(0,p.default)(this.settings.getSettings().throttleTimeMs,u.default)),this.throttledAutocompleteFetch(this.apiHostname,this.sitekey,"autocomplete",this.settings.getSettings(),n)}fetchCustomApi(t,e,n){var r;const s=Object.assign({},this.settings.getSettings());s.facetFields=null===(r=s.facetFields)||void 0===r?void 0:r.filter((e=>t===e)),(0,u.default)(this.apiHostname,this.sitekey,"search",s,n,null,e)}fetchRangeFacets(t,e,n){var r;const s=Object.assign({},this.settings.getSettings());null!==(r=s.rangeFacets)&&void 0!==r||(s.rangeFacets=[]),s.rangeFacets.push({field:t.field,ranges:t.ranges}),(0,u.default)(this.apiHostname,this.sitekey,"search",s,n,null,e)}recommendations(t,e){var n;if(!t||!e||!d.isFunction(e))throw new Error("Illegal recommendations parameters. Should be (options, callbackFunction)");null!==(n=this.throttledRecommendationFetch)&&void 0!==n||(this.throttledRecommendationFetch=(0,p.default)(this.settings.getSettings().throttleTimeMs,u.default)),this.throttledRecommendationFetch(this.apiHostname,this.sitekey,"recommend",this.settings.getSettings(),e,!1,null,t)}getDocument(t){return(0,c.getDocument)(this.apiHostname,this.sitekey,this.privatekey,t)}saveDocument(t){return(0,c.saveDocument)(this.apiHostname,this.sitekey,this.privatekey,t)}saveDocumentsBatch(t){if(!t||!t.documents||!Array.isArray(t.documents))throw new Error("Please provide an array of documents: {documents: []}");return(0,c.saveDocumentsBatch)(this.apiHostname,this.sitekey,this.privatekey,t)}deleteDocument(t){return(0,c.deleteDocument)(this.apiHostname,this.sitekey,this.privatekey,t)}deleteDocumentsBatch(t){if(!t||!t.documents||!Array.isArray(t.documents))throw new Error("Please provide an array of document ids: {documents: []}");return(0,c.deleteDocumentsBatch)(this.apiHostname,this.sitekey,this.privatekey,t)}setApiHostname(t,e){e&&e.statsApiRequestOnly||(this.apiHostname=t),e&&e.searchApiRequestOnly||(this.statsApiHostname=t)}getSettings(){return this.settings.getSettings()}setLanguage(t){this.settings.setLanguage(t)}setCategoryFilters(t){this.settings.setCategoryFilters(t)}addCustomFieldFilter(t,e){this.settings.addCustomFieldFilter(t,e)}removeCustomFieldFilter(t,e){this.settings.removeCustomFieldFilter(t,e)}setPriceRangeFilter(t,e){this.settings.setPriceRangeFilter(t,e)}setDateFilter(t,e){this.settings.setDateFilter(t,e)}setJWT(t){this.settings.setJWT(t)}setUserToken(t){this.settings.setUserToken(t)}setPaging(t,e,n,r){this.settings.setPaging(t,e,n,r)}nextPage(){this.settings.nextPage()}previousPage(){this.settings.previousPage()}setSuggestionsSize(t){this.settings.setSuggestionsSize(t)}setAutocompleteSize(t){this.settings.setAutocompleteSize(t)}addFacetField(t){this.settings.addFacetField(t)}addHierarchicalFacetSetting(t){this.settings.addHierarchicalFacetSetting(t)}addRangeFacet(t,e){this.settings.addRangeFacet(t,e)}addStatsField(t){this.settings.addStatsField(t)}setNumberOfFacets(t){this.settings.setNumberOfFacets(t)}setResultType(t){this.settings.setResultType(t)}setPersonalizationEvents(t){this.settings.setPersonalizationEvents(t)}setFilterObject(t){this.settings.setFilterObject(t)}setAiAnswersFilterObject(t){this.settings.setAiAnswersFilterObject(t)}setShuffleAndLimitTo(t){this.settings.setShuffleAndLimitTo(t)}setFuzzyMatch(t){this.settings.setFuzzyMatch(t)}setPostfixWildcard(t){this.settings.setPostfixWildcard(t)}setCacheResponseTime(t){this.settings.setCacheResponseTime(t)}setCollectAnalytics(t){this.settings.setCollectAnalytics(t)}setAnalyticsTag(t){this.settings.setAnalyticsTag(t)}setThrottleTime(t){this.settings.setThrottleTime(t)}setStatsSessionId(t){this.sessionId=t,this.userTokenInPersonalization=t,this.useStatsSessionId=!0}getStatsSessionId(){return this.sessionId}enableLogicalOperators(t){this.settings.enableLogicalOperators(t)}setSearchOperator(t){this.settings.setSearchOperator(t)}setApiMethod(t){this.settings.setApiMethod(t)}sendStatsEvent(t,e,n){const r=!this.useStatsSessionId&&w&&v;if(r&&!g.getCookie(b)&&g.setCookie(b,this.userTokenInPersonalization,E),"search"===t){const t={action:"search",session:r?this.userTokenInPersonalization:this.sessionId,keyword:e,numberOfResults:n.numberOfResults,tag:this.getSettings().analyticsTag};(0,l.default)(this.statsApiHostname,this.sitekey,t,this.settings.getSettings().statsRequestIntercepted)}else{if("click"!==t)throw new Error("Illegal sendStatsEvent type parameters. Should be search or click)");{const t={action:"click",session:r?this.userTokenInPersonalization:this.sessionId,keyword:e,docid:n.documentId,position:n.position,tag:this.getSettings().analyticsTag};(0,l.default)(this.statsApiHostname,this.sitekey,t,this.settings.getSettings().statsRequestIntercepted)}}}getUserTokenInPersonalization(){return this.userTokenInPersonalization}enablePersonalizationTracking(t,e){w=t,e&&(E=e)}consentAddSearchCookie(t){v=t}setApiRequestInterceptor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof t)return void console.error("API interceptor must be a function");const{searchApiRequestOnly:n=!1,statsApiRequestOnly:r=!1}=e;n||r?(n&&(0,y.setRequestInterceptor)(t,"searchApi"),r&&((0,y.setRequestInterceptor)(t,"statsApi"),this.settings.setStatsRequestIntercepted(!0))):((0,y.setRequestInterceptor)(t,"searchApi"),(0,y.setRequestInterceptor)(t,"statsApi"),this.settings.setStatsRequestIntercepted(!0))}setCookie(t,e,n){g.setCookie(t,e,n)}getCookie(t){return g.getCookie(t)}searchResultClicked(t,e){this.sendStatsEvent("click",this.settings.getSettings().keyword||"",{documentId:t,position:e})}useAiAnswersStream(t){this.settings.useAiAnswersStream(t)}}},104:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.deleteDocumentsBatch=e.deleteDocument=e.saveDocumentsBatch=e.saveDocument=e.getDocument=void 0;const s=r(n(425)),i=n(570),o=(t,e)=>({Authorization:"Basic "+(0,i.base64)(t+":"+e),"Content-Type":"application/json"});e.getDocument=(t,e,n,r)=>new Promise(((i,a)=>{s.default.get("https://".concat(t,"/v2/indices/").concat(e,"/documents/").concat(r),{headers:o(e,n)}).then((t=>{200===t.status?i(t.data):a(new Error(JSON.stringify({status:t.status,text:t.statusText})))})).catch((t=>{a(new Error(JSON.stringify({status:400,text:t})))}))}));e.saveDocument=(t,e,n,r)=>{const i=Boolean(r.id||r.url);return new Promise(((a,u)=>{(0,s.default)({url:"https://".concat(t,"/v2/indices/").concat(e,"/documents/"),method:i?"put":"post",headers:o(e,n),data:r}).then((t=>{202===t.status?a({status:t.status,text:t.statusText}):u(new Error(JSON.stringify({status:t.status,text:t.statusText})))})).catch((t=>{u(new Error(JSON.stringify({status:400,text:t})))}))}))};e.saveDocumentsBatch=(t,e,n,r)=>new Promise(((i,a)=>{(0,s.default)({method:"put",url:"https://".concat(t,"/v2/indices/").concat(e,"/documents:batch"),headers:o(e,n),data:r}).then((t=>{202===t.status?i({status:t.status,text:t.statusText}):a(new Error(JSON.stringify({status:t.status,text:t.statusText})))})).catch((t=>{a(new Error(JSON.stringify({status:400,text:t})))}))}));e.deleteDocument=(t,e,n,r)=>new Promise(((i,a)=>{s.default.delete("https://".concat(t,"/v2/indices/").concat(e,"/documents/").concat(r),{headers:o(e,n)}).then((t=>{202===t.status?i({status:t.status,text:t.statusText}):a(new Error(JSON.stringify({status:t.status,text:t.statusText})))})).catch((t=>{a(new Error(JSON.stringify({status:400,text:t})))}))}));e.deleteDocumentsBatch=(t,e,n,r)=>new Promise(((i,a)=>{s.default.delete("https://".concat(t,"/v2/indices/").concat(e,"/documents:batch"),{headers:o(e,n),data:r}).then((t=>{202===t.status?i({status:t.status,text:t.statusText}):a(new Error(JSON.stringify({status:t.status,text:t.statusText})))})).catch((t=>{a(new Error(JSON.stringify({status:400,text:t})))}))}))},219:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(570);e.default=class{constructor(){this.settings={keyword:"*",callback:null,throttleTimeMs:200,fuzzy:"auto",paging:{page:1,pageSize:10,sortBy:"relevance",sortOrder:"desc"},customFieldFilters:[],userToken:null,suggestionsSize:10,facetFields:[],autocomplete:{size:10},searchOperator:null,enableLogicalOperators:!1,cacheResponseTime:null,statsRequestIntercepted:!1,apiMethod:"GET"}}getSettings(){return this.settings}setKeyword(t){this.settings.keyword=t||"*"}setCallback(t){this.settings.callback=t}setThrottleTime(t){this.settings.throttleTimeMs=t}setSuggestionsPrefix(t){this.settings.suggestionsPrefix=t}setSuggestionsSize(t){this.settings.suggestionsSize=t}setAutocompleteSize(t){this.settings.autocomplete.size=t}setAutocompleteParams(t,e){this.settings.autocomplete.field=t,this.settings.autocomplete.prefix=e}setLanguage(t){let e;if(Intl&&Intl.Locale)try{e=new Intl.Locale(t).language}catch(t){throw console.debug(t),new Error('Use an accepted language code provided by the ECMAScript Internationalization API (e.g., "en", "en-GB").')}else e=t;if(e&&2!==e.length)throw new Error('Use a 2-char/4-char language code (e.g., "en", "en-GB")');this.settings.lang=e}setFuzzyMatch(t){if(!0!==t&&!1!==t&&"auto"!==t&&"retry"!==t)throw new Error("Fuzzy matching can be true, false, 'auto', or 'retry'");this.settings.fuzzy=t}enableLogicalOperators(t){this.settings.enableLogicalOperators=t}setCacheResponseTime(t){this.settings.cacheResponseTime=t}setPostfixWildcard(t){this.settings.postfixWildcard=t}setCollectAnalytics(t){this.settings.collectAnalytics=t}setAnalyticsTag(t){this.settings.analyticsTag=t}setCategoryFilters(t){this.settings.categories=t}setFilterObject(t){this.settings.filterObject=t}setAiAnswersFilterObject(t){this.settings.aiAnswersFilterObject=t}setPriceRangeFilter(t,e){this.settings.priceFromCents=t,this.settings.priceToCents=e}addCustomFieldFilter(t,e){const n=encodeURIComponent("".concat(t,"=").concat(e));this.settings.customFieldFilters.includes(n)||this.settings.customFieldFilters.push(n)}removeCustomFieldFilter(t,e){const n=!e,r=encodeURIComponent("".concat(t,"=").concat(e||""));this.settings.customFieldFilters=this.settings.customFieldFilters.filter((t=>n?!t.startsWith(r):t!==r))}setDateFilter(t,e){this.settings.dateFrom=t,this.settings.dateTo=e}setJWT(t){this.settings.jwt=t}setUserToken(t){this.settings.userToken=t}setPersonalizationEvents(t){Array.isArray(t)&&(this.settings.personalizationEvents=t)}setResultType(t){this.settings.resultType=t}addFacetField(t){this.settings.facetFields.includes(t)||this.settings.facetFields.push(t)}addHierarchicalFacetSetting(t){this.settings.hierarchicalFacetSetting=t}addRangeFacet(t,e){var n,r;null!==(n=(r=this.settings).rangeFacets)&&void 0!==n||(r.rangeFacets=[]),this.settings.rangeFacets.push({field:t,ranges:e})}addStatsField(t){var e,n;null!==(e=(n=this.settings).statsFields)&&void 0!==e||(n.statsFields=[]),this.settings.statsFields.includes(t)||this.settings.statsFields.push(t)}setNumberOfFacets(t){this.settings.numFacets=t}setPaging(t,e,n,s){(0,r.validateSetPagingParams)(t,e,n,s),this.settings.paging={page:t,pageSize:e,sortBy:n,sortOrder:s}}setShuffleAndLimitTo(t){this.settings.shuffleAndLimitTo=t}nextPage(){this.settings.paging.page++}previousPage(){this.settings.paging.page>0&&this.settings.paging.page--}setSearchOperator(t){if("and"!==t&&"or"!==t)throw new Error("Operator must be 'and' or 'or'");this.settings.searchOperator=t}setStatsRequestIntercepted(t){this.settings.statsRequestIntercepted=t}setApiMethod(t){if("GET"!==t&&"POST"!==t)throw new Error("API method must be 'GET' or 'POST'");this.settings.apiMethod=t}useAiAnswersStream(t){this.settings.useAiAnswersStream=t}}},515:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(964),s=n(972);(0,r.polyfill)();e.default=(t,e,n,r)=>{"undefined"!=typeof window&&window.navigator&&window.navigator.sendBeacon&&!r?window.navigator.sendBeacon("https://".concat(t,"/v1/stats/").concat(e,"/"),JSON.stringify(n)):s.statsInstance.post("https://".concat(t,"/v1/stats/").concat(e,"/"),n,{headers:{"Content-Type":"text/plain"}}).then().catch((t=>{console.error(t)}))}},718:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=(t,e)=>{let n=0,r=null;return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];const a=Date.now()-n,u=()=>{n=Date.now(),e(...i)};null!==r&&(clearTimeout(r),r=null),a>t?u():r=setTimeout(u,t-a)}}},570:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEmptyObject=e.generateUUID=e.validateSetPagingParams=e.base64=e.isFunction=void 0;const r=n(287),s=n(182);e.isFunction=t=>"function"==typeof t;e.base64=t=>"undefined"!=typeof window&&window.btoa?window.btoa(t):r.Buffer?r.Buffer.from(t).toString("base64"):void 0;e.validateSetPagingParams=(t,e,n,r)=>{if(t<1)throw new Error("Page must be 1 or bigger");if(e<1||e>300)throw new Error("PageSize must be between 1 and 300");if(!n||!r)throw new Error("Invalid values for sortBy or sortOrder:");if(!("string"==typeof n&&"string"==typeof r||Array.isArray(n)&&Array.isArray(r)))throw new Error("sortBy and sortOrder must have the same type: string or Array");if(Array.isArray(n)&&n.length!==r.length)throw new Error("sortBy and sortOrder must have the same size");if("string"==typeof r&&"asc"!==r&&"desc"!==r)throw new Error("sortOrder must be asc or desc");if(Array.isArray(r)&&r.some((t=>"desc"!==t&&"asc"!==t)))throw new Error("All values of sortOrder array must be asc or desc")};e.generateUUID=()=>(0,s.v4)().replace(/-/g,"");e.isEmptyObject=t=>null==t||(!(!Array.isArray(t)&&"[object Object]"===Object.prototype.toString.call(t))||0===Object.keys(t).length)},526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=a(t),o=i[0],u=i[1],c=new s(function(t,e,n){return 3*(e+n)/4-n}(0,o,u)),l=0,f=u>0?o-4:o;for(n=0;n<f;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;2===u&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[l++]=255&e);1===u&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e);return c},e.fromByteArray=function(t){for(var e,r=t.length,s=r%3,i=[],o=16383,a=0,c=r-s;a<c;a+=o)i.push(u(t,a,a+o>c?c:a+o));1===s?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===s&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=i[o],r[i.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,r){for(var s,i,o=[],a=e;a<r;a+=3)s=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(n[(i=s)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},287:(t,e,n)=>{"use strict";const r=n(526),s=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|g(t,e);let r=a(n);const s=r.write(t,e);s!==n&&(r=r.slice(0,s));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);const s=function(t){if(u.isBuffer(t)){const e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?a(0):h(t);if("Buffer"===t.type&&Array.isArray(t.data))return h(t.data)}(t);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),a(t<0?0:0|p(t))}function h(t){const e=t.length<0?0:0|p(t.length),n=a(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function d(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,u.prototype),r}function p(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let s=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(t).length;default:if(s)return r?-1:V(t).length;e=(""+e).toLowerCase(),s=!0}}function y(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return F(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return R(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,s){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=s?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(s)return-1;n=t.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:w(t,e,n,r,s);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):w(t,[e],n,r,s);throw new TypeError("val must be string, number or Buffer")}function w(t,e,n,r,s){let i,o=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,a/=2,u/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(s){let r=-1;for(i=n;i<a;i++)if(c(t,i)===c(e,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===u)return r*o}else-1!==r&&(i-=i-r),r=-1}else for(n+u>a&&(n=a-u),i=n;i>=0;i--){let n=!0;for(let r=0;r<u;r++)if(c(t,i+r)!==c(e,r)){n=!1;break}if(n)return i}return-1}function v(t,e,n,r){n=Number(n)||0;const s=t.length-n;r?(r=Number(r))>s&&(r=s):r=s;const i=e.length;let o;for(r>i/2&&(r=i/2),o=0;o<r;++o){const r=parseInt(e.substr(2*o,2),16);if(X(r))return o;t[n+o]=r}return o}function E(t,e,n,r){return K(V(e,t.length-n),t,n,r)}function O(t,e,n,r){return K(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return K(W(e),t,n,r)}function A(t,e,n,r){return K(function(t,e){let n,r,s;const i=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),r=n>>8,s=n%256,i.push(s),i.push(r);return i}(e,t.length-n),t,n,r)}function R(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function T(t,e,n){n=Math.min(t.length,n);const r=[];let s=e;for(;s<n;){const e=t[s];let i=null,o=e>239?4:e>223?3:e>191?2:1;if(s+o<=n){let n,r,a,u;switch(o){case 1:e<128&&(i=e);break;case 2:n=t[s+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(i=u));break;case 3:n=t[s+1],r=t[s+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:n=t[s+1],r=t[s+2],a=t[s+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&a,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,o=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),s+=o}return function(t){const e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=_));return n}(r)}e.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?a(t):void 0!==e?"string"==typeof n?a(t).fill(e,n):a(t).fill(e):a(t)}(t,e,n)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(G(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),G(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let s=0,i=Math.min(n,r);s<i;++s)if(t[s]!==e[s]){n=t[s],r=e[s];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=u.allocUnsafe(e);let s=0;for(n=0;n<t.length;++n){let e=t[n];if(G(e,Uint8Array))s+e.length>r.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,s)):Uint8Array.prototype.set.call(r,e,s);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,s)}s+=e.length}return r},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},i&&(u.prototype[i]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,s){if(G(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),e<0||n>t.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&e>=n)return 0;if(r>=s)return-1;if(e>=n)return 1;if(this===t)return 0;let i=(s>>>=0)-(r>>>=0),o=(n>>>=0)-(e>>>=0);const a=Math.min(i,o),c=this.slice(r,s),l=t.slice(e,n);for(let t=0;t<a;++t)if(c[t]!==l[t]){i=c[t],o=l[t];break}return i<o?-1:o<i?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const s=this.length-e;if((void 0===n||n>s)&&(n=s),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":case"latin1":case"binary":return O(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const _=4096;function F(t,e,n){let r="";n=Math.min(t.length,n);for(let s=e;s<n;++s)r+=String.fromCharCode(127&t[s]);return r}function j(t,e,n){let r="";n=Math.min(t.length,n);for(let s=e;s<n;++s)r+=String.fromCharCode(t[s]);return r}function P(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let s="";for(let r=e;r<n;++r)s+=Y[t[r]];return s}function U(t,e,n){const r=t.slice(e,n);let s="";for(let t=0;t<r.length-1;t+=2)s+=String.fromCharCode(r[t]+256*r[t+1]);return s}function I(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,n,r,s,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||e<i)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function C(t,e,n,r,s){q(e,r,s,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,n}function k(t,e,n,r,s){q(e,r,s,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i>>=8,t[n+6]=i,i>>=8,t[n+5]=i,i>>=8,t[n+4]=i;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=o,o>>=8,t[n+2]=o,o>>=8,t[n+1]=o,o>>=8,t[n]=o,n+8}function x(t,e,n,r,s,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,r,i){return e=+e,n>>>=0,i||x(t,0,n,4),s.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,i){return e=+e,n>>>=0,i||x(t,0,n,8),s.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||I(t,e,this.length);let r=this[t],s=1,i=0;for(;++i<e&&(s*=256);)r+=this[t+i]*s;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||I(t,e,this.length);let r=this[t+--e],s=1;for(;e>0&&(s*=256);)r+=this[t+--e]*s;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Q((function(t){$(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,s=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(s)<<BigInt(32))})),u.prototype.readBigUInt64BE=Q((function(t){$(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],s=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(s)})),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||I(t,e,this.length);let r=this[t],s=1,i=0;for(;++i<e&&(s*=256);)r+=this[t+i]*s;return s*=128,r>=s&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||I(t,e,this.length);let r=e,s=1,i=this[t+--r];for(;r>0&&(s*=256);)i+=this[t+--r]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return t>>>=0,e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||I(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||I(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Q((function(t){$(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=Q((function(t){$(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||I(t,4,this.length),s.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||I(t,4,this.length),s.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||I(t,8,this.length),s.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||I(t,8,this.length),s.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){B(this,t,e,n,Math.pow(2,8*n)-1,0)}let s=1,i=0;for(this[e]=255&t;++i<n&&(s*=256);)this[e+i]=t/s&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){B(this,t,e,n,Math.pow(2,8*n)-1,0)}let s=n-1,i=1;for(this[e+s]=255&t;--s>=0&&(i*=256);)this[e+s]=t/i&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Q((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Q((function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,t,e,n,r-1,-r)}let s=0,i=1,o=0;for(this[e]=255&t;++s<n&&(i*=256);)t<0&&0===o&&0!==this[e+s-1]&&(o=1),this[e+s]=(t/i|0)-o&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);B(this,t,e,n,r-1,-r)}let s=n-1,i=1,o=0;for(this[e+s]=255&t;--s>=0&&(i*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/i|0)-o&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Q((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Q((function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const s=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),s},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let s;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s<n;++s)this[s]=t;else{const i=u.isBuffer(t)?t:u.from(t,r),o=i.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<n-e;++s)this[s+e]=i[s%o]}return this};const D={};function M(t,e,n){D[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function z(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function q(t,e,n,r,s,i){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let s;throw s=i>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new D.ERR_OUT_OF_RANGE("value",s,t)}!function(t,e,n){$(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(r,s,i)}function $(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw $(t,n),new D.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}M("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),M("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,s=n;return Number.isInteger(n)&&Math.abs(n)>2**32?s=z(String(n)):"bigint"==typeof n&&(s=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(s=z(s)),s+="n"),r+=` It must be ${e}. Received ${s}`,r}),RangeError);const J=/[^+/0-9A-Za-z-_]/g;function V(t,e){let n;e=e||1/0;const r=t.length;let s=null;const i=[];for(let o=0;o<r;++o){if(n=t.charCodeAt(o),n>55295&&n<57344){if(!s){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&i.push(239,191,189);continue}s=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),s=n;continue}n=65536+(s-55296<<10|n-56320)}else s&&(e-=3)>-1&&i.push(239,191,189);if(s=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function W(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,n,r){let s;for(s=0;s<r&&!(s+n>=e.length||s>=t.length);++s)e[s+n]=t[s];return s}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const Y=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let s=0;s<16;++s)e[r+s]=t[n]+t[s]}return e}();function Q(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},232:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=function(t,e){const n=new a,r=t.length;if(r<2)return n;const s=e?.decode||l;let i=0;do{const e=t.indexOf("=",i);if(-1===e)break;const o=t.indexOf(";",i),a=-1===o?r:o;if(e>a){i=t.lastIndexOf(";",e-1)+1;continue}const l=u(t,i,e),f=c(t,e,l),h=t.slice(l,f);if(void 0===n[h]){let r=u(t,e+1,a),i=c(t,a,r);const o=s(t.slice(r,i));n[h]=o}i=a+1}while(i<r);return n},e.serialize=function(t,e,a){const u=a?.encode||encodeURIComponent;if(!n.test(t))throw new TypeError(`argument name is invalid: ${t}`);const c=u(e);if(!r.test(c))throw new TypeError(`argument val is invalid: ${e}`);let l=t+"="+c;if(!a)return l;if(void 0!==a.maxAge){if(!Number.isInteger(a.maxAge))throw new TypeError(`option maxAge is invalid: ${a.maxAge}`);l+="; Max-Age="+a.maxAge}if(a.domain){if(!s.test(a.domain))throw new TypeError(`option domain is invalid: ${a.domain}`);l+="; Domain="+a.domain}if(a.path){if(!i.test(a.path))throw new TypeError(`option path is invalid: ${a.path}`);l+="; Path="+a.path}if(a.expires){if(!function(t){return"[object Date]"===o.call(t)}(a.expires)||!Number.isFinite(a.expires.valueOf()))throw new TypeError(`option expires is invalid: ${a.expires}`);l+="; Expires="+a.expires.toUTCString()}a.httpOnly&&(l+="; HttpOnly");a.secure&&(l+="; Secure");a.partitioned&&(l+="; Partitioned");if(a.priority){switch("string"==typeof a.priority?a.priority.toLowerCase():void 0){case"low":l+="; Priority=Low";break;case"medium":l+="; Priority=Medium";break;case"high":l+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${a.priority}`)}}if(a.sameSite){switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${a.sameSite}`)}}return l};const n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,r=/^[\u0021-\u003A\u003C-\u007E]*$/,s=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,o=Object.prototype.toString,a=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function u(t,e,n){do{const n=t.charCodeAt(e);if(32!==n&&9!==n)return e}while(++e<n);return n}function c(t,e,n){for(;e>n;){const n=t.charCodeAt(--e);if(32!==n&&9!==n)return e+1}return n}function l(t){if(-1===t.indexOf("%"))return t;try{return decodeURIComponent(t)}catch(e){return t}}},542:(t,e,n)=>{"use strict";t.exports=n(964).polyfill()},964:function(t,e,n){t.exports=function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=0,i=void 0,o=void 0,a=function(t,e){v[s]=t,v[s+1]=e,2===(s+=2)&&(o?o(E):S())};function u(t){o=t}function c(t){a=t}var l="undefined"!=typeof window?window:void 0,f=l||{},h=f.MutationObserver||f.WebKitMutationObserver,d="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function g(){return function(){return process.nextTick(E)}}function y(){return void 0!==i?function(){i(E)}:w()}function m(){var t=0,e=new h(E),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function b(){var t=new MessageChannel;return t.port1.onmessage=E,function(){return t.port2.postMessage(0)}}function w(){var t=setTimeout;return function(){return t(E,1)}}var v=new Array(1e3);function E(){for(var t=0;t<s;t+=2)(0,v[t])(v[t+1]),v[t]=void 0,v[t+1]=void 0;s=0}function O(){try{var t=Function("return this")().require("vertx");return i=t.runOnLoop||t.runOnContext,y()}catch(t){return w()}}var S=void 0;function A(t,e){var n=this,r=new this.constructor(_);void 0===r[T]&&W(r);var s=n._state;if(s){var i=arguments[s-1];a((function(){return $(s,r,i,n._result)}))}else z(n,r,t,e);return r}function R(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(_);return N(n,t),n}S=d?g():h?m():p?b():void 0===l?O():w();var T=Math.random().toString(36).substring(2);function _(){}var F=void 0,j=1,P=2;function U(){return new TypeError("You cannot resolve a promise with itself")}function I(){return new TypeError("A promises callback cannot return that same promise.")}function B(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function C(t,e,n){a((function(t){var r=!1,s=B(n,e,(function(n){r||(r=!0,e!==n?N(t,n):D(t,n))}),(function(e){r||(r=!0,M(t,e))}),"Settle: "+(t._label||" unknown promise"));!r&&s&&(r=!0,M(t,s))}),t)}function k(t,e){e._state===j?D(t,e._result):e._state===P?M(t,e._result):z(e,void 0,(function(e){return N(t,e)}),(function(e){return M(t,e)}))}function x(t,n,r){n.constructor===t.constructor&&r===A&&n.constructor.resolve===R?k(t,n):void 0===r?D(t,n):e(r)?C(t,n,r):D(t,n)}function N(e,n){if(e===n)M(e,U());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void M(e,t)}x(e,n,r)}else D(e,n)}function L(t){t._onerror&&t._onerror(t._result),q(t)}function D(t,e){t._state===F&&(t._result=e,t._state=j,0!==t._subscribers.length&&a(q,t))}function M(t,e){t._state===F&&(t._state=P,t._result=e,a(L,t))}function z(t,e,n,r){var s=t._subscribers,i=s.length;t._onerror=null,s[i]=e,s[i+j]=n,s[i+P]=r,0===i&&t._state&&a(q,t)}function q(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,s=void 0,i=t._result,o=0;o<e.length;o+=3)r=e[o],s=e[o+n],r?$(n,r,s,i):s(i);t._subscribers.length=0}}function $(t,n,r,s){var i=e(r),o=void 0,a=void 0,u=!0;if(i){try{o=r(s)}catch(t){u=!1,a=t}if(n===o)return void M(n,I())}else o=s;n._state!==F||(i&&u?N(n,o):!1===u?M(n,a):t===j?D(n,o):t===P&&M(n,o))}function H(t,e){try{e((function(e){N(t,e)}),(function(e){M(t,e)}))}catch(e){M(t,e)}}var J=0;function V(){return J++}function W(t){t[T]=J++,t._state=void 0,t._result=void 0,t._subscribers=[]}function K(){return new Error("Array Methods must be provided an Array")}var G=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(_),this.promise[T]||W(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?D(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&D(this.promise,this._result))):M(this.promise,K())}return t.prototype._enumerate=function(t){for(var e=0;this._state===F&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===R){var s=void 0,i=void 0,o=!1;try{s=t.then}catch(t){o=!0,i=t}if(s===A&&t._state!==F)this._settledAt(t._state,e,t._result);else if("function"!=typeof s)this._remaining--,this._result[e]=t;else if(n===et){var a=new n(_);o?M(a,i):x(a,t,s),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===F&&(this._remaining--,t===P?M(r,n):this._result[e]=n),0===this._remaining&&D(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;z(t,void 0,(function(t){return n._settledAt(j,e,t)}),(function(t){return n._settledAt(P,e,t)}))},t}();function X(t){return new G(this,t).promise}function Y(t){var e=this;return r(t)?new e((function(n,r){for(var s=t.length,i=0;i<s;i++)e.resolve(t[i]).then(n,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))}function Q(t){var e=new this(_);return M(e,t),e}function Z(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var et=function(){function t(e){this[T]=V(),this._result=this._state=void 0,this._subscribers=[],_!==e&&("function"!=typeof e&&Z(),this instanceof t?H(this,e):tt())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();function nt(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=et}return et.prototype.then=A,et.all=X,et.race=Y,et.resolve=R,et.reject=Q,et._setScheduler=u,et._setAsap=c,et._asap=a,et.polyfill=nt,et.Promise=et,et}()},251:(t,e)=>{e.read=function(t,e,n,r,s){var i,o,a=8*s-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?s-1:0,h=n?-1:1,d=t[e+f];for(f+=h,i=d&(1<<-l)-1,d>>=-l,l+=a;l>0;i=256*i+t[e+f],f+=h,l-=8);for(o=i&(1<<-l)-1,i>>=-l,l+=r;l>0;o=256*o+t[e+f],f+=h,l-=8);if(0===i)i=1-c;else{if(i===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),i-=c}return(d?-1:1)*o*Math.pow(2,i-r)},e.write=function(t,e,n,r,s,i){var o,a,u,c=8*i-s-1,l=(1<<c)-1,f=l>>1,h=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=l?(a=0,o=l):o+f>=1?(a=(e*u-1)*Math.pow(2,s),o+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,s),o=0));s>=8;t[n+d]=255&a,d+=p,a/=256,s-=8);for(o=o<<s|a,c+=s;c>0;t[n+d]=255&o,d+=p,o/=256,c-=8);t[n+d-p]|=128*g}},425:(t,e,n)=>{"use strict";function r(t,e){return function(){return t.apply(e,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:o,toStringTag:a}=Symbol,u=(c=Object.create(null),t=>{const e=s.call(t);return c[e]||(c[e]=e.slice(8,-1).toLowerCase())});var c;const l=t=>(t=t.toLowerCase(),e=>u(e)===t),f=t=>e=>typeof e===t,{isArray:h}=Array,d=f("undefined");function p(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&m(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const g=l("ArrayBuffer");const y=f("string"),m=f("function"),b=f("number"),w=t=>null!==t&&"object"==typeof t,v=t=>{if("object"!==u(t))return!1;const e=i(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||a in t||o in t)},E=l("Date"),O=l("File"),S=l("Blob"),A=l("FileList"),R=l("URLSearchParams"),[T,_,F,j]=["ReadableStream","Request","Response","Headers"].map(l);function P(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,s;if("object"!=typeof t&&(t=[t]),h(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{if(p(t))return;const s=n?Object.getOwnPropertyNames(t):Object.keys(t),i=s.length;let o;for(r=0;r<i;r++)o=s[r],e.call(null,t[o],o,t)}}function U(t,e){if(p(t))return null;e=e.toLowerCase();const n=Object.keys(t);let r,s=n.length;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,B=t=>!d(t)&&t!==I;const C=(k="undefined"!=typeof Uint8Array&&i(Uint8Array),t=>k&&t instanceof k);var k;const x=l("HTMLFormElement"),N=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),L=l("RegExp"),D=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};P(n,((n,s)=>{let i;!1!==(i=e(n,s,t))&&(r[s]=i||n)})),Object.defineProperties(t,r)};const M=l("AsyncFunction"),z=(q="function"==typeof setImmediate,$=m(I.postMessage),q?setImmediate:$?(H=`axios@${Math.random()}`,J=[],I.addEventListener("message",(({source:t,data:e})=>{t===I&&e===H&&J.length&&J.shift()()}),!1),t=>{J.push(t),I.postMessage(H,"*")}):t=>setTimeout(t));var q,$,H,J;const V="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||z;var W={isArray:h,isArrayBuffer:g,isBuffer:p,isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||m(t.append)&&("formdata"===(e=u(t))||"object"===e&&m(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&g(t.buffer),e},isString:y,isNumber:b,isBoolean:t=>!0===t||!1===t,isObject:w,isPlainObject:v,isEmptyObject:t=>{if(!w(t)||p(t))return!1;try{return 0===Object.keys(t).length&&Object.getPrototypeOf(t)===Object.prototype}catch(t){return!1}},isReadableStream:T,isRequest:_,isResponse:F,isHeaders:j,isUndefined:d,isDate:E,isFile:O,isBlob:S,isRegExp:L,isFunction:m,isStream:t=>w(t)&&m(t.pipe),isURLSearchParams:R,isTypedArray:C,isFileList:A,forEach:P,merge:function t(){const{caseless:e,skipUndefined:n}=B(this)&&this||{},r={},s=(s,i)=>{const o=e&&U(r,i)||i;v(r[o])&&v(s)?r[o]=t(r[o],s):v(s)?r[o]=t({},s):h(s)?r[o]=s.slice():n&&d(s)||(r[o]=s)};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&P(arguments[t],s);return r},extend:(t,e,n,{allOwnKeys:s}={})=>(P(e,((e,s)=>{n&&m(e)?t[s]=r(e,n):t[s]=e}),{allOwnKeys:s}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let s,o,a;const u={};if(e=e||{},null==t)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)a=s[o],r&&!r(a,t,e)||u[a]||(e[a]=t[a],u[a]=!0);t=!1!==n&&i(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:u,kindOfTest:l,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!b(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[o]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:x,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:D,freezeMethods:t=>{D(t,((e,n)=>{if(m(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];m(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return h(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:U,global:I,isContextDefined:B,isSpecCompliantForm:function(t){return!!(t&&m(t.append)&&"FormData"===t[a]&&t[o])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(w(t)){if(e.indexOf(t)>=0)return;if(p(t))return t;if(!("toJSON"in t)){e[r]=t;const s=h(t)?[]:{};return P(t,((t,e)=>{const i=n(t,r+1);!d(i)&&(s[e]=i)})),e[r]=void 0,s}}return t};return n(t,0)},isAsyncFn:M,isThenable:t=>t&&(w(t)||m(t))&&m(t.then)&&m(t.catch),setImmediate:z,asap:V,isIterable:t=>null!=t&&m(t[o])};function K(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}W.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.status}}});const G=K.prototype,X={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{X[t]={value:t}})),Object.defineProperties(K,X),Object.defineProperty(G,"isAxiosError",{value:!0}),K.from=(t,e,n,r,s,i)=>{const o=Object.create(G);W.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t));const a=t&&t.message?t.message:"Error",u=null==e&&t?t.code:e;return K.call(o,a,u,n,r,s),t&&null==o.cause&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",i&&Object.assign(o,i),o};function Y(t){return W.isPlainObject(t)||W.isArray(t)}function Q(t){return W.endsWith(t,"[]")?t.slice(0,-2):t}function Z(t,e,n){return t?t.concat(e).map((function(t,e){return t=Q(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const tt=W.toFlatObject(W,{},null,(function(t){return/^is[A-Z]/.test(t)}));function et(t,e,n){if(!W.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=W.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!W.isUndefined(e[t])}))).metaTokens,s=n.visitor||c,i=n.dots,o=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&W.isSpecCompliantForm(e);if(!W.isFunction(s))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(W.isDate(t))return t.toISOString();if(W.isBoolean(t))return t.toString();if(!a&&W.isBlob(t))throw new K("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(t)||W.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,s){let a=t;if(t&&!s&&"object"==typeof t)if(W.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(W.isArray(t)&&function(t){return W.isArray(t)&&!t.some(Y)}(t)||(W.isFileList(t)||W.endsWith(n,"[]"))&&(a=W.toArray(t)))return n=Q(n),a.forEach((function(t,r){!W.isUndefined(t)&&null!==t&&e.append(!0===o?Z([n],r,i):null===o?n:n+"[]",u(t))})),!1;return!!Y(t)||(e.append(Z(s,n,i),u(t)),!1)}const l=[],f=Object.assign(tt,{defaultVisitor:c,convertValue:u,isVisitable:Y});if(!W.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!W.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),W.forEach(n,(function(n,i){!0===(!(W.isUndefined(n)||null===n)&&s.call(e,n,W.isString(i)?i.trim():i,r,f))&&t(n,r?r.concat(i):[i])})),l.pop()}}(t),e}function nt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function rt(t,e){this._pairs=[],t&&et(t,this,e)}const st=rt.prototype;function it(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(t,e,n){if(!e)return t;const r=n&&n.encode||it;W.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(i=s?s(e,n):W.isURLSearchParams(e)?e.toString():new rt(e,n).toString(r),i){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}st.append=function(t,e){this._pairs.push([t,e])},st.toString=function(t){const e=t?function(e){return t.call(this,e,nt)}:nt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var at=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},ut={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ct={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:rt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const lt="undefined"!=typeof window&&"undefined"!=typeof document,ft="object"==typeof navigator&&navigator||void 0,ht=lt&&(!ft||["ReactNative","NativeScript","NS"].indexOf(ft.product)<0),dt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,pt=lt&&window.location.href||"http://localhost";var gt={...Object.freeze({__proto__:null,hasBrowserEnv:lt,hasStandardBrowserWebWorkerEnv:dt,hasStandardBrowserEnv:ht,navigator:ft,origin:pt}),...ct};function yt(t){function e(t,n,r,s){let i=t[s++];if("__proto__"===i)return!0;const o=Number.isFinite(+i),a=s>=t.length;if(i=!i&&W.isArray(r)?r.length:i,a)return W.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!o;r[i]&&W.isObject(r[i])||(r[i]=[]);return e(t,n,r[i],s)&&W.isArray(r[i])&&(r[i]=function(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}(r[i])),!o}if(W.isFormData(t)&&W.isFunction(t.entries)){const n={};return W.forEachEntry(t,((t,r)=>{e(function(t){return W.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null}const mt={transitional:ut,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,s=W.isObject(t);s&&W.isHTMLForm(t)&&(t=new FormData(t));if(W.isFormData(t))return r?JSON.stringify(yt(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t)||W.isReadableStream(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return et(t,new gt.classes.URLSearchParams,{visitor:function(t,e,n,r){return gt.isNode&&W.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}(t,this.formSerializer).toString();if((i=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return et(i?{"files[]":t}:t,e&&new e,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),function(t,e,n){if(W.isString(t))try{return(e||JSON.parse)(t),W.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(n||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||mt.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(W.isResponse(t)||W.isReadableStream(t))return t;if(t&&W.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(t){if(n){if("SyntaxError"===t.name)throw K.from(t,K.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gt.classes.FormData,Blob:gt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],(t=>{mt.headers[t]={}}));var bt=mt;const wt=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const vt=Symbol("internals");function Et(t){return t&&String(t).trim().toLowerCase()}function Ot(t){return!1===t||null==t?t:W.isArray(t)?t.map(Ot):String(t)}function St(t,e,n,r,s){return W.isFunction(r)?r.call(this,e,n):(s&&(e=n),W.isString(e)?W.isString(r)?-1!==e.indexOf(r):W.isRegExp(r)?r.test(e):void 0:void 0)}class At{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function s(t,e,n){const s=Et(e);if(!s)throw new Error("header name must be a non-empty string");const i=W.findKey(r,s);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||e]=Ot(t))}const i=(t,e)=>W.forEach(t,((t,n)=>s(t,n,e)));if(W.isPlainObject(t)||t instanceof this.constructor)i(t,e);else if(W.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))i((t=>{const e={};let n,r,s;return t&&t.split("\n").forEach((function(t){s=t.indexOf(":"),n=t.substring(0,s).trim().toLowerCase(),r=t.substring(s+1).trim(),!n||e[n]&&wt[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e);else if(W.isObject(t)&&W.isIterable(t)){let n,r,s={};for(const e of t){if(!W.isArray(e))throw TypeError("Object iterator must return a key-value pair");s[r=e[0]]=(n=s[r])?W.isArray(n)?[...n,e[1]]:[n,e[1]]:e[1]}i(s,e)}else null!=t&&s(e,t,n);return this}get(t,e){if(t=Et(t)){const n=W.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(W.isFunction(e))return e.call(this,t,n);if(W.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Et(t)){const n=W.findKey(this,t);return!(!n||void 0===this[n]||e&&!St(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function s(t){if(t=Et(t)){const s=W.findKey(n,t);!s||e&&!St(0,n[s],s,e)||(delete n[s],r=!0)}}return W.isArray(t)?t.forEach(s):s(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const s=e[n];t&&!St(0,this[s],s,t,!0)||(delete this[s],r=!0)}return r}normalize(t){const e=this,n={};return W.forEach(this,((r,s)=>{const i=W.findKey(n,s);if(i)return e[i]=Ot(r),void delete e[s];const o=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(s):String(s).trim();o!==s&&delete e[s],e[o]=Ot(r),n[o]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return W.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&W.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[vt]=this[vt]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=Et(t);e[r]||(!function(t,e){const n=W.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,s){return this[r].call(this,e,t,n,s)},configurable:!0})}))}(n,t),e[r]=!0)}return W.isArray(t)?t.forEach(r):r(t),this}}At.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),W.reduceDescriptors(At.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),W.freezeMethods(At);var Rt=At;function Tt(t,e){const n=this||bt,r=e||n,s=Rt.from(r.headers);let i=r.data;return W.forEach(t,(function(t){i=t.call(n,i,s.normalize(),e?e.status:void 0)})),s.normalize(),i}function _t(t){return!(!t||!t.__CANCEL__)}function Ft(t,e,n){K.call(this,null==t?"canceled":t,K.ERR_CANCELED,e,n),this.name="CanceledError"}function jt(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}W.inherits(Ft,K,{__CANCEL__:!0});const Pt=(t,e,n=3)=>{let r=0;const s=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s,i=0,o=0;return e=void 0!==e?e:1e3,function(a){const u=Date.now(),c=r[o];s||(s=u),n[i]=a,r[i]=u;let l=o,f=0;for(;l!==i;)f+=n[l++],l%=t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-s<e)return;const h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}(50,250);return function(t,e){let n,r,s=0,i=1e3/e;const o=(e,i=Date.now())=>{s=i,n=null,r&&(clearTimeout(r),r=null),t(...e)};return[(...t)=>{const e=Date.now(),a=e-s;a>=i?o(t,e):(n=t,r||(r=setTimeout((()=>{r=null,o(n)}),i-a)))},()=>n&&o(n)]}((n=>{const i=n.loaded,o=n.lengthComputable?n.total:void 0,a=i-r,u=s(a);r=i;t({loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:u||void 0,estimated:u&&o&&i<=o?(o-i)/u:void 0,event:n,lengthComputable:null!=o,[e?"download":"upload"]:!0})}),n)},Ut=(t,e)=>{const n=null!=t;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},It=t=>(...e)=>W.asap((()=>t(...e)));var Bt=gt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,gt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,Ct=gt.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const o=[t+"="+encodeURIComponent(e)];W.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),W.isString(r)&&o.push("path="+r),W.isString(s)&&o.push("domain="+s),!0===i&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function kt(t,e,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);return t&&(r||0==n)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const xt=t=>t instanceof Rt?{...t}:t;function Nt(t,e){e=e||{};const n={};function r(t,e,n,r){return W.isPlainObject(t)&&W.isPlainObject(e)?W.merge.call({caseless:r},t,e):W.isPlainObject(e)?W.merge({},e):W.isArray(e)?e.slice():e}function s(t,e,n,s){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t,0,s):r(t,e,0,s)}function i(t,e){if(!W.isUndefined(e))return r(void 0,e)}function o(t,e){return W.isUndefined(e)?W.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,s,i){return i in e?r(n,s):i in t?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(t,e,n)=>s(xt(t),xt(e),0,!0)};return W.forEach(Object.keys({...t,...e}),(function(r){const i=u[r]||s,o=i(t[r],e[r],r);W.isUndefined(o)&&i!==a||(n[r]=o)})),n}var Lt=t=>{const e=Nt({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=e;if(e.headers=o=Rt.from(o),e.url=ot(kt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),W.isFormData(n))if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(W.isFunction(n.getHeaders)){const t=n.getHeaders(),e=["content-type","content-length"];Object.entries(t).forEach((([t,n])=>{e.includes(t.toLowerCase())&&o.set(t,n)}))}if(gt.hasStandardBrowserEnv&&(r&&W.isFunction(r)&&(r=r(e)),r||!1!==r&&Bt(e.url))){const t=s&&i&&Ct.read(i);t&&o.set(s,t)}return e};var Dt="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const r=Lt(t);let s=r.data;const i=Rt.from(r.headers).normalize();let o,a,u,c,l,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=r;function p(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let g=new XMLHttpRequest;function y(){if(!g)return;const r=Rt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());jt((function(t){e(t),p()}),(function(t){n(t),p()}),{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g}),g=null}g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(n(new K("Request aborted",K.ECONNABORTED,t,g)),g=null)},g.onerror=function(e){const r=new K(e&&e.message?e.message:"Network Error",K.ERR_NETWORK,t,g);r.event=e||null,n(r),g=null},g.ontimeout=function(){let e=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const s=r.transitional||ut;r.timeoutErrorMessage&&(e=r.timeoutErrorMessage),n(new K(e,s.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,t,g)),g=null},void 0===s&&i.setContentType(null),"setRequestHeader"in g&&W.forEach(i.toJSON(),(function(t,e){g.setRequestHeader(e,t)})),W.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),f&&"json"!==f&&(g.responseType=r.responseType),d&&([u,l]=Pt(d,!0),g.addEventListener("progress",u)),h&&g.upload&&([a,c]=Pt(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(o=e=>{g&&(n(!e||e.type?new Ft(null,t,g):e),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const m=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(r.url);m&&-1===gt.protocols.indexOf(m)?n(new K("Unsupported protocol "+m+":",K.ERR_BAD_REQUEST,t)):g.send(s||null)}))};var Mt=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,r=new AbortController;const s=function(t){if(!n){n=!0,o();const e=t instanceof Error?t:this.reason;r.abort(e instanceof K?e:new Ft(e instanceof Error?e.message:e))}};let i=e&&setTimeout((()=>{i=null,s(new K(`timeout ${e} of ms exceeded`,K.ETIMEDOUT))}),e);const o=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(s):t.removeEventListener("abort",s)})),t=null)};t.forEach((t=>t.addEventListener("abort",s)));const{signal:a}=r;return a.unsubscribe=()=>W.asap(o),a}};const zt=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let r,s=0;for(;s<n;)r=s+e,yield t.slice(s,r),s=r},qt=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}},$t=(t,e,n,r)=>{const s=async function*(t,e){for await(const n of qt(t))yield*zt(n,e)}(t,e);let i,o=0,a=t=>{i||(i=!0,r&&r(t))};return new ReadableStream({async pull(t){try{const{done:e,value:r}=await s.next();if(e)return a(),void t.close();let i=r.byteLength;if(n){let t=o+=i;n(t)}t.enqueue(new Uint8Array(r))}catch(t){throw a(t),t}},cancel:t=>(a(t),s.return())},{highWaterMark:2})},{isFunction:Ht}=W,Jt=(({Request:t,Response:e})=>({Request:t,Response:e}))(W.global),{ReadableStream:Vt,TextEncoder:Wt}=W.global,Kt=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},Gt=t=>{t=W.merge.call({skipUndefined:!0},Jt,t);const{fetch:e,Request:n,Response:r}=t,s=e?Ht(e):"function"==typeof fetch,i=Ht(n),o=Ht(r);if(!s)return!1;const a=s&&Ht(Vt),u=s&&("function"==typeof Wt?(c=new Wt,t=>c.encode(t)):async t=>new Uint8Array(await new n(t).arrayBuffer()));var c;const l=i&&a&&Kt((()=>{let t=!1;const e=new n(gt.origin,{body:new Vt,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),f=o&&a&&Kt((()=>W.isReadableStream(new r("").body))),h={stream:f&&(t=>t.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!h[t]&&(h[t]=(e,n)=>{let r=e&&e[t];if(r)return r.call(e);throw new K(`Response type '${t}' is not supported`,K.ERR_NOT_SUPPORT,n)})}));const d=async(t,e)=>{const r=W.toFiniteNumber(t.getContentLength());return null==r?(async t=>{if(null==t)return 0;if(W.isBlob(t))return t.size;if(W.isSpecCompliantForm(t)){const e=new n(gt.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return W.isArrayBufferView(t)||W.isArrayBuffer(t)?t.byteLength:(W.isURLSearchParams(t)&&(t+=""),W.isString(t)?(await u(t)).byteLength:void 0)})(e):r};return async t=>{let{url:s,method:o,data:a,signal:u,cancelToken:c,timeout:p,onDownloadProgress:g,onUploadProgress:y,responseType:m,headers:b,withCredentials:w="same-origin",fetchOptions:v}=Lt(t),E=e||fetch;m=m?(m+"").toLowerCase():"text";let O=Mt([u,c&&c.toAbortSignal()],p),S=null;const A=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let R;try{if(y&&l&&"get"!==o&&"head"!==o&&0!==(R=await d(b,a))){let t,e=new n(s,{method:"POST",body:a,duplex:"half"});if(W.isFormData(a)&&(t=e.headers.get("content-type"))&&b.setContentType(t),e.body){const[t,n]=Ut(R,Pt(It(y)));a=$t(e.body,65536,t,n)}}W.isString(w)||(w=w?"include":"omit");const e=i&&"credentials"in n.prototype,u={...v,signal:O,method:o.toUpperCase(),headers:b.normalize().toJSON(),body:a,duplex:"half",credentials:e?w:void 0};S=i&&new n(s,u);let c=await(i?E(S,v):E(s,u));const p=f&&("stream"===m||"response"===m);if(f&&(g||p&&A)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=c[e]}));const e=W.toFiniteNumber(c.headers.get("content-length")),[n,s]=g&&Ut(e,Pt(It(g),!0))||[];c=new r($t(c.body,65536,n,(()=>{s&&s(),A&&A()})),t)}m=m||"text";let T=await h[W.findKey(h,m)||"text"](c,t);return!p&&A&&A(),await new Promise(((e,n)=>{jt(e,n,{data:T,headers:Rt.from(c.headers),status:c.status,statusText:c.statusText,config:t,request:S})}))}catch(e){if(A&&A(),e&&"TypeError"===e.name&&/Load failed|fetch/i.test(e.message))throw Object.assign(new K("Network Error",K.ERR_NETWORK,t,S),{cause:e.cause||e});throw K.from(e,e&&e.code,t,S)}}},Xt=new Map,Yt=t=>{let e=t?t.env:{};const{fetch:n,Request:r,Response:s}=e,i=[r,s,n];let o,a,u=i.length,c=Xt;for(;u--;)o=i[u],a=c.get(o),void 0===a&&c.set(o,a=u?new Map:Gt(e)),c=a;return a};Yt();const Qt={http:null,xhr:Dt,fetch:{get:Yt}};W.forEach(Qt,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const Zt=t=>`- ${t}`,te=t=>W.isFunction(t)||null===t||!1===t;var ee=(t,e)=>{t=W.isArray(t)?t:[t];const{length:n}=t;let r,s;const i={};for(let o=0;o<n;o++){let n;if(r=t[o],s=r,!te(r)&&(s=Qt[(n=String(r)).toLowerCase()],void 0===s))throw new K(`Unknown adapter '${n}'`);if(s&&(W.isFunction(s)||(s=s.get(e))))break;i[n||"#"+o]=s}if(!s){const t=Object.entries(i).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new K("There is no suitable adapter to dispatch the request "+(n?t.length>1?"since :\n"+t.map(Zt).join("\n"):" "+Zt(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return s};function ne(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ft(null,t)}function re(t){ne(t),t.headers=Rt.from(t.headers),t.data=Tt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return ee(t.adapter||bt.adapter,t)(t).then((function(e){return ne(t),e.data=Tt.call(t,t.transformResponse,e),e.headers=Rt.from(e.headers),e}),(function(e){return _t(e)||(ne(t),e&&e.response&&(e.response.data=Tt.call(t,t.transformResponse,e.response),e.response.headers=Rt.from(e.response.headers))),Promise.reject(e)}))}const se="1.12.2",ie={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ie[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const oe={};ie.transitional=function(t,e,n){function r(t,e){return"[Axios v"+se+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,s,i)=>{if(!1===t)throw new K(r(s," has been removed"+(e?" in "+e:"")),K.ERR_DEPRECATED);return e&&!oe[s]&&(oe[s]=!0,console.warn(r(s," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,s,i)}},ie.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};var ae={assertOptions:function(t,e,n){if("object"!=typeof t)throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],o=e[i];if(o){const e=t[i],n=void 0===e||o(e,i,t);if(!0!==n)throw new K("option "+i+" must be "+n,K.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new K("Unknown option "+i,K.ERR_BAD_OPTION)}},validators:ie};const ue=ae.validators;class ce{constructor(t){this.defaults=t||{},this.interceptors={request:new at,response:new at}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Nt(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:s}=e;void 0!==n&&ae.assertOptions(n,{silentJSONParsing:ue.transitional(ue.boolean),forcedJSONParsing:ue.transitional(ue.boolean),clarifyTimeoutError:ue.transitional(ue.boolean)},!1),null!=r&&(W.isFunction(r)?e.paramsSerializer={serialize:r}:ae.assertOptions(r,{encode:ue.function,serialize:ue.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),ae.assertOptions(e,{baseUrl:ue.spelling("baseURL"),withXsrfToken:ue.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let i=s&&W.merge(s.common,s[e.method]);s&&W.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete s[t]})),e.headers=Rt.concat(i,s);const o=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)}));let l,f=0;if(!a){const t=[re.bind(this),void 0];for(t.unshift(...o),t.push(...u),l=t.length,c=Promise.resolve(e);f<l;)c=c.then(t[f++],t[f++]);return c}l=o.length;let h=e;for(;f<l;){const t=o[f++],e=o[f++];try{h=t(h)}catch(t){e.call(this,t);break}}try{c=re.call(this,h)}catch(t){return Promise.reject(t)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(t){return ot(kt((t=Nt(this.defaults,t)).baseURL,t.url,t.allowAbsoluteUrls),t.params,t.paramsSerializer)}}W.forEach(["delete","get","head","options"],(function(t){ce.prototype[t]=function(e,n){return this.request(Nt(n||{},{method:t,url:e,data:(n||{}).data}))}})),W.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,s){return this.request(Nt(s||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}ce.prototype[t]=e(),ce.prototype[t+"Form"]=e(!0)}));var le=ce;class fe{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,s){n.reason||(n.reason=new Ft(t,r,s),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new fe((function(e){t=e})),cancel:t}}}var he=fe;const de={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(de).forEach((([t,e])=>{de[e]=t}));var pe=de;const ge=function t(e){const n=new le(e),s=r(le.prototype.request,n);return W.extend(s,le.prototype,n,{allOwnKeys:!0}),W.extend(s,n,null,{allOwnKeys:!0}),s.create=function(n){return t(Nt(e,n))},s}(bt);ge.Axios=le,ge.CanceledError=Ft,ge.CancelToken=he,ge.isCancel=_t,ge.VERSION=se,ge.toFormData=et,ge.AxiosError=K,ge.Cancel=ge.CanceledError,ge.all=function(t){return Promise.all(t)},ge.spread=function(t){return function(e){return t.apply(null,e)}},ge.isAxiosError=function(t){return W.isObject(t)&&!0===t.isAxiosError},ge.mergeConfig=Nt,ge.AxiosHeaders=Rt,ge.formToJSON=t=>yt(W.isHTMLForm(t)?new FormData(t):t),ge.getAdapter=ee,ge.HttpStatusCode=pe,ge.default=ge,t.exports=ge},182:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.validate=e.v7=e.v6ToV1=e.v6=e.v5=e.v4=e.v3=e.v1ToV6=e.v1=e.stringify=e.parse=e.NIL=e.MAX=void 0;var r=n(196);Object.defineProperty(e,"MAX",{enumerable:!0,get:function(){return r.default}});var s=n(465);Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return s.default}});var i=n(797);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.default}});var o=n(11);Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.default}});var a=n(806);Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return a.default}});var u=n(568);Object.defineProperty(e,"v1ToV6",{enumerable:!0,get:function(){return u.default}});var c=n(591);Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return c.default}});var l=n(286);Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return l.default}});var f=n(557);Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return f.default}});var h=n(356);Object.defineProperty(e,"v6",{enumerable:!0,get:function(){return h.default}});var d=n(268);Object.defineProperty(e,"v6ToV1",{enumerable:!0,get:function(){return d.default}});var p=n(299);Object.defineProperty(e,"v7",{enumerable:!0,get:function(){return p.default}});var g=n(746);Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return g.default}});var y=n(770);Object.defineProperty(e,"version",{enumerable:!0,get:function(){return y.default}})},196:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="ffffffff-ffff-ffff-ffff-ffffffffffff"},338:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function s(t,e,n,s,i,o){return r((a=r(r(e,t),r(s,o)))<<(u=i)|a>>>32-u,n);var a,u}function i(t,e,n,r,i,o,a){return s(e&n|~e&r,t,e,i,o,a)}function o(t,e,n,r,i,o,a){return s(e&r|n&~r,t,e,i,o,a)}function a(t,e,n,r,i,o,a){return s(e^n^r,t,e,i,o,a)}function u(t,e,n,r,i,o,a){return s(n^(e|~r),t,e,i,o,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(t){const e=new Uint8Array(4*t.length);for(let n=0;n<4*t.length;n++)e[n]=t[n>>2]>>>n%4*8&255;return e}(function(t,e){const s=new Uint32Array(n(e)).fill(0);s.set(t),s[e>>5]|=128<<e%32,s[s.length-1]=e,t=s;let c=1732584193,l=-271733879,f=-1732584194,h=271733878;for(let e=0;e<t.length;e+=16){const n=c,s=l,d=f,p=h;c=i(c,l,f,h,t[e],7,-680876936),h=i(h,c,l,f,t[e+1],12,-389564586),f=i(f,h,c,l,t[e+2],17,606105819),l=i(l,f,h,c,t[e+3],22,-1044525330),c=i(c,l,f,h,t[e+4],7,-176418897),h=i(h,c,l,f,t[e+5],12,1200080426),f=i(f,h,c,l,t[e+6],17,-1473231341),l=i(l,f,h,c,t[e+7],22,-45705983),c=i(c,l,f,h,t[e+8],7,1770035416),h=i(h,c,l,f,t[e+9],12,-1958414417),f=i(f,h,c,l,t[e+10],17,-42063),l=i(l,f,h,c,t[e+11],22,-1990404162),c=i(c,l,f,h,t[e+12],7,1804603682),h=i(h,c,l,f,t[e+13],12,-40341101),f=i(f,h,c,l,t[e+14],17,-1502002290),l=i(l,f,h,c,t[e+15],22,1236535329),c=o(c,l,f,h,t[e+1],5,-165796510),h=o(h,c,l,f,t[e+6],9,-1069501632),f=o(f,h,c,l,t[e+11],14,643717713),l=o(l,f,h,c,t[e],20,-373897302),c=o(c,l,f,h,t[e+5],5,-701558691),h=o(h,c,l,f,t[e+10],9,38016083),f=o(f,h,c,l,t[e+15],14,-660478335),l=o(l,f,h,c,t[e+4],20,-405537848),c=o(c,l,f,h,t[e+9],5,568446438),h=o(h,c,l,f,t[e+14],9,-1019803690),f=o(f,h,c,l,t[e+3],14,-187363961),l=o(l,f,h,c,t[e+8],20,1163531501),c=o(c,l,f,h,t[e+13],5,-1444681467),h=o(h,c,l,f,t[e+2],9,-51403784),f=o(f,h,c,l,t[e+7],14,1735328473),l=o(l,f,h,c,t[e+12],20,-1926607734),c=a(c,l,f,h,t[e+5],4,-378558),h=a(h,c,l,f,t[e+8],11,-2022574463),f=a(f,h,c,l,t[e+11],16,1839030562),l=a(l,f,h,c,t[e+14],23,-35309556),c=a(c,l,f,h,t[e+1],4,-1530992060),h=a(h,c,l,f,t[e+4],11,1272893353),f=a(f,h,c,l,t[e+7],16,-155497632),l=a(l,f,h,c,t[e+10],23,-1094730640),c=a(c,l,f,h,t[e+13],4,681279174),h=a(h,c,l,f,t[e],11,-358537222),f=a(f,h,c,l,t[e+3],16,-722521979),l=a(l,f,h,c,t[e+6],23,76029189),c=a(c,l,f,h,t[e+9],4,-640364487),h=a(h,c,l,f,t[e+12],11,-421815835),f=a(f,h,c,l,t[e+15],16,530742520),l=a(l,f,h,c,t[e+2],23,-995338651),c=u(c,l,f,h,t[e],6,-198630844),h=u(h,c,l,f,t[e+7],10,1126891415),f=u(f,h,c,l,t[e+14],15,-1416354905),l=u(l,f,h,c,t[e+5],21,-57434055),c=u(c,l,f,h,t[e+12],6,1700485571),h=u(h,c,l,f,t[e+3],10,-1894986606),f=u(f,h,c,l,t[e+10],15,-1051523),l=u(l,f,h,c,t[e+1],21,-2054922799),c=u(c,l,f,h,t[e+8],6,1873313359),h=u(h,c,l,f,t[e+15],10,-30611744),f=u(f,h,c,l,t[e+6],15,-1560198380),l=u(l,f,h,c,t[e+13],21,1309151649),c=u(c,l,f,h,t[e+4],6,-145523070),h=u(h,c,l,f,t[e+11],10,-1120210379),f=u(f,h,c,l,t[e+2],15,718787259),l=u(l,f,h,c,t[e+9],21,-343485551),c=r(c,n),l=r(l,s),f=r(f,d),h=r(h,p)}return Uint32Array.of(c,l,f,h)}(function(t){if(0===t.length)return new Uint32Array;const e=new Uint32Array(n(8*t.length)).fill(0);for(let n=0;n<t.length;n++)e[n>>2]|=(255&t[n])<<n%4*8;return e}(t),8*t.length))}},779:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);e.default={randomUUID:n}},465:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="00000000-0000-0000-0000-000000000000"},797:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(746);e.default=function(t){if(!(0,r.default)(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,255&e,(e=parseInt(t.slice(9,13),16))>>>8,255&e,(e=parseInt(t.slice(14,18),16))>>>8,255&e,(e=parseInt(t.slice(19,23),16))>>>8,255&e,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,255&e)}},697:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},291:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");n=crypto.getRandomValues.bind(crypto)}return n(r)};const r=new Uint8Array(16)},829:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<<e|t>>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=[1518500249,1859775393,2400959708,3395469782],s=[1732584193,4023233417,2562383102,271733878,3285377520],i=new Uint8Array(t.length+1);i.set(t),i[t.length]=128;const o=(t=i).length/4+2,a=Math.ceil(o/16),u=new Array(a);for(let e=0;e<a;++e){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=t[64*e+4*r]<<24|t[64*e+4*r+1]<<16|t[64*e+4*r+2]<<8|t[64*e+4*r+3];u[e]=n}u[a-1][14]=8*(t.length-1)/Math.pow(2,32),u[a-1][14]=Math.floor(u[a-1][14]),u[a-1][15]=8*(t.length-1)&4294967295;for(let t=0;t<a;++t){const i=new Uint32Array(80);for(let e=0;e<16;++e)i[e]=u[t][e];for(let t=16;t<80;++t)i[t]=r(i[t-3]^i[t-8]^i[t-14]^i[t-16],1);let o=s[0],a=s[1],c=s[2],l=s[3],f=s[4];for(let t=0;t<80;++t){const s=Math.floor(t/20),u=r(o,5)+n(s,a,c,l)+f+e[s]+i[t]>>>0;f=l,l=c,c=r(a,30)>>>0,a=o,o=u}s[0]=s[0]+o>>>0,s[1]=s[1]+a>>>0,s[2]=s[2]+c>>>0,s[3]=s[3]+l>>>0,s[4]=s[4]+f>>>0}return Uint8Array.of(s[0]>>24,s[0]>>16,s[0]>>8,s[0],s[1]>>24,s[1]>>16,s[1]>>8,s[1],s[2]>>24,s[2]>>16,s[2]>>8,s[2],s[3]>>24,s[3]>>16,s[3]>>8,s[3],s[4]>>24,s[4]>>16,s[4]>>8,s[4])}},11:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unsafeStringify=i;const r=n(746),s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));function i(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}e.default=function(t,e=0){const n=i(t,e);if(!(0,r.default)(n))throw TypeError("Stringified UUID is invalid");return n}},806:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateV1State=o;const r=n(291),s=n(11),i={};function o(t,e,n){return t.msecs??=-1/0,t.nsecs??=0,e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e<t.msecs&&(t.node=void 0),t.node||(t.node=n.slice(10,16),t.node[0]|=1,t.clockseq=16383&(n[8]<<8|n[9])),t.msecs=e,t}function a(t,e,n,r,s,i,o=0){i||(i=new Uint8Array(16),o=0),e??=Date.now(),n??=0,r??=16383&(t[8]<<8|t[9]),s??=t.slice(10,16);const a=(1e4*(268435455&(e+=122192928e5))+n)%4294967296;i[o++]=a>>>24&255,i[o++]=a>>>16&255,i[o++]=a>>>8&255,i[o++]=255&a;const u=e/4294967296*1e4&268435455;i[o++]=u>>>8&255,i[o++]=255&u,i[o++]=u>>>24&15|16,i[o++]=u>>>16&255,i[o++]=r>>>8|128,i[o++]=255&r;for(let t=0;t<6;++t)i[o++]=s[t];return i}e.default=function(t,e,n){let u;const c=t?._v6??!1;if(t){const e=Object.keys(t);1===e.length&&"_v6"===e[0]&&(t=void 0)}if(t)u=a(t.random??t.rng?.()??(0,r.default)(),t.msecs,t.nsecs,t.clockseq,t.node,e,n);else{const t=Date.now(),s=(0,r.default)();o(i,t,s),u=a(s,i.msecs,i.nsecs,c?void 0:i.clockseq,c?void 0:i.node,e,n)}return e?u:(0,s.unsafeStringify)(u)}},568:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=function(t){return Uint8Array.of((15&t[6])<<4|t[7]>>4&15,(15&t[7])<<4|(240&t[4])>>4,(15&t[4])<<4|(240&t[5])>>4,(15&t[5])<<4|(240&t[0])>>4,(15&t[0])<<4|(240&t[1])>>4,(15&t[1])<<4|(240&t[2])>>4,96|15&t[2],t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}("string"==typeof t?(0,r.default)(t):t);return"string"==typeof t?(0,s.unsafeStringify)(e):e};const r=n(797),s=n(11)},591:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0;const r=n(338),s=n(988);var i=n(988);function o(t,e,n,i){return(0,s.default)(48,r.default,t,e,n,i)}Object.defineProperty(e,"DNS",{enumerable:!0,get:function(){return i.DNS}}),Object.defineProperty(e,"URL",{enumerable:!0,get:function(){return i.URL}}),o.DNS=s.DNS,o.URL=s.URL,e.default=o},988:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.stringToBytes=i,e.default=function(t,e,n,o,a,u){const c="string"==typeof n?i(n):n,l="string"==typeof o?(0,r.default)(o):o;"string"==typeof o&&(o=(0,r.default)(o));if(16!==o?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+c.length);if(f.set(l),f.set(c,l.length),f=e(f),f[6]=15&f[6]|t,f[8]=63&f[8]|128,a){u=u||0;for(let t=0;t<16;++t)a[u+t]=f[t];return a}return(0,s.unsafeStringify)(f)};const r=n(797),s=n(11);function i(t){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n);return e}e.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",e.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8"},286:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(779),s=n(291),i=n(11);e.default=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const o=(t=t||{}).random||(t.rng||s.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=o[t];return e}return(0,i.unsafeStringify)(o)}},557:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0;const r=n(829),s=n(988);var i=n(988);function o(t,e,n,i){return(0,s.default)(80,r.default,t,e,n,i)}Object.defineProperty(e,"DNS",{enumerable:!0,get:function(){return i.DNS}}),Object.defineProperty(e,"URL",{enumerable:!0,get:function(){return i.URL}}),o.DNS=s.DNS,o.URL=s.URL,e.default=o},356:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(11),s=n(806),i=n(568);e.default=function(t,e,n){t??={},n??=0;let o=(0,s.default)({...t,_v6:!0},new Uint8Array(16));if(o=(0,i.default)(o),e){for(let t=0;t<16;t++)e[n+t]=o[t];return e}return(0,r.unsafeStringify)(o)}},268:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=function(t){return Uint8Array.of((15&t[3])<<4|t[4]>>4&15,(15&t[4])<<4|(240&t[5])>>4,(15&t[5])<<4|15&t[6],t[7],(15&t[1])<<4|(240&t[2])>>4,(15&t[2])<<4|(240&t[3])>>4,16|(240&t[0])>>4,(15&t[0])<<4|(240&t[1])>>4,t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}("string"==typeof t?(0,r.default)(t):t);return"string"==typeof t?(0,s.unsafeStringify)(e):e};const r=n(797),s=n(11)},299:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateV7State=o;const r=n(291),s=n(11),i={};function o(t,e,n){return t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],t.msecs=e):(t.seq=t.seq+1|0,0===t.seq&&t.msecs++),t}function a(t,e,n,r,s=0){return r||(r=new Uint8Array(16),s=0),e??=Date.now(),n??=127*t[6]<<24|t[7]<<16|t[8]<<8|t[9],r[s++]=e/1099511627776&255,r[s++]=e/4294967296&255,r[s++]=e/16777216&255,r[s++]=e/65536&255,r[s++]=e/256&255,r[s++]=255&e,r[s++]=112|n>>>28&15,r[s++]=n>>>20&255,r[s++]=128|n>>>14&63,r[s++]=n>>>6&255,r[s++]=n<<2&255|3&t[10],r[s++]=t[11],r[s++]=t[12],r[s++]=t[13],r[s++]=t[14],r[s++]=t[15],r}e.default=function(t,e,n){let u;if(t)u=a(t.random??t.rng?.()??(0,r.default)(),t.msecs,t.seq,e,n);else{const t=Date.now(),s=(0,r.default)();o(i,t,s),u=a(s,i.msecs,i.seq,e,n)}return e?u:(0,s.unsafeStringify)(u)}},746:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(697);e.default=function(t){return"string"==typeof t&&r.default.test(t)}},770:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(746);e.default=function(t){if(!(0,r.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}}},e={};function n(r){var s=e[r];if(void 0!==s)return s.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n(740)})()));