@bitcaster/printkit 0.0.0-stage → 0.1.0

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.
Files changed (56) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +8 -2
  3. package/README.npm.md +9 -0
  4. package/THIRD_PARTY_NOTICES.md +1973 -0
  5. package/dist/assets/fonts/C400.ttf +0 -0
  6. package/dist/assets/fonts/M400.ttf +0 -0
  7. package/dist/assets/fonts/M600.ttf +0 -0
  8. package/dist/assets/fonts/M700.ttf +0 -0
  9. package/dist/assets/fonts/OFL-IBMPlexMono.txt +93 -0
  10. package/dist/assets/fonts/OFL-LibreCaslonText.txt +93 -0
  11. package/dist/assets/fonts/OFL-Manrope.txt +93 -0
  12. package/dist/assets/fonts/P400.ttf +0 -0
  13. package/dist/assets/fonts/P500.ttf +0 -0
  14. package/dist/assets/pdf.worker.min.mjs +29 -0
  15. package/dist/components/index.d.ts +42 -0
  16. package/dist/components/index.js +1 -0
  17. package/dist/components/p-6By_vSL9.js +1 -0
  18. package/dist/components/p-B85ddf5i.js +58 -0
  19. package/dist/components/p-BEuF_WyR.js +15 -0
  20. package/dist/components/p-C06-VTon.js +1 -0
  21. package/dist/components/p-C5up7ejY.js +22 -0
  22. package/dist/components/p-ChB3W-Ln.js +3 -0
  23. package/dist/components/p-DpEO5JlK.js +2 -0
  24. package/dist/components/p-DzTdZECU.js +21 -0
  25. package/dist/components/pk-editor.d.ts +11 -0
  26. package/dist/components/pk-editor.js +277 -0
  27. package/dist/components/pk-help.d.ts +11 -0
  28. package/dist/components/pk-help.js +1 -0
  29. package/dist/components/pk-template-editor.d.ts +11 -0
  30. package/dist/components/pk-template-editor.js +1 -0
  31. package/dist/types/.stencil/components/pk-editor/pk-editor.d.ts +113 -0
  32. package/dist/types/.stencil/components/pk-help/help.content.d.ts +1 -0
  33. package/dist/types/.stencil/components/pk-help/pk-help.d.ts +9 -0
  34. package/dist/types/.stencil/components/pk-template-editor/pk-template-editor.d.ts +203 -0
  35. package/dist/types/.stencil/services/background-load.d.ts +20 -0
  36. package/dist/types/.stencil/services/background.d.ts +70 -0
  37. package/dist/types/.stencil/services/card-engine.d.ts +123 -0
  38. package/dist/types/.stencil/services/card-render.d.ts +5 -0
  39. package/dist/types/.stencil/services/card.config.d.ts +48 -0
  40. package/dist/types/.stencil/services/cmyk-lut.d.ts +4 -0
  41. package/dist/types/.stencil/services/collide.d.ts +19 -0
  42. package/dist/types/.stencil/services/color.d.ts +12 -0
  43. package/dist/types/.stencil/services/design.d.ts +106 -0
  44. package/dist/types/.stencil/services/fonts.d.ts +32 -0
  45. package/dist/types/.stencil/services/layouts.d.ts +15 -0
  46. package/dist/types/.stencil/services/logo.d.ts +19 -0
  47. package/dist/types/.stencil/services/palette.d.ts +31 -0
  48. package/dist/types/.stencil/services/pdf.d.ts +26 -0
  49. package/dist/types/.stencil/services/qr.d.ts +21 -0
  50. package/dist/types/.stencil/services/spot.d.ts +49 -0
  51. package/dist/types/.stencil/services/terms.d.ts +1 -0
  52. package/dist/types/.stencil/types/card.types.d.ts +403 -0
  53. package/dist/types/.stencil/types/editor.types.d.ts +48 -0
  54. package/dist/types/components.d.ts +320 -0
  55. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  56. package/package.json +46 -4
