@ptengine/widgets 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +38 -2
- package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/index-DRCOne2Q.js +1583 -0
- package/dist/cjs/index-DRCOne2Q.js.map +1 -0
- package/dist/cjs/index.cjs.js +107 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/pt-provider.cjs.entry.js +85 -0
- package/dist/cjs/pt-provider.cjs.entry.js.map +1 -0
- package/dist/cjs/ptengine-widgets.cjs.js +28 -0
- package/dist/cjs/ptengine-widgets.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/pt-provider/pt-provider.js +136 -0
- package/dist/collection/components/pt-provider/pt-provider.js.map +1 -0
- package/dist/collection/index.js +9 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/context.js +98 -0
- package/dist/collection/utils/context.js.map +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/pt-provider.d.ts +11 -0
- package/dist/components/pt-provider.js +2 -0
- package/dist/components/pt-provider.js.map +1 -0
- package/dist/define/pt-provider.d.ts +1 -0
- package/dist/define/pt-provider.js +5 -0
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/index-CZKQmozD.js +1559 -0
- package/dist/esm/index-CZKQmozD.js.map +1 -0
- package/dist/esm/index.js +102 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +14 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/pt-provider.entry.js +83 -0
- package/dist/esm/pt-provider.entry.js.map +1 -0
- package/dist/esm/ptengine-widgets.js +24 -0
- package/dist/esm/ptengine-widgets.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/ptengine-widgets/index.esm.js +2 -0
- package/dist/ptengine-widgets/index.esm.js.map +1 -0
- package/dist/ptengine-widgets/p-8a0ee9f5.entry.js +2 -0
- package/dist/ptengine-widgets/p-8a0ee9f5.entry.js.map +1 -0
- package/dist/ptengine-widgets/p-CZKQmozD.js +3 -0
- package/dist/ptengine-widgets/p-CZKQmozD.js.map +1 -0
- package/dist/ptengine-widgets/p-DQuL1Twl.js +2 -0
- package/dist/ptengine-widgets/p-DQuL1Twl.js.map +1 -0
- package/dist/ptengine-widgets/ptengine-widgets.css +1 -0
- package/dist/ptengine-widgets/ptengine-widgets.esm.js +2 -0
- package/dist/ptengine-widgets/ptengine-widgets.esm.js.map +1 -0
- package/dist/types/components/pt-provider/pt-provider.d.ts +59 -0
- package/dist/types/components.d.ts +107 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/stencil-public-runtime.d.ts +1879 -0
- package/dist/types/utils/context.d.ts +45 -0
- package/docs.json +86 -0
- package/hydrate/index.d.ts +287 -0
- package/hydrate/index.js +22214 -0
- package/hydrate/index.mjs +22204 -0
- package/hydrate/package.json +12 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +93 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t="ptengine-widgets";const e={hydratedSelectorName:"hydrated",lazyLoad:false,prop:true,updatable:true};var n=(t=>{t["Undefined"]="undefined";t["Null"]="null";t["String"]="string";t["Number"]="number";t["SpecialNumber"]="number";t["Boolean"]="boolean";t["BigInt"]="bigint";return t})(n||{});var r=(t=>{t["Array"]="array";t["Date"]="date";t["Map"]="map";t["Object"]="object";t["RegularExpression"]="regexp";t["Set"]="set";t["Channel"]="channel";t["Symbol"]="symbol";return t})(r||{});var o="type";var s="value";var i="serialized:";function l(t,e,n){const r=typeof HTMLElement!=="undefined"?HTMLElement.prototype:null;while(t&&t!==r){const r=Object.getOwnPropertyDescriptor(t,e);if(r&&(!n||r.get))return r;t=Object.getPrototypeOf(t)}return void 0}var c=(t,e)=>{var n;const r=e.t;const o=Object.entries((n=r.o)!=null?n:{});o.map((([n,[r]])=>{if(r&31||r&32){const r=t[n];const o=l(Object.getPrototypeOf(t),n,true)||Object.getOwnPropertyDescriptor(t,n);if(o){Object.defineProperty(t,n,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:true,enumerable:true})}if(e.i.has(n)){t[n]=e.i.get(n)}else if(r!==void 0){t[n]=r}}}))};var f=t=>{if(t.__stencil__getHostRef){return t.__stencil__getHostRef()}return void 0};var a=(t,n)=>{const r={l:0,$hostElement$:t,t:n,i:new Map,u:new Map};{r.v=new Promise((t=>r.$=t));t["s-p"]=[];t["s-rc"]=[]}const o=r;t.__stencil__getHostRef=()=>o;if(n.l&512&&e.prop){c(t,r)}return o};var u=(t,e)=>(0,console.error)(t,e);var d="o";var v="s";var $="t";var p="c";var h="s-id";var m="c-id";var b=1e3;var y=typeof window!=="undefined"?window:{};var g=y.HTMLElement||class{};var w={l:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,r)=>t.addEventListener(e,n,r),rel:(t,e,n,r)=>t.removeEventListener(e,n,r),ce:(t,e)=>new CustomEvent(t,e)};var j=(()=>{var t;let e=false;try{(t=y.document)==null?void 0:t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=true}}))}catch(t){}return e})();var O=t=>Promise.resolve(t);var x=false;var I=[];var k=[];var M=()=>{var t;return((t=y.document)==null?void 0:t.hidden)?L(S):w.raf(S)};var E=(t,e)=>n=>{t.push(n);if(!x){x=true;if(e&&w.l&4){L(S)}else{M()}}};var N=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){u(t)}}t.length=0};var S=()=>{N(I);{N(k);if(x=I.length>0){M()}}};var L=t=>O().then(t);var _=E(k,true);var U=t=>{const e=new URL(t,w.p);return e.origin!==y.location.origin?e.href:e.pathname};var C=t=>w.p=t;var A=t=>{const e=[];for(let n=0;n<t.length;n++){const r=t[n]["s-nr"]||void 0;if(r&&r.isConnected){e.push(r)}}return e};var D=(t,e,n,r)=>{if(t["s-ol"]&&t["s-ol"].isConnected){return}const o=document.createTextNode("");o["s-nr"]=t;if(!e["s-cr"]||!e["s-cr"].parentNode)return;const s=e["s-cr"].parentNode;const i=V(s,"appendChild");if(typeof r!=="undefined"){o["s-oo"]=r;const t=V(s,"childNodes");const e=[o];t.forEach((t=>{if(t["s-nr"])e.push(t)}));e.sort(((t,e)=>{if(!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0))return-1;else if(!e["s-oo"]||e["s-oo"]<t["s-oo"])return 1;return 0}));e.forEach((t=>i.call(s,t)))}else{i.call(s,o)}t["s-ol"]=o;t["s-sh"]=e["s-hn"]};var P=t=>typeof t["s-sn"]==="string"?t["s-sn"]:t.nodeType===1&&t.getAttribute("slot")||void 0;function R(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[];const r=this["s-sn"];if(t==null?void 0:t.flatten){console.error(`\n Flattening is not supported for Stencil non-shadow slots.\n You can use \`.childNodes\` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n `)}const o=this["s-cr"].parentElement;const s=o.__childNodes?o.childNodes:A(o.childNodes);s.forEach((t=>{if(r===P(t)){n.push(t)}}));if(e){return n.filter((t=>t.nodeType===1))}return n}.bind(t);t.assignedElements=e(true);t.assignedNodes=e(false)}function V(t,e){if("__"+e in t){const n=t["__"+e];if(typeof n!=="function")return n;return n.bind(t)}else{if(typeof t[e]!=="function")return t[e];return t[e].bind(t)}}var W=(t,e="")=>{{return()=>{}}};var H=new WeakMap;var T=(t,e)=>"sc-"+t.h;var q=t=>{t=typeof t;return t==="object"||t==="function"};var z=(t,e,...n)=>{let r=null;let o=false;let s=false;const i=[];const l=t=>{for(let e=0;e<t.length;e++){r=t[e];if(Array.isArray(r)){l(r)}else if(r!=null&&typeof r!=="boolean"){if(o=!q(r)){r=String(r)}else if(r.l===void 0){{u("Invalid vNode child")}continue}if(o&&s){i[i.length-1].m+=r}else{i.push(o?F(null,r):r)}s=o}}};l(n);const c=F(t,null);c.j=e;if(i.length>0){c.O=i}return c};var F=(t,e)=>{const n={l:0,I:t,m:e!=null?e:null,k:null,O:null};return n};var Y={};var B=t=>t&&t.I===Y;var J=(t,e,n,r)=>{var o,s,i,l;const c=W("hydrateClient",e);const a=t.shadowRoot;const u=[];const d=[];const v=[];const $=null;const p=F(e,null);p.k=t;if(y.document&&(!w.M||!w.M.size)){K(y.document.body,w.M=new Map)}t[h]=n;t.removeAttribute(h);r.N=G(p,u,d,$,t,t,n,v);let m=0;const b=u.length;let g;for(m;m<b;m++){g=u[m];const n=g.S+"."+g.L;const r=w.M.get(n);const s=g.k;if(!a){s["s-hn"]=Tt(e).toUpperCase();if(g.I==="slot"){s["s-cr"]=t["s-cr"]}}else if(((o=g.I)==null?void 0:o.toString().includes("-"))&&g.I!=="slot-fb"&&!g.k.shadowRoot){const t=f(g.k);if(t){const e=T(t.t);const n=y.document.querySelector(`style[sty-id="${e}"]`);if(n){$.unshift(n.cloneNode(true))}}}if(g.I==="slot"){g._=g.k["s-sn"]||g.k["name"]||null;if(g.O){g.l|=2;if(!g.k.childNodes.length){g.O.forEach((t=>{g.k.appendChild(t.k)}))}}else{g.l|=1}}if(r&&r.isConnected){if(r.parentElement.shadowRoot&&r["s-en"]===""){r.parentNode.insertBefore(s,r.nextSibling)}r.parentNode.removeChild(r);if(!a){s["s-oo"]=parseInt(g.L)}}if(r&&!r["s-id"]){w.M.delete(n)}}const j=[];const O=v.length;let x=0;let I;let k;let M;let E;let N=0;for(x;x<O;x++){I=v[x];if(!I||!I.length)continue;M=I.length;k=0;for(k;k<M;k++){E=I[k];if(!j[E.hostId]){j[E.hostId]=w.M.get(E.hostId)}if(!j[E.hostId])continue;const t=j[E.hostId];if(t.shadowRoot&&E.node.parentElement!==t){t.insertBefore(E.node,(i=(s=I[k-1])==null?void 0:s.node)==null?void 0:i.nextSibling)}if(!t.shadowRoot||!a){if(!E.slot["s-cr"]){E.slot["s-cr"]=t["s-cr"];if(!E.slot["s-cr"]&&t.shadowRoot){E.slot["s-cr"]=t}else{E.slot["s-cr"]=(t.__childNodes||t.childNodes)[0]}}D(E.node,E.slot,false,E.node["s-oo"]||N);if(((l=E.node.parentElement)==null?void 0:l.shadowRoot)&&E.node["getAttribute"]&&E.node.getAttribute("slot")){E.node.removeAttribute("slot")}}N=(E.node["s-oo"]||N)+1}}r.$hostElement$=t;c()};var G=(t,e,n,r,o,s,i,l=[])=>{let c;let f;let a;let u;if(s.nodeType===1){c=s.getAttribute(m);if(c){f=c.split(".");if(f[0]===i||f[0]==="0"){a=Q({l:0,S:f[0],L:f[1],U:f[2],C:f[3],I:s.tagName.toLowerCase(),k:s,j:{class:s.className||""}});e.push(a);s.removeAttribute(m);if(!t.O){t.O=[]}const o=a.k.getAttribute("s-sn");if(typeof o==="string"){if(a.I==="slot-fb"){X(o,f[2],a,s,t,e,n,r,l)}a.k["s-sn"]=o;a.k.removeAttribute("s-sn")}if(a.C!==void 0){t.O[a.C]=a}t=a}}if(s.shadowRoot){for(u=s.shadowRoot.childNodes.length-1;u>=0;u--){G(t,e,n,r,o,s.shadowRoot.childNodes[u],i,l)}}const d=s.__childNodes||s.childNodes;for(u=d.length-1;u>=0;u--){G(t,e,n,r,o,d[u],i,l)}}else if(s.nodeType===8){f=s.nodeValue.split(".");if(f[1]===i||f[1]==="0"){c=f[0];a=Q({S:f[1],L:f[2],U:f[3],C:f[4]||"0",k:s,j:null,O:null,A:null,_:null,I:null,m:null});if(c===$){a.k=tt(s,3);if(a.k&&a.k.nodeType===3){a.m=a.k.textContent;e.push(a);s.remove();if(i===a.S){if(!t.O){t.O=[]}t.O[a.C]=a}}}else if(c===p){a.k=tt(s,8);if(a.k&&a.k.nodeType===8){e.push(a);s.remove()}}else if(a.S===i){if(c===v){const o=s["s-sn"]=f[5]||"";X(o,f[2],a,s,t,e,n,r,l)}}}}else if(t&&t.I==="style"){const e=F(null,s.textContent);e.k=s;e.C="0";t.O=[e]}return t};var K=(t,e)=>{if(t.nodeType===1){const n=t[h]||t.getAttribute(h);if(n){e.set(n,t)}let r=0;if(t.shadowRoot){for(;r<t.shadowRoot.childNodes.length;r++){K(t.shadowRoot.childNodes[r],e)}}const o=t.__childNodes||t.childNodes;for(r=0;r<o.length;r++){K(o[r],e)}}else if(t.nodeType===8){const n=t.nodeValue.split(".");if(n[0]===d){e.set(n[1]+"."+n[2],t);t.nodeValue="";t["s-en"]=n[3]}}};var Q=t=>{const e={l:0,S:null,L:null,U:null,C:"0",k:null,j:null,O:null,A:null,_:null,I:null,m:null};return{...e,...t}};function X(t,e,n,r,o,s,i,l,c){r["s-sr"]=true;n._=t||null;n.I="slot";const f=(o==null?void 0:o.k)?o.k["s-id"]||o.k.getAttribute("s-id"):"";{const s=n.k;const i=f&&f!==n.S&&o.k.shadowRoot;Z(c,e,t,r,i?f:n.S);R(r);if(i){o.k.insertBefore(s,o.k.children[0])}}s.push(n);i.push(n);if(!o.O){o.O=[]}o.O[n.C]=n}var Z=(t,e,n,r,o)=>{var s,i;let l=r.nextSibling;t[e]=t[e]||[];if(!l||((s=l.nodeValue)==null?void 0:s.startsWith(v+".")))return;do{if(l&&((l["getAttribute"]&&l.getAttribute("slot")||l["s-sn"])===n||n===""&&!l["s-sn"]&&(!l["getAttribute"]||!l.getAttribute("slot"))&&(l.nodeType===8||l.nodeType===3))){l["s-sn"]=n;t[e].push({slot:r,node:l,hostId:o})}l=l==null?void 0:l.nextSibling}while(l&&!((i=l.nodeValue)==null?void 0:i.startsWith(v+".")))};var tt=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n};var et=t=>{if(!t)return void 0;const e=Object.keys(t);if(e.length===0)return void 0;let n=false;for(const r of e){if(n)break;for(const e of t[r]){if(typeof e==="string"){n=true;break}}}if(!n)return t;const r={};for(const n of e){r[n]=t[n].map((t=>typeof t==="string"?{[t]:0}:t))}return r};var nt=class t{static fromLocalValue(e){const n=e[o];const r=s in e?e[s]:void 0;switch(n){case"string":return r;case"boolean":return r;case"bigint":return BigInt(r);case"undefined":return void 0;case"null":return null;case"number":if(r==="NaN")return NaN;if(r==="-0")return-0;if(r==="Infinity")return Infinity;if(r==="-Infinity")return-Infinity;return r;case"array":return r.map((e=>t.fromLocalValue(e)));case"date":return new Date(r);case"map":const e=new Map;for(const[n,o]of r){const r=typeof n==="object"&&n!==null?t.fromLocalValue(n):n;const s=t.fromLocalValue(o);e.set(r,s)}return e;case"object":const o={};for(const[e,n]of r){o[e]=t.fromLocalValue(n)}return o;case"regexp":const{pattern:s,flags:i}=r;return new RegExp(s,i);case"set":const l=new Set;for(const e of r){l.add(t.fromLocalValue(e))}return l;case"symbol":return Symbol(r);default:throw new Error(`Unsupported type: ${n}`)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if(typeof t!=="object"||t===null){return false}if(!t.hasOwnProperty(o)){return false}const e=t[o];const i=Object.values({...n,...r}).includes(e);if(!i){return false}if(e!=="null"&&e!=="undefined"){return t.hasOwnProperty(s)}return true}};function rt(t){const e=atob(t);const n=new Uint8Array(e.length);for(let t=0;t<e.length;t++){n[t]=e.charCodeAt(t)}return(new TextDecoder).decode(n)}function ot(t){if(typeof t!=="string"||!t.startsWith(i)){return t}return nt.fromLocalValue(JSON.parse(rt(t.slice(i.length))))}var st=(t,e,n)=>{if(typeof t==="string"&&t.startsWith(i)){t=ot(t);return t}if(t!=null&&!q(t)){return t}return t};var it=(t,e,n)=>{const r=w.ce(e,n);t.dispatchEvent(r);return r};var lt;var ct=(t,e,n)=>{const r=e.O[n];let o=0;let s;let i;{if(!y.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.")}s=r.k=y.document.createElement(r.I);if(r.O){const e=r.I==="template"?s.content:s;for(o=0;o<r.O.length;++o){i=ct(t,r,o);if(i){e.appendChild(i)}}}}s["s-hn"]=lt;return s};var ft=(t,e,n,r,o,s)=>{let i=t;let l;if(n.I==="template"){i=i.content}for(;o<=s;++o){if(r[o]){l=ct(null,n,o);if(l){r[o].k=l;$t(i,l,e)}}}};var at=(t,e,n)=>{for(let r=e;r<=n;++r){const e=t[r];if(e){const t=e.k;if(t){t.remove()}}}};var ut=(t,e,n,r,o=false)=>{let s=0;let i=0;let l=e.length-1;let c=e[0];let f=e[l];let a=r.length-1;let u=r[0];let d=r[a];let v;const $=n.I==="template"?t.content:t;while(s<=l&&i<=a){if(c==null){c=e[++s]}else if(f==null){f=e[--l]}else if(u==null){u=r[++i]}else if(d==null){d=r[--a]}else if(dt(c,u,o)){vt(c,u,o);c=e[++s];u=r[++i]}else if(dt(f,d,o)){vt(f,d,o);f=e[--l];d=r[--a]}else if(dt(c,d,o)){vt(c,d,o);$t($,c.k,f.k.nextSibling);c=e[++s];d=r[--a]}else if(dt(f,u,o)){vt(f,u,o);$t($,f.k,c.k);f=e[--l];u=r[++i]}else{{v=ct(e&&e[i],n,i);u=r[++i]}if(v){{$t(c.k.parentNode,v,c.k)}}}}if(s>l){ft(t,r[a+1]==null?null:r[a+1].k,n,r,i,a)}else if(i>a){at(e,s,l)}};var dt=(t,e,n=false)=>{if(t.I===e.I){if(n&&!t.A&&e.A){t.A=e.A}return true}return false};var vt=(t,n,r=false)=>{const o=n.k=t.k;const s=t.O;const i=n.O;{if(s!==null&&i!==null){ut(o,s,n,i,r)}else if(i!==null){ft(o,null,n,i,0,i.length-1)}else if(!r&&e.updatable&&s!==null){at(s,0,s.length-1)}else if(r&&e.updatable&&s!==null&&i===null){n.O=s}}};var $t=(t,e,n,r)=>{{return t==null?void 0:t.insertBefore(e,n)}};var pt=(t,e,n=false)=>{const r=t.$hostElement$;const o=t.N||F(null,null);const s=B(e);const i=s?e:z(null,null,e);lt=r.tagName;if(n&&i.j){for(const t of Object.keys(i.j)){if(r.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){i.j[t]=r[t]}}}i.I=null;i.l|=4;t.N=i;i.k=o.k=r;vt(o,i,n)};var ht=(t,e)=>{if(e&&!t.D&&e["s-p"]){const n=e["s-p"].push(new Promise((r=>t.D=()=>{e["s-p"].splice(n-1,1);r()})))}};var mt=(t,e)=>{{t.l|=16}if(t.l&4){t.l|=512;return}ht(t,t.P);const n=()=>bt(t,e);if(e){queueMicrotask((()=>{n()}));return}return _(n)};var bt=(t,e)=>{const n=t.$hostElement$;const r=W("scheduleUpdate",t.t.h);const o=n;if(!o){throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`)}let s;if(e){s=It(o,"componentWillLoad",void 0,n)}else{s=It(o,"componentWillUpdate",void 0,n)}s=yt(s,(()=>It(o,"componentWillRender",void 0,n)));r();return yt(s,(()=>wt(t,o)))};var yt=(t,e)=>gt(t)?t.then(e).catch((t=>{console.error(t);e()})):e();var gt=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";var wt=async(t,e,n)=>{var r;const o=t.$hostElement$;const s=W("update",t.t.h);const i=o["s-rc"];const l=W("render",t.t.h);{jt(t,e)}if(i){i.map((t=>t()));o["s-rc"]=void 0}l();s();{const e=(r=o["s-p"])!=null?r:[];const n=()=>Ot(t);if(e.length===0){n()}else{Promise.all(e).then(n).catch(n);t.l|=4;e.length=0}}};var jt=(t,e,n,r)=>{try{e=e.render&&e.render();{t.l&=-17}{t.l|=2}}catch(e){u(e,t.$hostElement$)}return null};var Ot=t=>{const e=t.t.h;const n=t.$hostElement$;const r=W("postUpdate",e);const o=n;const s=t.P;It(o,"componentDidRender",void 0,n);if(!(t.l&64)){t.l|=64;{kt(n)}It(o,"componentDidLoad",void 0,n);r();{t.$(n);if(!s){xt()}}}else{It(o,"componentDidUpdate",void 0,n);r()}{if(t.D){t.D();t.D=void 0}if(t.l&512){L((()=>mt(t,false)))}t.l&=-517}};var xt=e=>{var n;L((()=>it(y,"appload",{detail:{namespace:t}})));{if((n=w.M)==null?void 0:n.size){w.M.clear()}}};var It=(t,e,n,r)=>{if(t&&t[e]){try{return t[e](n)}catch(t){u(t,r)}}return void 0};var kt=t=>{var n;return t.setAttribute((n=e.hydratedSelectorName)!=null?n:"hydrated","")};var Mt=(t,e)=>f(t).i.get(e);var Et=(t,e,n,r)=>{const o=f(t);if(!o){return}const s=t;const i=o.i.get(e);const l=o.l;const c=s;n=st(n);const a=Number.isNaN(i)&&Number.isNaN(n);const d=n!==i&&!a;if(d){o.i.set(e,n);if(r.R){const t=r.R[e];if(t){t.map((t=>{try{const[[r,s]]=Object.entries(t);if(l&128||s&1){if(!c){o.V.push((()=>{o.W[r](n,i,e)}))}else{c[r](n,i,e)}}}catch(t){u(t,s)}}))}}if(l&2){if(c.componentShouldUpdate){const t=c.componentShouldUpdate(n,i,e);if(t===false&&!(l&16)){return}}if(!(l&16)){mt(o,false)}}}};var Nt=(t,n,r)=>{var o,s;const i=t.prototype;{{if(t.watchers&&!n.R){n.R=et(t.watchers)}if(t.deserializers&&!n.H){n.H=t.deserializers}if(t.serializers&&!n.T){n.T=t.serializers}}const r=Object.entries((o=n.o)!=null?o:{});r.map((([t,[e]])=>{if(e&31||e&32){const{get:r,set:o}=l(i,t)||{};if(r)n.o[t][0]|=2048;if(o)n.o[t][0]|=4096;{Object.defineProperty(i,t,{get(){{return r?r.apply(this):Mt(this,t)}},configurable:true,enumerable:true})}Object.defineProperty(i,t,{set(r){const s=f(this);if(!s){return}if(o){const i=e&32?this[t]:s.$hostElement$[t];if(typeof i==="undefined"&&s.i.get(t)){r=s.i.get(t)}o.apply(this,[st(r)]);r=e&32?this[t]:s.$hostElement$[t];Et(this,t,r,n);return}{Et(this,t,r,n);return}}})}}));{const o=new Map;i.attributeChangedCallback=function(t,s,l){w.jmp((()=>{var c;const a=o.get(t);const u=f(this);if(this.hasOwnProperty(a)&&e.lazyLoad);if(i.hasOwnProperty(a)&&typeof this[a]==="number"&&this[a]==l){return}else if(a==null){const e=u==null?void 0:u.l;if(u&&e&&!(e&8)&&l!==s){const r=this;const o=r;const i=(c=n.R)==null?void 0:c[t];i==null?void 0:i.forEach((n=>{const[[r,i]]=Object.entries(n);if(o[r]!=null&&(e&128||i&1)){o[r].call(o,l,s,t)}}))}return}const d=r.find((([t])=>t===a));const v=d?d[1][0]:0;const $=v&4;const p=$&&l===null&&this[a]===void 0;if($){l=l===null||l==="false"?false:true}const h=Object.getOwnPropertyDescriptor(i,a);if(!p&&l!=this[a]&&(!h.get||!!h.set)){this[a]=l}}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=n.R)!=null?s:{}),...r.filter((([t,e])=>e[0]&31)).map((([t,e])=>{const n=e[1]||t;o.set(n,t);return n}))]))}}return t};var St=async(t,e,n,r)=>{try{if((e.l&32)===0){e.l|=32;e.l&=-1025;{const n=t.localName;customElements.whenDefined(n).then((()=>e.l|=128))}}const n=e.P;const r=()=>mt(e,true);if(n&&n["s-rc"]){n["s-rc"].push(r)}else{r()}}catch(n){u(n,t);if(e.D){e.D();e.D=void 0}if(e.$&&!(e.l&1024)){e.$(t)}}};var Lt=(t,e)=>{};var _t=t=>{if((w.l&1)===0){const e=f(t);if(!e){return}const n=e.t;const r=W("connectedCallback",n.h);if(!(e.l&1)){e.l|=1;let r;{r=t.getAttribute(h);if(r){J(t,n.h,r,e)}}{let n=t;while(n=n.parentNode||n.host){if(n.nodeType===1&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){ht(e,e.P=n);break}}}if(n.o){Object.entries(n.o).map((([e,[n]])=>{if(n&31&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e];t[e]=n}}))}{St(t,e)}}else{At(t,e,n.q);if(e==null?void 0:e.W);else if(e.l&1024){setTimeout((()=>St(t,e)),b)}else if(e==null?void 0:e.v){e.v.then((()=>Lt()))}}r()}};var Ut=async t=>{if((w.l&1)===0){const e=f(t);{if(e==null?void 0:e.F){e.F.map((t=>t()));e.F=void 0}}}if(H.has(t)){H.delete(t)}if(t.shadowRoot&&H.has(t.shadowRoot)){H.delete(t.shadowRoot)}};var Ct=(t,e)=>{const n={l:e[0],h:e[1]};try{{n.o=e[2]}{n.q=e[3]}{n.R=et(t.R);n.H=t.H;n.T=t.T}const r=t.prototype.connectedCallback;const o=t.prototype.disconnectedCallback;Object.assign(t.prototype,{__hasHostListenerAttached:false,__registerHost(){a(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=f(this);if(!t){return}At(this,t,n.q);this.__hasHostListenerAttached=true}_t(this);if(r){r.call(this)}},disconnectedCallback(){Ut(this);if(o){o.call(this)}},__attachShadow(){{this.shadowRoot=this}}});Object.defineProperty(t,"is",{value:n.h,configurable:true});return Nt(t,n)}catch(e){u(e);return t}};var At=(t,e,n,r)=>{if(n&&y.document){n.map((([n,r,o])=>{const s=t;const i=Dt(e,o);const l=Pt(n);w.ael(s,r,i,l);(e.F=e.F||[]).push((()=>w.rel(s,r,i,l)))}))}};var Dt=(t,e)=>n=>{try{{t.$hostElement$[e](n)}}catch(e){u(e,t.$hostElement$)}};var Pt=t=>j?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;var Rt=t=>w.Y=t;var Vt=t=>Object.assign(w,t);var Wt=new WeakMap;function Ht(t,e){let n=Wt.get(e);if(!n){const t={l:0,h:e.tagName};n={l:0,t,$hostElement$:e};Wt.set(e,n)}pt(n,t)}function Tt(t){return t}const qt="@ptengine/client";const zt="context-provider";class Ft extends Event{constructor(t,e,n=false){super("context-request",{bubbles:true,composed:true,cancelable:true});this.context=t;this.callback=e;this.subscribe=n}}function Yt(t,e,n=true){let r;let o=false;let s=false;let i=0;let l=0;const c=()=>{const c=++i;t.dispatchEvent(new Ft(qt,((t,n)=>{if(s||o&&c!==l){n?.();return}o=true;l=c;if(n)r=n;e(t)}),n))};c();const f=()=>{if(!o&&!s&&t.isConnected)c()};if(!o&&typeof customElements!=="undefined"){void customElements.whenDefined("pt-provider").then(f)}const a=()=>f();if(!o&&typeof document!=="undefined"){document.addEventListener(zt,a)}return()=>{s=true;if(typeof document!=="undefined")document.removeEventListener(zt,a);r?.()}}export{zt as CONTEXT_PROVIDER_EVENT,Ft as ContextRequestEvent,g as H,qt as PT_CLIENT_CONTEXT,U as getAssetPath,Ct as p,Ht as render,Yt as requestClient,C as setAssetPath,Rt as setNonce,Vt as setPlatformOptions,Tt as t};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|