trip-calculator/arrow.min.mjs

3 lines
6.3 KiB
JavaScript
Raw Normal View History

2024-09-03 12:20:28 +00:00
/* esm.sh - esbuild bundle(@arrow-js/core@1.0.0-alpha.10) es2022 production */
var E=new Set,P=new Set;function oe(e){if(!E.size)return e&&e(),Promise.resolve();let o,t=new Promise(n=>{o=n});return P.add(()=>{e&&e(),o()}),t}function R(e){return typeof e=="function"&&!!e.isT}function k(e){return typeof e=="object"&&e!==null&&"$on"in e&&typeof e.$on=="function"}function W(e){return"$on"in e}function H(e){return(o,t)=>{function n(){let l=Array.from(E);E.clear();let f=Array.from(P);P.clear(),l.forEach(r=>r(o,t)),f.forEach(r=>r()),E.size&&queueMicrotask(n)}E.size||queueMicrotask(n),E.add(e)}}var N={};function Q(e,o){let t=performance.now(),n=typeof o=="function";e=n?`${e} (ms)`:`${e} (calls)`;let l=n?o():o,f=n?performance.now()-t:o;return N[e]?N[e].push(f):N[e]=[f],l}var w=new Map;function A(e,o={}){if(k(e)||typeof e!="object")return e;let t=o.o||new Map,n=o.op||new Map,l=Array.isArray(e),f=[],r=l?[]:Object.create(e,{});for(let c in e){let s=e[c];typeof s=="object"&&s!==null?(r[c]=k(s)?s:A(s),f.push(c)):r[c]=s}let i=c=>(s,m)=>{let u=t.get(s),g=n.get(m);u||(u=new Set,t.set(s,u)),g||(g=new Set,n.set(m,g)),u[c](m),g[c](s)},d=i("add"),h=i("delete"),y=(c,s,m)=>{t.has(c)&&t.get(c).forEach(u=>u(s,m))},p={$on:d,$off:h,_em:y,_st:()=>({o:t,op:n,r,p:a._p}),_p:void 0},a=new Proxy(r,{has(c,s){return s in p||s in c},get(...c){let[,s]=c;if(Reflect.has(p,s))return Reflect.get(p,s);let m=Reflect.get(...c);return B(a,s),l&&s in Array.prototype?G(s,r,a,m):m},set(...c){let[s,m,u]=c,g=Reflect.get(s,m);if(Reflect.has(p,m))return Reflect.set(p,m,u);if(u&&k(g)){let b=g,C=b._st(),S=k(u)?J(u,b):A(u,C);return Reflect.set(s,m,S),y(m,S),C.o.forEach((ne,$)=>{let V=Reflect.get(g,$),D=Reflect.get(S,$);V!==D&&b._em($,D,V)}),!0}let v=Reflect.set(...c);return v&&(g!==u&&y(m,u,g),a._p&&a._p[1]._em(...a._p)),v}});return o.p&&(a._p=o.p),f.map(c=>{a[c]._p=[c,a]}),a}function B(e,o){w.forEach(t=>{let n=t.get(e);n||(n=new Set,t.set(e,n)),n.add(o)})}function G(e,o,t,n){let l=(...f)=>{let r=Array.prototype[e].call(o,...f);if(o.forEach((i,d)=>t._em(String(d),i)),t._p){let[i,d]=t._p;d._em(i,t)}return r};switch(e){case"shift":case"pop":case"sort":case"reverse":case"copyWithin":return l;case"unshift":case"push":case"fill":return(...f)=>l(...f.map(r=>A(r)));case"splice":return function(f,r,...i){return arguments.length===1?l(f):l(f,r,...i.map(d=>A(d)))};default:return n}}function J(e,o){let t=o._st();return t.o&&t.o.forEach((n,l)=>{n.forEach(f=>{e.$on(l,f)})}),t.p&&(e._p=t.p),e}function T(e,o){let t=Symbol();w.has(t)||w.set(t,new Map);let n=new Map,l=H(f);function f(){w.set(t,new Map);let r=e(),i=w.get(t);return w.delete(t),n.forEach((d,h)=>{let y=i.get(h);y&&y.forEach(_=>d.delete(_)),d.forEach(_=>h.$off(_,l))}),i.forEach((d,h)=>{d.forEach(y=>h.$on(y,l))}),n=i,o?o(r):r}return W(e)&&e.$on(f),f()}var M=new WeakMap,L={},O="\u27B3\u274D",z="\u274D\u21DA",F=`<!--${O}-->`,K=`<!--${z}-->`;function j(e,...o){let t=[],n="",l=(i,d)=>{if(typeof i=="function"){let h=()=>{};return t.push(Object.assign((...y)=>i(...y),{e:i,$on:y=>{h=y},_up:y=>{i=y,h()}})),d+F}return Array.isArray(i)?i.reduce((h,y)=>l(y,h),d):d+i},f=()=>(n||(!o.length&&e.length===1&&e[0]===""?n="<!---->":n=e.reduce(function(d,h,y){return d+=h,o[y]!==void 0?l(o[y],d):d},"")),n),r=i=>{let d=I(f()),h=x(d,{i:0,e:t});return i?h(i):h()};return r.isT=!0,r._k=0,r._h=()=>[f(),t,r._k],r.key=i=>(r._k=i,r),r}function x(e,o){let t,n=0,l=e.childNodes;for(;t=l.item(n++);){if(t.nodeType===8&&t.nodeValue===O){Z(t,o);continue}t instanceof Element&&U(t,o),t.hasChildNodes()&&x(t,o),t instanceof HTMLOptionElement&&(t.selected=t.defaultSelected)}return f=>f?(f.appendChild(e),f):e}function U(e,o){var t;let n=[],l=0,f;for(;f=e.attributes[l++];){if(o.i>=o.e.length)return;if(f.value!==F)continue;let r=f.name,i=o.e[o.i++];if(r.charAt(0)==="@"){let d=r.substring(1);e.addEventListener(d,i),M.has(e)||M.set(e,new Map),(t=M.get(e))===null||t===void 0||t.set(d,i),n.push(r)}else{let d=r==="value"&&"value"in e||r==="checked"||r.startsWith(".")&&(r=r.substring(1));T(i,h=>{d&&(e[r]=h,e.getAttribute(r)!=h&&(h=!1)),h!==!1?e.setAttribute(r,h):(e.removeAttribute(r),l--)})}}n.forEach(r=>e.removeAttribute(r))}function X(e){e.forEach(Y)}func
//# sourceMappingURL=core.mjs.map