@justifi/webcomponents 4.19.1-rc → 4.19.1-rc-4
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.
- package/dist/cjs/{Analytics-0b3db49d.js → Analytics-985bc298.js} +2 -3
- package/dist/cjs/{business.service-c384784d.js → business.service-6bb7ac82.js} +5 -6
- package/dist/cjs/{get-payout-csv-51a02be7.js → get-payout-csv-1391ff3e.js} +3 -4
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +7 -8
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-business-details.cjs.entry.js +3 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-card-form.cjs.entry.js +4 -5
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +11 -9
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +1 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -6
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -3
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -5
- package/dist/cjs/{package-39dc73ed.js → package-cbc08fe3.js} +2 -4
- package/dist/cjs/{payment.service-2dbfb83d.js → payment.service-dfcfa19b.js} +2 -3
- package/dist/collection/api/services/analytics.service.js +1 -2
- package/dist/collection/api/services/business.service.js +5 -6
- package/dist/collection/api/services/checkout.service.js +2 -3
- package/dist/collection/api/services/insurance.service.js +2 -3
- package/dist/collection/api/services/payment.service.js +2 -3
- package/dist/collection/api/services/payout.service.js +3 -4
- package/dist/collection/api/services/provision.service.js +2 -4
- package/dist/collection/api/services/reports.service.js +1 -2
- package/dist/collection/components/bank-account-form/bank-account-form.js +3 -4
- package/dist/collection/components/business-forms/business-form/business-form.js +2 -3
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +2 -3
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +2 -3
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -3
- package/dist/collection/components/card-form/card-form.js +3 -4
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/checkout/new-payment-method.js +6 -4
- package/dist/collection/components/checkout/payment-method-options.js +3 -4
- package/dist/collection/components/checkout/saved-payment-method.js +3 -4
- package/dist/collection/components/checkout/sezzle-payment-method.js +3 -4
- package/dist/collection/components/payment-form/payment-form.js +3 -4
- package/dist/collection/components/refund-form/refund-form.js +2 -3
- package/dist/docs.json +8 -8
- package/dist/esm/{Analytics-37556050.js → Analytics-79e20e2d.js} +2 -3
- package/dist/esm/{business.service-eee46ab1.js → business.service-f45decfc.js} +5 -6
- package/dist/esm/{get-payout-csv-4d6b29d8.js → get-payout-csv-e784a2ab.js} +3 -4
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +7 -8
- package/dist/esm/justifi-bank-account-form.entry.js +4 -5
- package/dist/esm/justifi-business-details.entry.js +3 -4
- package/dist/esm/justifi-business-form.entry.js +4 -5
- package/dist/esm/justifi-card-form.entry.js +4 -5
- package/dist/esm/justifi-checkout-core.entry.js +3 -3
- package/dist/esm/justifi-checkout.entry.js +4 -5
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
- package/dist/esm/justifi-new-payment-method_4.entry.js +11 -9
- package/dist/esm/justifi-owner-form_3.entry.js +1 -2
- package/dist/esm/justifi-payment-details.entry.js +3 -4
- package/dist/esm/justifi-payment-form.entry.js +5 -6
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +5 -6
- package/dist/esm/justifi-payments-list.entry.js +3 -4
- package/dist/esm/justifi-payout-details.entry.js +3 -4
- package/dist/esm/justifi-payouts-list.entry.js +3 -4
- package/dist/esm/justifi-refund-form.entry.js +2 -3
- package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
- package/dist/esm/{package-e2a7aa3f.js → package-cf64a48c.js} +2 -4
- package/dist/esm/{payment.service-9005a501.js → payment.service-dad5153b.js} +2 -3
- package/dist/globals.d.ts +2 -0
- package/dist/module/Analytics.js +1 -2
- package/dist/module/business-bank-account-form-step.js +2 -3
- package/dist/module/business-document-upload-form-step.js +2 -3
- package/dist/module/business-terms-conditions-form-step.js +2 -3
- package/dist/module/business.service.js +5 -6
- package/dist/module/checkout-core.js +3 -3
- package/dist/module/get-payout-csv.js +3 -4
- package/dist/module/justifi-bank-account-form.js +2 -3
- package/dist/module/justifi-business-form.js +2 -3
- package/dist/module/justifi-card-form.js +2 -3
- package/dist/module/justifi-checkout.js +2 -3
- package/dist/module/justifi-gross-payment-chart.js +1 -2
- package/dist/module/justifi-payment-form.js +3 -4
- package/dist/module/justifi-payment-provisioning.js +2 -3
- package/dist/module/justifi-refund-form.js +2 -3
- package/dist/module/justifi-season-interruption-insurance.js +2 -3
- package/dist/module/new-payment-method.js +5 -3
- package/dist/module/package.js +2 -4
- package/dist/module/payment-method-options.js +2 -3
- package/dist/module/payment.service.js +2 -3
- package/dist/module/saved-payment-method.js +2 -3
- package/dist/module/sezzle-payment-method.js +2 -3
- package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +1 -0
- package/dist/webcomponents/p-01a404ca.entry.js +44 -0
- package/dist/webcomponents/p-02c58e00.entry.js +97 -0
- package/dist/webcomponents/p-03d35880.entry.js +130 -0
- package/dist/webcomponents/p-05f46d63.entry.js +99 -0
- package/dist/webcomponents/p-06ff0429.entry.js +65 -0
- package/dist/webcomponents/p-08b0fb31.js +41 -1
- package/dist/webcomponents/p-14c91ffd.js +20 -1
- package/dist/webcomponents/p-1ad5995e.js +3599 -1
- package/dist/webcomponents/p-1ff8810b.js +29 -1
- package/dist/webcomponents/p-2338affa.js +213 -1
- package/dist/webcomponents/p-258b1ee2.entry.js +149 -0
- package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
- package/dist/webcomponents/p-29c0b182.js +114 -1
- package/dist/webcomponents/p-2b6c9c4f.js +7 -1
- package/dist/webcomponents/p-2eab3c90.js +3052 -1
- package/dist/webcomponents/p-3e9ef4a8.js +28 -0
- package/dist/webcomponents/p-3fd13ca3.js +52 -1
- package/dist/webcomponents/p-492588bf.js +79 -0
- package/dist/webcomponents/p-525db3e8.js +22 -1
- package/dist/webcomponents/p-5482d030.entry.js +21 -0
- package/dist/webcomponents/p-56f6ce4c.js +10 -1
- package/dist/webcomponents/p-576826b1.entry.js +43 -0
- package/dist/webcomponents/p-5968ff8a.js +178 -1
- package/dist/webcomponents/p-5cb3f0b2.entry.js +261 -0
- package/dist/webcomponents/p-5f835b89.entry.js +606 -0
- package/dist/webcomponents/p-6053809a.entry.js +80 -0
- package/dist/webcomponents/p-6078a370.js +244 -1
- package/dist/webcomponents/p-66e4869f.entry.js +75 -0
- package/dist/webcomponents/p-6f1c56d4.entry.js +94 -0
- package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
- package/dist/webcomponents/p-7582b554.entry.js +18 -0
- package/dist/webcomponents/p-79646550.entry.js +61 -0
- package/dist/webcomponents/p-7a70ff09.entry.js +133 -0
- package/dist/webcomponents/p-7bbf73bd.entry.js +117 -0
- package/dist/webcomponents/p-7d85af5c.js +16 -1
- package/dist/webcomponents/p-800d31fe.entry.js +162 -0
- package/dist/webcomponents/p-8115b2f4.js +28 -1
- package/dist/webcomponents/p-83125497.js +4027 -1
- package/dist/webcomponents/p-85fc69e5.js +90 -1
- package/dist/webcomponents/p-890088fc.entry.js +298 -0
- package/dist/webcomponents/p-89887332.js +301 -1
- package/dist/webcomponents/p-8df7bde8.js +27 -1
- package/dist/webcomponents/p-8eb774df.entry.js +54 -0
- package/dist/webcomponents/p-9282eab8.js +77 -0
- package/dist/webcomponents/p-96c12fef.entry.js +73 -0
- package/dist/webcomponents/p-9c9c7dac.js +24 -1
- package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
- package/dist/webcomponents/p-9fd108be.entry.js +74 -0
- package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
- package/dist/webcomponents/p-a5c5821e.entry.js +101 -0
- package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
- package/dist/webcomponents/p-a6d04afc.js +44 -0
- package/dist/webcomponents/p-ac086069.entry.js +58 -0
- package/dist/webcomponents/p-acbac8b8.entry.js +131 -0
- package/dist/webcomponents/p-adc30a61.entry.js +145 -0
- package/dist/webcomponents/p-af244664.js +126 -1
- package/dist/webcomponents/p-b6e3d7ed.entry.js +94 -0
- package/dist/webcomponents/p-b82c146f.entry.js +111 -0
- package/dist/webcomponents/p-ba4bae6f.js +12 -1
- package/dist/webcomponents/p-ba5fae28.js +90 -1
- package/dist/webcomponents/p-c636f563.entry.js +791 -0
- package/dist/webcomponents/p-cb26f708.js +18 -0
- package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
- package/dist/webcomponents/p-d89bad72.js +39 -1
- package/dist/webcomponents/p-dce846bf.js +27 -1
- package/dist/webcomponents/p-df21aaad.js +120 -1
- package/dist/webcomponents/p-e1255160.js +3 -1
- package/dist/webcomponents/p-e333620e.js +34 -1
- package/dist/webcomponents/p-e356f280.entry.js +29 -0
- package/dist/webcomponents/p-e3e5f95f.entry.js +98 -0
- package/dist/webcomponents/p-e3fab0e2.js +43 -1
- package/dist/webcomponents/p-eb5dbd23.entry.js +1684 -0
- package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
- package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
- package/dist/webcomponents/p-fad19d75.js +1638 -2
- package/dist/webcomponents/webcomponents.css +362 -4
- package/dist/webcomponents/webcomponents.esm.js +20 -1
- package/package.json +2 -4
- package/dist/cjs/config-037e67d0.js +0 -15
- package/dist/config.js +0 -11
- package/dist/esm/config-58e393e2.js +0 -13
- package/dist/module/config.js +0 -13
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +0 -11
- package/dist/webcomponents/p-023779ee.entry.js +0 -1
- package/dist/webcomponents/p-037763f4.entry.js +0 -1
- package/dist/webcomponents/p-07109641.entry.js +0 -1
- package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
- package/dist/webcomponents/p-17e4246f.entry.js +0 -1
- package/dist/webcomponents/p-1a43e355.entry.js +0 -19
- package/dist/webcomponents/p-1f6afff9.entry.js +0 -1
- package/dist/webcomponents/p-246a6c6a.entry.js +0 -1
- package/dist/webcomponents/p-2d3b1692.entry.js +0 -1
- package/dist/webcomponents/p-30a493cd.entry.js +0 -1
- package/dist/webcomponents/p-32286934.js +0 -1
- package/dist/webcomponents/p-3f5e7e86.js +0 -1
- package/dist/webcomponents/p-462dc522.entry.js +0 -1
- package/dist/webcomponents/p-487b72a8.entry.js +0 -1
- package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
- package/dist/webcomponents/p-52021fa1.entry.js +0 -1
- package/dist/webcomponents/p-53e64f15.entry.js +0 -1
- package/dist/webcomponents/p-57e1f2fd.js +0 -1
- package/dist/webcomponents/p-5f095525.entry.js +0 -1
- package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
- package/dist/webcomponents/p-69faef3f.entry.js +0 -1
- package/dist/webcomponents/p-6c078cd1.js +0 -1
- package/dist/webcomponents/p-8e541a32.entry.js +0 -1
- package/dist/webcomponents/p-8f325782.entry.js +0 -1
- package/dist/webcomponents/p-987b5de2.entry.js +0 -1
- package/dist/webcomponents/p-a63fc384.entry.js +0 -1
- package/dist/webcomponents/p-a8220709.entry.js +0 -1
- package/dist/webcomponents/p-ae530971.entry.js +0 -1
- package/dist/webcomponents/p-b7cf49f4.entry.js +0 -1
- package/dist/webcomponents/p-b87b27ba.js +0 -1
- package/dist/webcomponents/p-bbed6107.entry.js +0 -1
- package/dist/webcomponents/p-be39c802.entry.js +0 -1
- package/dist/webcomponents/p-c28db166.js +0 -1
- package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
- package/dist/webcomponents/p-d8355f91.entry.js +0 -1
- package/dist/webcomponents/p-e2c88817.entry.js +0 -1
- package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
- package/dist/webcomponents/p-edac2b43.entry.js +0 -1
- package/dist/webcomponents/p-ef23c091.entry.js +0 -1
- package/dist/webcomponents/p-f06910aa.entry.js +0 -1
- package/dist/webcomponents/p-f0866375.entry.js +0 -1
- package/dist/webcomponents/p-f0a06884.entry.js +0 -1
- package/dist/webcomponents/p-f2f94d9f.entry.js +0 -1
- package/dist/webcomponents/p-f49b7170.entry.js +0 -1
- package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
- package/dist/webcomponents/p-fe33151d.entry.js +0 -1
|
@@ -1,2 +1,1638 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>e.set(n.t=t,n),l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="http://www.w3.org/1999/xlink",f="undefined"!=typeof window?window:{},a=f.document||{head:{}},d={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),m=!1,v=[],y=[],w=(t,e)=>n=>{t.push(n),m||(m=!0,e&&4&d.o?g(b):d.raf(b))},$=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{$(v),$(y),(m=v.length>0)&&d.raf(b)},g=t=>h().then(t),k=w(y,!0),S={},j=t=>"object"==(t=typeof t)||"function"===t;function O(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>x,ok:()=>E,unwrap:()=>T,unwrapErr:()=>A});var E=t=>({isOk:!0,isErr:!1,value:t}),C=t=>({isOk:!1,isErr:!0,value:t});function x(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>E(t))):E(n)}if(t.isErr)return C(t.value);throw"should never get here"}var M,P,R,T=t=>{if(t.isOk)return t.value;throw t.value},A=t=>{if(t.isErr)return t.value;throw t.value},F=(t,e,...n)=>{let o=null,l=null,s=null,r=!1,i=!1;const c=[],u=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof t&&!j(o))&&(o+=""),r&&i?c[c.length-1].i+=o:c.push(r?L(null,o):o),i=r)};if(u(n),e){e.key&&(l=e.key),e.name&&(s=e.name);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,c,D);const f=L(t,null);return f.u=e,c.length>0&&(f.h=c),f.p=l,f.m=s,f},L=(t,e)=>({o:0,v:t,i:e,$:null,h:null,u:null,p:null,m:null}),N={},D={forEach:(t,e)=>t.map(H).forEach(e),map:(t,e)=>t.map(H).map(e).map(U)},H=t=>({vattrs:t.u,vchildren:t.h,vkey:t.p,vname:t.m,vtag:t.v,vtext:t.i}),U=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),F(t.vtag,e,...t.vchildren||[])}const e=L(t.vtag,t.vtext);return e.u=t.vattrs,e.h=t.vchildren,e.p=t.vkey,e.m=t.vname,e},W=t=>n(t).$hostElement$,q=(t,e,n)=>{const o=W(t);return{emit:t=>G(o,e,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:t})}},G=(t,e,n)=>{const o=d.ce(e,n);return t.dispatchEvent(o),o},V=new WeakMap,_=t=>"sc-"+t.k,z=(t,e,n,o,s,r)=>{if(n!==o){let i=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=I(n),s=I(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&o(t);else if(i||"o"!==e[0]||"n"!==e[1]){const l=j(o);if((i||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]=o;else{const l=null==o?"":o;"list"===e?i=!1:null!=n&&t[e]==l||(t[e]=l)}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(e=c,f=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(f?t.removeAttributeNS(u,e):t.removeAttribute(e)):(!i||4&r||s)&&!l&&(o=!0===o?"":o,f?t.setAttributeNS(u,e,o):t.setAttribute(e,o))}else if(e="-"===e[2]?e.slice(3):l(f,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(J);e=e.replace(K,""),n&&d.rel(t,e,n,l),o&&d.ael(t,e,o,l)}}},B=/\s/,I=t=>t?t.split(B):[],J="Capture",K=RegExp(J+"$"),Q=(t,e,n)=>{const o=11===e.$.nodeType&&e.$.host?e.$.host:e.$,l=t&&t.u||S,s=e.u||S;for(const t of X(Object.keys(l)))t in s||z(o,t,l[t],void 0,n,e.o);for(const t of X(Object.keys(s)))z(o,t,l[t],s[t],n,e.o)};function X(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Y=!1,Z=!1,tt=!1,et=!1,nt=(t,e,n,o)=>{var l;const s=e.h[n];let r,i,c,u=0;if(Y||(tt=!0,"slot"===s.v&&(M&&o.classList.add(M+"-s"),s.o|=s.h?2:1)),null!==s.i)r=s.$=a.createTextNode(s.i);else if(1&s.o)r=s.$=a.createTextNode("");else{if(et||(et="svg"===s.v),r=s.$=a.createElementNS(et?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Y&&2&s.o?"slot-fb":s.v),et&&"foreignObject"===s.v&&(et=!1),Q(null,s,et),null!=M&&r["s-si"]!==M&&r.classList.add(r["s-si"]=M),s.h)for(u=0;u<s.h.length;++u)i=nt(t,s,u,r),i&&r.appendChild(i);"svg"===s.v?et=!1:"foreignObject"===r.tagName&&(et=!0)}return r["s-hn"]=R,3&s.o&&(r["s-sr"]=!0,r["s-cr"]=P,r["s-sn"]=s.m||"",r["s-rf"]=null==(l=s.u)?void 0:l.ref,c=t&&t.h&&t.h[n],c&&c.v===s.v&&t.$&&ot(t.$,!1)),r},ot=(t,e)=>{d.o|=1;const n=Array.from(t.childNodes);for(let t=n.length-1;t>=0;t--){const o=n[t];o["s-hn"]!==R&&o["s-ol"]&&(mt(ct(o),o,it(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,tt=!0),e&&ot(o,e)}d.o&=-2},lt=(t,e,n,o,l,s)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(i.shadowRoot&&i.tagName===R&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=nt(null,n,l,t),r&&(o[l].$=r,mt(i,r,it(e))))},st=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.$;pt(e),t&&(Z=!0,t["s-ol"]?t["s-ol"].remove():ot(t,!0),t.remove())}}},rt=(t,e,n=!1)=>t.v===e.v&&("slot"===t.v?t.m===e.m:!!n||t.p===e.p),it=t=>t&&t["s-ol"]||t,ct=t=>(t["s-ol"]?t["s-ol"]:t).parentNode,ut=(t,e,n=!1)=>{const o=e.$=t.$,l=t.h,s=e.h,r=e.v,i=e.i;let c;null===i?(et="svg"===r||"foreignObject"!==r&&et,("slot"!==r||Y)&&Q(t,e,et),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=e.length-1,d=e[0],h=e[a],p=o.length-1,m=o[0],v=o[p];for(;i<=a&&c<=p;)if(null==d)d=e[++i];else if(null==h)h=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(rt(d,m,l))ut(d,m,l),d=e[++i],m=o[++c];else if(rt(h,v,l))ut(h,v,l),h=e[--a],v=o[--p];else if(rt(d,v,l))"slot"!==d.v&&"slot"!==v.v||ot(d.$.parentNode,!1),ut(d,v,l),mt(t,d.$,h.$.nextSibling),d=e[++i],v=o[--p];else if(rt(h,m,l))"slot"!==d.v&&"slot"!==v.v||ot(h.$.parentNode,!1),ut(h,m,l),mt(t,h.$,d.$),h=e[--a],m=o[++c];else{for(u=-1,f=i;f<=a;++f)if(e[f]&&null!==e[f].p&&e[f].p===m.p){u=f;break}u>=0?(r=e[u],r.v!==m.v?s=nt(e&&e[c],n,u,t):(ut(r,m,l),e[u]=void 0,s=r.$),m=o[++c]):(s=nt(e&&e[c],n,c,t),m=o[++c]),s&&mt(ct(d.$),s,it(d.$))}i>a?lt(t,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&st(e,i,a)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),lt(o,null,e,s,0,s.length-1)):null!==l&&st(l,0,l.length-1),et&&"svg"===r&&(et=!1)):(c=o["s-cr"])?c.parentNode.textContent=i:t.i!==i&&(o.data=i)},ft=t=>{const e=t.childNodes;for(const t of e)if(1===t.nodeType){if(t["s-sr"]){const n=t["s-sn"];t.hidden=!1;for(const o of e)if(o!==t)if(o["s-hn"]!==t["s-hn"]||""!==n){if(1===o.nodeType&&(n===o.getAttribute("slot")||n===o["s-sn"])||3===o.nodeType&&n===o["s-sn"]){t.hidden=!0;break}}else if(1===o.nodeType||3===o.nodeType&&""!==o.textContent.trim()){t.hidden=!0;break}}ft(t)}},at=[],dt=t=>{let e,n,o;for(const l of t.childNodes){if(l["s-sr"]&&(e=l["s-cr"])&&e.parentNode){n=e.parentNode.childNodes;const t=l["s-sn"];for(o=n.length-1;o>=0;o--)if(e=n[o],!e["s-cn"]&&!e["s-nr"]&&e["s-hn"]!==l["s-hn"])if(ht(e,t)){let n=at.find((t=>t.S===e));Z=!0,e["s-sn"]=e["s-sn"]||t,n?(n.S["s-sh"]=l["s-hn"],n.j=l):(e["s-sh"]=l["s-hn"],at.push({j:l,S:e})),e["s-sr"]&&at.map((t=>{ht(t.S,e["s-sn"])&&(n=at.find((t=>t.S===e)),n&&!t.j&&(t.j=n.j))}))}else at.some((t=>t.S===e))||at.push({S:e})}1===l.nodeType&&dt(l)}},ht=(t,e)=>1===t.nodeType?null===t.getAttribute("slot")&&""===e||t.getAttribute("slot")===e:t["s-sn"]===e||""===e,pt=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(pt)},mt=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),vt=(t,e)=>{e&&!t.O&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.O=e)))},yt=(t,e)=>{if(t.o|=16,!(4&t.o))return vt(t,t.C),k((()=>wt(t,e)));t.o|=512},wt=(t,e)=>{const n=t.t;if(!n)throw Error(`Can't render component <${t.$hostElement$.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 e&&(t.o|=256,t.M&&(t.M.map((([t,e])=>xt(n,t,e))),t.M=void 0),o=xt(n,"componentWillLoad")),$t(o,(()=>gt(t,n,e)))},$t=(t,e)=>bt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),bt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,gt=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.P,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=_(e),l=i.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,r=V.get(t=t.head||t);if(r||V.set(t,r=new Set),!r.has(o)){{s=a.createElement("style"),s.innerHTML=l;const e=null!=(n=d.R)?n:O(a);null!=e&&s.setAttribute("nonce",e),t.insertBefore(s,t.querySelector("link"))}4&e.o&&(s.innerHTML+=c),r&&r.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);St(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>Ot(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},kt=null,St=(t,e,n,o)=>{try{kt=e,e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{var o,l,s,r;const i=t.$hostElement$,c=t.P,u=t.T||L(null,null),f=(t=>t&&t.v===N)(e)?e:F(null,null,e);if(R=i.tagName,n&&f.u)for(const t of Object.keys(f.u))i.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(f.u[t]=i[t]);if(f.v=null,f.o|=4,t.T=f,f.$=u.$=i.shadowRoot||i,M=i["s-sc"],Y=!!(1&c.o),P=i["s-cr"],Z=!1,ut(u,f,n),d.o|=1,tt){dt(f.$);for(const t of at){const e=t.S;if(!e["s-ol"]){const t=a.createTextNode("");t["s-nr"]=e,mt(e.parentNode,e["s-ol"]=t,e)}}for(const t of at){const e=t.S,i=t.j;if(i){const t=i.parentNode;let n=i.nextSibling;{let s=null==(o=e["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===e["s-sn"]&&t===o.parentNode){for(o=o.nextSibling;o===e||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&t!==e.parentNode||e.nextSibling!==n)&&e!==n&&(!e["s-hn"]&&e["s-ol"]&&(e["s-hn"]=e["s-ol"].parentNode.nodeName),mt(t,e,n),1===e.nodeType&&(e.hidden=null!=(s=e["s-ih"])&&s)),e&&"function"==typeof i["s-rf"]&&i["s-rf"](e)}else 1===e.nodeType&&(n&&(e["s-ih"]=null!=(r=e.hidden)&&r),e.hidden=!0)}}Z&&ft(f.$),d.o&=-2,at.length=0,P=void 0})(t,e,o)}catch(e){s(e,t.$hostElement$)}return kt=null,null},jt=()=>kt,Ot=t=>{const e=t.$hostElement$,n=t.t,o=t.C;xt(n,"componentDidRender"),64&t.o||(t.o|=64,Mt(e),xt(n,"componentDidLoad"),t.A(e),o||Ct()),t.F(e),t.O&&(t.O(),t.O=void 0),512&t.o&&g((()=>yt(t,!1))),t.o&=-517},Et=t=>{{const e=n(t),o=e.$hostElement$.isConnected;return o&&2==(18&e.o)&&yt(e,!1),o}},Ct=()=>{Mt(a.documentElement),g((()=>G(f,"appload",{detail:{namespace:"webcomponents"}})))},xt=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t)}},Mt=t=>t.classList.add("hydrated"),Pt=(t,e,o)=>{var l,r;const i=t.prototype;if(e.L||e.N||t.watchers){t.watchers&&!e.N&&(e.N=t.watchers);const c=Object.entries(null!=(l=e.L)?l:{});if(c.map((([t,[l]])=>{31&l||2&o&&32&l?Object.defineProperty(i,t,{get(){return((t,e)=>n(this).D.get(e))(0,t)},set(o){((t,e,o,l)=>{const r=n(t);if(!r)throw Error(`Couldn't find host element for "${l.k}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.D.get(e),u=r.o,f=r.t;if(o=((t,e)=>null==t||j(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?parseFloat(t):1&e?t+"":t)(o,l.L[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(r.D.set(e,o),f)){if(l.N&&128&u){const t=l.N[e];t&&t.map((t=>{try{f[t](o,c,e)}catch(t){s(t,i)}}))}2==(18&u)&&yt(r,!1)}})(this,t,o,e)},configurable:!0,enumerable:!0}):1&o&&64&l&&Object.defineProperty(i,t,{value(...e){var o;const l=n(this);return null==(o=null==l?void 0:l.H)?void 0:o.then((()=>{var n;return null==(n=l.t)?void 0:n[t](...e)}))}})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){d.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.N)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=e.N)?r:{}),...c.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},Rt=t=>{xt(t,"connectedCallback")},Tt=t=>{xt(t,"disconnectedCallback")},At=(t,o={})=>{var l;const u=[],h=o.exclude||[],m=f.customElements,v=a.head,y=v.querySelector("meta[charset]"),w=a.createElement("style"),$=[];let b,g=!0;Object.assign(d,o),d.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let k=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],k:o[1],L:o[2],U:o[3]};4&c.o&&(k=!0),c.L=o[2],c.U=o[3],c.N=null!=(l=o[4])?l:{};const f=c.k,v=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,P:n,D:new Map};o.H=new Promise((t=>o.F=t)),o.W=new Promise((t=>o.A=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.k}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Lt(this,t,c.U)),b&&(clearTimeout(b),b=null),g?$.push(this):d.jmp((()=>(t=>{if(!(1&d.o)){const e=n(t),o=e.P,l=()=>{};if(1&e.o)Lt(t,e,o.U),(null==e?void 0:e.t)?Rt(e.t):(null==e?void 0:e.W)&&e.W.then((()=>Rt(e.t)));else{e.o|=1,12&o.o&&(t=>{const e=t["s-cr"]=a.createComment("");e["s-cn"]=!0,mt(t,e,t.firstChild)})(t);{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){vt(e,e.C=n);break}}o.L&&Object.entries(o.L).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.q){const t=(t=>{const e=t.k.replace(/-/g,"_"),n=t.q;if(!n)return;const o=r.get(n);return o?o[e]:import(`./${n}.entry.js`).then((t=>(r.set(n,t),t[e])),s)
|
|
2
|
-
|
|
1
|
+
const NAMESPACE = 'webcomponents';
|
|
2
|
+
const BUILD = /* webcomponents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
6
|
+
*/
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
15
|
+
var registerHost = (hostElement, cmpMeta) => {
|
|
16
|
+
const hostRef = {
|
|
17
|
+
$flags$: 0,
|
|
18
|
+
$hostElement$: hostElement,
|
|
19
|
+
$cmpMeta$: cmpMeta,
|
|
20
|
+
$instanceValues$: /* @__PURE__ */ new Map()
|
|
21
|
+
};
|
|
22
|
+
{
|
|
23
|
+
hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
|
|
24
|
+
}
|
|
25
|
+
{
|
|
26
|
+
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
27
|
+
hostElement["s-p"] = [];
|
|
28
|
+
hostElement["s-rc"] = [];
|
|
29
|
+
}
|
|
30
|
+
return hostRefs.set(hostElement, hostRef);
|
|
31
|
+
};
|
|
32
|
+
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
33
|
+
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
34
|
+
|
|
35
|
+
// src/client/client-load-module.ts
|
|
36
|
+
var cmpModules = /* @__PURE__ */ new Map();
|
|
37
|
+
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
38
|
+
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
39
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
40
|
+
if (!bundleId) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
const module = cmpModules.get(bundleId) ;
|
|
44
|
+
if (module) {
|
|
45
|
+
return module[exportName];
|
|
46
|
+
}
|
|
47
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
48
|
+
return import(
|
|
49
|
+
/* @vite-ignore */
|
|
50
|
+
/* webpackInclude: /\.entry\.js$/ */
|
|
51
|
+
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
52
|
+
/* webpackMode: "lazy" */
|
|
53
|
+
`./${bundleId}.entry.js${""}`
|
|
54
|
+
).then((importedModule) => {
|
|
55
|
+
{
|
|
56
|
+
cmpModules.set(bundleId, importedModule);
|
|
57
|
+
}
|
|
58
|
+
return importedModule[exportName];
|
|
59
|
+
}, consoleError);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// src/client/client-style.ts
|
|
63
|
+
var styles = /* @__PURE__ */ new Map();
|
|
64
|
+
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
65
|
+
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
66
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
67
|
+
var win = typeof window !== "undefined" ? window : {};
|
|
68
|
+
var doc = win.document || { head: {} };
|
|
69
|
+
var plt = {
|
|
70
|
+
$flags$: 0,
|
|
71
|
+
$resourcesUrl$: "",
|
|
72
|
+
jmp: (h2) => h2(),
|
|
73
|
+
raf: (h2) => requestAnimationFrame(h2),
|
|
74
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
75
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
76
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
77
|
+
};
|
|
78
|
+
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
79
|
+
let supportsListenerOptions2 = false;
|
|
80
|
+
try {
|
|
81
|
+
doc.addEventListener(
|
|
82
|
+
"e",
|
|
83
|
+
null,
|
|
84
|
+
Object.defineProperty({}, "passive", {
|
|
85
|
+
get() {
|
|
86
|
+
supportsListenerOptions2 = true;
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
}
|
|
92
|
+
return supportsListenerOptions2;
|
|
93
|
+
})();
|
|
94
|
+
var promiseResolve = (v) => Promise.resolve(v);
|
|
95
|
+
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
96
|
+
try {
|
|
97
|
+
new CSSStyleSheet();
|
|
98
|
+
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
99
|
+
} catch (e) {
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
})() ;
|
|
103
|
+
var queuePending = false;
|
|
104
|
+
var queueDomReads = [];
|
|
105
|
+
var queueDomWrites = [];
|
|
106
|
+
var queueTask = (queue, write) => (cb) => {
|
|
107
|
+
queue.push(cb);
|
|
108
|
+
if (!queuePending) {
|
|
109
|
+
queuePending = true;
|
|
110
|
+
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
111
|
+
nextTick(flush);
|
|
112
|
+
} else {
|
|
113
|
+
plt.raf(flush);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
var consume = (queue) => {
|
|
118
|
+
for (let i2 = 0; i2 < queue.length; i2++) {
|
|
119
|
+
try {
|
|
120
|
+
queue[i2](performance.now());
|
|
121
|
+
} catch (e) {
|
|
122
|
+
consoleError(e);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
queue.length = 0;
|
|
126
|
+
};
|
|
127
|
+
var flush = () => {
|
|
128
|
+
consume(queueDomReads);
|
|
129
|
+
{
|
|
130
|
+
consume(queueDomWrites);
|
|
131
|
+
if (queuePending = queueDomReads.length > 0) {
|
|
132
|
+
plt.raf(flush);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var nextTick = (cb) => promiseResolve().then(cb);
|
|
137
|
+
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
138
|
+
|
|
139
|
+
// src/utils/constants.ts
|
|
140
|
+
var EMPTY_OBJ = {};
|
|
141
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
142
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
143
|
+
|
|
144
|
+
// src/utils/helpers.ts
|
|
145
|
+
var isDef = (v) => v != null;
|
|
146
|
+
var isComplexType = (o) => {
|
|
147
|
+
o = typeof o;
|
|
148
|
+
return o === "object" || o === "function";
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
152
|
+
function queryNonceMetaTagContent(doc2) {
|
|
153
|
+
var _a, _b, _c;
|
|
154
|
+
return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// src/utils/result.ts
|
|
158
|
+
var result_exports = {};
|
|
159
|
+
__export(result_exports, {
|
|
160
|
+
err: () => err,
|
|
161
|
+
map: () => map,
|
|
162
|
+
ok: () => ok,
|
|
163
|
+
unwrap: () => unwrap,
|
|
164
|
+
unwrapErr: () => unwrapErr
|
|
165
|
+
});
|
|
166
|
+
var ok = (value) => ({
|
|
167
|
+
isOk: true,
|
|
168
|
+
isErr: false,
|
|
169
|
+
value
|
|
170
|
+
});
|
|
171
|
+
var err = (value) => ({
|
|
172
|
+
isOk: false,
|
|
173
|
+
isErr: true,
|
|
174
|
+
value
|
|
175
|
+
});
|
|
176
|
+
function map(result, fn) {
|
|
177
|
+
if (result.isOk) {
|
|
178
|
+
const val = fn(result.value);
|
|
179
|
+
if (val instanceof Promise) {
|
|
180
|
+
return val.then((newVal) => ok(newVal));
|
|
181
|
+
} else {
|
|
182
|
+
return ok(val);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
if (result.isErr) {
|
|
186
|
+
const value = result.value;
|
|
187
|
+
return err(value);
|
|
188
|
+
}
|
|
189
|
+
throw "should never get here";
|
|
190
|
+
}
|
|
191
|
+
var unwrap = (result) => {
|
|
192
|
+
if (result.isOk) {
|
|
193
|
+
return result.value;
|
|
194
|
+
} else {
|
|
195
|
+
throw result.value;
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var unwrapErr = (result) => {
|
|
199
|
+
if (result.isErr) {
|
|
200
|
+
return result.value;
|
|
201
|
+
} else {
|
|
202
|
+
throw result.value;
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
var createTime = (fnName, tagName = "") => {
|
|
206
|
+
{
|
|
207
|
+
return () => {
|
|
208
|
+
return;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
var uniqueTime = (key, measureText) => {
|
|
213
|
+
{
|
|
214
|
+
return () => {
|
|
215
|
+
return;
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
var h = (nodeName, vnodeData, ...children) => {
|
|
220
|
+
let child = null;
|
|
221
|
+
let key = null;
|
|
222
|
+
let slotName = null;
|
|
223
|
+
let simple = false;
|
|
224
|
+
let lastSimple = false;
|
|
225
|
+
const vNodeChildren = [];
|
|
226
|
+
const walk = (c) => {
|
|
227
|
+
for (let i2 = 0; i2 < c.length; i2++) {
|
|
228
|
+
child = c[i2];
|
|
229
|
+
if (Array.isArray(child)) {
|
|
230
|
+
walk(child);
|
|
231
|
+
} else if (child != null && typeof child !== "boolean") {
|
|
232
|
+
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
233
|
+
child = String(child);
|
|
234
|
+
}
|
|
235
|
+
if (simple && lastSimple) {
|
|
236
|
+
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
237
|
+
} else {
|
|
238
|
+
vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
239
|
+
}
|
|
240
|
+
lastSimple = simple;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
walk(children);
|
|
245
|
+
if (vnodeData) {
|
|
246
|
+
if (vnodeData.key) {
|
|
247
|
+
key = vnodeData.key;
|
|
248
|
+
}
|
|
249
|
+
if (vnodeData.name) {
|
|
250
|
+
slotName = vnodeData.name;
|
|
251
|
+
}
|
|
252
|
+
{
|
|
253
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
254
|
+
if (classData) {
|
|
255
|
+
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
if (typeof nodeName === "function") {
|
|
260
|
+
return nodeName(
|
|
261
|
+
vnodeData === null ? {} : vnodeData,
|
|
262
|
+
vNodeChildren,
|
|
263
|
+
vdomFnUtils
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
const vnode = newVNode(nodeName, null);
|
|
267
|
+
vnode.$attrs$ = vnodeData;
|
|
268
|
+
if (vNodeChildren.length > 0) {
|
|
269
|
+
vnode.$children$ = vNodeChildren;
|
|
270
|
+
}
|
|
271
|
+
{
|
|
272
|
+
vnode.$key$ = key;
|
|
273
|
+
}
|
|
274
|
+
{
|
|
275
|
+
vnode.$name$ = slotName;
|
|
276
|
+
}
|
|
277
|
+
return vnode;
|
|
278
|
+
};
|
|
279
|
+
var newVNode = (tag, text) => {
|
|
280
|
+
const vnode = {
|
|
281
|
+
$flags$: 0,
|
|
282
|
+
$tag$: tag,
|
|
283
|
+
$text$: text,
|
|
284
|
+
$elm$: null,
|
|
285
|
+
$children$: null
|
|
286
|
+
};
|
|
287
|
+
{
|
|
288
|
+
vnode.$attrs$ = null;
|
|
289
|
+
}
|
|
290
|
+
{
|
|
291
|
+
vnode.$key$ = null;
|
|
292
|
+
}
|
|
293
|
+
{
|
|
294
|
+
vnode.$name$ = null;
|
|
295
|
+
}
|
|
296
|
+
return vnode;
|
|
297
|
+
};
|
|
298
|
+
var Host = {};
|
|
299
|
+
var isHost = (node) => node && node.$tag$ === Host;
|
|
300
|
+
var vdomFnUtils = {
|
|
301
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
302
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
303
|
+
};
|
|
304
|
+
var convertToPublic = (node) => ({
|
|
305
|
+
vattrs: node.$attrs$,
|
|
306
|
+
vchildren: node.$children$,
|
|
307
|
+
vkey: node.$key$,
|
|
308
|
+
vname: node.$name$,
|
|
309
|
+
vtag: node.$tag$,
|
|
310
|
+
vtext: node.$text$
|
|
311
|
+
});
|
|
312
|
+
var convertToPrivate = (node) => {
|
|
313
|
+
if (typeof node.vtag === "function") {
|
|
314
|
+
const vnodeData = { ...node.vattrs };
|
|
315
|
+
if (node.vkey) {
|
|
316
|
+
vnodeData.key = node.vkey;
|
|
317
|
+
}
|
|
318
|
+
if (node.vname) {
|
|
319
|
+
vnodeData.name = node.vname;
|
|
320
|
+
}
|
|
321
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
322
|
+
}
|
|
323
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
324
|
+
vnode.$attrs$ = node.vattrs;
|
|
325
|
+
vnode.$children$ = node.vchildren;
|
|
326
|
+
vnode.$key$ = node.vkey;
|
|
327
|
+
vnode.$name$ = node.vname;
|
|
328
|
+
return vnode;
|
|
329
|
+
};
|
|
330
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
331
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
332
|
+
if (propType & 4 /* Boolean */) {
|
|
333
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
334
|
+
}
|
|
335
|
+
if (propType & 2 /* Number */) {
|
|
336
|
+
return parseFloat(propValue);
|
|
337
|
+
}
|
|
338
|
+
if (propType & 1 /* String */) {
|
|
339
|
+
return String(propValue);
|
|
340
|
+
}
|
|
341
|
+
return propValue;
|
|
342
|
+
}
|
|
343
|
+
return propValue;
|
|
344
|
+
};
|
|
345
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
346
|
+
|
|
347
|
+
// src/runtime/event-emitter.ts
|
|
348
|
+
var createEvent = (ref, name, flags) => {
|
|
349
|
+
const elm = getElement(ref);
|
|
350
|
+
return {
|
|
351
|
+
emit: (detail) => {
|
|
352
|
+
return emitEvent(elm, name, {
|
|
353
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
354
|
+
composed: !!(flags & 2 /* Composed */),
|
|
355
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
356
|
+
detail
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
var emitEvent = (elm, name, opts) => {
|
|
362
|
+
const ev = plt.ce(name, opts);
|
|
363
|
+
elm.dispatchEvent(ev);
|
|
364
|
+
return ev;
|
|
365
|
+
};
|
|
366
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
367
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
368
|
+
let style = styles.get(scopeId2);
|
|
369
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
370
|
+
style = style || new CSSStyleSheet();
|
|
371
|
+
if (typeof style === "string") {
|
|
372
|
+
style = cssText;
|
|
373
|
+
} else {
|
|
374
|
+
style.replaceSync(cssText);
|
|
375
|
+
}
|
|
376
|
+
} else {
|
|
377
|
+
style = cssText;
|
|
378
|
+
}
|
|
379
|
+
styles.set(scopeId2, style);
|
|
380
|
+
};
|
|
381
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
382
|
+
var _a;
|
|
383
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
384
|
+
const style = styles.get(scopeId2);
|
|
385
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
386
|
+
if (style) {
|
|
387
|
+
if (typeof style === "string") {
|
|
388
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
389
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
390
|
+
let styleElm;
|
|
391
|
+
if (!appliedStyles) {
|
|
392
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
393
|
+
}
|
|
394
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
395
|
+
{
|
|
396
|
+
styleElm = doc.createElement("style");
|
|
397
|
+
styleElm.innerHTML = style;
|
|
398
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
399
|
+
if (nonce != null) {
|
|
400
|
+
styleElm.setAttribute("nonce", nonce);
|
|
401
|
+
}
|
|
402
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
403
|
+
}
|
|
404
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
405
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
406
|
+
}
|
|
407
|
+
if (appliedStyles) {
|
|
408
|
+
appliedStyles.add(scopeId2);
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
412
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return scopeId2;
|
|
416
|
+
};
|
|
417
|
+
var attachStyles = (hostRef) => {
|
|
418
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
419
|
+
const elm = hostRef.$hostElement$;
|
|
420
|
+
const flags = cmpMeta.$flags$;
|
|
421
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
422
|
+
const scopeId2 = addStyle(
|
|
423
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
424
|
+
cmpMeta);
|
|
425
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
426
|
+
elm["s-sc"] = scopeId2;
|
|
427
|
+
elm.classList.add(scopeId2 + "-h");
|
|
428
|
+
}
|
|
429
|
+
endAttachStyles();
|
|
430
|
+
};
|
|
431
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
432
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
433
|
+
if (oldValue !== newValue) {
|
|
434
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
435
|
+
let ln = memberName.toLowerCase();
|
|
436
|
+
if (memberName === "class") {
|
|
437
|
+
const classList = elm.classList;
|
|
438
|
+
const oldClasses = parseClassList(oldValue);
|
|
439
|
+
const newClasses = parseClassList(newValue);
|
|
440
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
441
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
442
|
+
} else if (memberName === "style") {
|
|
443
|
+
{
|
|
444
|
+
for (const prop in oldValue) {
|
|
445
|
+
if (!newValue || newValue[prop] == null) {
|
|
446
|
+
if (prop.includes("-")) {
|
|
447
|
+
elm.style.removeProperty(prop);
|
|
448
|
+
} else {
|
|
449
|
+
elm.style[prop] = "";
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
for (const prop in newValue) {
|
|
455
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
456
|
+
if (prop.includes("-")) {
|
|
457
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
458
|
+
} else {
|
|
459
|
+
elm.style[prop] = newValue[prop];
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
464
|
+
if (newValue) {
|
|
465
|
+
newValue(elm);
|
|
466
|
+
}
|
|
467
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
468
|
+
if (memberName[2] === "-") {
|
|
469
|
+
memberName = memberName.slice(3);
|
|
470
|
+
} else if (isMemberInElement(win, ln)) {
|
|
471
|
+
memberName = ln.slice(2);
|
|
472
|
+
} else {
|
|
473
|
+
memberName = ln[2] + memberName.slice(3);
|
|
474
|
+
}
|
|
475
|
+
if (oldValue || newValue) {
|
|
476
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
477
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
478
|
+
if (oldValue) {
|
|
479
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
480
|
+
}
|
|
481
|
+
if (newValue) {
|
|
482
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
} else {
|
|
486
|
+
const isComplex = isComplexType(newValue);
|
|
487
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
488
|
+
try {
|
|
489
|
+
if (!elm.tagName.includes("-")) {
|
|
490
|
+
const n = newValue == null ? "" : newValue;
|
|
491
|
+
if (memberName === "list") {
|
|
492
|
+
isProp = false;
|
|
493
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
494
|
+
elm[memberName] = n;
|
|
495
|
+
}
|
|
496
|
+
} else {
|
|
497
|
+
elm[memberName] = newValue;
|
|
498
|
+
}
|
|
499
|
+
} catch (e) {
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
let xlink = false;
|
|
503
|
+
{
|
|
504
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
505
|
+
memberName = ln;
|
|
506
|
+
xlink = true;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
if (newValue == null || newValue === false) {
|
|
510
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
511
|
+
if (xlink) {
|
|
512
|
+
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
513
|
+
} else {
|
|
514
|
+
elm.removeAttribute(memberName);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
518
|
+
newValue = newValue === true ? "" : newValue;
|
|
519
|
+
if (xlink) {
|
|
520
|
+
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
521
|
+
} else {
|
|
522
|
+
elm.setAttribute(memberName, newValue);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
var parseClassListRegex = /\s/;
|
|
529
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
530
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
531
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
532
|
+
|
|
533
|
+
// src/runtime/vdom/update-element.ts
|
|
534
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
535
|
+
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
536
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
537
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
538
|
+
{
|
|
539
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
540
|
+
if (!(memberName in newVnodeAttrs)) {
|
|
541
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
546
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
function sortedAttrNames(attrNames) {
|
|
550
|
+
return attrNames.includes("ref") ? (
|
|
551
|
+
// we need to sort these to ensure that `'ref'` is the last attr
|
|
552
|
+
[...attrNames.filter((attr) => attr !== "ref"), "ref"]
|
|
553
|
+
) : (
|
|
554
|
+
// no need to sort, return the original array
|
|
555
|
+
attrNames
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// src/runtime/vdom/vdom-render.ts
|
|
560
|
+
var scopeId;
|
|
561
|
+
var contentRef;
|
|
562
|
+
var hostTagName;
|
|
563
|
+
var useNativeShadowDom = false;
|
|
564
|
+
var checkSlotFallbackVisibility = false;
|
|
565
|
+
var checkSlotRelocate = false;
|
|
566
|
+
var isSvgMode = false;
|
|
567
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
568
|
+
var _a;
|
|
569
|
+
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
570
|
+
let i2 = 0;
|
|
571
|
+
let elm;
|
|
572
|
+
let childNode;
|
|
573
|
+
let oldVNode;
|
|
574
|
+
if (!useNativeShadowDom) {
|
|
575
|
+
checkSlotRelocate = true;
|
|
576
|
+
if (newVNode2.$tag$ === "slot") {
|
|
577
|
+
if (scopeId) {
|
|
578
|
+
parentElm.classList.add(scopeId + "-s");
|
|
579
|
+
}
|
|
580
|
+
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
581
|
+
// slot element has fallback content
|
|
582
|
+
// still create an element that "mocks" the slot element
|
|
583
|
+
2 /* isSlotFallback */
|
|
584
|
+
) : (
|
|
585
|
+
// slot element does not have fallback content
|
|
586
|
+
// create an html comment we'll use to always reference
|
|
587
|
+
// where actual slot content should sit next to
|
|
588
|
+
1 /* isSlotReference */
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
if (newVNode2.$text$ !== null) {
|
|
593
|
+
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
594
|
+
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
595
|
+
elm = newVNode2.$elm$ = doc.createTextNode("");
|
|
596
|
+
} else {
|
|
597
|
+
if (!isSvgMode) {
|
|
598
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
599
|
+
}
|
|
600
|
+
elm = newVNode2.$elm$ = doc.createElementNS(
|
|
601
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
602
|
+
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
603
|
+
) ;
|
|
604
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
605
|
+
isSvgMode = false;
|
|
606
|
+
}
|
|
607
|
+
{
|
|
608
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
609
|
+
}
|
|
610
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
611
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
612
|
+
}
|
|
613
|
+
if (newVNode2.$children$) {
|
|
614
|
+
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
615
|
+
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
|
616
|
+
if (childNode) {
|
|
617
|
+
elm.appendChild(childNode);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
{
|
|
622
|
+
if (newVNode2.$tag$ === "svg") {
|
|
623
|
+
isSvgMode = false;
|
|
624
|
+
} else if (elm.tagName === "foreignObject") {
|
|
625
|
+
isSvgMode = true;
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
elm["s-hn"] = hostTagName;
|
|
630
|
+
{
|
|
631
|
+
if (newVNode2.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {
|
|
632
|
+
elm["s-sr"] = true;
|
|
633
|
+
elm["s-cr"] = contentRef;
|
|
634
|
+
elm["s-sn"] = newVNode2.$name$ || "";
|
|
635
|
+
elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
|
|
636
|
+
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
637
|
+
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
638
|
+
{
|
|
639
|
+
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
return elm;
|
|
645
|
+
};
|
|
646
|
+
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
647
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
648
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
649
|
+
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
650
|
+
let node = parentElm;
|
|
651
|
+
while (node = node.nextSibling) {
|
|
652
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
653
|
+
oldSlotChildNodes.push(node);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
658
|
+
const childNode = oldSlotChildNodes[i2];
|
|
659
|
+
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
660
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
|
661
|
+
childNode["s-ol"].remove();
|
|
662
|
+
childNode["s-ol"] = void 0;
|
|
663
|
+
childNode["s-sh"] = void 0;
|
|
664
|
+
checkSlotRelocate = true;
|
|
665
|
+
}
|
|
666
|
+
if (recursive) {
|
|
667
|
+
putBackInOriginalLocation(childNode, recursive);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
671
|
+
};
|
|
672
|
+
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
673
|
+
let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
|
|
674
|
+
let childNode;
|
|
675
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
|
|
676
|
+
containerElm = containerElm.shadowRoot;
|
|
677
|
+
}
|
|
678
|
+
for (; startIdx <= endIdx; ++startIdx) {
|
|
679
|
+
if (vnodes[startIdx]) {
|
|
680
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
681
|
+
if (childNode) {
|
|
682
|
+
vnodes[startIdx].$elm$ = childNode;
|
|
683
|
+
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
689
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
690
|
+
const vnode = vnodes[index];
|
|
691
|
+
if (vnode) {
|
|
692
|
+
const elm = vnode.$elm$;
|
|
693
|
+
nullifyVNodeRefs(vnode);
|
|
694
|
+
if (elm) {
|
|
695
|
+
{
|
|
696
|
+
checkSlotFallbackVisibility = true;
|
|
697
|
+
if (elm["s-ol"]) {
|
|
698
|
+
elm["s-ol"].remove();
|
|
699
|
+
} else {
|
|
700
|
+
putBackInOriginalLocation(elm, true);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
elm.remove();
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
709
|
+
let oldStartIdx = 0;
|
|
710
|
+
let newStartIdx = 0;
|
|
711
|
+
let idxInOld = 0;
|
|
712
|
+
let i2 = 0;
|
|
713
|
+
let oldEndIdx = oldCh.length - 1;
|
|
714
|
+
let oldStartVnode = oldCh[0];
|
|
715
|
+
let oldEndVnode = oldCh[oldEndIdx];
|
|
716
|
+
let newEndIdx = newCh.length - 1;
|
|
717
|
+
let newStartVnode = newCh[0];
|
|
718
|
+
let newEndVnode = newCh[newEndIdx];
|
|
719
|
+
let node;
|
|
720
|
+
let elmToMove;
|
|
721
|
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
|
|
722
|
+
if (oldStartVnode == null) {
|
|
723
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
724
|
+
} else if (oldEndVnode == null) {
|
|
725
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
726
|
+
} else if (newStartVnode == null) {
|
|
727
|
+
newStartVnode = newCh[++newStartIdx];
|
|
728
|
+
} else if (newEndVnode == null) {
|
|
729
|
+
newEndVnode = newCh[--newEndIdx];
|
|
730
|
+
} else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
731
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
732
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
733
|
+
newStartVnode = newCh[++newStartIdx];
|
|
734
|
+
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
735
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
736
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
737
|
+
newEndVnode = newCh[--newEndIdx];
|
|
738
|
+
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
739
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
740
|
+
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
741
|
+
}
|
|
742
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
743
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
744
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
745
|
+
newEndVnode = newCh[--newEndIdx];
|
|
746
|
+
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
747
|
+
if ((oldStartVnode.$tag$ === "slot" || newEndVnode.$tag$ === "slot")) {
|
|
748
|
+
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
749
|
+
}
|
|
750
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
751
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
752
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
753
|
+
newStartVnode = newCh[++newStartIdx];
|
|
754
|
+
} else {
|
|
755
|
+
idxInOld = -1;
|
|
756
|
+
{
|
|
757
|
+
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
|
|
758
|
+
if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
759
|
+
idxInOld = i2;
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
if (idxInOld >= 0) {
|
|
765
|
+
elmToMove = oldCh[idxInOld];
|
|
766
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
767
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
|
768
|
+
} else {
|
|
769
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
770
|
+
oldCh[idxInOld] = void 0;
|
|
771
|
+
node = elmToMove.$elm$;
|
|
772
|
+
}
|
|
773
|
+
newStartVnode = newCh[++newStartIdx];
|
|
774
|
+
} else {
|
|
775
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
|
|
776
|
+
newStartVnode = newCh[++newStartIdx];
|
|
777
|
+
}
|
|
778
|
+
if (node) {
|
|
779
|
+
{
|
|
780
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
if (oldStartIdx > oldEndIdx) {
|
|
786
|
+
addVnodes(
|
|
787
|
+
parentElm,
|
|
788
|
+
newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,
|
|
789
|
+
newVNode2,
|
|
790
|
+
newCh,
|
|
791
|
+
newStartIdx,
|
|
792
|
+
newEndIdx
|
|
793
|
+
);
|
|
794
|
+
} else if (newStartIdx > newEndIdx) {
|
|
795
|
+
removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
799
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
800
|
+
if (leftVNode.$tag$ === "slot") {
|
|
801
|
+
return leftVNode.$name$ === rightVNode.$name$;
|
|
802
|
+
}
|
|
803
|
+
if (!isInitialRender) {
|
|
804
|
+
return leftVNode.$key$ === rightVNode.$key$;
|
|
805
|
+
}
|
|
806
|
+
return true;
|
|
807
|
+
}
|
|
808
|
+
return false;
|
|
809
|
+
};
|
|
810
|
+
var referenceNode = (node) => {
|
|
811
|
+
return node && node["s-ol"] || node;
|
|
812
|
+
};
|
|
813
|
+
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
814
|
+
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
815
|
+
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
816
|
+
const oldChildren = oldVNode.$children$;
|
|
817
|
+
const newChildren = newVNode2.$children$;
|
|
818
|
+
const tag = newVNode2.$tag$;
|
|
819
|
+
const text = newVNode2.$text$;
|
|
820
|
+
let defaultHolder;
|
|
821
|
+
if (text === null) {
|
|
822
|
+
{
|
|
823
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
824
|
+
}
|
|
825
|
+
{
|
|
826
|
+
if (tag === "slot" && !useNativeShadowDom) ; else {
|
|
827
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (oldChildren !== null && newChildren !== null) {
|
|
831
|
+
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
832
|
+
} else if (newChildren !== null) {
|
|
833
|
+
if (oldVNode.$text$ !== null) {
|
|
834
|
+
elm.textContent = "";
|
|
835
|
+
}
|
|
836
|
+
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
837
|
+
} else if (oldChildren !== null) {
|
|
838
|
+
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
839
|
+
}
|
|
840
|
+
if (isSvgMode && tag === "svg") {
|
|
841
|
+
isSvgMode = false;
|
|
842
|
+
}
|
|
843
|
+
} else if ((defaultHolder = elm["s-cr"])) {
|
|
844
|
+
defaultHolder.parentNode.textContent = text;
|
|
845
|
+
} else if (oldVNode.$text$ !== text) {
|
|
846
|
+
elm.data = text;
|
|
847
|
+
}
|
|
848
|
+
};
|
|
849
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
850
|
+
const childNodes = elm.childNodes;
|
|
851
|
+
for (const childNode of childNodes) {
|
|
852
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
853
|
+
if (childNode["s-sr"]) {
|
|
854
|
+
const slotName = childNode["s-sn"];
|
|
855
|
+
childNode.hidden = false;
|
|
856
|
+
for (const siblingNode of childNodes) {
|
|
857
|
+
if (siblingNode !== childNode) {
|
|
858
|
+
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
859
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
860
|
+
childNode.hidden = true;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
} else {
|
|
864
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
865
|
+
childNode.hidden = true;
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
updateFallbackSlotVisibility(childNode);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
};
|
|
876
|
+
var relocateNodes = [];
|
|
877
|
+
var markSlotContentForRelocation = (elm) => {
|
|
878
|
+
let node;
|
|
879
|
+
let hostContentNodes;
|
|
880
|
+
let j;
|
|
881
|
+
for (const childNode of elm.childNodes) {
|
|
882
|
+
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
883
|
+
hostContentNodes = node.parentNode.childNodes;
|
|
884
|
+
const slotName = childNode["s-sn"];
|
|
885
|
+
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
886
|
+
node = hostContentNodes[j];
|
|
887
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!BUILD.experimentalSlotFixes )) {
|
|
888
|
+
if (isNodeLocatedInSlot(node, slotName)) {
|
|
889
|
+
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
890
|
+
checkSlotFallbackVisibility = true;
|
|
891
|
+
node["s-sn"] = node["s-sn"] || slotName;
|
|
892
|
+
if (relocateNodeData) {
|
|
893
|
+
relocateNodeData.$nodeToRelocate$["s-sh"] = childNode["s-hn"];
|
|
894
|
+
relocateNodeData.$slotRefNode$ = childNode;
|
|
895
|
+
} else {
|
|
896
|
+
node["s-sh"] = childNode["s-hn"];
|
|
897
|
+
relocateNodes.push({
|
|
898
|
+
$slotRefNode$: childNode,
|
|
899
|
+
$nodeToRelocate$: node
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
if (node["s-sr"]) {
|
|
903
|
+
relocateNodes.map((relocateNode) => {
|
|
904
|
+
if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node["s-sn"])) {
|
|
905
|
+
relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
906
|
+
if (relocateNodeData && !relocateNode.$slotRefNode$) {
|
|
907
|
+
relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
} else if (!relocateNodes.some((r) => r.$nodeToRelocate$ === node)) {
|
|
913
|
+
relocateNodes.push({
|
|
914
|
+
$nodeToRelocate$: node
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
921
|
+
markSlotContentForRelocation(childNode);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
};
|
|
925
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
926
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
927
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
928
|
+
return true;
|
|
929
|
+
}
|
|
930
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
931
|
+
return true;
|
|
932
|
+
}
|
|
933
|
+
return false;
|
|
934
|
+
}
|
|
935
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
936
|
+
return true;
|
|
937
|
+
}
|
|
938
|
+
return slotName === "";
|
|
939
|
+
};
|
|
940
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
941
|
+
{
|
|
942
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
943
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
947
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
948
|
+
return inserted;
|
|
949
|
+
};
|
|
950
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
951
|
+
var _a, _b, _c, _d;
|
|
952
|
+
const hostElm = hostRef.$hostElement$;
|
|
953
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
954
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
955
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
956
|
+
hostTagName = hostElm.tagName;
|
|
957
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
958
|
+
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
959
|
+
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
960
|
+
rootVnode.$attrs$[key] = hostElm[key];
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
rootVnode.$tag$ = null;
|
|
965
|
+
rootVnode.$flags$ |= 4 /* isHost */;
|
|
966
|
+
hostRef.$vnode$ = rootVnode;
|
|
967
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
968
|
+
{
|
|
969
|
+
scopeId = hostElm["s-sc"];
|
|
970
|
+
}
|
|
971
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
972
|
+
{
|
|
973
|
+
contentRef = hostElm["s-cr"];
|
|
974
|
+
checkSlotFallbackVisibility = false;
|
|
975
|
+
}
|
|
976
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
977
|
+
{
|
|
978
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
979
|
+
if (checkSlotRelocate) {
|
|
980
|
+
markSlotContentForRelocation(rootVnode.$elm$);
|
|
981
|
+
for (const relocateData of relocateNodes) {
|
|
982
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
983
|
+
if (!nodeToRelocate["s-ol"]) {
|
|
984
|
+
const orgLocationNode = doc.createTextNode("");
|
|
985
|
+
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
986
|
+
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
for (const relocateData of relocateNodes) {
|
|
990
|
+
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
991
|
+
const slotRefNode = relocateData.$slotRefNode$;
|
|
992
|
+
if (slotRefNode) {
|
|
993
|
+
const parentNodeRef = slotRefNode.parentNode;
|
|
994
|
+
let insertBeforeNode = slotRefNode.nextSibling;
|
|
995
|
+
{
|
|
996
|
+
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
997
|
+
while (orgLocationNode) {
|
|
998
|
+
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
999
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1000
|
+
refNode = refNode.nextSibling;
|
|
1001
|
+
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1002
|
+
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
1003
|
+
}
|
|
1004
|
+
if (!refNode || !refNode["s-nr"]) {
|
|
1005
|
+
insertBeforeNode = refNode;
|
|
1006
|
+
break;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
orgLocationNode = orgLocationNode.previousSibling;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1013
|
+
if (nodeToRelocate !== insertBeforeNode) {
|
|
1014
|
+
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1015
|
+
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1016
|
+
}
|
|
1017
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1018
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1019
|
+
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
|
|
1024
|
+
} else {
|
|
1025
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1026
|
+
if (isInitialLoad) {
|
|
1027
|
+
nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
|
|
1028
|
+
}
|
|
1029
|
+
nodeToRelocate.hidden = true;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
if (checkSlotFallbackVisibility) {
|
|
1035
|
+
updateFallbackSlotVisibility(rootVnode.$elm$);
|
|
1036
|
+
}
|
|
1037
|
+
plt.$flags$ &= ~1 /* isTmpDisconnected */;
|
|
1038
|
+
relocateNodes.length = 0;
|
|
1039
|
+
}
|
|
1040
|
+
contentRef = void 0;
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
// src/runtime/update-component.ts
|
|
1044
|
+
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1045
|
+
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1046
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
1047
|
+
}
|
|
1048
|
+
};
|
|
1049
|
+
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1050
|
+
{
|
|
1051
|
+
hostRef.$flags$ |= 16 /* isQueuedForUpdate */;
|
|
1052
|
+
}
|
|
1053
|
+
if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {
|
|
1054
|
+
hostRef.$flags$ |= 512 /* needsRerender */;
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1057
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1058
|
+
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1059
|
+
return writeTask(dispatch) ;
|
|
1060
|
+
};
|
|
1061
|
+
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1062
|
+
const elm = hostRef.$hostElement$;
|
|
1063
|
+
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
1064
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1065
|
+
if (!instance) {
|
|
1066
|
+
throw new Error(
|
|
1067
|
+
`Can't render component <${elm.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`
|
|
1068
|
+
);
|
|
1069
|
+
}
|
|
1070
|
+
let maybePromise;
|
|
1071
|
+
if (isInitialLoad) {
|
|
1072
|
+
{
|
|
1073
|
+
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1074
|
+
if (hostRef.$queuedListeners$) {
|
|
1075
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1076
|
+
hostRef.$queuedListeners$ = void 0;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
{
|
|
1080
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
endSchedule();
|
|
1084
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1085
|
+
};
|
|
1086
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
|
|
1087
|
+
console.error(err2);
|
|
1088
|
+
fn();
|
|
1089
|
+
}) : fn();
|
|
1090
|
+
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
1091
|
+
var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1092
|
+
var _a;
|
|
1093
|
+
const elm = hostRef.$hostElement$;
|
|
1094
|
+
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
|
1095
|
+
const rc = elm["s-rc"];
|
|
1096
|
+
if (isInitialLoad) {
|
|
1097
|
+
attachStyles(hostRef);
|
|
1098
|
+
}
|
|
1099
|
+
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
1100
|
+
{
|
|
1101
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1102
|
+
}
|
|
1103
|
+
if (rc) {
|
|
1104
|
+
rc.map((cb) => cb());
|
|
1105
|
+
elm["s-rc"] = void 0;
|
|
1106
|
+
}
|
|
1107
|
+
endRender();
|
|
1108
|
+
endUpdate();
|
|
1109
|
+
{
|
|
1110
|
+
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
|
1111
|
+
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1112
|
+
if (childrenPromises.length === 0) {
|
|
1113
|
+
postUpdate();
|
|
1114
|
+
} else {
|
|
1115
|
+
Promise.all(childrenPromises).then(postUpdate);
|
|
1116
|
+
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
1117
|
+
childrenPromises.length = 0;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
var renderingRef = null;
|
|
1122
|
+
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1123
|
+
try {
|
|
1124
|
+
renderingRef = instance;
|
|
1125
|
+
instance = instance.render() ;
|
|
1126
|
+
{
|
|
1127
|
+
hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
|
|
1128
|
+
}
|
|
1129
|
+
{
|
|
1130
|
+
hostRef.$flags$ |= 2 /* hasRendered */;
|
|
1131
|
+
}
|
|
1132
|
+
{
|
|
1133
|
+
{
|
|
1134
|
+
{
|
|
1135
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
} catch (e) {
|
|
1140
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1141
|
+
}
|
|
1142
|
+
renderingRef = null;
|
|
1143
|
+
return null;
|
|
1144
|
+
};
|
|
1145
|
+
var getRenderingRef = () => renderingRef;
|
|
1146
|
+
var postUpdateComponent = (hostRef) => {
|
|
1147
|
+
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1148
|
+
const elm = hostRef.$hostElement$;
|
|
1149
|
+
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1150
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1151
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1152
|
+
{
|
|
1153
|
+
safeCall(instance, "componentDidRender");
|
|
1154
|
+
}
|
|
1155
|
+
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1156
|
+
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
1157
|
+
{
|
|
1158
|
+
addHydratedFlag(elm);
|
|
1159
|
+
}
|
|
1160
|
+
{
|
|
1161
|
+
safeCall(instance, "componentDidLoad");
|
|
1162
|
+
}
|
|
1163
|
+
endPostUpdate();
|
|
1164
|
+
{
|
|
1165
|
+
hostRef.$onReadyResolve$(elm);
|
|
1166
|
+
if (!ancestorComponent) {
|
|
1167
|
+
appDidLoad();
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
} else {
|
|
1171
|
+
endPostUpdate();
|
|
1172
|
+
}
|
|
1173
|
+
{
|
|
1174
|
+
hostRef.$onInstanceResolve$(elm);
|
|
1175
|
+
}
|
|
1176
|
+
{
|
|
1177
|
+
if (hostRef.$onRenderResolve$) {
|
|
1178
|
+
hostRef.$onRenderResolve$();
|
|
1179
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1180
|
+
}
|
|
1181
|
+
if (hostRef.$flags$ & 512 /* needsRerender */) {
|
|
1182
|
+
nextTick(() => scheduleUpdate(hostRef, false));
|
|
1183
|
+
}
|
|
1184
|
+
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
var forceUpdate = (ref) => {
|
|
1188
|
+
{
|
|
1189
|
+
const hostRef = getHostRef(ref);
|
|
1190
|
+
const isConnected = hostRef.$hostElement$.isConnected;
|
|
1191
|
+
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1192
|
+
scheduleUpdate(hostRef, false);
|
|
1193
|
+
}
|
|
1194
|
+
return isConnected;
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
var appDidLoad = (who) => {
|
|
1198
|
+
{
|
|
1199
|
+
addHydratedFlag(doc.documentElement);
|
|
1200
|
+
}
|
|
1201
|
+
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1202
|
+
};
|
|
1203
|
+
var safeCall = (instance, method, arg) => {
|
|
1204
|
+
if (instance && instance[method]) {
|
|
1205
|
+
try {
|
|
1206
|
+
return instance[method](arg);
|
|
1207
|
+
} catch (e) {
|
|
1208
|
+
consoleError(e);
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
return void 0;
|
|
1212
|
+
};
|
|
1213
|
+
var addHydratedFlag = (elm) => {
|
|
1214
|
+
var _a;
|
|
1215
|
+
return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
// src/runtime/set-value.ts
|
|
1219
|
+
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1220
|
+
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1221
|
+
const hostRef = getHostRef(ref);
|
|
1222
|
+
if (!hostRef) {
|
|
1223
|
+
throw new Error(
|
|
1224
|
+
`Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
|
|
1225
|
+
);
|
|
1226
|
+
}
|
|
1227
|
+
const elm = hostRef.$hostElement$ ;
|
|
1228
|
+
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1229
|
+
const flags = hostRef.$flags$;
|
|
1230
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1231
|
+
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1232
|
+
const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
|
|
1233
|
+
const didValueChange = newVal !== oldVal && !areBothNaN;
|
|
1234
|
+
if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
|
|
1235
|
+
hostRef.$instanceValues$.set(propName, newVal);
|
|
1236
|
+
if (instance) {
|
|
1237
|
+
if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
|
|
1238
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1239
|
+
if (watchMethods) {
|
|
1240
|
+
watchMethods.map((watchMethodName) => {
|
|
1241
|
+
try {
|
|
1242
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1243
|
+
} catch (e) {
|
|
1244
|
+
consoleError(e, elm);
|
|
1245
|
+
}
|
|
1246
|
+
});
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
1250
|
+
scheduleUpdate(hostRef, false);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
// src/runtime/proxy-component.ts
|
|
1257
|
+
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1258
|
+
var _a, _b;
|
|
1259
|
+
const prototype = Cstr.prototype;
|
|
1260
|
+
if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
|
|
1261
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
1262
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1263
|
+
}
|
|
1264
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1265
|
+
members.map(([memberName, [memberFlags]]) => {
|
|
1266
|
+
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1267
|
+
Object.defineProperty(prototype, memberName, {
|
|
1268
|
+
get() {
|
|
1269
|
+
return getValue(this, memberName);
|
|
1270
|
+
},
|
|
1271
|
+
set(newValue) {
|
|
1272
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1273
|
+
},
|
|
1274
|
+
configurable: true,
|
|
1275
|
+
enumerable: true
|
|
1276
|
+
});
|
|
1277
|
+
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1278
|
+
Object.defineProperty(prototype, memberName, {
|
|
1279
|
+
value(...args) {
|
|
1280
|
+
var _a2;
|
|
1281
|
+
const ref = getHostRef(this);
|
|
1282
|
+
return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
|
|
1283
|
+
var _a3;
|
|
1284
|
+
return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
});
|
|
1290
|
+
if ((flags & 1 /* isElementConstructor */)) {
|
|
1291
|
+
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
1292
|
+
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
1293
|
+
plt.jmp(() => {
|
|
1294
|
+
var _a2;
|
|
1295
|
+
const propName = attrNameToPropName.get(attrName);
|
|
1296
|
+
if (this.hasOwnProperty(propName)) {
|
|
1297
|
+
newValue = this[propName];
|
|
1298
|
+
delete this[propName];
|
|
1299
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1300
|
+
return;
|
|
1301
|
+
} else if (propName == null) {
|
|
1302
|
+
const hostRef = getHostRef(this);
|
|
1303
|
+
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1304
|
+
if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
|
|
1305
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1306
|
+
const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
|
|
1307
|
+
entry == null ? void 0 : entry.forEach((callbackName) => {
|
|
1308
|
+
if (instance[callbackName] != null) {
|
|
1309
|
+
instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1316
|
+
});
|
|
1317
|
+
};
|
|
1318
|
+
Cstr.observedAttributes = Array.from(
|
|
1319
|
+
/* @__PURE__ */ new Set([
|
|
1320
|
+
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1321
|
+
...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
|
|
1322
|
+
const attrName = m[1] || propName;
|
|
1323
|
+
attrNameToPropName.set(attrName, propName);
|
|
1324
|
+
return attrName;
|
|
1325
|
+
})
|
|
1326
|
+
])
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
return Cstr;
|
|
1331
|
+
};
|
|
1332
|
+
|
|
1333
|
+
// src/runtime/initialize-component.ts
|
|
1334
|
+
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1335
|
+
let Cstr;
|
|
1336
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1337
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1338
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1339
|
+
if (bundleId) {
|
|
1340
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1341
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1342
|
+
const endLoad = uniqueTime();
|
|
1343
|
+
Cstr = await CstrImport;
|
|
1344
|
+
endLoad();
|
|
1345
|
+
} else {
|
|
1346
|
+
Cstr = CstrImport;
|
|
1347
|
+
}
|
|
1348
|
+
if (!Cstr) {
|
|
1349
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1350
|
+
}
|
|
1351
|
+
if (!Cstr.isProxied) {
|
|
1352
|
+
{
|
|
1353
|
+
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1354
|
+
}
|
|
1355
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1356
|
+
Cstr.isProxied = true;
|
|
1357
|
+
}
|
|
1358
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
1359
|
+
{
|
|
1360
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
1361
|
+
}
|
|
1362
|
+
try {
|
|
1363
|
+
new Cstr(hostRef);
|
|
1364
|
+
} catch (e) {
|
|
1365
|
+
consoleError(e);
|
|
1366
|
+
}
|
|
1367
|
+
{
|
|
1368
|
+
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1369
|
+
}
|
|
1370
|
+
{
|
|
1371
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1372
|
+
}
|
|
1373
|
+
endNewInstance();
|
|
1374
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1375
|
+
} else {
|
|
1376
|
+
Cstr = elm.constructor;
|
|
1377
|
+
const cmpTag = elm.localName;
|
|
1378
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1379
|
+
}
|
|
1380
|
+
if (Cstr && Cstr.style) {
|
|
1381
|
+
let style;
|
|
1382
|
+
if (typeof Cstr.style === "string") {
|
|
1383
|
+
style = Cstr.style;
|
|
1384
|
+
}
|
|
1385
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1386
|
+
if (!styles.has(scopeId2)) {
|
|
1387
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1388
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1389
|
+
endRegisterStyles();
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1394
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1395
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1396
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
1397
|
+
} else {
|
|
1398
|
+
schedule();
|
|
1399
|
+
}
|
|
1400
|
+
};
|
|
1401
|
+
var fireConnectedCallback = (instance) => {
|
|
1402
|
+
{
|
|
1403
|
+
safeCall(instance, "connectedCallback");
|
|
1404
|
+
}
|
|
1405
|
+
};
|
|
1406
|
+
|
|
1407
|
+
// src/runtime/connected-callback.ts
|
|
1408
|
+
var connectedCallback = (elm) => {
|
|
1409
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1410
|
+
const hostRef = getHostRef(elm);
|
|
1411
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1412
|
+
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1413
|
+
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1414
|
+
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1415
|
+
{
|
|
1416
|
+
if (// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
|
|
1417
|
+
cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {
|
|
1418
|
+
setContentReference(elm);
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
{
|
|
1422
|
+
let ancestorComponent = elm;
|
|
1423
|
+
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
1424
|
+
if (ancestorComponent["s-p"]) {
|
|
1425
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1426
|
+
break;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
if (cmpMeta.$members$) {
|
|
1431
|
+
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1432
|
+
if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
|
|
1433
|
+
const value = elm[memberName];
|
|
1434
|
+
delete elm[memberName];
|
|
1435
|
+
elm[memberName] = value;
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
{
|
|
1440
|
+
initializeComponent(elm, hostRef, cmpMeta);
|
|
1441
|
+
}
|
|
1442
|
+
} else {
|
|
1443
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1444
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1445
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1446
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1447
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
endConnected();
|
|
1451
|
+
}
|
|
1452
|
+
};
|
|
1453
|
+
var setContentReference = (elm) => {
|
|
1454
|
+
const contentRefElm = elm["s-cr"] = doc.createComment(
|
|
1455
|
+
""
|
|
1456
|
+
);
|
|
1457
|
+
contentRefElm["s-cn"] = true;
|
|
1458
|
+
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1459
|
+
};
|
|
1460
|
+
var disconnectInstance = (instance) => {
|
|
1461
|
+
{
|
|
1462
|
+
safeCall(instance, "disconnectedCallback");
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
var disconnectedCallback = async (elm) => {
|
|
1466
|
+
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1467
|
+
const hostRef = getHostRef(elm);
|
|
1468
|
+
{
|
|
1469
|
+
if (hostRef.$rmListeners$) {
|
|
1470
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1471
|
+
hostRef.$rmListeners$ = void 0;
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1475
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1476
|
+
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1477
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1481
|
+
|
|
1482
|
+
// src/runtime/bootstrap-lazy.ts
|
|
1483
|
+
var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1484
|
+
var _a;
|
|
1485
|
+
const endBootstrap = createTime();
|
|
1486
|
+
const cmpTags = [];
|
|
1487
|
+
const exclude = options.exclude || [];
|
|
1488
|
+
const customElements2 = win.customElements;
|
|
1489
|
+
const head = doc.head;
|
|
1490
|
+
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1491
|
+
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
|
1492
|
+
const deferredConnectedCallbacks = [];
|
|
1493
|
+
let appLoadFallback;
|
|
1494
|
+
let isBootstrapping = true;
|
|
1495
|
+
Object.assign(plt, options);
|
|
1496
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
1497
|
+
let hasSlotRelocation = false;
|
|
1498
|
+
lazyBundles.map((lazyBundle) => {
|
|
1499
|
+
lazyBundle[1].map((compactMeta) => {
|
|
1500
|
+
var _a2;
|
|
1501
|
+
const cmpMeta = {
|
|
1502
|
+
$flags$: compactMeta[0],
|
|
1503
|
+
$tagName$: compactMeta[1],
|
|
1504
|
+
$members$: compactMeta[2],
|
|
1505
|
+
$listeners$: compactMeta[3]
|
|
1506
|
+
};
|
|
1507
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1508
|
+
hasSlotRelocation = true;
|
|
1509
|
+
}
|
|
1510
|
+
{
|
|
1511
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1512
|
+
}
|
|
1513
|
+
{
|
|
1514
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1515
|
+
}
|
|
1516
|
+
{
|
|
1517
|
+
cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
|
|
1518
|
+
}
|
|
1519
|
+
const tagName = cmpMeta.$tagName$;
|
|
1520
|
+
const HostElement = class extends HTMLElement {
|
|
1521
|
+
// StencilLazyHost
|
|
1522
|
+
constructor(self) {
|
|
1523
|
+
super(self);
|
|
1524
|
+
this.hasRegisteredEventListeners = false;
|
|
1525
|
+
self = this;
|
|
1526
|
+
registerHost(self, cmpMeta);
|
|
1527
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1528
|
+
{
|
|
1529
|
+
if (!self.shadowRoot) {
|
|
1530
|
+
{
|
|
1531
|
+
self.attachShadow({ mode: "open" });
|
|
1532
|
+
}
|
|
1533
|
+
} else {
|
|
1534
|
+
if (self.shadowRoot.mode !== "open") {
|
|
1535
|
+
throw new Error(
|
|
1536
|
+
`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${self.shadowRoot.mode} but Stencil only supports open shadow roots.`
|
|
1537
|
+
);
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
connectedCallback() {
|
|
1544
|
+
const hostRef = getHostRef(this);
|
|
1545
|
+
if (!this.hasRegisteredEventListeners) {
|
|
1546
|
+
this.hasRegisteredEventListeners = true;
|
|
1547
|
+
addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
|
|
1548
|
+
}
|
|
1549
|
+
if (appLoadFallback) {
|
|
1550
|
+
clearTimeout(appLoadFallback);
|
|
1551
|
+
appLoadFallback = null;
|
|
1552
|
+
}
|
|
1553
|
+
if (isBootstrapping) {
|
|
1554
|
+
deferredConnectedCallbacks.push(this);
|
|
1555
|
+
} else {
|
|
1556
|
+
plt.jmp(() => connectedCallback(this));
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
disconnectedCallback() {
|
|
1560
|
+
plt.jmp(() => disconnectedCallback(this));
|
|
1561
|
+
}
|
|
1562
|
+
componentOnReady() {
|
|
1563
|
+
return getHostRef(this).$onReadyPromise$;
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
cmpMeta.$lazyBundleId$ = lazyBundle[0];
|
|
1567
|
+
if (!exclude.includes(tagName) && !customElements2.get(tagName)) {
|
|
1568
|
+
cmpTags.push(tagName);
|
|
1569
|
+
customElements2.define(
|
|
1570
|
+
tagName,
|
|
1571
|
+
proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */)
|
|
1572
|
+
);
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
});
|
|
1576
|
+
if (cmpTags.length > 0) {
|
|
1577
|
+
if (hasSlotRelocation) {
|
|
1578
|
+
dataStyles.textContent += SLOT_FB_CSS;
|
|
1579
|
+
}
|
|
1580
|
+
{
|
|
1581
|
+
dataStyles.textContent += cmpTags.sort() + HYDRATED_CSS;
|
|
1582
|
+
}
|
|
1583
|
+
if (dataStyles.innerHTML.length) {
|
|
1584
|
+
dataStyles.setAttribute("data-styles", "");
|
|
1585
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
1586
|
+
if (nonce != null) {
|
|
1587
|
+
dataStyles.setAttribute("nonce", nonce);
|
|
1588
|
+
}
|
|
1589
|
+
head.insertBefore(dataStyles, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
isBootstrapping = false;
|
|
1593
|
+
if (deferredConnectedCallbacks.length) {
|
|
1594
|
+
deferredConnectedCallbacks.map((host) => host.connectedCallback());
|
|
1595
|
+
} else {
|
|
1596
|
+
{
|
|
1597
|
+
plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
endBootstrap();
|
|
1601
|
+
};
|
|
1602
|
+
|
|
1603
|
+
// src/runtime/fragment.ts
|
|
1604
|
+
var Fragment = (_, children) => children;
|
|
1605
|
+
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1606
|
+
if (listeners) {
|
|
1607
|
+
listeners.map(([flags, name, method]) => {
|
|
1608
|
+
const target = elm;
|
|
1609
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1610
|
+
const opts = hostListenerOpts(flags);
|
|
1611
|
+
plt.ael(target, name, handler, opts);
|
|
1612
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1613
|
+
});
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1617
|
+
var _a;
|
|
1618
|
+
try {
|
|
1619
|
+
{
|
|
1620
|
+
if (hostRef.$flags$ & 256 /* isListenReady */) {
|
|
1621
|
+
(_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
|
|
1622
|
+
} else {
|
|
1623
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
} catch (e) {
|
|
1627
|
+
consoleError(e);
|
|
1628
|
+
}
|
|
1629
|
+
};
|
|
1630
|
+
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
1631
|
+
passive: (flags & 1 /* Passive */) !== 0,
|
|
1632
|
+
capture: (flags & 2 /* Capture */) !== 0
|
|
1633
|
+
} : (flags & 2 /* Capture */) !== 0;
|
|
1634
|
+
|
|
1635
|
+
// src/runtime/nonce.ts
|
|
1636
|
+
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1637
|
+
|
|
1638
|
+
export { Fragment as F, Host as H, getRenderingRef as a, bootstrapLazy as b, createEvent as c, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|