@skaldapp/runtime 3.0.6 → 3.0.8

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.
@@ -1 +0,0 @@
1
- const P=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,N=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,O=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function q(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){j(e);return}return t}function j(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function L(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!O.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(P.test(e)||N.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,q)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}const I=/#/g,$=/&/g,F=/\//g,U=/=/g,w=/\+/g,Q=/%5e/gi,D=/%60/gi,J=/%7c/gi,H=/%20/gi;function B(e){return encodeURI(""+e).replace(J,"|")}function b(e){return B(typeof e=="string"?e:JSON.stringify(e)).replace(w,"%2B").replace(H,"+").replace(I,"%23").replace($,"%26").replace(D,"`").replace(Q,"^").replace(F,"%2F")}function E(e){return b(e).replace(U,"%3D")}function T(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function M(e){return T(e.replace(w," "))}function G(e){return T(e.replace(w," "))}function K(e=""){const t=Object.create(null);e[0]==="?"&&(e=e.slice(1));for(const r of e.split("&")){const n=r.match(/([^=]+)=?(.*)/)||[];if(n.length<2)continue;const i=M(n[1]);if(i==="__proto__"||i==="constructor")continue;const a=G(n[2]||"");t[i]===void 0?t[i]=a:Array.isArray(t[i])?t[i].push(a):t[i]=[t[i],a]}return t}function V(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(r=>`${E(e)}=${b(r)}`).join("&"):`${E(e)}=${b(t)}`:E(e)}function W(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>V(t,e[t])).filter(Boolean).join("&")}const k=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,z=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,X=/^([/\\]\s*){2,}[^/\\]/,Y=/^\.?\//;function _(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?k.test(e):z.test(e)||(t.acceptRelative?X.test(e):!1)}function Z(e="",t){return e.endsWith("/")}function x(e="",t){return(Z(e)?e.slice(0,-1):e)||"/"}function v(e="",t){return e.endsWith("/")?e:e+"/"}function ee(e,t){if(oe(t)||_(e))return e;const r=x(t);if(e.startsWith(r)){const n=e[r.length];if(!n||n==="/"||n==="?")return e}return se(r,e)}function te(e,t){const r=ne(e),n={...K(r.search),...t};return r.search=W(n),ie(r)}function oe(e){return!e||e==="/"}function re(e){return e&&e!=="/"}function se(e,...t){let r=e||"";for(const n of t.filter(i=>re(i)))if(r){const i=n.replace(Y,"");r=v(r)+i}else r=n;return r}const S=Symbol.for("ufo:protocolRelative");function ne(e="",t){const r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){const[,h,l=""]=r;return{protocol:h.toLowerCase(),pathname:l,href:h+l,auth:"",host:"",search:"",hash:""}}if(!_(e,{acceptRelative:!0}))return g(e);const[,n="",i,a=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,p="",s=""]=a.match(/([^#/?]*)(.*)?/)||[];n==="file:"&&(s=s.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:c,search:u,hash:o}=g(s);return{protocol:n.toLowerCase(),auth:i?i.slice(0,Math.max(0,i.length-1)):"",host:p,pathname:c,search:u,hash:o,[S]:!n}}function g(e=""){const[t="",r="",n=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:n}}function ie(e){const t=e.pathname||"",r=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",n=e.hash||"",i=e.auth?e.auth+"@":"",a=e.host||"";return(e.protocol||e[S]?(e.protocol||"")+"//":"")+i+a+t+r+n}class ae extends Error{constructor(t,r){super(t,r),this.name="FetchError",r?.cause&&!this.cause&&(this.cause=r.cause)}}function ce(e){const t=e.error?.message||e.error?.toString()||"",r=e.request?.method||e.options?.method||"GET",n=e.request?.url||String(e.request)||"/",i=`[${r}] ${JSON.stringify(n)}`,a=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",p=`${i}: ${a}${t?` ${t}`:""}`,s=new ae(p,e.error?{cause:e.error}:void 0);for(const c of["request","options","response"])Object.defineProperty(s,c,{get(){return e[c]}});for(const[c,u]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(s,c,{get(){return e.response&&e.response[u]}});return s}const fe=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function R(e="GET"){return fe.has(e.toUpperCase())}function ue(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const pe=new Set(["image/svg","application/xml","application/xhtml","application/html"]),he=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function le(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return he.test(t)?"json":t==="text/event-stream"?"stream":pe.has(t)||t.startsWith("text/")?"text":"blob"}function ye(e,t,r,n){const i=de(t?.headers??e?.headers,r?.headers,n);let a;return(r?.query||r?.params||t?.params||t?.query)&&(a={...r?.params,...r?.query,...t?.params,...t?.query}),{...r,...t,query:a,params:a,headers:i}}function de(e,t,r){if(!t)return new r(e);const n=new r(t);if(e)for(const[i,a]of Symbol.iterator in e||Array.isArray(e)?e:new r(e))n.set(i,a);return n}async function d(e,t){if(t)if(Array.isArray(t))for(const r of t)await r(e);else await t(e)}const me=new Set([408,409,425,429,500,502,503,504]),Ee=new Set([101,204,205,304]);function A(e={}){const{fetch:t=globalThis.fetch,Headers:r=globalThis.Headers,AbortController:n=globalThis.AbortController}=e;async function i(s){const c=s.error&&s.error.name==="AbortError"&&!s.options.timeout||!1;if(s.options.retry!==!1&&!c){let o;typeof s.options.retry=="number"?o=s.options.retry:o=R(s.options.method)?0:1;const h=s.response&&s.response.status||500;if(o>0&&(Array.isArray(s.options.retryStatusCodes)?s.options.retryStatusCodes.includes(h):me.has(h))){const l=typeof s.options.retryDelay=="function"?s.options.retryDelay(s):s.options.retryDelay||0;return l>0&&await new Promise(f=>setTimeout(f,l)),a(s.request,{...s.options,retry:o-1})}}const u=ce(s);throw Error.captureStackTrace&&Error.captureStackTrace(u,a),u}const a=async function(c,u={}){const o={request:c,options:ye(c,u,e.defaults,r),response:void 0,error:void 0};if(o.options.method&&(o.options.method=o.options.method.toUpperCase()),o.options.onRequest&&(await d(o,o.options.onRequest),o.options.headers instanceof r||(o.options.headers=new r(o.options.headers||{}))),typeof o.request=="string"&&(o.options.baseURL&&(o.request=ee(o.request,o.options.baseURL)),o.options.query&&(o.request=te(o.request,o.options.query),delete o.options.query),"query"in o.options&&delete o.options.query,"params"in o.options&&delete o.options.params),o.options.body&&R(o.options.method))if(ue(o.options.body)){const f=o.options.headers.get("content-type");typeof o.options.body!="string"&&(o.options.body=f==="application/x-www-form-urlencoded"?new URLSearchParams(o.options.body).toString():JSON.stringify(o.options.body)),f||o.options.headers.set("content-type","application/json"),o.options.headers.has("accept")||o.options.headers.set("accept","application/json")}else("pipeTo"in o.options.body&&typeof o.options.body.pipeTo=="function"||typeof o.options.body.pipe=="function")&&("duplex"in o.options||(o.options.duplex="half"));let h;if(!o.options.signal&&o.options.timeout){const f=new n;h=setTimeout(()=>{const y=new Error("[TimeoutError]: The operation was aborted due to timeout");y.name="TimeoutError",y.code=23,f.abort(y)},o.options.timeout),o.options.signal=f.signal}try{o.response=await t(o.request,o.options)}catch(f){return o.error=f,o.options.onRequestError&&await d(o,o.options.onRequestError),await i(o)}finally{h&&clearTimeout(h)}if((o.response.body||o.response._bodyInit)&&!Ee.has(o.response.status)&&o.options.method!=="HEAD"){const f=(o.options.parseResponse?"json":o.options.responseType)||le(o.response.headers.get("content-type")||"");switch(f){case"json":{const y=await o.response.text(),C=o.options.parseResponse||L;o.response._data=C(y);break}case"stream":{o.response._data=o.response.body||o.response._bodyInit;break}default:o.response._data=await o.response[f]()}}return o.options.onResponse&&await d(o,o.options.onResponse),!o.options.ignoreResponseError&&o.response.status>=400&&o.response.status<600?(o.options.onResponseError&&await d(o,o.options.onResponseError),await i(o)):o.response},p=async function(c,u){return(await a(c,u))._data};return p.raw=a,p.native=(...s)=>t(...s),p.create=(s={},c={})=>A({...e,...c,defaults:{...e.defaults,...c.defaults,...s}}),p}const m=(function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")})(),be=m.fetch?(...e)=>m.fetch(...e):()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!")),we=m.Headers,ge=m.AbortController,Re=A({fetch:be,Headers:we,AbortController:ge}),Te=Re;export{Te as $fetch,ge as AbortController,ae as FetchError,we as Headers,A as createFetch,ce as createFetchError,be as fetch,Re as ofetch};
@@ -1 +0,0 @@
1
- @import"https://cdn.jsdelivr.net/npm/katex/dist/katex-swap.min.css";pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-tag,.hljs-punctuation{color:#444a}.hljs-tag .hljs-name,.hljs-tag .hljs-attr{color:#444}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta .hljs-keyword,.hljs-doctag,.hljs-name{font-weight:700}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#800}.hljs-title,.hljs-section{color:#800;font-weight:700}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-operator,.hljs-selector-pseudo{color:#ab5656}.hljs-literal{color:#695}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}[un-cloak]{display:none}img.emoji{height:1em;width:1em;margin:0 .05em 0 .1em;vertical-align:-.1em;display:inline-block}:root,:host{--spacing: .25rem;--text-9xl-fontSize: 8rem;--text-9xl-lineHeight: 1;--font-sans: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family: var(--font-sans);--default-monoFont-family: var(--font-mono)}*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" );font-feature-settings:var(--default-font-featureSettings, normal);font-variation-settings:var(--default-font-variationSettings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var( --default-monoFont-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );font-feature-settings:var(--default-monoFont-featureSettings, normal);font-variation-settings:var(--default-monoFont-variationSettings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.text-9xl{font-size:var(--text-9xl-fontSize);line-height:var(--un-leading, var(--text-9xl-lineHeight))}.text-center{text-align:center}.grid{display:grid}.inset-0{inset:calc(var(--spacing) * 0)}.place-items-center{place-items:center}.absolute{position:absolute}