diff --git a/.changeset/eleven-pumpkins-unite.md b/.changeset/eleven-pumpkins-unite.md new file mode 100644 index 0000000..e432f62 --- /dev/null +++ b/.changeset/eleven-pumpkins-unite.md @@ -0,0 +1,5 @@ +--- +"@minima-global/mds": patch +--- + +fixed state type for coins diff --git a/.gitignore b/.gitignore index 7118f71..29e2213 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ node_modules .turbo *.log dist +build dist-ssr *.local .cache diff --git a/packages/mds/src/commands/general/response.ts b/packages/mds/src/commands/general/response.ts index 7bc4d76..8747052 100644 --- a/packages/mds/src/commands/general/response.ts +++ b/packages/mds/src/commands/general/response.ts @@ -93,7 +93,7 @@ export type Coin = { tokenid: string; token: Token | null; storestate: boolean; - state: string[]; + state: StateArray[] | StateObject; spent: boolean; mmrentry: string; created: string; @@ -101,6 +101,16 @@ export type Coin = { tokenamount: string; }; +export type StateArray = { + port: number; + type: number; + data: string; +}; + +export type StateObject = { + [key: `${number}`]: string; +}; + export type SimpleCoinResponse = MDSResponse; export type TokenCreate = { diff --git a/tests/test-app-new/build/assets/index-DUKqEKPp.js b/tests/test-app-new/build/assets/index-DUKqEKPp.js deleted file mode 100644 index 493ff9f..0000000 --- a/tests/test-app-new/build/assets/index-DUKqEKPp.js +++ /dev/null @@ -1,57 +0,0 @@ -function Sg(){import.meta.url,import("_").catch(()=>1),async function*(){}().next()}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const i of u.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function l(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function n(a){if(a.ep)return;a.ep=!0;const u=l(a);fetch(a.href,u)}})();function yr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gr={exports:{}},Ti={};/** - * @license React - * react-jsx-runtime.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var C0=Symbol.for("react.transitional.element"),N0=Symbol.for("react.fragment");function pr(t,e,l){var n=null;if(l!==void 0&&(n=""+l),e.key!==void 0&&(n=""+e.key),"key"in e){l={};for(var a in e)a!=="key"&&(l[a]=e[a])}else l=e;return e=l.ref,{$$typeof:C0,type:t,key:n,ref:e!==void 0?e:null,props:l}}Ti.Fragment=N0;Ti.jsx=pr;Ti.jsxs=pr;gr.exports=Ti;var T=gr.exports;function U0(t,e){let l=t,n,a;if(e.length>0&&(typeof e[e.length-1]=="function"?(n=e.pop(),e.length>0&&(a=e[0])):a=e[0]),a){if(typeof a=="string")l+=" ".concat(a);else if(typeof a=="object")if(a.params){const u=Object.entries(a.params).filter(([i,c])=>c!==void 0).map(([i,c])=>typeof c=="object"&&c!==null?"".concat(i,":").concat(JSON.stringify(c)):"".concat(i,":").concat(c)).join(" ");l+=u?" ".concat(u):""}else{const u=Object.entries(a).filter(([i,c])=>c!==void 0).map(([i,c])=>typeof c=="object"&&c!==null?"".concat(i,":").concat(JSON.stringify(c)):"".concat(i,":").concat(c)).join(" ");l+=u?" ".concat(u):""}}return{commandString:l,callback:n}}function L0(t){return(...e)=>{const{commandString:l,callback:n}=U0(t,e);return new Promise(a=>{F("cmd",l,u=>{a(u),n&&typeof n=="function"&&n(u)})})}}var Xu,Wl=[];const U={filehost:"",mainhost:"",minidappuid:"",testhost:"",TEST_MODE:!1,logging:!1,DEBUG_HOST:null,DEBUG_PORT:0,DEBUG_MINIDAPPID:"",init:t=>{if(U.log("MDS Inited"),Go()){U.TEST_MODE=!0,U.minidappuid="0x00",U.filehost="https://".concat(U.DEBUG_HOST,":").concat(U.DEBUG_PORT,"/"),U.mainhost="http://".concat(U.DEBUG_HOST,":").concat(U.DEBUG_PORT,"/"),U.testhost="http://".concat(U.DEBUG_HOST,":").concat(U.DEBUG_PORT,"/"),Xu=t,t&&t({event:"inited",data:null});return}U.form.getParams("MDS_LOGGING")!=null&&(U.logging=!0);var e=window.location.hostname,l=Number(window.location.port);U.minidappuid=U.form.getParams("uid"),U.minidappuid==null&&(U.minidappuid=U.DEBUG_MINIDAPPID),U.minidappuid=="0x00"&&U.log("No MiniDAPP UID specified.. using test value"),U.filehost="https://"+e+":"+l+"/",U.mainhost="https://"+e+":"+l+"/mdscommand_/",U.testhost="https://"+e+":"+l+"/",U.log("MDS HOST : "+U.filehost),Xu=t,Vu(),Bs({event:"inited"})},log:t=>{console.log("Minima @ "+new Date().toLocaleString()+" : "+t)},notify:t=>{F(U.mainhost+"notify?uid="+U.minidappuid,t)},notifycancel:()=>{F("notifycancel","*")},cmd:new Proxy({},{get:(t,e)=>{if(e in t)return t[e];const l=L0(e);return t[e]=l,l}}),sql:(t,e)=>new Promise(l=>{F("sql",t,n=>{l(n),e&&e(n)})}),dapplink:(t,e)=>new Promise(l=>{F("dapplink",t,n=>{l(n),e&&e(n)})}),api:{call:(t,e,l)=>{var n=""+Math.random()*1e9,a={};a.id=n,a.callback=l,Wl.push(a);var u=t+"&request&"+n+"&"+e;F("api",u)},reply:(t,e,l,n)=>{var a=t+"&response&"+e+"&"+l;F("api",a,n)}},net:{GET:(t,e)=>{F("net",t,e)},POST:(t,e,l)=>{var n=t+"&"+e;F("netpost",n,l)}},keypair:{get:(t,e)=>new Promise(l=>{var n="get&"+t;F("keypair",n,a=>{l(a),e&&e(a)})}),set:(t,e,l)=>new Promise(n=>{var a="set&"+t+"&"+e;F("keypair",a,u=>{n(u),l&&l(u)})})},comms:{broadcast:(t,e)=>{var l="public&"+t;F("comms",l,e)},solo:(t,e)=>{var l="private&"+t;F("comms",l,e)}},file:{list:(t,e,l)=>{var n="list&"+t;F("file",n,l)},save:(t,e,l)=>{var n="save&"+t+"&"+e;F("file",n,l)},savebinary:function(t,e,l){var n="savebinary&"+t+"&"+e;F("file",n,l)},load:(t,e,l)=>{var n="load&"+t;F("file",n,l)},loadbinary(t,e,l){var n="loadbinary&"+t;F("file",n,l)},delete:(t,e,l)=>{var n="delete&"+t;F("file",n,l)},getpath:(t,e,l)=>{var n="getpath&"+t;F("file",n,l)},makedir:(t,e,l)=>{var n="makedir&"+t;F("file",n,l)},copy:(t,e,l)=>{var n="copy&"+t+"&"+e;F("file",n,l)},move:(t,e,l)=>{var n="move&"+t+"&"+e;F("file",n,l)},download:(t,e,l)=>{var n="download&"+t;F("file",n,l)},upload:(t,e,l)=>{wc(t,0,l)},listweb:(t,e,l)=>{var n="listweb&"+t;F("file",n,l)},copytoweb:(t,e,l)=>{var n="copytoweb&"+t+"&"+e;F("file",n,l)},deletefromweb:(t,e,l)=>{var n="deletefromweb&"+t;F("file",n,l)}},executeRaw:(t,e)=>new Promise(l=>{F("cmd",t,n=>{l(n),e&&e(n)})}),form:{getParams:t=>{var u,i,c;if(Go())return null;for(var e=null,l=[],n=window.location.search.substr(1).split("&"),a=0;a{var e=t;return t.startsWith("0x")&&(e=t.substring(2)),btoa((e.match(/\w{2}/g)||[]).map(function(l){return String.fromCharCode(parseInt(l,16))}).join(""))},base64ToHex:t=>{const e=atob(t);let l="";for(let n=0;n{const e=window.atob(t),l=e.length,n=new Uint8Array(l);for(let a=0;ai.json()).then(i=>{U.logging&&U.log("RESPONSE:"+JSON.stringify(i)),l&&l(i)}).catch(i=>{jc(n,e,i)});return}var u=new XMLHttpRequest;u.onreadystatechange=function(){var i=u.status;if(u.readyState==XMLHttpRequest.DONE)if(i===0||i>=200&&i<400){if(U.logging&&U.log("RESPONSE:"+u.responseText),l)try{const c=JSON.parse(u.responseText);l(c)}catch(c){console.error("Failed to parse response as JSON",c)}}else jc(n,e,u.status)},u.open("POST",n,!0),u.overrideMimeType&&u.overrideMimeType("text/plain; charset=UTF-8"),u.send(encodeURIComponent(e))}function H0(t,e,l){if(U.logging&&U.log("POST_POLL_RPC:"+t+" PARAMS:"+e),U.TEST_MODE){fetch(t).then(a=>a.json()).then(a=>{U.logging&&U.log("RESPONSE:"+JSON.stringify(a)),l&&l(a)}).catch(a=>{setTimeout(()=>{Vu()},1e4)});return}var n=new XMLHttpRequest;n.onreadystatechange=function(){var a=n.status;if(n.readyState==XMLHttpRequest.DONE)if(a===0||a>=200&&a<400){if(U.logging&&U.log("RESPONSE:"+n.responseText),l)try{const u=JSON.parse(n.responseText);l(u)}catch(u){console.error("Failed to parse response as JSON",u)}}else jc(t,e,n.status)},n.addEventListener("error",function(){U.log("Error Polling - reconnect in 10s"),setTimeout(function(){Vu()},1e4)}),n.open("POST",t,!0),n.overrideMimeType&&n.overrideMimeType("text/plain; charset=UTF-8"),n.send(encodeURIComponent(e))}function wc(t,e,l){var n=t.name,a=t.size,u=1024*1024,i=Math.ceil(a/u);if(!(e>i-1)){var c=u*e,s=c+u;s>a&&(s=a);var o=t.slice(c,s),d=new FormData;d.append("uid",U.minidappuid),d.append("filename",n),d.append("filesize",a),d.append("allchunks",i),d.append("chunknum",e),d.append("fileupload",o);var f=new XMLHttpRequest;f.open("POST","/fileuploadchunk.html"),f.onreadystatechange=function(){var r=f.status;if(f.readyState==XMLHttpRequest.DONE)if(r===0||r>=200&&r<400){if(l){var v={};v.status=!0,v.filename=n,v.size=a,v.allchunks=i,v.chunk=e+1,v.start=c,v.end=s,l(v)}l?wc(t,e+1,l):wc(t,e+1)}else{if(l){var v={};v.status=!1,v.error=f.responseText,v.filename=n,v.size=a,v.allchunks=i,v.chunk=e,v.start=c,v.end=s,l(v)}U.log("MDS FILEUPLOAD CHUNK ERROR: "+f.responseText)}},f.send(d)}}function Go(){return typeof window>"u"||U.TEST_MODE}const B0={INITED:"inited",NEWBLOCK:"NEWBLOCK",MINING:"MINING",MINIMALOG:"MINIMALOG",MAXIMA:"MAXIMA",TIMER_10SECONDS:"MDS_TIMER_10SECONDS",TIMER_1HOUR:"MDS_TIMER_1HOUR",SHUTDOWN:"MDS_SHUTDOWN",PENDING:"MDS_PENDING",NEWCOIN:"NEWCOIN",NOTIFYCOIN:"NOTIFYCOIN",NOTIFYCASCADECOIN:"NOTIFYCASCADECOIN"};var j0="Invariant failed";function ve(t,e){if(!t)throw new Error(j0)}function yn(t){const e=t.resolvedLocation,l=t.location,n=(e==null?void 0:e.pathname)!==l.pathname,a=(e==null?void 0:e.href)!==l.href,u=(e==null?void 0:e.hash)!==l.hash;return{fromLocation:e,toLocation:l,pathChanged:n,hrefChanged:a,hashChanged:u}}function oa(t){return t[t.length-1]}function w0(t){return typeof t=="function"}function la(t,e){return w0(t)?t(e):t}function qc(t,e){return e.reduce((l,n)=>(l[n]=t[n],l),{})}function Wt(t,e){if(t===e)return t;const l=e,n=Xo(t)&&Xo(l);if(n||Qu(t)&&Qu(l)){const a=n?t:Object.keys(t),u=a.length,i=n?l:Object.keys(l),c=i.length,s=n?[]:{};let o=0;for(let d=0;d"u")return!0;const l=e.prototype;return!(!Yo(l)||!l.hasOwnProperty("isPrototypeOf"))}function Yo(t){return Object.prototype.toString.call(t)==="[object Object]"}function Xo(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Vo(t,e){let l=Object.keys(t);return e&&(l=l.filter(n=>t[n]!==void 0)),l}function fa(t,e,l){var n;if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Qu(t)&&Qu(e)){const a=(n=l==null?void 0:l.ignoreUndefined)!=null?n:!0,u=Vo(t,a),i=Vo(e,a);return!(l!=null&&l.partial)&&u.length!==i.length?!1:i.every(c=>fa(t[c],e[c],l))}return Array.isArray(t)&&Array.isArray(e)?t.length!==e.length?!1:!t.some((a,u)=>!fa(a,e[u],l)):!1}function Pl(t){let e,l;const n=new Promise((a,u)=>{e=a,l=u});return n.status="pending",n.resolve=a=>{n.status="resolved",n.value=a,e(a),t==null||t(a)},n.reject=a=>{n.status="rejected",l(a)},n}function Ge(t){return Oi(t.filter(e=>e!==void 0).join("/"))}function Oi(t){return t.replace(/\/{2,}/g,"/")}function js(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function Al(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function q0(t){return Al(js(t))}function G0({basepath:t,base:e,to:l,trailingSlash:n="never",caseSensitive:a}){var u,i;e=Zu(t,e,a),l=Zu(t,l,a);let c=An(e);const s=An(l);c.length>1&&((u=oa(c))==null?void 0:u.value)==="/"&&c.pop(),s.forEach((d,f)=>{d.value==="/"?f?f===s.length-1&&c.push(d):c=[d]:d.value===".."?c.pop():d.value==="."||c.push(d)}),c.length>1&&(((i=oa(c))==null?void 0:i.value)==="/"?n==="never"&&c.pop():n==="always"&&c.push({type:"pathname",value:"/"}));const o=Ge([t,...c.map(d=>d.value)]);return Oi(o)}function An(t){if(!t)return[];t=Oi(t);const e=[];if(t.slice(0,1)==="/"&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const l=t.split("/").filter(Boolean);return e.push(...l.map(n=>n==="$"||n==="*"?{type:"wildcard",value:n}:n.charAt(0)==="$"?{type:"param",value:n}:{type:"pathname",value:decodeURI(n)})),t.slice(-1)==="/"&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function cu({path:t,params:e,leaveWildcards:l,leaveParams:n,decodeCharMap:a}){const u=An(t);function i(o){const d=e[o],f=typeof d=="string";return["*","_splat"].includes(o)?f?encodeURI(d):d:f?Y0(d,a):d}const c={},s=Ge(u.map(o=>{var d;if(o.type==="wildcard"){c._splat=e._splat;const f=i("_splat");return l?"".concat(o.value).concat(f!=null?f:""):f}if(o.type==="param"){const f=o.value.substring(1);if(c[f]=e[f],n){const r=i(o.value);return"".concat(o.value).concat(r!=null?r:"")}return(d=i(f))!=null?d:"undefined"}return o.value}));return{usedParams:c,interpolatedPath:s}}function Y0(t,e){let l=encodeURIComponent(t);if(e)for(const[n,a]of e)l=l.replaceAll(n,a);return l}function su(t,e,l){const n=X0(t,e,l);if(!(l.to&&!n))return n!=null?n:{}}function Zu(t,e,l=!1){const n=l?t:t.toLowerCase(),a=l?e:e.toLowerCase();switch(!0){case n==="/":return e;case a===n:return"";case e.length{for(let o=0;o=a.length-1,v=o>=u.length-1;if(f){if(f.type==="wildcard"){const g=decodeURI(Ge(a.slice(o).map(S=>S.value)));return i["*"]=g,i._splat=g,!0}if(f.type==="pathname"){if(f.value==="/"&&!(d!=null&&d.value))return!0;if(d){if(l.caseSensitive){if(f.value!==d.value)return!1}else if(f.value.toLowerCase()!==d.value.toLowerCase())return!1}}if(!d)return!1;if(f.type==="param"){if(d.value==="/")return!1;d.value.charAt(0)!=="$"&&(i[f.value.substring(1)]=decodeURIComponent(d.value))}}if(!r&&v)return i["**"]=Ge(a.slice(o+1).map(g=>g.value)),!!l.fuzzy&&(f==null?void 0:f.value)!=="/"}return!0})()?i:void 0}function V0(t,e){let l,n,a,u="";for(l in t)if((a=t[l])!==void 0)if(Array.isArray(a))for(n=0;n{e.substring(0,1)==="?"&&(e=e.substring(1));const l=Q0(e);for(const n in l){const a=l[n];if(typeof a=="string")try{l[n]=t(a)}catch(u){}}return l}}function $0(t,e){function l(n){if(typeof n=="object"&&n!==null)try{return t(n)}catch(a){}else if(typeof n=="string"&&typeof e=="function")try{return e(n),t(n)}catch(a){}return n}return n=>{n={...n},Object.keys(n).forEach(u=>{const i=n[u];typeof i>"u"||i===void 0?delete n[u]:n[u]=l(i)});const a=V0(n).toString();return a?"?".concat(a):""}}const il="__TSR_index",Zo="popstate",Ko="beforeunload";function Sr(t){let e=t.getLocation();const l=new Set,n=i=>{e=t.getLocation(),l.forEach(c=>c({location:e,action:i}))},a=i=>{var c;(c=t.notifyOnIndexChange)==null||c?n(i):e=t.getLocation()},u=async({task:i,navigateOpts:c,...s})=>{var g,S;var o,d;if((g=c==null?void 0:c.ignoreBlocker)!=null?g:!1){i();return}const r=(S=(o=t.getBlockers)==null?void 0:o.call(t))!=null?S:[],v=s.type==="PUSH"||s.type==="REPLACE";if(typeof document<"u"&&r.length&&v)for(const M of r){const m=Da(s.path,s.state);if(await M.blockerFn({currentLocation:e,nextLocation:m,action:s.type})){(d=t.onBlocked)==null||d.call(t);return}}i()};return{get location(){return e},get length(){return t.getLength()},subscribers:l,subscribe:i=>(l.add(i),()=>{l.delete(i)}),push:(i,c,s)=>{const o=e.state[il];c=Gc(o+1,c),u({task:()=>{t.pushState(i,c),n({type:"PUSH"})},navigateOpts:s,type:"PUSH",path:i,state:c})},replace:(i,c,s)=>{const o=e.state[il];c=Gc(o,c),u({task:()=>{t.replaceState(i,c),n({type:"REPLACE"})},navigateOpts:s,type:"REPLACE",path:i,state:c})},go:(i,c)=>{u({task:()=>{t.go(i),a({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{u({task:()=>{var c;t.back((c=i==null?void 0:i.ignoreBlocker)!=null?c:!1),a({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{u({task:()=>{var c;t.forward((c=i==null?void 0:i.ignoreBlocker)!=null?c:!1),a({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>e.state[il]!==0,createHref:i=>t.createHref(i),block:i=>{var o;var c;if(!t.setBlockers)return()=>{};const s=(o=(c=t.getBlockers)==null?void 0:c.call(t))!=null?o:[];return t.setBlockers([...s,i]),()=>{var v;var d,f;const r=(v=(d=t.getBlockers)==null?void 0:d.call(t))!=null?v:[];(f=t.setBlockers)==null||f.call(t,r.filter(g=>g!==i))}},flush:()=>{var i;return(i=t.flush)==null?void 0:i.call(t)},destroy:()=>{var i;return(i=t.destroy)==null?void 0:i.call(t)},notify:n}}function Gc(t,e){return e||(e={}),{...e,key:ws(),[il]:t}}function k0(t){var e;const l=typeof document<"u"?window:void 0,n=l.history.pushState,a=l.history.replaceState;let u=[];const i=()=>u,c=D=>u=D,s=D=>D,o=()=>Da("".concat(l.location.pathname).concat(l.location.search).concat(l.location.hash),l.history.state);(e=l.history.state)!=null&&e.key||l.history.replaceState({[il]:0,key:ws()},"");let d=o(),f,r=!1,v=!1,g=!1,S=!1;const M=()=>d;let m,h;const y=()=>{m&&(R._ignoreSubscribers=!0,(m.isPush?l.history.pushState:l.history.replaceState)(m.state,"",m.href),R._ignoreSubscribers=!1,m=void 0,h=void 0,f=void 0)},p=(D,x,L)=>{const N=s(x);h||(f=d),d=Da(x,L),m={href:N,state:L,isPush:(m==null?void 0:m.isPush)||D==="push"},h||(h=Promise.resolve().then(()=>y()))},b=D=>{d=o(),R.notify({type:D})},A=async()=>{if(v){v=!1;return}const D=o(),x=D.state[il]-d.state[il],L=x===1,N=x===-1,H=!L&&!N||r;r=!1;const st=H?"GO":N?"BACK":"FORWARD",ot=H?{type:"GO",index:x}:{type:N?"BACK":"FORWARD"};if(g)g=!1;else{const O=i();if(typeof document<"u"&&O.length){for(const z of O)if(await z.blockerFn({currentLocation:d,nextLocation:D,action:st})){v=!0,l.history.go(1),R.notify(ot);return}}}d=o(),R.notify(ot)},E=D=>{var N;if(S){S=!1;return}let x=!1;const L=i();if(typeof document<"u"&&L.length)for(const H of L){const st=(N=H.enableBeforeUnload)!=null?N:!0;if(st===!0){x=!0;break}if(typeof st=="function"&&st()===!0){x=!0;break}}if(x)return D.preventDefault(),D.returnValue=""},R=Sr({getLocation:M,getLength:()=>l.history.length,pushState:(D,x)=>p("push",D,x),replaceState:(D,x)=>p("replace",D,x),back:D=>(D&&(g=!0),S=!0,l.history.back()),forward:D=>{D&&(g=!0),S=!0,l.history.forward()},go:D=>{r=!0,l.history.go(D)},createHref:D=>s(D),flush:y,destroy:()=>{l.history.pushState=n,l.history.replaceState=a,l.removeEventListener(Ko,E,{capture:!0}),l.removeEventListener(Zo,A)},onBlocked:()=>{f&&d!==f&&(d=f)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return l.addEventListener(Ko,E,{capture:!0}),l.addEventListener(Zo,A),l.history.pushState=function(...D){const x=n.apply(l.history,D);return R._ignoreSubscribers||b("PUSH"),x},l.history.replaceState=function(...D){const x=a.apply(l.history,D);return R._ignoreSubscribers||b("REPLACE"),x},R}function br(t={initialEntries:["/"]}){const e=t.initialEntries;let l=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1;const n=e.map((u,i)=>Gc(i,void 0));return Sr({getLocation:()=>Da(e[l],n[l]),getLength:()=>e.length,pushState:(u,i)=>{l{n[l]=i,e[l]=u},back:()=>{l=Math.max(l-1,0)},forward:()=>{l=Math.min(l+1,e.length-1)},go:u=>{l=Math.min(Math.max(l+u,0),e.length-1)},createHref:u=>u})}function Da(t,e){const l=t.indexOf("#"),n=t.indexOf("?");return{href:t,pathname:t.substring(0,l>0?n>0?Math.min(l,n):l:n>0?n:t.length),hash:l>-1?t.substring(l):"",search:n>-1?t.slice(n,l===-1?void 0:l):"",state:e||{[il]:0,key:ws()}}}function ws(){return(Math.random()+1).toString(36).substring(7)}var _r={exports:{}},w={};/** - * @license React - * react.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var qs=Symbol.for("react.transitional.element"),F0=Symbol.for("react.portal"),W0=Symbol.for("react.fragment"),P0=Symbol.for("react.strict_mode"),I0=Symbol.for("react.profiler"),tv=Symbol.for("react.consumer"),ev=Symbol.for("react.context"),lv=Symbol.for("react.forward_ref"),nv=Symbol.for("react.suspense"),av=Symbol.for("react.memo"),Er=Symbol.for("react.lazy"),Jo=Symbol.iterator;function uv(t){return t===null||typeof t!="object"?null:(t=Jo&&t[Jo]||t["@@iterator"],typeof t=="function"?t:null)}var Mr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Tr=Object.assign,Or={};function qn(t,e,l){this.props=t,this.context=e,this.refs=Or,this.updater=l||Mr}qn.prototype.isReactComponent={};qn.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};qn.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Rr(){}Rr.prototype=qn.prototype;function Gs(t,e,l){this.props=t,this.context=e,this.refs=Or,this.updater=l||Mr}var Ys=Gs.prototype=new Rr;Ys.constructor=Gs;Tr(Ys,qn.prototype);Ys.isPureReactComponent=!0;var $o=Array.isArray,it={H:null,A:null,T:null,S:null},Ar=Object.prototype.hasOwnProperty;function Xs(t,e,l,n,a,u){return l=u.ref,{$$typeof:qs,type:t,key:e,ref:l!==void 0?l:null,props:u}}function iv(t,e){return Xs(t.type,e,void 0,void 0,void 0,t.props)}function Vs(t){return typeof t=="object"&&t!==null&&t.$$typeof===qs}function cv(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(l){return e[l]})}var ko=/\/+/g;function $i(t,e){return typeof t=="object"&&t!==null&&t.key!=null?cv(""+t.key):e.toString(36)}function Fo(){}function sv(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Fo,Fo):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function Il(t,e,l,n,a){var u=typeof t;(u==="undefined"||u==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(u){case"bigint":case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case qs:case F0:i=!0;break;case Er:return i=t._init,Il(i(t._payload),e,l,n,a)}}if(i)return a=a(t),i=n===""?"."+$i(t,0):n,$o(a)?(l="",i!=null&&(l=i.replace(ko,"$&/")+"/"),Il(a,e,l,"",function(o){return o})):a!=null&&(Vs(a)&&(a=iv(a,l+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace(ko,"$&/")+"/")+i)),e.push(a)),1;i=0;var c=n===""?".":n+":";if($o(t))for(var s=0;sn?V.createElement(e,{error:n,reset:a}):t.children})}class dv extends V.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,l){l.error&&l.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,l){this.props.onCatch&&this.props.onCatch(e,l)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Ri({error:t}){const[e,l]=V.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>l(n=>!n),children:e?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),e?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?T.jsx("code",{children:t.message}):null})}):null]})}var Dr={exports:{}},zr={},xr={exports:{}},Cr={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Dn=V;function hv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var vv=typeof Object.is=="function"?Object.is:hv,mv=Dn.useState,yv=Dn.useEffect,gv=Dn.useLayoutEffect,pv=Dn.useDebugValue;function Sv(t,e){var l=e(),n=mv({inst:{value:l,getSnapshot:e}}),a=n[0].inst,u=n[1];return gv(function(){a.value=l,a.getSnapshot=e,ki(a)&&u({inst:a})},[t,l,e]),yv(function(){return ki(a)&&u({inst:a}),t(function(){ki(a)&&u({inst:a})})},[t]),pv(l),l}function ki(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!vv(t,l)}catch(n){return!0}}function bv(t,e){return e()}var _v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?bv:Sv;Cr.useSyncExternalStore=Dn.useSyncExternalStore!==void 0?Dn.useSyncExternalStore:_v;xr.exports=Cr;var Ev=xr.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Ai=V,Mv=Ev;function Tv(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Ov=typeof Object.is=="function"?Object.is:Tv,Rv=Mv.useSyncExternalStore,Av=Ai.useRef,Dv=Ai.useEffect,zv=Ai.useMemo,xv=Ai.useDebugValue;zr.useSyncExternalStoreWithSelector=function(t,e,l,n,a){var u=Av(null);if(u.current===null){var i={hasValue:!1,value:null};u.current=i}else i=u.current;u=zv(function(){function s(v){if(!o){if(o=!0,d=v,v=n(v),a!==void 0&&i.hasValue){var g=i.value;if(a(g,v))return f=g}return f=v}if(g=f,Ov(d,v))return g;var S=n(v);return a!==void 0&&a(g,S)?(d=v,g):(d=v,f=S)}var o=!1,d,f,r=l===void 0?null:l;return[function(){return s(e())},r===null?void 0:function(){return s(r())}]},[e,l,n,a]);var c=Rv(t,u[0],u[1]);return Dv(function(){i.hasValue=!0,i.value=c},[c]),xv(c),c};Dr.exports=zr;var Cv=Dr.exports;const gn=new WeakMap,Du=new WeakMap,Ku={current:[]};let Fi=!1,ra=0;const na=new Set,fu=new Map;function Nr(t){const e=Array.from(t).sort((l,n)=>l instanceof pn&&l.options.deps.includes(n)?1:n instanceof pn&&n.options.deps.includes(l)?-1:0);for(const l of e){if(Ku.current.includes(l))continue;Ku.current.push(l),l.recompute();const n=Du.get(l);if(n)for(const a of n){const u=gn.get(a);u&&Nr(u)}}}function Nv(t){t.listeners.forEach(e=>e({prevVal:t.prevState,currentVal:t.state}))}function Uv(t){t.listeners.forEach(e=>e({prevVal:t.prevState,currentVal:t.state}))}function Ur(t){var e;if(ra>0&&!fu.has(t)&&fu.set(t,t.prevState),na.add(t),!(ra>0)&&!Fi)try{for(Fi=!0;na.size>0;){const l=Array.from(na);na.clear();for(const n of l){const a=(e=fu.get(n))!=null?e:n.prevState;n.prevState=a,Nv(n)}for(const n of l){const a=gn.get(n);a&&(Ku.current.push(n),Nr(a))}for(const n of l){const a=gn.get(n);if(a)for(const u of a)Uv(u)}}}finally{Fi=!1,Ku.current=[],fu.clear()}}function Wi(t){ra++;try{t()}finally{if(ra--,ra===0){const e=Array.from(na)[0];e&&Ur(e)}}}class Yc{constructor(e,l){this.listeners=new Set,this.subscribe=n=>{var a,u;this.listeners.add(n);const i=(u=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:u.call(a,n,this);return()=>{this.listeners.delete(n),i==null||i()}},this.setState=n=>{var a,u,i;this.prevState=this.state,this.state=(a=this.options)!=null&&a.updateFn?this.options.updateFn(this.prevState)(n):n(this.prevState),(i=(u=this.options)==null?void 0:u.onUpdate)==null||i.call(u),Ur(this)},this.prevState=e,this.state=e,this.options=l}}class pn{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{var a;const l=[],n=[];for(const u of this.options.deps)l.push(u.prevState),n.push(u.state);return this.lastSeenDepValues=n,{prevDepVals:l,currDepVals:n,prevVal:(a=this.prevState)!=null?a:void 0}},this.recompute=()=>{var l,n;this.prevState=this.state;const{prevDepVals:a,currDepVals:u,prevVal:i}=this.getDepVals();this.state=this.options.fn({prevDepVals:a,currDepVals:u,prevVal:i}),(n=(l=this.options).onUpdate)==null||n.call(l)},this.checkIfRecalculationNeededDeeply=()=>{for(const u of this.options.deps)u instanceof pn&&u.checkIfRecalculationNeededDeeply();let l=!1;const n=this.lastSeenDepValues,{currDepVals:a}=this.getDepVals();for(let u=0;u(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const l of this._subscriptions)l()}),this.subscribe=l=>{var n,a;this.listeners.add(l);const u=(a=(n=this.options).onSubscribe)==null?void 0:a.call(n,l,this);return()=>{this.listeners.delete(l),u==null||u()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const l of e)if(l instanceof pn)l.registerOnGraph(),this.registerOnGraph(l.options.deps);else if(l instanceof Yc){let n=gn.get(l);n||(n=new Set,gn.set(l,n)),n.add(this);let a=Du.get(this);a||(a=new Set,Du.set(this,a)),a.add(l)}}unregisterFromGraph(e=this.options.deps){for(const l of e)if(l instanceof pn)this.unregisterFromGraph(l.options.deps);else if(l instanceof Yc){const n=gn.get(l);n&&n.delete(this);const a=Du.get(this);a&&a.delete(l)}}}function Lv(t,e=l=>l){return Cv.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,e,Hv)}function Hv(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,a]of t)if(!e.has(n)||!Object.is(a,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}const l=Object.keys(t);if(l.length!==Object.keys(e).length)return!1;for(let n=0;n"u"?Pi:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Pi,Pi)}function Ke(t){var l;const e=V.useContext(Lr());return(l=t==null?void 0:t.warn)==null,e}function Xt(t){const e=Ke({warn:(t==null?void 0:t.router)===void 0}),l=(t==null?void 0:t.router)||e,n=V.useRef(void 0);return Lv(l.__store,a=>{var u;if(t!=null&&t.select){if((u=t.structuralSharing)!=null?u:l.options.defaultStructuralSharing){const i=Wt(n.current,t.select(a));return n.current=i,i}return t.select(a)}return a})}const Di=V.createContext(void 0),Bv=V.createContext(void 0);function zn(t){const e=V.useContext(t.from?Bv:Di);return Xt({select:n=>{var u;const a=n.matches.find(i=>t.from?t.from===i.routeId:i.id===e);if(ve(!(((u=t.shouldThrow)==null||u)&&!a),"Could not find ".concat(t.from?'an active match from "'.concat(t.from,'"'):"a nearest match!")),a!==void 0)return t.select?t.select(a):a},structuralSharing:t.structuralSharing})}function jv(t){return zn({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function wv(t){const{select:e,...l}=t;return zn({...l,select:n=>e?e(n.loaderDeps):n.loaderDeps})}function qv(t){return zn({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.params):e.params})}function Gv(t){return zn({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function Pt(t){return!!(t!=null&&t.isNotFound)}function Yv(t){const e=Xt({select:l=>"not-found-".concat(l.location.pathname,"-").concat(l.status)});return T.jsx(Qs,{getResetKey:()=>e,onCatch:(l,n)=>{var a;if(Pt(l))(a=t.onCatch)==null||a.call(t,l,n);else throw l},errorComponent:({error:l})=>{var n;if(Pt(l))return(n=t.fallback)==null?void 0:n.call(t,l);throw l},children:t.children})}function Xv(){return T.jsx("p",{children:"Not Found"})}function Vv(t){const{navigate:e}=Ke();return V.useCallback(l=>e({...l}),[e])}let Hr=class{constructor(e){this.init=l=>{var f,r;var n,a;this.originalIndex=l.originalIndex;const u=this.options,i=!(u!=null&&u.path)&&!(u!=null&&u.id);this.parentRoute=(a=(n=this.options).getParentRoute)==null?void 0:a.call(n),i?this._path=Ht:ve(this.parentRoute);let c=i?Ht:u.path;c&&c!=="/"&&(c=js(c));const s=(u==null?void 0:u.id)||c;let o=i?Ht:Ge([this.parentRoute.id===Ht?"":this.parentRoute.id,s]);c===Ht&&(c="/"),o!==Ht&&(o=Ge(["/",o]));const d=o===Ht?"/":Ge([this.parentRoute.fullPath,c]);this._path=c,this._id=o,this._fullPath=d,this._to=d,this._ssr=(r=(f=u==null?void 0:u.ssr)!=null?f:l.defaultSsr)!=null?r:!0},this.updateLoader=l=>(Object.assign(this.options,l),this),this.update=l=>(Object.assign(this.options,l),this),this.lazy=l=>(this.lazyFn=l,this),this.useMatch=l=>zn({select:l==null?void 0:l.select,from:this.id,structuralSharing:l==null?void 0:l.structuralSharing}),this.useRouteContext=l=>zn({...l,from:this.id,select:n=>l!=null&&l.select?l.select(n.context):n.context}),this.useSearch=l=>Gv({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useParams=l=>qv({select:l==null?void 0:l.select,structuralSharing:l==null?void 0:l.structuralSharing,from:this.id}),this.useLoaderDeps=l=>wv({...l,from:this.id}),this.useLoaderData=l=>jv({...l,from:this.id}),this.useNavigate=()=>Vv({from:this.id}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),ve(!(e!=null&&e.id&&(e!=null&&e.path))),this.$$typeof=Symbol.for("react.memo")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}addChildren(e){return this._addFileChildren(e)}_addFileChildren(e){return Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(this.children=Object.values(e)),this}};function Qv(t){return new Hr(t)}class Zv extends Hr{constructor(e){super(e)}addChildren(e){return super.addChildren(e),this}_addFileChildren(e){return super._addFileChildren(e),this}_addFileTypes(){return this}}function Kv(t){return new Zv(t)}function Jv(t){return new $v(t,{silent:!0}).createRoute}class $v{constructor(e,l){this.path=e,this.createRoute=n=>{this.silent;const a=Qv(n);return a.isRoot=!1,a},this.silent=l==null?void 0:l.silent}}function El(t){return!!(t!=null&&t.isRedirect)}function Ii(t){return!!(t!=null&&t.isRedirect)&&t.href}function zu(t){return T.jsx(T.Fragment,{children:t.children})}function Br(t,e,l){return e.options.notFoundComponent?T.jsx(e.options.notFoundComponent,{data:l}):t.options.defaultNotFoundComponent?T.jsx(t.options.defaultNotFoundComponent,{data:l}):T.jsx(Xv,{})}const jr={},kv=jr.hasOwnProperty,wr=(t,e)=>{for(const l in t)kv.call(t,l)&&e(l,t[l])},Fv=(t,e)=>(e&&wr(e,(l,n)=>{t[l]=n}),t),Wv=(t,e)=>{const l=t.length;let n=-1;for(;++n"\\u"+("0000"+t).slice(-4),Jn=(t,e)=>{let l=t.toString(16);return e?l:l.toUpperCase()},Qa=jr.toString,Pv=Array.isArray,Iv=t=>typeof Buffer=="function"&&Buffer.isBuffer(t),tm=t=>Qa.call(t)=="[object Object]",em=t=>typeof t=="string"||Qa.call(t)=="[object String]",lm=t=>typeof t=="number"||Qa.call(t)=="[object Number]",tc=t=>typeof t=="bigint",nm=t=>typeof t=="function",am=t=>Qa.call(t)=="[object Map]",um=t=>Qa.call(t)=="[object Set]",im={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},cm=/[\\\b\f\n\r\t]/,sm=/[0-9]/,om=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,fm=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,rm=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,Ml=(t,e)=>{const l=()=>{o=s,++e.indentLevel,s=e.indent.repeat(e.indentLevel)},n={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},a=e&&e.json;a&&(n.quotes="double",n.wrap=!0),e=Fv(n,e),e.quotes!="single"&&e.quotes!="double"&&e.quotes!="backtick"&&(e.quotes="single");const u=e.quotes=="double"?'"':e.quotes=="backtick"?"`":"'",i=e.compact,c=e.lowercaseHex;let s=e.indent.repeat(e.indentLevel),o="";const d=e.__inline1__,f=e.__inline2__,r=i?"":"\n";let v,g=!0;const S=e.numbers=="binary",M=e.numbers=="octal",m=e.numbers=="decimal",h=e.numbers=="hexadecimal";if(a&&t&&nm(t.toJSON)&&(t=t.toJSON()),!em(t)){if(am(t))return t.size==0?"new Map()":(i||(e.__inline1__=!0,e.__inline2__=!1),"new Map("+Ml(Array.from(t),e)+")");if(um(t))return t.size==0?"new Set()":"new Set("+Ml(Array.from(t),e)+")";if(Iv(t))return t.length==0?"Buffer.from([])":"Buffer.from("+Ml(Array.from(t),e)+")";if(Pv(t))return v=[],e.wrap=!0,d&&(e.__inline1__=!1,e.__inline2__=!0),f||l(),Wv(t,p=>{g=!1,f&&(e.__inline2__=!1),v.push((i||f?"":s)+Ml(p,e))}),g?"[]":f?"["+v.join(", ")+"]":"["+r+v.join(","+r)+r+(i?"":o)+"]";if(lm(t)||tc(t)){if(a)return JSON.stringify(Number(t));let p;if(m)p=String(t);else if(h){let b=t.toString(16);c||(b=b.toUpperCase()),p="0x"+b}else S?p="0b"+t.toString(2):M&&(p="0o"+t.toString(8));return tc(t)?p+"n":p}else return tc(t)?a?JSON.stringify(Number(t)):t+"n":tm(t)?(v=[],e.wrap=!0,l(),wr(t,(p,b)=>{g=!1,v.push((i?"":s)+Ml(p,e)+":"+(i?"":" ")+Ml(b,e))}),g?"{}":"{"+r+v.join(","+r)+r+(i?"":o)+"}"):a?JSON.stringify(t)||"null":String(t)}const y=e.escapeEverything?fm:rm;return v=t.replace(y,(p,b,A,E,R,D)=>{if(b){if(e.minimal)return b;const L=b.charCodeAt(0),N=b.charCodeAt(1);if(e.es6){const H=(L-55296)*1024+N-56320+65536;return"\\u{"+Jn(H,c)+"}"}return ru(Jn(L,c))+ru(Jn(N,c))}if(A)return ru(Jn(A.charCodeAt(0),c));if(p=="\0"&&!a&&!sm.test(D.charAt(R+1)))return"\\0";if(E)return E==u||e.escapeEverything?"\\"+E:E;if(cm.test(p))return im[p];if(e.minimal&&!om.test(p))return p;const x=Jn(p.charCodeAt(0),c);return a||x.length>2?ru(x):"\\x"+("00"+x).slice(-2)}),u=="`"&&(v=v.replace(/\$\{/g,"\\${")),e.isScriptContext&&(v=v.replace(/<\/(script|style)/gi,"<\\/$1").replace(/