@ysolve/ocity-heritage-visualizer 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@ var Kt = (e, t, n) => t in e ? Qt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Ae = (e, t, n) => Kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsxs as F, jsx as w, Fragment as Ge } from "react/jsx-runtime";
|
|
5
5
|
import { useState as v, useRef as I, useEffect as j } from "react";
|
|
6
|
-
const Xt = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_DEBUG_MODE: "true", VITE_DEFAULT_IMAGE_URL: "https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png", VITE_GOOGLE_TRANSLATE_BASE: "https://translate.googleapis.com/translate_a/single", VITE_IMAGE_BASE_URL: "https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/", VITE_QWEN_TTS_API_URL: "
|
|
6
|
+
const Xt = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_DEBUG_MODE: "true", VITE_DEFAULT_IMAGE_URL: "https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png", VITE_GOOGLE_TRANSLATE_BASE: "https://translate.googleapis.com/translate_a/single", VITE_IMAGE_BASE_URL: "https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/", VITE_QWEN_TTS_API_URL: "https://playground-tts.o-city.org" };
|
|
7
7
|
function ue(e, t = !0) {
|
|
8
8
|
const n = Xt[e];
|
|
9
9
|
if (!n && t)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(B,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(B=typeof globalThis<"u"?globalThis:B||self,p(B.OCityHeritageVisualizer={},B["react/jsx-runtime"],B.React))})(this,function(B,p,g){"use strict";var Cr=Object.defineProperty;var xr=(B,p,g)=>p in B?Cr(B,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):B[p]=g;var De=(B,p,g)=>xr(B,typeof p!="symbol"?p+"":p,g);const Ut={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_DEBUG_MODE:"true",VITE_DEFAULT_IMAGE_URL:"https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png",VITE_GOOGLE_TRANSLATE_BASE:"https://translate.googleapis.com/translate_a/single",VITE_IMAGE_BASE_URL:"https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/",VITE_QWEN_TTS_API_URL:"http://localhost:3010"};function oe(e,t=!0){const n=Ut[e];if(!n&&t)throw new Error(`❌ Missing required env variable: ${e}`);return n??""}const Se={NODE_ENV:"production",QWEN_TTS_API_URL:oe("VITE_QWEN_TTS_API_URL"),DEBUG_MODE:!0,GOOGLE_TRANSLATE_BASE:oe("VITE_GOOGLE_TRANSLATE_BASE"),IMAGE_BASE_URL:oe("VITE_IMAGE_BASE_URL"),DEFAULT_IMAGE_URL:oe("VITE_DEFAULT_IMAGE_URL")};async function je(e,t){if(!e.trim())return e;try{const n=`${Se.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`,r=await fetch(n);if(!r.ok)throw new Error(`Error en la traducción: ${r.status}`);const s=await r.json();return s&&Array.isArray(s[0])?s[0].map(i=>i[0]).join(""):e}catch(n){return console.error("Error al traducir:",n),e}}function Te(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ft(e,t){let n;const r=()=>{if(n)return n;const s=indexedDB.open(e);return s.onupgradeneeded=()=>s.result.createObjectStore(t),n=Te(s),n.then(i=>{i.onclose=()=>n=void 0},()=>{}),n};return(s,i)=>r().then(o=>i(o.transaction(t,s).objectStore(t)))}let _e;function Me(){return _e||(_e=Ft("keyval-store","keyval")),_e}function It(e,t=Me()){return t("readonly",n=>Te(n.get(e)))}function Dt(e,t,n=Me()){return n("readwrite",r=>(r.put(t,e),Te(r.transaction)))}async function jt(e){return await It(e)??null}async function Mt(e,t){await Dt(e,t)}function $e(e,t){return function(){return e.apply(t,arguments)}}const{toString:$t}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:ie,toStringTag:qe}=Symbol,ae=(e=>t=>{const n=$t.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>ae(t)===e),ce=e=>t=>typeof t===e,{isArray:Q}=Array,Y=ce("undefined");function qt(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ze=I("ArrayBuffer");function zt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ze(e.buffer),t}const Ht=ce("string"),P=ce("function"),He=ce("number"),le=e=>e!==null&&typeof e=="object",Vt=e=>e===!0||e===!1,ue=e=>{if(ae(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qe in e)&&!(ie in e)},Wt=I("Date"),Jt=I("File"),Gt=I("Blob"),Qt=I("FileList"),Kt=e=>le(e)&&P(e.pipe),Xt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ae(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Zt=I("URLSearchParams"),[Yt,en,tn,nn]=["ReadableStream","Request","Response","Headers"].map(I),rn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Q(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,We=e=>!Y(e)&&e!==z;function Re(){const{caseless:e}=We(this)&&this||{},t={},n=(r,s)=>{const i=e&&Ve(t,s)||s;ue(t[i])&&ue(r)?t[i]=Re(t[i],r):ue(r)?t[i]=Re({},r):Q(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ee(arguments[r],n);return t}const sn=(e,t,n,{allOwnKeys:r}={})=>(ee(t,(s,i)=>{n&&P(s)?e[i]=$e(s,n):e[i]=s},{allOwnKeys:r}),e),on=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),an=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},cn=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ln=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},un=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!He(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),fn=(e,t)=>{const r=(e&&e[ie]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},pn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hn=I("HTMLFormElement"),mn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Je=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wn=I("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ee(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},gn=e=>{Ge(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},En=()=>{},bn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sn(e){return!!(e&&P(e.append)&&e[qe]==="FormData"&&e[ie])}const Tn=e=>{const t=new Array(10),n=(r,s)=>{if(le(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Q(r)?[]:{};return ee(r,(o,c)=>{const l=n(o,s+1);!Y(l)&&(i[c]=l)}),t[s]=void 0,i}}return r};return n(e,0)},_n=I("AsyncFunction"),An=e=>e&&(le(e)||P(e))&&P(e.then)&&P(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:i})=>{s===z&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(z.postMessage)),Rn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||Qe,a={isArray:Q,isArrayBuffer:ze,isBuffer:qt,isFormData:Xt,isArrayBufferView:zt,isString:Ht,isNumber:He,isBoolean:Vt,isObject:le,isPlainObject:ue,isReadableStream:Yt,isRequest:en,isResponse:tn,isHeaders:nn,isUndefined:Y,isDate:Wt,isFile:Jt,isBlob:Gt,isRegExp:wn,isFunction:P,isStream:Kt,isURLSearchParams:Zt,isTypedArray:dn,isFileList:Qt,forEach:ee,merge:Re,extend:sn,trim:rn,stripBOM:on,inherits:an,toFlatObject:cn,kindOf:ae,kindOfTest:I,endsWith:ln,toArray:un,forEachEntry:fn,matchAll:pn,isHTMLForm:hn,hasOwnProperty:Je,hasOwnProp:Je,reduceDescriptors:Ge,freezeMethods:gn,toObjectSet:yn,toCamelCase:mn,noop:En,toFiniteNumber:bn,findKey:Ve,global:z,isContextDefined:We,isSpecCompliantForm:Sn,toJSONObject:Tn,isAsyncFn:_n,isThenable:An,setImmediate:Qe,asap:Rn,isIterable:e=>e!=null&&P(e[ie])};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ke=y.prototype,Xe={};["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(e=>{Xe[e]={value:e}}),Object.defineProperties(y,Xe),Object.defineProperty(Ke,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ke);return a.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),y.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const On=null;function Oe(e){return a.isPlainObject(e)||a.isArray(e)}function Ze(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ze(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function vn(e){return a.isArray(e)&&!e.some(Oe)}const Cn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function de(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,m){return!a.isUndefined(m[w])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(a.isBoolean(h))return h.toString();if(!l&&a.isBlob(h))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,w,m){let _=h;if(h&&!m&&typeof h=="object"){if(a.endsWith(w,"{}"))w=r?w:w.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&vn(h)||(a.isFileList(h)||a.endsWith(w,"[]"))&&(_=a.toArray(h)))return w=Ze(w),_.forEach(function(T,L){!(a.isUndefined(T)||T===null)&&t.append(o===!0?Ye([w],L,i):o===null?w:w+"[]",u(T))}),!1}return Oe(h)?!0:(t.append(Ye(m,w,i),u(h)),!1)}const f=[],E=Object.assign(Cn,{defaultVisitor:d,convertValue:u,isVisitable:Oe});function S(h,w){if(!a.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(h),a.forEach(h,function(_,R){(!(a.isUndefined(_)||_===null)&&s.call(t,_,a.isString(R)?R.trim():R,w,E))===!0&&S(_,w?w.concat(R):[R])}),f.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ve(e,t){this._pairs=[],e&&de(e,this,t)}const tt=ve.prototype;tt.append=function(t,n){this._pairs.push([t,n])},tt.toString=function(t){const n=t?function(r){return t.call(this,r,et)}:et;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||xn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new ve(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class rt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ln={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ve,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",xe=typeof navigator=="object"&&navigator||void 0,Bn=Ce&&(!xe||["ReactNative","NativeScript","NS"].indexOf(xe.product)<0),Nn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kn=Ce&&window.location.href||"http://localhost",N={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:Bn,hasStandardBrowserWebWorkerEnv:Nn,navigator:xe,origin:kn},Symbol.toStringTag,{value:"Module"})),...Ln};function Pn(e,t){return de(e,new N.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return N.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Un(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Fn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function ot(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Fn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Un(r),s,n,0)}),n}return null}function In(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const te={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ot(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return de(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),In(t)):t}],transformResponse:[function(t){const n=this.transitional||te.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{te.headers[e]={}});const Dn=a.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"]),jn=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
1
|
+
(function(B,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(B=typeof globalThis<"u"?globalThis:B||self,p(B.OCityHeritageVisualizer={},B["react/jsx-runtime"],B.React))})(this,function(B,p,g){"use strict";var Cr=Object.defineProperty;var xr=(B,p,g)=>p in B?Cr(B,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):B[p]=g;var De=(B,p,g)=>xr(B,typeof p!="symbol"?p+"":p,g);const Ut={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_DEBUG_MODE:"true",VITE_DEFAULT_IMAGE_URL:"https://o-city.org/assets/NO_AVAILABLE_IMG-4d02b370.png",VITE_GOOGLE_TRANSLATE_BASE:"https://translate.googleapis.com/translate_a/single",VITE_IMAGE_BASE_URL:"https://eu2.contabostorage.com/7fb97413b6c243adb4347dafa02551a9:ocity/heritage/images/",VITE_QWEN_TTS_API_URL:"https://playground-tts.o-city.org"};function oe(e,t=!0){const n=Ut[e];if(!n&&t)throw new Error(`❌ Missing required env variable: ${e}`);return n??""}const Se={NODE_ENV:"production",QWEN_TTS_API_URL:oe("VITE_QWEN_TTS_API_URL"),DEBUG_MODE:!0,GOOGLE_TRANSLATE_BASE:oe("VITE_GOOGLE_TRANSLATE_BASE"),IMAGE_BASE_URL:oe("VITE_IMAGE_BASE_URL"),DEFAULT_IMAGE_URL:oe("VITE_DEFAULT_IMAGE_URL")};async function je(e,t){if(!e.trim())return e;try{const n=`${Se.GOOGLE_TRANSLATE_BASE}?client=gtx&sl=auto&tl=${t}&dt=t&q=${encodeURIComponent(e)}`,r=await fetch(n);if(!r.ok)throw new Error(`Error en la traducción: ${r.status}`);const s=await r.json();return s&&Array.isArray(s[0])?s[0].map(i=>i[0]).join(""):e}catch(n){return console.error("Error al traducir:",n),e}}function Te(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ft(e,t){let n;const r=()=>{if(n)return n;const s=indexedDB.open(e);return s.onupgradeneeded=()=>s.result.createObjectStore(t),n=Te(s),n.then(i=>{i.onclose=()=>n=void 0},()=>{}),n};return(s,i)=>r().then(o=>i(o.transaction(t,s).objectStore(t)))}let _e;function Me(){return _e||(_e=Ft("keyval-store","keyval")),_e}function It(e,t=Me()){return t("readonly",n=>Te(n.get(e)))}function Dt(e,t,n=Me()){return n("readwrite",r=>(r.put(t,e),Te(r.transaction)))}async function jt(e){return await It(e)??null}async function Mt(e,t){await Dt(e,t)}function $e(e,t){return function(){return e.apply(t,arguments)}}const{toString:$t}=Object.prototype,{getPrototypeOf:Ae}=Object,{iterator:ie,toStringTag:qe}=Symbol,ae=(e=>t=>{const n=$t.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),I=e=>(e=e.toLowerCase(),t=>ae(t)===e),ce=e=>t=>typeof t===e,{isArray:Q}=Array,Y=ce("undefined");function qt(e){return e!==null&&!Y(e)&&e.constructor!==null&&!Y(e.constructor)&&P(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ze=I("ArrayBuffer");function zt(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ze(e.buffer),t}const Ht=ce("string"),P=ce("function"),He=ce("number"),le=e=>e!==null&&typeof e=="object",Vt=e=>e===!0||e===!1,ue=e=>{if(ae(e)!=="object")return!1;const t=Ae(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(qe in e)&&!(ie in e)},Wt=I("Date"),Jt=I("File"),Gt=I("Blob"),Qt=I("FileList"),Kt=e=>le(e)&&P(e.pipe),Xt=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||P(e.append)&&((t=ae(e))==="formdata"||t==="object"&&P(e.toString)&&e.toString()==="[object FormData]"))},Zt=I("URLSearchParams"),[Yt,en,tn,nn]=["ReadableStream","Request","Response","Headers"].map(I),rn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ee(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Q(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(r=0;r<o;r++)c=i[r],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,We=e=>!Y(e)&&e!==z;function Re(){const{caseless:e}=We(this)&&this||{},t={},n=(r,s)=>{const i=e&&Ve(t,s)||s;ue(t[i])&&ue(r)?t[i]=Re(t[i],r):ue(r)?t[i]=Re({},r):Q(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&ee(arguments[r],n);return t}const sn=(e,t,n,{allOwnKeys:r}={})=>(ee(t,(s,i)=>{n&&P(s)?e[i]=$e(s,n):e[i]=s},{allOwnKeys:r}),e),on=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),an=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},cn=(e,t,n,r)=>{let s,i,o;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&Ae(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ln=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},un=e=>{if(!e)return null;if(Q(e))return e;let t=e.length;if(!He(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},dn=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ae(Uint8Array)),fn=(e,t)=>{const r=(e&&e[ie]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},pn=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hn=I("HTMLFormElement"),mn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Je=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),wn=I("RegExp"),Ge=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ee(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},gn=e=>{Ge(e,(t,n)=>{if(P(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(P(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yn=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Q(e)?r(e):r(String(e).split(t)),n},En=()=>{},bn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Sn(e){return!!(e&&P(e.append)&&e[qe]==="FormData"&&e[ie])}const Tn=e=>{const t=new Array(10),n=(r,s)=>{if(le(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Q(r)?[]:{};return ee(r,(o,c)=>{const l=n(o,s+1);!Y(l)&&(i[c]=l)}),t[s]=void 0,i}}return r};return n(e,0)},_n=I("AsyncFunction"),An=e=>e&&(le(e)||P(e))&&P(e.then)&&P(e.catch),Qe=((e,t)=>e?setImmediate:t?((n,r)=>(z.addEventListener("message",({source:s,data:i})=>{s===z&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),z.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",P(z.postMessage)),Rn=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||Qe,a={isArray:Q,isArrayBuffer:ze,isBuffer:qt,isFormData:Xt,isArrayBufferView:zt,isString:Ht,isNumber:He,isBoolean:Vt,isObject:le,isPlainObject:ue,isReadableStream:Yt,isRequest:en,isResponse:tn,isHeaders:nn,isUndefined:Y,isDate:Wt,isFile:Jt,isBlob:Gt,isRegExp:wn,isFunction:P,isStream:Kt,isURLSearchParams:Zt,isTypedArray:dn,isFileList:Qt,forEach:ee,merge:Re,extend:sn,trim:rn,stripBOM:on,inherits:an,toFlatObject:cn,kindOf:ae,kindOfTest:I,endsWith:ln,toArray:un,forEachEntry:fn,matchAll:pn,isHTMLForm:hn,hasOwnProperty:Je,hasOwnProp:Je,reduceDescriptors:Ge,freezeMethods:gn,toObjectSet:yn,toCamelCase:mn,noop:En,toFiniteNumber:bn,findKey:Ve,global:z,isContextDefined:We,isSpecCompliantForm:Sn,toJSONObject:Tn,isAsyncFn:_n,isThenable:An,setImmediate:Qe,asap:Rn,isIterable:e=>e!=null&&P(e[ie])};function y(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}a.inherits(y,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:a.toJSONObject(this.config),code:this.code,status:this.status}}});const Ke=y.prototype,Xe={};["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(e=>{Xe[e]={value:e}}),Object.defineProperties(y,Xe),Object.defineProperty(Ke,"isAxiosError",{value:!0}),y.from=(e,t,n,r,s,i)=>{const o=Object.create(Ke);return a.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),y.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const On=null;function Oe(e){return a.isPlainObject(e)||a.isArray(e)}function Ze(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Ye(e,t,n){return e?e.concat(t).map(function(s,i){return s=Ze(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function vn(e){return a.isArray(e)&&!e.some(Oe)}const Cn=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function de(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,m){return!a.isUndefined(m[w])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(a.isDate(h))return h.toISOString();if(a.isBoolean(h))return h.toString();if(!l&&a.isBlob(h))throw new y("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(h)||a.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function d(h,w,m){let _=h;if(h&&!m&&typeof h=="object"){if(a.endsWith(w,"{}"))w=r?w:w.slice(0,-2),h=JSON.stringify(h);else if(a.isArray(h)&&vn(h)||(a.isFileList(h)||a.endsWith(w,"[]"))&&(_=a.toArray(h)))return w=Ze(w),_.forEach(function(T,L){!(a.isUndefined(T)||T===null)&&t.append(o===!0?Ye([w],L,i):o===null?w:w+"[]",u(T))}),!1}return Oe(h)?!0:(t.append(Ye(m,w,i),u(h)),!1)}const f=[],E=Object.assign(Cn,{defaultVisitor:d,convertValue:u,isVisitable:Oe});function S(h,w){if(!a.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+w.join("."));f.push(h),a.forEach(h,function(_,R){(!(a.isUndefined(_)||_===null)&&s.call(t,_,a.isString(R)?R.trim():R,w,E))===!0&&S(_,w?w.concat(R):[R])}),f.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function et(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ve(e,t){this._pairs=[],e&&de(e,this,t)}const tt=ve.prototype;tt.append=function(t,n){this._pairs.push([t,n])},tt.toString=function(t){const n=t?function(r){return t.call(this,r,et)}:et;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function xn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function nt(e,t,n){if(!t)return e;const r=n&&n.encode||xn;a.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=a.isURLSearchParams(t)?t.toString():new ve(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class rt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const st={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ln={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ve,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ce=typeof window<"u"&&typeof document<"u",xe=typeof navigator=="object"&&navigator||void 0,Bn=Ce&&(!xe||["ReactNative","NativeScript","NS"].indexOf(xe.product)<0),Nn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",kn=Ce&&window.location.href||"http://localhost",N={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ce,hasStandardBrowserEnv:Bn,hasStandardBrowserWebWorkerEnv:Nn,navigator:xe,origin:kn},Symbol.toStringTag,{value:"Module"})),...Ln};function Pn(e,t){return de(e,new N.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return N.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Un(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Fn(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function ot(e){function t(n,r,s,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&a.isArray(s)?s.length:o,l?(a.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!c):((!s[o]||!a.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&a.isArray(s[o])&&(s[o]=Fn(s[o])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Un(r),s,n,0)}),n}return null}function In(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const te={transitional:st,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=a.isObject(t);if(i&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(ot(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pn(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return de(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),In(t)):t}],transformResponse:[function(t){const n=this.transitional||te.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?y.from(c,y.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:N.classes.FormData,Blob:N.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{te.headers[e]={}});const Dn=a.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"]),jn=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
2
2
|
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Dn[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},it=Symbol("internals");function ne(e){return e&&String(e).trim().toLowerCase()}function fe(e){return e===!1||e==null?e:a.isArray(e)?e.map(fe):String(e)}function Mn(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $n=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Le(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function qn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zn(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let U=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(c,l,u){const d=ne(l);if(!d)throw new Error("header name must be a non-empty string");const f=a.findKey(s,d);(!f||s[f]===void 0||u===!0||u===void 0&&s[f]!==!1)&&(s[f||l]=fe(c))}const o=(c,l)=>a.forEach(c,(u,d)=>i(u,d,l));if(a.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(a.isString(t)&&(t=t.trim())&&!$n(t))o(jn(t),n);else if(a.isObject(t)&&a.isIterable(t)){let c={},l,u;for(const d of t){if(!a.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[u=d[0]]=(l=c[u])?a.isArray(l)?[...l,d[1]]:[l,d[1]]:d[1]}o(c,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=ne(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Mn(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ne(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Le(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=ne(o),o){const c=a.findKey(r,o);c&&(!n||Le(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||Le(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,i)=>{const o=a.findKey(r,i);if(o){n[o]=fe(s),delete n[i];return}const c=t?qn(i):String(i).trim();c!==i&&delete n[i],n[c]=fe(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
3
3
|
`)}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,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[it]=this[it]={accessors:{}}).accessors,s=this.prototype;function i(o){const c=ne(o);r[c]||(zn(s,o),r[c]=!0)}return a.isArray(t)?t.forEach(i):i(t),this}};U.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(U.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),a.freezeMethods(U);function Be(e,t){const n=this||te,r=t||n,s=U.from(r.headers);let i=r.data;return a.forEach(e,function(c){i=c.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function at(e){return!!(e&&e.__CANCEL__)}function K(e,t,n){y.call(this,e??"canceled",y.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(K,y,{__CANCEL__:!0});function ct(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new y("Request failed with status code "+n.status,[y.ERR_BAD_REQUEST,y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Hn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vn(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=r[i];o||(o=u),n[s]=l,r[s]=u;let f=i,E=0;for(;f!==s;)E+=n[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const S=d&&u-d;return S?Math.round(E*1e3/S):void 0}}function Wn(e,t){let n=0,r=1e3/t,s,i;const o=(u,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),f=d-n;f>=r?o(u,d):(s=u,i||(i=setTimeout(()=>{i=null,o(s)},r-f)))},()=>s&&o(s)]}const pe=(e,t,n=3)=>{let r=0;const s=Vn(50,250);return Wn(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-r,u=s(l),d=o<=c;r=o;const f={loaded:o,total:c,progress:c?o/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&d?(c-o)/u:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},n)},lt=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ut=e=>(...t)=>a.asap(()=>e(...t)),Jn=N.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,N.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(N.origin),N.navigator&&/(msie|trident)/i.test(N.navigator.userAgent)):()=>!0,Gn=N.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),a.isString(r)&&o.push("path="+r),a.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Kn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function dt(e,t,n){let r=!Qn(t);return e&&(r||n==!1)?Kn(e,t):t}const ft=e=>e instanceof U?{...e}:e;function H(e,t){t=t||{};const n={};function r(u,d,f,E){return a.isPlainObject(u)&&a.isPlainObject(d)?a.merge.call({caseless:E},u,d):a.isPlainObject(d)?a.merge({},d):a.isArray(d)?d.slice():d}function s(u,d,f,E){if(a.isUndefined(d)){if(!a.isUndefined(u))return r(void 0,u,f,E)}else return r(u,d,f,E)}function i(u,d){if(!a.isUndefined(d))return r(void 0,d)}function o(u,d){if(a.isUndefined(d)){if(!a.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function c(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const l={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:c,headers:(u,d,f)=>s(ft(u),ft(d),f,!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||s,E=f(e[d],t[d],d);a.isUndefined(E)&&f!==c||(n[d]=E)}),n}const pt=e=>{const t=H({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:c}=t;t.headers=o=U.from(o),t.url=nt(dt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(a.isFormData(n)){if(N.hasStandardBrowserEnv||N.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...d]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...d].join("; "))}}if(N.hasStandardBrowserEnv&&(r&&a.isFunction(r)&&(r=r(t)),r||r!==!1&&Jn(t.url))){const u=s&&i&&Gn.read(i);u&&o.set(s,u)}return t},Xn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=pt(e);let i=s.data;const o=U.from(s.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=s,d,f,E,S,h;function w(){S&&S(),h&&h(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let m=new XMLHttpRequest;m.open(s.method.toUpperCase(),s.url,!0),m.timeout=s.timeout;function _(){if(!m)return;const T=U.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),v={data:!c||c==="text"||c==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:T,config:e,request:m};ct(function(D){n(D),w()},function(D){r(D),w()},v),m=null}"onloadend"in m?m.onloadend=_:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(_)},m.onabort=function(){m&&(r(new y("Request aborted",y.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new y("Network Error",y.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let L=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const v=s.transitional||st;s.timeoutErrorMessage&&(L=s.timeoutErrorMessage),r(new y(L,v.clarifyTimeoutError?y.ETIMEDOUT:y.ECONNABORTED,e,m)),m=null},i===void 0&&o.setContentType(null),"setRequestHeader"in m&&a.forEach(o.toJSON(),function(L,v){m.setRequestHeader(v,L)}),a.isUndefined(s.withCredentials)||(m.withCredentials=!!s.withCredentials),c&&c!=="json"&&(m.responseType=s.responseType),u&&([E,h]=pe(u,!0),m.addEventListener("progress",E)),l&&m.upload&&([f,S]=pe(l),m.upload.addEventListener("progress",f),m.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(d=T=>{m&&(r(!T||T.type?new K(null,e,m):T),m.abort(),m=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const R=Hn(s.url);if(R&&N.protocols.indexOf(R)===-1){r(new y("Unsupported protocol "+R+":",y.ERR_BAD_REQUEST,e));return}m.send(i||null)})},Zn=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(u){if(!s){s=!0,c();const d=u instanceof Error?u:this.reason;r.abort(d instanceof y?d:new K(d instanceof Error?d.message:d))}};let o=t&&setTimeout(()=>{o=null,i(new y(`timeout ${t} of ms exceeded`,y.ETIMEDOUT))},t);const c=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>a.asap(c),l}},Yn=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},er=async function*(e,t){for await(const n of tr(e))yield*Yn(n,t)},tr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ht=(e,t,n,r)=>{const s=er(e,t);let i=0,o,c=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await s.next();if(u){c(),l.close();return}let f=d.byteLength;if(n){let E=i+=f;n(E)}l.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(l){return c(l),s.return()}},{highWaterMark:2})},he=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",mt=he&&typeof ReadableStream=="function",nr=he&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),wt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rr=mt&&wt(()=>{let e=!1;const t=new Request(N.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gt=64*1024,Ne=mt&&wt(()=>a.isReadableStream(new Response("").body)),me={stream:Ne&&(e=>e.body)};he&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!me[t]&&(me[t]=a.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new y(`Response type '${t}' is not supported`,y.ERR_NOT_SUPPORT,r)})})})(new Response);const sr=async e=>{if(e==null)return 0;if(a.isBlob(e))return e.size;if(a.isSpecCompliantForm(e))return(await new Request(N.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(a.isArrayBufferView(e)||a.isArrayBuffer(e))return e.byteLength;if(a.isURLSearchParams(e)&&(e=e+""),a.isString(e))return(await nr(e)).byteLength},or=async(e,t)=>{const n=a.toFiniteNumber(e.getContentLength());return n??sr(t)},ke={http:On,xhr:Xn,fetch:he&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:f="same-origin",fetchOptions:E}=pt(e);u=u?(u+"").toLowerCase():"text";let S=Zn([s,i&&i.toAbortSignal()],o),h;const w=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let m;try{if(l&&rr&&n!=="get"&&n!=="head"&&(m=await or(d,r))!==0){let v=new Request(t,{method:"POST",body:r,duplex:"half"}),k;if(a.isFormData(r)&&(k=v.headers.get("content-type"))&&d.setContentType(k),v.body){const[D,M]=lt(m,pe(ut(l)));r=ht(v.body,gt,D,M)}}a.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;h=new Request(t,{...E,signal:S,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:_?f:void 0});let R=await fetch(h,E);const T=Ne&&(u==="stream"||u==="response");if(Ne&&(c||T&&w)){const v={};["status","statusText","headers"].forEach(b=>{v[b]=R[b]});const k=a.toFiniteNumber(R.headers.get("content-length")),[D,M]=c&<(k,pe(ut(c),!0))||[];R=new Response(ht(R.body,gt,D,()=>{M&&M(),w&&w()}),v)}u=u||"text";let L=await me[a.findKey(me,u)||"text"](R,e);return!T&&w&&w(),await new Promise((v,k)=>{ct(v,k,{data:L,headers:U.from(R.headers),status:R.status,statusText:R.statusText,config:e,request:h})})}catch(_){throw w&&w(),_&&_.name==="TypeError"&&/Load failed|fetch/i.test(_.message)?Object.assign(new y("Network Error",y.ERR_NETWORK,e,h),{cause:_.cause||_}):y.from(_,_&&_.code,e,h)}})};a.forEach(ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yt=e=>`- ${e}`,ir=e=>a.isFunction(e)||e===null||e===!1,Et={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i<t;i++){n=e[i];let o;if(r=n,!ir(n)&&(r=ke[(o=String(n)).toLowerCase()],r===void 0))throw new y(`Unknown adapter '${o}'`);if(r)break;s[o||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
|
|
4
4
|
`+i.map(yt).join(`
|