@@ -0,0 +1 @@
1
+ function t(t,e,n){const l="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==l;){const l=Object.getOwnPropertyDescriptor(t,e);if(l&&(!n||l.get))return l;t=Object.getPrototypeOf(t)}}var e,n=(e,n)=>{var l;Object.entries(null!=(l=n.l.t)?l:{}).map((([l,[o]])=>{if(31&o||32&o){const o=e[l],s=t(Object.getPrototypeOf(e),l,!0)||Object.getOwnPropertyDescriptor(e,l);s&&Object.defineProperty(e,l,{get(){return s.get.call(this)},set(t){s.set.call(this,t)},configurable:!0,enumerable:!0}),n.o.has(l)?e[l]=n.o.get(l):void 0!==o&&(e[l]=o)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r="http://www.w3.org/1999/xlink",c="undefined"!=typeof window?window:{},f=c.HTMLElement||class{},u={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},a=(()=>{try{return!!c.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),d=!!a&&(()=>!!c.document&&Object.getOwnPropertyDescriptor(c.document.adoptedStyleSheets,"length").writable)(),h=!1,p=[],m=[],b=()=>{var t;return(null==(t=c.document)?void 0:t.hidden)?setTimeout($,16):u.raf($)},v=(t,e)=>n=>{t.push(n),h||(h=!0,e&&4&u.i?w($):b())},y=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},$=()=>{y(p),y(m),(h=p.length>0)&&b()},w=t=>Promise.resolve(undefined).then(t),g=v(m,!0),j=t=>{const e=new URL(t,u.u);return e.origin!==c.location.origin?e.href:e.pathname},O=t=>u.u=t;function S(){const t=this.attachShadow({mode:"open"});void 0===e&&(e=null),e&&(d?t.adoptedStyleSheets.push(e):t.adoptedStyleSheets=[...t.adoptedStyleSheets,e])}var k,M=new WeakMap,E=t=>"sc-"+t.h,x=t=>"object"==(t=typeof t)||"function"===t,C=(t,e,...n)=>{let l=null,o=null,i=!1,r=!1;const c=[],f=e=>{for(let n=0;n<e.length;n++)if(l=e[n],Array.isArray(l))f(l);else if(null!=l&&"boolean"!=typeof l){if(i="function"!=typeof t&&!x(l))l=String(l);else if("function"!=typeof t&&void 0===l.i){s("Invalid vNode child");continue}i&&r?c[c.length-1].p+=l:c.push(i?A(null,l):l),r=i}};if(f(n),e){e.key&&(o=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=A(t,null);return u.m=e,c.length>0&&(u.v=c),u.$=o,u},A=(t,e)=>({i:0,j:t,p:null!=e?e:null,O:null,v:null,m:null,$:null}),L={},_=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const l of e){if(n)break;for(const e of t[l])if("string"==typeof e){n=!0;break}}if(!n)return t;const l={};for(const n of e)l[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return l},D=(t,e)=>null==t||x(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t,H=(t,e)=>{const n=t;return{emit:t=>N(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},N=(t,e,n)=>{const l=u.ce(e,n);return t.dispatchEvent(l),l},P=(t,e,n,s,i,f)=>{if(n===s)return;let a=o(t,e),d=e.toLowerCase();if("class"===e){const e=t.classList,l=T(n);let o=T(s);{let t=l.filter((t=>t&&!o.includes(t)));e.remove(...t),e.add(...o.filter((t=>t&&!l.includes(t))))}}else if("style"===e){for(const e in n)s&&null!=s[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in s)n&&s[e]===n[e]||(e.includes("-")?t.style.setProperty(e,s[e]):t.style[e]=s[e])}else if("key"===e);else if("ref"===e)s&&tt(s,t);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let o;{const e=l(t);if(e&&e.l&&e.l.t){const t=e.l.t[n];t&&t[1]&&(o=t[1])}}return o||(o=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(o)||t.removeAttribute(o):t.setAttribute(o,!0===s?"":s))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=s}catch(t){}return}{const l=x(s);if((a||l&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const l=null==s?"":s;"list"===e?a=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let o=!1;d!==(d=d.replace(/^xlink\:?/,""))&&(e=d,o=!0),null==s||!1===s?(!1!==s||""===t.getAttribute(e)||4&f&&!U(e))&&(o?t.removeAttributeNS(r,e):t.removeAttribute(e)):(!a||4&f||i)&&!l&&1===t.nodeType&&(s=!0===s?"":s,o?t.setAttributeNS(r,e,s):t.setAttribute(e,s))}}else if(e="-"===e[2]?e.slice(3):o(c,d)?d.slice(2):d[2]+e.slice(3),n||s){const l=e.endsWith(V);e=e.replace(q,""),n&&u.rel(t,e,n,l),s&&u.ael(t,e,s,l)}},R=new Set(["draggable","contenteditable","spellcheck"]),U=t=>R.has(t)||t.startsWith("aria-"),W=/\s/,T=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(W):[]),V="Capture",q=new RegExp(V+"$"),z=(t,e,n)=>{const l=11===e.O.nodeType&&e.O.host?e.O.host:e.O,o=t&&t.m||{},s=e.m||{};for(const t of F(Object.keys(o)))t in s||P(l,t,o[t],void 0,n,e.i);for(const t of F(Object.keys(s)))P(l,t,o[t],s[t],n,e.i)};function F(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var I=!1,Y=[],Z=[],B=(t,e,n)=>{const l=e.v[n];let o,s,i=0;if(null!=l.p)o=l.O=c.document.createTextNode(l.p);else{if(I||(I="svg"===l.j),!c.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.O=c.document.createElementNS(I?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.j),I&&"foreignObject"===l.j&&(I=!1),z(null,l,I),l.v){const e="template"===l.j?o.content:o;for(i=0;i<l.v.length;++i)s=B(t,l,i),s&&e.appendChild(s)}"svg"===l.j?I=!1:"foreignObject"===o.tagName&&(I=!0)}return o["s-hn"]=k,o},G=(t,e,n,l,o,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===k&&(r=r.shadowRoot),"template"===n.j&&(r=r.content);o<=s;++o)l[o]&&(i=B(null,n,o),i&&(l[o].O=i,et(r,i,e)))},J=(t,e,n)=>{for(let l=e;l<=n;++l){const e=t[l];if(e){const t=e.O;X(e),t&&t.remove()}}},K=(t,e,n=!1)=>t.j===e.j&&(n?(n&&!t.$&&e.$&&(t.$=e.$),!0):t.$===e.$),Q=(t,e,n=!1)=>{const l=e.O=t.O,o=t.v,s=e.v,i=e.j,r=e.p;null==r?(z(t,e,I="svg"===i||"foreignObject"!==i&&I),null!==o&&null!==s?((t,e,n,l,o=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=e.length-1,d=e[0],h=e[a],p=l.length-1,m=l[0],b=l[p];const v="template"===n.j?t.content:t;for(;r<=a&&c<=p;)if(null==d)d=e[++r];else if(null==h)h=e[--a];else if(null==m)m=l[++c];else if(null==b)b=l[--p];else if(K(d,m,o))Q(d,m,o),d=e[++r],m=l[++c];else if(K(h,b,o))Q(h,b,o),h=e[--a],b=l[--p];else if(K(d,b,o))Q(d,b,o),et(v,d.O,h.O.nextSibling),d=e[++r],b=l[--p];else if(K(h,m,o))Q(h,m,o),et(v,h.O,d.O),h=e[--a],m=l[++c];else{for(f=-1,u=r;u<=a;++u)if(e[u]&&null!==e[u].$&&e[u].$===m.$){f=u;break}f>=0?(i=e[f],i.j!==m.j?s=B(e&&e[c],n,c):(Q(i,m,o),e[f]=void 0,s=i.O),m=l[++c]):(s=B(e&&e[c],n,c),m=l[++c]),s&&et(d.O.parentNode,s,d.O)}r>a?G(t,null==l[p+1]?null:l[p+1].O,n,l,c,p):c>p&&J(e,r,a)})(l,o,e,s,n):null!==s?(null!==t.p&&(l.textContent=""),G(l,null,e,s,0,s.length-1)):!n&&null!==o&&J(o,0,o.length-1),I&&"svg"===i&&(I=!1)):t.p!==r&&(l.data=r)},X=t=>{t.m&&t.m.ref&&Y.push((()=>t.m.ref(null))),t.v&&t.v.map(X)},tt=(t,e)=>{Z.push((()=>t(e)))},et=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),nt=(t,e,n=!1)=>{const l=t.$hostElement$,o=t.l,s=t.S||A(null,null);var i;const r=(i=e)&&i.j===L?e:C(null,null,e);if(k=l.tagName,o.k&&(r.m=r.m||{},o.k.forEach((([t,e])=>{r.m[e]=l[t]}))),n&&r.m)for(const t of Object.keys(r.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(r.m[t]=l[t]);r.j=null,r.i|=4,t.S=r,r.O=s.O=l.shadowRoot||l,Q(s,r,n),Y.forEach((t=>t())),Y.length=0,Z.forEach((t=>t())),Z.length=0},lt=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((l=>t.M=()=>{e["s-p"].splice(n-1,1),l()})))}},ot=(t,e)=>{if(t.i|=16,4&t.i)return void(t.i|=512);lt(t,t.C);const n=()=>st(t,e);if(!e)return g(n);queueMicrotask((()=>{n()}))},st=(t,e)=>{const n=t.$hostElement$,l=n;if(!l)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=dt(l,e?"componentWillLoad":"componentWillUpdate",void 0,n),o=it(o,(()=>dt(l,"componentWillRender",void 0,n))),it(o,(()=>ct(t,l,e)))},it=(t,e)=>rt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),rt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ct=async(t,e,n)=>{var l;const o=t.$hostElement$,s=o["s-rc"];n&&(t=>{const e=t.l,n=t.$hostElement$,l=e.i,o=((t,e)=>{var n,l,o;const s=E(e),r=i.get(s);if(!c.document)return s;if(t=11===t.nodeType?t:c.document,r)if("string"==typeof r){let o,i=M.get(t=t.head||t);if(i||M.set(t,i=new Set),!i.has(s)){o=c.document.createElement("style"),o.textContent=r;const f=null!=(n=u.A)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=c.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=f&&o.setAttribute("nonce",f),!(1&e.i))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(a){const e=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(r),d?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=r+e.textContent:t.prepend(o)}else t.append(o);1&e.i&&t.insertBefore(o,null),4&e.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let e=M.get(t);if(e||M.set(t,e=new Set),!e.has(s)){const n=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(r.constructor===n.CSSStyleSheet)l=r;else{l=new n.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)l.insertRule(r.cssRules[t].cssText,t)}d?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],e.add(s)}}return s})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(t);ft(t,e,o,n),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const e=null!=(l=o["s-p"])?l:[],n=()=>ut(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.i|=4,e.length=0)}},ft=(t,e,n,l)=>{try{e=e.render(),t.i&=-17,t.i|=2,nt(t,e,l)}catch(e){s(e,t.$hostElement$)}return null},ut=t=>{const e=t.$hostElement$,n=e,l=t.C;dt(n,"componentDidRender",void 0,e),64&t.i?dt(n,"componentDidUpdate",void 0,e):(t.i|=64,ht(e),dt(n,"componentDidLoad",void 0,e),t.L(e),l||at()),t.M&&(t.M(),t.M=void 0),512&t.i&&w((()=>ot(t,!1))),t.i&=-517},at=()=>{w((()=>N(c,"appload",{detail:{namespace:"printkit"}})))},dt=(t,e,n,l)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,l)}},ht=t=>t.classList.add("hydrated"),pt=(t,e,n,o)=>{const i=l(t);if(!i)return;const r=t,c=i.o.get(e),f=i.i,u=r;n=D(n,o.t[e][0]);const a=Number.isNaN(c)&&Number.isNaN(n);if(n!==c&&!a){if(i.o.set(e,n),o._){const t=o._[e];t&&t.map((t=>{try{const[[l,o]]=Object.entries(t);(128&f||1&o)&&(u?u[l](n,c,e):i.D.push((()=>{i.H[l](n,c,e)})))}catch(t){s(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(n,c,e)&&!(16&f))return;16&f||ot(i,!1)}}},mt=(e,n)=>{var o,s;const i=e.prototype;{e.watchers&&!n._&&(n._=_(e.watchers)),e.deserializers&&!n.N&&(n.N=e.deserializers),e.serializers&&!n.P&&(n.P=e.serializers);const r=Object.entries(null!=(o=n.t)?o:{});r.map((([e,[o]])=>{if(31&o||32&o){const{get:s,set:r}=t(i,e)||{};s&&(n.t[e][0]|=2048),r&&(n.t[e][0]|=4096),Object.defineProperty(i,e,{get(){return s?s.apply(this):(t=e,l(this).o.get(t));var t},configurable:!0,enumerable:!0}),Object.defineProperty(i,e,{set(t){const s=l(this);if(s){if(r)return void 0===(32&o?this[e]:s.$hostElement$[e])&&s.o.get(e)&&(t=s.o.get(e)),r.apply(this,[D(t,o)]),void pt(this,e,t=32&o?this[e]:s.$hostElement$[e],n);pt(this,e,t,n)}}})}}));{const t=new Map;i.attributeChangedCallback=function(e,o,s){u.jmp((()=>{var c;const f=t.get(e),u=l(this);if(this.hasOwnProperty(f),i.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==s)return;if(null==f){const t=null==u?void 0:u.i;if(u&&t&&!(8&t)&&s!==o){const l=this,i=null==(c=n._)?void 0:c[e];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=l[i]&&(128&t||1&r)&&l[i].call(l,s,o,e)}))}return}const a=r.find((([t])=>t===f)),d=a?a[1][0]:0,h=4&d;if(512&d&&8&d&&!x(this[f])&&(null==(p=this[f])||!1===p?null:!0===p?"":String(p))===s)return;var p;const m=h&&null===s&&void 0===this[f];h&&(s=null!==s&&"false"!==s);const b=Object.getOwnPropertyDescriptor(i,f);m||s==this[f]||b.get&&!b.set||(this[f]=s)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n._)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([e,l])=>{var o;const s=l[1]||e;return t.set(s,e),512&l[0]&&(null==(o=n.k)||o.push([e,s])),s}))]))}}return e},bt=async(t,e,n)=>{let l;try{if(!(32&e.i)&&(e.i|=32,e.i&=-1025,l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const e=E(n);if(!i.has(e)){const l=()=>{};((t,e,n)=>{let l=i.get(t);a&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,i.set(t,l)})(e,t,!!(1&n.i)),l()}}const o=e.C,s=()=>ot(e,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()}catch(n){s(n,t),e.M&&(e.M(),e.M=void 0),!e.L||1024&e.i||e.L(t)}},vt=(t,e)=>{const o={i:e[0],h:e[1]};try{o.t=e[2],o._=_(t._),o.N=t.N,o.P=t.P,o.k=[];const s=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const l={i:0,$hostElement$:t,l:e,o:new Map,R:new Map};l.U=new Promise((t=>l.L=t)),t["s-p"]=[],t["s-rc"]=[];const o=l;t.__stencil__getHostRef=()=>o,512&e.i&&n(t,l)})(this,o)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!l(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&u.i)){const e=l(t);if(!e)return;const n=e.l,o=()=>{};if(1&e.i)(null==e?void 0:e.H)||(1024&e.i?setTimeout((()=>bt(t,e,n)),1e3):(null==e?void 0:e.U)&&e.U.then((()=>{})));else{e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){lt(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),bt(t,e,n)}o()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&u.i||l(t),M.has(t)&&M.delete(t),t.shadowRoot&&M.has(t.shadowRoot)&&M.delete(t.shadowRoot)})(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${o.h}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else S.call(this,o)}}),Object.defineProperty(t,"is",{value:o.h,configurable:!0}),mt(t,o)}catch(e){return s(e),t}},yt=t=>u.A=t,$t=t=>Object.assign(u,t),wt=new WeakMap;function gt(t,e){let n=wt.get(e);n||(n={i:0,l:{i:0,h:e.tagName},$hostElement$:e},wt.set(e,n)),nt(n,t)}function jt(t){return t}export{f as H,yt as a,$t as b,L as c,H as d,j as g,C as h,vt as p,gt as r,O as s,jt as t}