kuru-kuru/static/partytown-atomics.js

3 lines
31 KiB
JavaScript
Raw Normal View History

/* Partytown 0.8.1 - MIT builder.io */
(e=>{const t=()=>{},r=e=>e.length,n=e=>{var t,r,n;try{const r=null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name;if(r)return r}catch(e){}try{const t=null===(n=null===(r=null==e?void 0:e.__zone_symbol__originalInstance)||void 0===r?void 0:r.constructor)||void 0===n?void 0:n.name;if(t)return t}catch(e){}return""},i=(e,t)=>e.startsWith(t),s=e=>!(i(e,"webkit")||i(e,"toJSON")||i(e,"constructor")||i(e,"toString")||i(e,"_")),o=e=>11===e.nodeType&&e.host?"#s":e.nodeName,a=()=>Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(36),l={Anchor:"a",DList:"dl",Image:"img",OList:"ol",Paragraph:"p",Quote:"q",TableCaption:"caption",TableCell:"td",TableCol:"colgroup",TableRow:"tr",TableSection:"tbody",UList:"ul"},c={Graphics:"g",SVG:"svg"},u=Symbol(),d=Symbol(),h=new Map,p=new Map,m={},g=new WeakMap,f=(e,t)=>{if(e)return(t=g.get(e))||(t=e[u])||v(e,t=a()),t},y=(e,t,r,n,i)=>{if((r=m[e])&&r.U){if(e===t)return r.U;if(n=r.U.document,"d"===(i=t.split(".").pop()))return n;if("e"===i)return n.documentElement;if("h"===i)return n.head;if("b"===i)return n.body}return h.get(t)},v=(e,t,r)=>{e&&(h.set(t,e),e[u]=t,e[d]=r=Date.now(),r>w+5e3&&(h.forEach(((e,t)=>{e[d]<w&&e.nodeType&&!e.isConnected&&h.delete(t)})),w=r))};let w=0;const $=e.parent,S=document.implementation.createHTMLDocument(),b=$.partytown||{},E=(b.lib||"/~partytown/")+"",T=(e,t,r)=>{const n=((e,t)=>{return r=e,n={value:t},Object.defineProperty(r,"name",{...n,configurable:!0});var r,n})(class extends m[e].U.HTMLElement{},r[0]);return"connectedCallback,disconnectedCallback,attributeChangedCallback,adoptedCallback".split(",").map((r=>n.prototype[r]=function(...n){t.postMessage([15,e,f(this),r,n])})),n.observedAttributes=r[1],n},I=(e,t,r,s,a,l)=>void 0!==t&&(s=typeof t)?"string"===s||"number"===s||"boolean"===s||null==t?[0,t]:"function"===s?[6]:(r=r||new Set)&&Array.isArray(t)?r.has(t)?[1,[]]:r.add(t)&&[1,t.map((t=>I(e,t,r)))]:"object"===s?N(t)?[14,{name:t.name,message:t.message,stack:t.stack}]:""===(a=n(t))?[2,{}]:"Window"===a?[3,[e,e]]:"HTMLCollection"===a||"NodeList"===a?[7,Array.from(t).map((t=>I(e,t,r)[1]))]:a.endsWith("Event")?[5,M(e,t,r)]:"CSSRuleList"===a?[12,Array.from(t).map(x)]:i(a,"CSS")&&a.endsWith("Rule")?[11,x(t)]:"CSSStyleDeclaration"===a?[13,M(e,t,r)]:"Attr"===a?[10,[t.name,t.value]]:t.nodeType?[3,[e,f(t),o(t),l]]:[2,M(e,t,r,!0,!0)]:void 0:t,M=(e,t,r,i,o,a,l,c)=>{if(a={},!r.has(t))for(l in r.add(t),t)s(l)&&(c="path"===l&&n(t).endsWith("Event")?t.composedPath():t[l],(i||"function"!=typeof c)&&(o||""!==c)&&(a[l]=I(e,c,r)));return a},x=e=>{let t,r={};for(t in e)W.includes(t)&&(r[t]=String(e[t]));return r},N=t=>t instanceof e.top.Error,L=(t,r,n,i)=>r?(n=r[0],i=r[1],0===n?i:4===n?C(t,i):1===n?i.map((e=>L(t,e))):3===n?y(i[0],i[1]):5===n?R(A(t,i)):2===n?A(t,i):8===n?i:9===n?new e[r[2]](i):void 0):void 0,C=(e,{V:t,w:r,L:n},i)=>((i=p.get(n))||(i=function(...i){e.postMessage([9,{V:t,w:r,L:n,R:I(t,this),b:I(t,i)}])},p.set(n,i)),i),R=e=>new("detail"in e?CustomEvent:Event)(e.type,e),A=(e,t,r,n)=>{for(n in r={},t)r[n]=L(e,t[n]);return r},W="cssText,selectorText,href,media,namespaceURI,prefix,name,conditionText".split(","),U=async(e,t)=>{let n,i,s,o,a,l,c={F:t.F},u=r(t.Q),d=0;for(;d<u;d++)try{l=d===u-1,n=t.Q[d],i=n.V,s=n.a,!m[i]&&i.startsWith("f_")&&await new Promise((e=>{let t=0,r=()=>{m[i]||t++>1e3?e():requestAnimationFrame(r)};r()})),1===s[0]&&s[1]in m[i].U?v(new m[i].U[s[1]](...L(e,s[2])),n.w):(o=y(i,n.w),o?(a=P(e,i,o,s,l,n.r),n.d&&("string"==typeof n.d?v(a,n.d):m[n.d.V]={V:n.d.V,U:{document:a}}),"object"==typeof(h=a)&&h&&h.then&&(a=await a,l&&(c.z=!0)),l&&(c.M=I(i,a,void 0,void 0,void 0,n.w))):c.p=n.w+" not found")}catch(e){l?c.p=String(e.stack||e):console.error(e)}var h;return c},P=(e,t,i,s,o,a)=>{let l,c,u,d,h,p=0,m=r(s);for(;p<m;p++){c=s[p],l=s[p+1],u=s[p-1];try{if(!Array.isArray(l))if("string"==typeof c||"number"==typeof c){if(p+1===m&&a)return h={},a.map((e=>h[e]=i[e])),h;i=i[c]}else{if(0===l)return void(i[u]=L(e,c));if("function"==typeof i[u]&&(d=L(e,c),"define"===u&&"CustomElementRegistry"===n(i)&&(d[1]=T(t,e,d[1])),"insertRule"===u&&d[1]>r(i.cssRules)&&(d[