joe-stencil-library 0.0.6 → 0.0.8

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.
@@ -99,6 +99,7 @@ var registerHost = (hostElement, cmpMeta) => {
99
99
  hostElement.__stencil__getHostRef = () => ref;
100
100
  return ref;
101
101
  };
102
+ var isMemberInElement = (elm, memberName) => memberName in elm;
102
103
  var consoleError = (e, el) => (0, console.error)(e, el);
103
104
 
104
105
  // src/client/client-load-module.ts
@@ -1032,6 +1033,25 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1032
1033
  }
1033
1034
  return propValue;
1034
1035
  };
1036
+ var getElement = (ref) => {
1037
+ var _a;
1038
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
1039
+ };
1040
+
1041
+ // src/runtime/event-emitter.ts
1042
+ var createEvent = (ref, name, flags) => {
1043
+ const elm = getElement(ref);
1044
+ return {
1045
+ emit: (detail) => {
1046
+ return emitEvent(elm, name, {
1047
+ bubbles: true,
1048
+ composed: true,
1049
+ cancelable: true,
1050
+ detail
1051
+ });
1052
+ }
1053
+ };
1054
+ };
1035
1055
  var emitEvent = (elm, name, opts) => {
1036
1056
  const ev = plt.ce(name, opts);
1037
1057
  elm.dispatchEvent(ev);
@@ -1041,7 +1061,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1041
1061
  if (oldValue === newValue) {
1042
1062
  return;
1043
1063
  }
1044
- memberName.toLowerCase();
1064
+ let isProp = isMemberInElement(elm, memberName);
1065
+ let ln = memberName.toLowerCase();
1045
1066
  if (memberName === "style") {
1046
1067
  {
1047
1068
  for (const prop in oldValue) {
@@ -1063,8 +1084,28 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1063
1084
  }
1064
1085
  }
1065
1086
  }
1087
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1088
+ if (memberName[2] === "-") {
1089
+ memberName = memberName.slice(3);
1090
+ } else if (isMemberInElement(win, ln)) {
1091
+ memberName = ln.slice(2);
1092
+ } else {
1093
+ memberName = ln[2] + memberName.slice(3);
1094
+ }
1095
+ if (oldValue || newValue) {
1096
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1097
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1098
+ if (oldValue) {
1099
+ plt.rel(elm, memberName, oldValue, capture);
1100
+ }
1101
+ if (newValue) {
1102
+ plt.ael(elm, memberName, newValue, capture);
1103
+ }
1104
+ }
1066
1105
  } else ;
1067
1106
  };
1107
+ var CAPTURE_EVENT_SUFFIX = "Capture";
1108
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1068
1109
 
1069
1110
  // src/runtime/vdom/update-element.ts
1070
1111
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -1936,6 +1977,7 @@ function transformTag(tag) {
1936
1977
  }
1937
1978
 
1938
1979
  exports.bootstrapLazy = bootstrapLazy;
1980
+ exports.createEvent = createEvent;
1939
1981
  exports.h = h;
1940
1982
  exports.promiseResolve = promiseResolve;
1941
1983
  exports.registerInstance = registerInstance;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUSIRKMT.js');
3
+ var index = require('./index-MbqmDEbk.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUSIRKMT.js');
3
+ var index = require('./index-MbqmDEbk.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  const defineCustomElements = async (win, options) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DUSIRKMT.js');
3
+ var index = require('./index-MbqmDEbk.js');
4
4
  var index$1 = require('./index.cjs.js');
5
5
 
6
6
  const myComponentCss = () => `:host{display:block}`;
@@ -8,6 +8,7 @@ const myComponentCss = () => `:host{display:block}`;
8
8
  const MyComponent = class {
9
9
  constructor(hostRef) {
10
10
  index.registerInstance(this, hostRef);
11
+ this.myClick = index.createEvent(this, "myClick");
11
12
  }
12
13
  /**
13
14
  * The first name
@@ -21,11 +22,22 @@ const MyComponent = class {
21
22
  * The last name
22
23
  */
23
24
  last;
25
+ /**
26
+ * Click event - 点击事件
27
+ */
28
+ myClick;
24
29
  getText() {
25
30
  return index$1.format(this.first, this.middle, this.last);
26
31
  }
32
+ handleClick = () => {
33
+ this.myClick.emit({
34
+ first: this.first,
35
+ middle: this.middle,
36
+ last: this.last,
37
+ });
38
+ };
27
39
  render() {
28
- return index.h("div", { key: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
40
+ return index.h("div", { key: '7b797ef9d028ff9aadbcfa34b9f678b05989cd3c', onClick: this.handleClick, style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
29
41
  }
30
42
  };
31
43
  MyComponent.style = myComponentCss();
@@ -13,11 +13,22 @@ export class MyComponent {
13
13
  * The last name
14
14
  */
15
15
  last;
16
+ /**
17
+ * Click event - 点击事件
18
+ */
19
+ myClick;
16
20
  getText() {
17
21
  return format(this.first, this.middle, this.last);
18
22
  }
23
+ handleClick = () => {
24
+ this.myClick.emit({
25
+ first: this.first,
26
+ middle: this.middle,
27
+ last: this.last,
28
+ });
29
+ };
19
30
  render() {
20
- return h("div", { key: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
31
+ return h("div", { key: '7b797ef9d028ff9aadbcfa34b9f678b05989cd3c', onClick: this.handleClick, style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
21
32
  }
22
33
  static get is() { return "my-component"; }
23
34
  static get encapsulation() { return "shadow"; }
@@ -92,4 +103,22 @@ export class MyComponent {
92
103
  }
93
104
  };
94
105
  }
106
+ static get events() {
107
+ return [{
108
+ "method": "myClick",
109
+ "name": "myClick",
110
+ "bubbles": true,
111
+ "cancelable": true,
112
+ "composed": true,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Click event - \u70B9\u51FB\u4E8B\u4EF6"
116
+ },
117
+ "complexType": {
118
+ "original": "{ first: string; middle: string; last: string }",
119
+ "resolved": "{ first: string; middle: string; last: string; }",
120
+ "references": {}
121
+ }
122
+ }];
123
+ }
95
124
  }
@@ -1 +1 @@
1
- var t,n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(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",t))(e||{}),l="type",o="value",s="serialized:",r=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.o.has(e)?n.o.get(e):l}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>(0,console.error)(t,n),u=new Map,f="s-id",a="sty-id",d="c-id",$="undefined"!=typeof window?window:{},p=$.HTMLElement||class{},h={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},m=(()=>{try{return!!$.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),y=!!m&&(()=>!!$.document&&Object.getOwnPropertyDescriptor($.document.adoptedStyleSheets,"length").writable)(),b=!1,v=[],g=[],w=(t,n)=>e=>{t.push(e),b||(b=!0,n&&4&h.i?S(O):h.raf(O))},j=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){c(t)}t.length=0},O=()=>{j(v),j(g),(b=v.length>0)&&h.raf(O)},S=t=>Promise.resolve(void 0).then(t),k=w(g,!0),x=t=>{const n=new URL(t,h.u);return n.origin!==$.location.origin?n.href:n.pathname},I=t=>h.u=t;function M(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(y?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var N=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,r=E(s,"appendChild");if(void 0!==l){o["s-oo"]=l;const t=E(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>r.call(s,t)))}else r.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]};function E(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var _=new WeakMap,C=(t,n,e)=>{let l=u.get(t);m&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,u.set(t,l)},A=(t,n)=>{var e,l,o;const s=L(n),r=u.get(s);if(!$.document)return s;if(t=11===t.nodeType?t:$.document,r)if("string"==typeof r){let o,i=_.get(t=t.head||t);i||_.set(t,i=new Set);const c=t.querySelector(`[${a}="${s}"]`);if(c)c.textContent=r;else if(!i.has(s)){o=$.document.createElement("style"),o.textContent=r;const c=null!=(e=h.$)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=$.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=c&&o.setAttribute("nonce",c),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(m){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(r),y?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=r+n.textContent:t.prepend(o)}else t.append(o);1&n.i&&t.insertBefore(o,null),4&n.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let n=_.get(t);if(n||_.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(r.constructor===e.CSSStyleSheet)l=r;else{l=new e.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)l.insertRule(r.cssRules[t].cssText,t)}y?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s)}}return s},L=t=>"sc-"+t.p,D=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),U=t=>"object"==(t=typeof t)||"function"===t,P=(t,n,...e)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!U(l))&&(l+=""),s&&r?i[i.length-1].h+=l:i.push(s?R(null,l):l),r=s)};c(e),n&&n.key&&(o=n.key);const u=R(t,null);return u.m=n,i.length>0&&(u.v=i),u.j=o,u},R=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,v:null,m:null,j:null}),V={},W=(t,n,e,l,o,s,r,i=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(d),c&&(u=c.split("."),u[0]===r||"0"===u[0])){f=F({i:0,k:u[0],I:u[1],M:u[2],N:u[3],O:s.tagName.toLowerCase(),S:s,m:{class:s.className||""}}),n.push(f),s.removeAttribute(d),t.v||(t.v=[]);const o=f.S.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===f.O&&H(o,u[2],f,s,t,n,e,l,i),f.S["s-sn"]=o,f.S.removeAttribute("s-sn")),void 0!==f.N&&(t.v[f.N]=f),t=f,l&&"0"===f.M&&(l[f.N]=f.S)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)W(t,n,e,l,o,s.shadowRoot.childNodes[a],r,i);const $=s.__childNodes||s.childNodes;for(a=$.length-1;a>=0;a--)W(t,n,e,l,o,$[a],r,i)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===r||"0"===u[1])&&(c=u[0],f=F({k:u[1],I:u[2],M:u[3],N:u[4]||"0",S:s,m:null,v:null,j:null,_:null,O:null,h:null}),"t"===c?(f.S=Y(s,3),f.S&&3===f.S.nodeType&&(f.h=f.S.textContent,n.push(f),s.remove(),r===f.k&&(t.v||(t.v=[]),t.v[f.N]=f),l&&"0"===f.M&&(l[f.N]=f.S))):"c"===c?(f.S=Y(s,8),f.S&&8===f.S.nodeType&&(n.push(f),s.remove())):f.k===r&&("s"===c?H(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,l,i):"r"===c&&l&&s.remove()));else if(t&&"style"===t.O){const n=R(null,s.textContent);n.S=s,n.N="0",t.v=[n]}return t},B=(t,n)=>{if(1===t.nodeType){const e=t[f]||t.getAttribute(f);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)B(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)B(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},F=t=>({i:0,k:null,I:null,M:null,N:"0",S:null,m:null,v:null,j:null,_:null,O:null,h:null,...t});function H(t,n,e,l,o,s,r,i,c){l["s-sr"]=!0,e._=t||null,e.O="slot";const u=(null==o?void 0:o.S)?o.S["s-id"]||o.S.getAttribute("s-id"):"";if(i&&$.document){const s=e.S=$.document.createElement(e.O);e._&&e.S.setAttribute("name",t),o.S.shadowRoot&&u&&u!==e.k?E(o.S,"insertBefore")(s,E(o.S,"children")[0]):E(E(l,"parentNode"),"insertBefore")(s,l),z(c,n,t,l,e.k),l.remove(),"0"===e.M&&(i[e.N]=e.S)}else{const s=e.S,r=u&&u!==e.k&&o.S.shadowRoot;z(c,n,t,l,r?u:e.k),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?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;return(o.__childNodes?o.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n})(o.childNodes)).forEach((t=>{l===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(l),r&&o.S.insertBefore(s,o.S.children[0])}s.push(e),r.push(e),o.v||(o.v=[]),o.v[e.N]=e}var q,z=(t,n,e,l,o)=>{var s,r;let i=l.nextSibling;if(t[n]=t[n]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==e&&(""!==e||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=e,t[n].push({slot:l,node:i,hostId:o})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},Y=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},J=class t{static fromLocalValue(n){const e=n[l],s=o in n?n[o]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,l]of s){const o="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(l);n.set(o,s)}return n;case"object":const l={};for(const[n,e]of s)l[n]=t.fromLocalValue(e);return l;case"regexp":const{pattern:o,flags:r}=s;return RegExp(o,r);case"set":const i=new Set;for(const n of s)i.add(t.fromLocalValue(n));return i;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+e)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(l))return!1;const s=t[l];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(o))}},G=(t,n)=>"string"==typeof t&&t.startsWith(s)?t=function(t){return"string"==typeof t&&t.startsWith(s)?J.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||U(t)?t:1&n?t+"":t,K=(t,n,e,l)=>{if(e!==l&&(n.toLowerCase(),"style"===n)){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}},Q=(t,n)=>{const e=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.m||{},o=n.m||{};for(const t of T(Object.keys(l)))t in o||K(e,t,l[t],void 0);for(const t of T(Object.keys(o)))K(e,t,l[t],o[t])};function T(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var X=(t,n,e)=>{const l=n.v[e];let o,s,r=0;if(null!=l.h)o=l.S=$.document.createTextNode(l.h);else{if(!$.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.S=$.document.createElement(l.O),Q(null,l),l.v){const n="template"===l.O?o.content:o;for(r=0;r<l.v.length;++r)s=X(t,l,r),s&&n.appendChild(s)}}return o["s-hn"]=q,o},Z=(t,n,e,l,o,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===q&&(i=i.shadowRoot),"template"===e.O&&(i=i.content);o<=s;++o)l[o]&&(r=X(null,e,o),r&&(l[o].S=r,lt(i,r,n)))},tt=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.S;t&&t.remove()}}},nt=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),et=(t,n,e=!1)=>{const l=n.S=t.S,o=t.v,s=n.v,r=n.h;null==r?(Q(t,n),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=n.length-1,d=n[0],$=n[a],p=l.length-1,h=l[0],m=l[p];const y="template"===e.O?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=n[++i];else if(null==$)$=n[--a];else if(null==h)h=l[++c];else if(null==m)m=l[--p];else if(nt(d,h,o))et(d,h,o),d=n[++i],h=l[++c];else if(nt($,m,o))et($,m,o),$=n[--a],m=l[--p];else if(nt(d,m,o))et(d,m,o),lt(y,d.S,$.S.nextSibling),d=n[++i],m=l[--p];else if(nt($,h,o))et($,h,o),lt(y,$.S,d.S),$=n[--a],h=l[++c];else{for(u=-1,f=i;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===h.j){u=f;break}u>=0?(r=n[u],r.O!==h.O?s=X(n&&n[c],e,u):(et(r,h,o),n[u]=void 0,s=r.S),h=l[++c]):(s=X(n&&n[c],e,c),h=l[++c]),s&&lt(d.S.parentNode,s,d.S)}i>a?Z(t,null==l[p+1]?null:l[p+1].S,e,l,c,p):c>p&&tt(n,i,a)})(l,o,n,s,e):null!==s?(null!==t.h&&(l.textContent=""),Z(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.v=o):tt(o,0,o.length-1)):t.h!==r&&(l.data=r)},lt=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),ot=(t,n,e=!1)=>{const l=t.$hostElement$,o=t.C||R(null,null),s=(t=>t&&t.O===V)(n)?n:P(null,null,n);if(q=l.tagName,e&&s.m)for(const t of Object.keys(s.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=l[t]);s.O=null,s.i|=4,t.C=s,s.S=o.S=l.shadowRoot||l,et(o,s,e)},st=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t.A=()=>{n["s-p"].splice(e-1,1),l()})))}},rt=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);st(t,t.L);const e=()=>it(t,n);if(!n)return k(e);queueMicrotask((()=>{e()}))},it=(t,n)=>{const e=t.$hostElement$,l=e;if(!l)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=pt(l,n?"componentWillLoad":"componentWillUpdate",void 0,e),o=ct(o,(()=>pt(l,"componentWillRender",void 0,e))),ct(o,(()=>ft(t,l,n)))},ct=(t,n)=>ut(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),ut=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ft=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l,e=t.$hostElement$,l=n.i,o=A(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(t);at(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>dt(t);0===n.length?e():(Promise.all(n).then(e),t.i|=4,n.length=0)}},at=(t,n,e,l)=>{try{n=n.render(),t.i&=-17,t.i|=2,ot(t,n,l)}catch(n){c(n,t.$hostElement$)}return null},dt=t=>{const n=t.$hostElement$,e=n,l=t.L;pt(e,"componentDidRender",void 0,n),64&t.i?pt(e,"componentDidUpdate",void 0,n):(t.i|=64,ht(n),pt(e,"componentDidLoad",void 0,n),t.D(n),l||$t()),t.A&&(t.A(),t.A=void 0),512&t.i&&S((()=>rt(t,!1))),t.i&=-517},$t=()=>{var t;S((()=>(t=>{const n=h.ce("appload",{detail:{namespace:"joe-stencil-library"}});return t.dispatchEvent(n),n})($))),(null==(t=h.U)?void 0:t.size)&&h.U.clear()},pt=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){c(t,l)}},ht=t=>t.classList.add("hydrated"),mt=(t,n,e,l)=>{const o=i(t);if(!o)return;const s=t,r=o.o.get(n),c=o.i,u=s;if(!((e=G(e,l.t[n][0]))===r||Number.isNaN(r)&&Number.isNaN(e)||(o.o.set(n,e),2!=(18&c)))){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,r,n))return;rt(o,!1)}},yt=(t,n)=>{var e,l;const o=t.prototype;if(n.t){const s=Object.entries(null!=(e=n.t)?e:{});s.map((([t,[e]])=>{if(31&e||32&e){const{get:l,set:s}=Object.getOwnPropertyDescriptor(o,t)||{};l&&(n.t[t][0]|=2048),s&&(n.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return l?l.apply(this):((t,n)=>i(this).o.get(n))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(l){const o=i(this);if(o){if(s)return void 0===(32&e?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(l=o.o.get(t)),s.call(this,G(l,e)),void mt(this,t,l=32&e?this[t]:o.$hostElement$[t],n);mt(this,t,l,n)}}})}}));{const e=new Map;o.attributeChangedCallback=function(t,l,r){h.jmp((()=>{var c;const u=e.get(t),f=i(this);if(this.hasOwnProperty(u),o.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==r)return;if(null==u){const e=null==f?void 0:f.i;if(f&&e&&!(8&e)&&r!==l){const o=this,s=null==(c=n.P)?void 0:c[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=s.find((([t])=>t===u));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(o,u);r==this[u]||d.get&&!d.set||(this[u]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.P)?l:{}),...s.filter((([t,n])=>31&n[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))]))}}return t},bt=(t,n)=>{const e={i:n[0],p:n[1]};e.t=n[2],(()=>{if(!$.document)return;const t=$.document.querySelectorAll(`[${a}]`);let n=0;for(;n<t.length;n++)C(t[n].getAttribute(a),D(t[n].innerHTML),!0)})();const l=t.prototype.connectedCallback,o=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const e={i:0,$hostElement$:t,l:n,o:new Map,R:new Map};e.V=new Promise((t=>e.D=t)),t["s-p"]=[],t["s-rc"]=[];const l=e;t.__stencil__getHostRef=()=>l,512&n.i&&r(t,e)})(this,e)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!i(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&h.i)){const n=i(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.i)(null==n?void 0:n.W)||(null==n?void 0:n.V)&&n.V.then((()=>{}));else{let l;if(n.i|=1,l=t.getAttribute(f),l){if(1&e.i){const n=A(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,l)=>{var o,s,r,c;const u=t.shadowRoot,a=[],d=[],p=u?[]:null,m=R(n,null);m.S=t,!$.document||h.U&&h.U.size||B($.document.body,h.U=new Map),t[f]=e,t.removeAttribute(f),l.C=W(m,a,[],p,t,t,e,d);let y=0;const b=a.length;let v;for(;y<b;y++){v=a[y];const e=v.k+"."+v.I,l=h.U.get(e),s=v.S;if(u){if((null==(o=v.O)?void 0:(""+o).includes("-"))&&"slot-fb"!==v.O&&!v.S.shadowRoot){const t=i(v.S);if(t){const n=L(t.l),e=$.document.querySelector(`style[sty-id="${n}"]`);e&&p.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===v.O&&(s["s-cr"]=t["s-cr"]);"slot"===v.O&&(v._=v.S["s-sn"]||v.S.name||null,v.v?(v.i|=2,v.S.childNodes.length||v.v.forEach((t=>{v.S.appendChild(t.S)}))):v.i|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt(v.I))),l&&!l["s-id"]&&h.U.delete(e)}const g=[],w=d.length;let j,O,S,k,x=0,I=0;for(;x<w;x++)if(j=d[x],j&&j.length)for(S=j.length,O=0;O<S;O++){if(k=j[O],g[k.hostId]||(g[k.hostId]=h.U.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(r=null==(s=j[O-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),N(k.node,k.slot,0,k.node["s-oo"]||I),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),I=(k.node["s-oo"]||I)+1}if(u&&!u.childNodes.length){let n=0;const e=p.length;if(e){for(;n<e;n++){const t=p[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}l.$hostElement$=t})(t,e.p,l,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){st(n,n.L=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let l;if(!(32&n.i)&&(n.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const n=L(e);if(!u.has(n)){const l=()=>{};C(n,t,!!(1&e.i)),l()}}const o=n.L,s=()=>rt(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(t,n,e)}l()}})(this),l&&l.call(this)},disconnectedCallback(){(async t=>{_.has(t)&&_.delete(t),t.shadowRoot&&_.has(t.shadowRoot)&&_.delete(t.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${e.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else M.call(this,e)}}),t.is=e.p,yt(t,e)},vt=t=>h.$=t,gt=t=>Object.assign(h,t);function wt(t,n){ot({$hostElement$:n},t)}function jt(t){return t}function Ot(t,n,e){return(t||"")+(n?" "+n:"")+(e?" "+e:"")}export{p as H,Ot as format,x as getAssetPath,P as h,bt as p,wt as render,I as setAssetPath,vt as setNonce,gt as setPlatformOptions,jt as t}
1
+ var t,n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(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",t))(e||{}),l="type",o="value",s="serialized:",r=(t,n)=>{var e;Object.entries(null!=(e=n.l.t)?e:{}).map((([e,[l]])=>{if(31&l||32&l){const l=t[e],o=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);o&&Object.defineProperty(t,e,{get(){return o.get.call(this)},set(t){o.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.o.has(e)?n.o.get(e):l}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>(0,console.error)(t,n),u=new Map,f="s-id",a="sty-id",d="c-id",$="undefined"!=typeof window?window:{},p=$.HTMLElement||class{},h={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,l)=>t.addEventListener(n,e,l),rel:(t,n,e,l)=>t.removeEventListener(n,e,l),ce:(t,n)=>new CustomEvent(t,n)},m=(()=>{try{return!!$.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),y=!!m&&(()=>!!$.document&&Object.getOwnPropertyDescriptor($.document.adoptedStyleSheets,"length").writable)(),b=!1,v=[],g=[],w=(t,n)=>e=>{t.push(e),b||(b=!0,n&&4&h.i?S(O):h.raf(O))},j=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){c(t)}t.length=0},O=()=>{j(v),j(g),(b=v.length>0)&&h.raf(O)},S=t=>Promise.resolve(void 0).then(t),k=w(g,!0),x=t=>{const n=new URL(t,h.u);return n.origin!==$.location.origin?n.href:n.pathname},I=t=>h.u=t;function M(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(y?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var E=(t,n,e,l)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const o=document.createTextNode("");if(o["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,r=N(s,"appendChild");if(void 0!==l){o["s-oo"]=l;const t=N(s,"childNodes"),n=[o];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>r.call(s,t)))}else r.call(s,o);t["s-ol"]=o,t["s-sh"]=n["s-hn"]};function N(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var _=new WeakMap,C=(t,n,e)=>{let l=u.get(t);m&&e?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,u.set(t,l)},A=(t,n)=>{var e,l,o;const s=L(n),r=u.get(s);if(!$.document)return s;if(t=11===t.nodeType?t:$.document,r)if("string"==typeof r){let o,i=_.get(t=t.head||t);i||_.set(t,i=new Set);const c=t.querySelector(`[${a}="${s}"]`);if(c)c.textContent=r;else if(!i.has(s)){o=$.document.createElement("style"),o.textContent=r;const c=null!=(e=h.$)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=$.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=c&&o.setAttribute("nonce",c),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(o,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(m){const n=new(null!=(l=t.defaultView)?l:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(r),y?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=r+n.textContent:t.prepend(o)}else t.append(o);1&n.i&&t.insertBefore(o,null),4&n.i&&(o.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let n=_.get(t);if(n||_.set(t,n=new Set),!n.has(s)){const e=null!=(o=t.defaultView)?o:t.ownerDocument.defaultView;let l;if(r.constructor===e.CSSStyleSheet)l=r;else{l=new e.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)l.insertRule(r.cssRules[t].cssText,t)}y?t.adoptedStyleSheets.push(l):t.adoptedStyleSheets=[...t.adoptedStyleSheets,l],n.add(s)}}return s},L=t=>"sc-"+t.p,D=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),R=t=>"object"==(t=typeof t)||"function"===t,U=(t,n,...e)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=n=>{for(let e=0;e<n.length;e++)l=n[e],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!R(l))&&(l+=""),s&&r?i[i.length-1].h+=l:i.push(s?P(null,l):l),r=s)};c(e),n&&n.key&&(o=n.key);const u=P(t,null);return u.m=n,i.length>0&&(u.v=i),u.j=o,u},P=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,v:null,m:null,j:null}),V={},W=(t,n,e,l,o,s,r,i=[])=>{let c,u,f,a;if(1===s.nodeType){if(c=s.getAttribute(d),c&&(u=c.split("."),u[0]===r||"0"===u[0])){f=F({i:0,k:u[0],I:u[1],M:u[2],N:u[3],O:s.tagName.toLowerCase(),S:s,m:{class:s.className||""}}),n.push(f),s.removeAttribute(d),t.v||(t.v=[]);const o=f.S.getAttribute("s-sn");"string"==typeof o&&("slot-fb"===f.O&&H(o,u[2],f,s,t,n,e,l,i),f.S["s-sn"]=o,f.S.removeAttribute("s-sn")),void 0!==f.N&&(t.v[f.N]=f),t=f,l&&"0"===f.M&&(l[f.N]=f.S)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)W(t,n,e,l,o,s.shadowRoot.childNodes[a],r,i);const $=s.__childNodes||s.childNodes;for(a=$.length-1;a>=0;a--)W(t,n,e,l,o,$[a],r,i)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===r||"0"===u[1])&&(c=u[0],f=F({k:u[1],I:u[2],M:u[3],N:u[4]||"0",S:s,m:null,v:null,j:null,_:null,O:null,h:null}),"t"===c?(f.S=Y(s,3),f.S&&3===f.S.nodeType&&(f.h=f.S.textContent,n.push(f),s.remove(),r===f.k&&(t.v||(t.v=[]),t.v[f.N]=f),l&&"0"===f.M&&(l[f.N]=f.S))):"c"===c?(f.S=Y(s,8),f.S&&8===f.S.nodeType&&(n.push(f),s.remove())):f.k===r&&("s"===c?H(s["s-sn"]=u[5]||"",u[2],f,s,t,n,e,l,i):"r"===c&&l&&s.remove()));else if(t&&"style"===t.O){const n=P(null,s.textContent);n.S=s,n.N="0",t.v=[n]}return t},B=(t,n)=>{if(1===t.nodeType){const e=t[f]||t.getAttribute(f);e&&n.set(e,t);let l=0;if(t.shadowRoot)for(;l<t.shadowRoot.childNodes.length;l++)B(t.shadowRoot.childNodes[l],n);const o=t.__childNodes||t.childNodes;for(l=0;l<o.length;l++)B(o[l],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},F=t=>({i:0,k:null,I:null,M:null,N:"0",S:null,m:null,v:null,j:null,_:null,O:null,h:null,...t});function H(t,n,e,l,o,s,r,i,c){l["s-sr"]=!0,e._=t||null,e.O="slot";const u=(null==o?void 0:o.S)?o.S["s-id"]||o.S.getAttribute("s-id"):"";if(i&&$.document){const s=e.S=$.document.createElement(e.O);e._&&e.S.setAttribute("name",t),o.S.shadowRoot&&u&&u!==e.k?N(o.S,"insertBefore")(s,N(o.S,"children")[0]):N(N(l,"parentNode"),"insertBefore")(s,l),z(c,n,t,l,e.k),l.remove(),"0"===e.M&&(i[e.N]=e.S)}else{const s=e.S,r=u&&u!==e.k&&o.S.shadowRoot;z(c,n,t,l,r?u:e.k),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],l=this["s-sn"];(null==t?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;return(o.__childNodes?o.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const l=t[e]["s-nr"]||void 0;l&&l.isConnected&&n.push(l)}return n})(o.childNodes)).forEach((t=>{l===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(l),r&&o.S.insertBefore(s,o.S.children[0])}s.push(e),r.push(e),o.v||(o.v=[]),o.v[e.N]=e}var q,z=(t,n,e,l,o)=>{var s,r;let i=l.nextSibling;if(t[n]=t[n]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==e&&(""!==e||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=e,t[n].push({slot:l,node:i,hostId:o})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},Y=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},J=class t{static fromLocalValue(n){const e=n[l],s=o in n?n[o]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,l]of s){const o="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(l);n.set(o,s)}return n;case"object":const l={};for(const[n,e]of s)l[n]=t.fromLocalValue(e);return l;case"regexp":const{pattern:o,flags:r}=s;return RegExp(o,r);case"set":const i=new Set;for(const n of s)i.add(t.fromLocalValue(n));return i;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+e)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(l))return!1;const s=t[l];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(o))}},G=(t,n)=>"string"==typeof t&&t.startsWith(s)?t=function(t){return"string"==typeof t&&t.startsWith(s)?J.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||R(t)?t:1&n?t+"":t,K=(t,n)=>{const e=t;return{emit:t=>Q(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Q=(t,n,e)=>{const l=h.ce(n,e);return t.dispatchEvent(l),l},T=(t,n,e,l)=>{if(e===l)return;let o=n.toLowerCase();if("style"===n){for(const n in e)l&&null!=l[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in l)e&&l[n]===e[n]||(n.includes("-")?t.style.setProperty(n,l[n]):t.style[n]=l[n])}else if("key"===n);else if(!t.__lookupSetter__(n)&&"o"===n[0]&&"n"===n[1]&&(n="-"===n[2]?n.slice(3):((t,n)=>n in $)(0,o)?o.slice(2):o[2]+n.slice(3),e||l)){const o=n.endsWith(X);n=n.replace(Z,""),e&&h.rel(t,n,e,o),l&&h.ael(t,n,l,o)}},X="Capture",Z=RegExp(X+"$"),tt=(t,n)=>{const e=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.m||{},o=n.m||{};for(const t of nt(Object.keys(l)))t in o||T(e,t,l[t],void 0);for(const t of nt(Object.keys(o)))T(e,t,l[t],o[t])};function nt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var et=(t,n,e)=>{const l=n.v[e];let o,s,r=0;if(null!=l.h)o=l.S=$.document.createTextNode(l.h);else{if(!$.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(o=l.S=$.document.createElement(l.O),tt(null,l),l.v){const n="template"===l.O?o.content:o;for(r=0;r<l.v.length;++r)s=et(t,l,r),s&&n.appendChild(s)}}return o["s-hn"]=q,o},lt=(t,n,e,l,o,s)=>{let r,i=t;for(i.shadowRoot&&i.tagName===q&&(i=i.shadowRoot),"template"===e.O&&(i=i.content);o<=s;++o)l[o]&&(r=et(null,e,o),r&&(l[o].S=r,it(i,r,n)))},ot=(t,n,e)=>{for(let l=n;l<=e;++l){const n=t[l];if(n){const t=n.S;t&&t.remove()}}},st=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),rt=(t,n,e=!1)=>{const l=n.S=t.S,o=t.v,s=n.v,r=n.h;null==r?(tt(t,n),null!==o&&null!==s?((t,n,e,l,o=!1)=>{let s,r,i=0,c=0,u=0,f=0,a=n.length-1,d=n[0],$=n[a],p=l.length-1,h=l[0],m=l[p];const y="template"===e.O?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=n[++i];else if(null==$)$=n[--a];else if(null==h)h=l[++c];else if(null==m)m=l[--p];else if(st(d,h,o))rt(d,h,o),d=n[++i],h=l[++c];else if(st($,m,o))rt($,m,o),$=n[--a],m=l[--p];else if(st(d,m,o))rt(d,m,o),it(y,d.S,$.S.nextSibling),d=n[++i],m=l[--p];else if(st($,h,o))rt($,h,o),it(y,$.S,d.S),$=n[--a],h=l[++c];else{for(u=-1,f=i;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===h.j){u=f;break}u>=0?(r=n[u],r.O!==h.O?s=et(n&&n[c],e,u):(rt(r,h,o),n[u]=void 0,s=r.S),h=l[++c]):(s=et(n&&n[c],e,c),h=l[++c]),s&&it(d.S.parentNode,s,d.S)}i>a?lt(t,null==l[p+1]?null:l[p+1].S,e,l,c,p):c>p&&ot(n,i,a)})(l,o,n,s,e):null!==s?(null!==t.h&&(l.textContent=""),lt(l,null,n,s,0,s.length-1)):e||null===o?e&&null!==o&&null===s&&(n.v=o):ot(o,0,o.length-1)):t.h!==r&&(l.data=r)},it=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),ct=(t,n,e=!1)=>{const l=t.$hostElement$,o=t.C||P(null,null),s=(t=>t&&t.O===V)(n)?n:U(null,null,n);if(q=l.tagName,e&&s.m)for(const t of Object.keys(s.m))l.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=l[t]);s.O=null,s.i|=4,t.C=s,s.S=o.S=l.shadowRoot||l,rt(o,s,e)},ut=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((l=>t.A=()=>{n["s-p"].splice(e-1,1),l()})))}},ft=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);ut(t,t.L);const e=()=>at(t,n);if(!n)return k(e);queueMicrotask((()=>{e()}))},at=(t,n)=>{const e=t.$hostElement$,l=e;if(!l)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return o=bt(l,n?"componentWillLoad":"componentWillUpdate",void 0,e),o=dt(o,(()=>bt(l,"componentWillRender",void 0,e))),dt(o,(()=>pt(t,l,n)))},dt=(t,n)=>$t(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),$t=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,pt=async(t,n,e)=>{var l;const o=t.$hostElement$,s=o["s-rc"];e&&(t=>{const n=t.l,e=t.$hostElement$,l=n.i,o=A(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&l&&(e["s-sc"]=o,e.classList.add(o+"-h"))})(t);ht(t,n,o,e),s&&(s.map((t=>t())),o["s-rc"]=void 0);{const n=null!=(l=o["s-p"])?l:[],e=()=>mt(t);0===n.length?e():(Promise.all(n).then(e),t.i|=4,n.length=0)}},ht=(t,n,e,l)=>{try{n=n.render(),t.i&=-17,t.i|=2,ct(t,n,l)}catch(n){c(n,t.$hostElement$)}return null},mt=t=>{const n=t.$hostElement$,e=n,l=t.L;bt(e,"componentDidRender",void 0,n),64&t.i?bt(e,"componentDidUpdate",void 0,n):(t.i|=64,vt(n),bt(e,"componentDidLoad",void 0,n),t.D(n),l||yt()),t.A&&(t.A(),t.A=void 0),512&t.i&&S((()=>ft(t,!1))),t.i&=-517},yt=()=>{var t;S((()=>Q($,"appload",{detail:{namespace:"joe-stencil-library"}}))),(null==(t=h.R)?void 0:t.size)&&h.R.clear()},bt=(t,n,e,l)=>{if(t&&t[n])try{return t[n](e)}catch(t){c(t,l)}},vt=t=>t.classList.add("hydrated"),gt=(t,n,e,l)=>{const o=i(t);if(!o)return;const s=t,r=o.o.get(n),c=o.i,u=s;if(!((e=G(e,l.t[n][0]))===r||Number.isNaN(r)&&Number.isNaN(e)||(o.o.set(n,e),2!=(18&c)))){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(e,r,n))return;ft(o,!1)}},wt=(t,n)=>{var e,l;const o=t.prototype;if(n.t){const s=Object.entries(null!=(e=n.t)?e:{});s.map((([t,[e]])=>{if(31&e||32&e){const{get:l,set:s}=Object.getOwnPropertyDescriptor(o,t)||{};l&&(n.t[t][0]|=2048),s&&(n.t[t][0]|=4096),Object.defineProperty(o,t,{get(){return l?l.apply(this):((t,n)=>i(this).o.get(n))(0,t)},configurable:!0,enumerable:!0}),Object.defineProperty(o,t,{set(l){const o=i(this);if(o){if(s)return void 0===(32&e?this[t]:o.$hostElement$[t])&&o.o.get(t)&&(l=o.o.get(t)),s.call(this,G(l,e)),void gt(this,t,l=32&e?this[t]:o.$hostElement$[t],n);gt(this,t,l,n)}}})}}));{const e=new Map;o.attributeChangedCallback=function(t,l,r){h.jmp((()=>{var c;const u=e.get(t),f=i(this);if(this.hasOwnProperty(u),o.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==r)return;if(null==u){const e=null==f?void 0:f.i;if(f&&e&&!(8&e)&&r!==l){const o=this,s=null==(c=n.U)?void 0:c[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=s.find((([t])=>t===u));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(o,u);r==this[u]||d.get&&!d.set||(this[u]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.U)?l:{}),...s.filter((([t,n])=>31&n[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))]))}}return t},jt=(t,n)=>{const e={i:n[0],p:n[1]};e.t=n[2],(()=>{if(!$.document)return;const t=$.document.querySelectorAll(`[${a}]`);let n=0;for(;n<t.length;n++)C(t[n].getAttribute(a),D(t[n].innerHTML),!0)})();const l=t.prototype.connectedCallback,o=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const e={i:0,$hostElement$:t,l:n,o:new Map,P:new Map};e.V=new Promise((t=>e.D=t)),t["s-p"]=[],t["s-rc"]=[];const l=e;t.__stencil__getHostRef=()=>l,512&n.i&&r(t,e)})(this,e)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!i(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&h.i)){const n=i(t);if(!n)return;const e=n.l,l=()=>{};if(1&n.i)(null==n?void 0:n.W)||(null==n?void 0:n.V)&&n.V.then((()=>{}));else{let l;if(n.i|=1,l=t.getAttribute(f),l){if(1&e.i){const n=A(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,l)=>{var o,s,r,c;const u=t.shadowRoot,a=[],d=[],p=u?[]:null,m=P(n,null);m.S=t,!$.document||h.R&&h.R.size||B($.document.body,h.R=new Map),t[f]=e,t.removeAttribute(f),l.C=W(m,a,[],p,t,t,e,d);let y=0;const b=a.length;let v;for(;y<b;y++){v=a[y];const e=v.k+"."+v.I,l=h.R.get(e),s=v.S;if(u){if((null==(o=v.O)?void 0:(""+o).includes("-"))&&"slot-fb"!==v.O&&!v.S.shadowRoot){const t=i(v.S);if(t){const n=L(t.l),e=$.document.querySelector(`style[sty-id="${n}"]`);e&&p.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===v.O&&(s["s-cr"]=t["s-cr"]);"slot"===v.O&&(v._=v.S["s-sn"]||v.S.name||null,v.v?(v.i|=2,v.S.childNodes.length||v.v.forEach((t=>{v.S.appendChild(t.S)}))):v.i|=1),l&&l.isConnected&&(l.parentElement.shadowRoot&&""===l["s-en"]&&l.parentNode.insertBefore(s,l.nextSibling),l.parentNode.removeChild(l),u||(s["s-oo"]=parseInt(v.I))),l&&!l["s-id"]&&h.R.delete(e)}const g=[],w=d.length;let j,O,S,k,x=0,I=0;for(;x<w;x++)if(j=d[x],j&&j.length)for(S=j.length,O=0;O<S;O++){if(k=j[O],g[k.hostId]||(g[k.hostId]=h.R.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(r=null==(s=j[O-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),E(k.node,k.slot,0,k.node["s-oo"]||I),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),I=(k.node["s-oo"]||I)+1}if(u&&!u.childNodes.length){let n=0;const e=p.length;if(e){for(;n<e;n++){const t=p[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}l.$hostElement$=t})(t,e.p,l,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){ut(n,n.L=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let l;if(!(32&n.i)&&(n.i|=32,l=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),l&&l.style)){let t;"string"==typeof l.style&&(t=l.style);const n=L(e);if(!u.has(n)){const l=()=>{};C(n,t,!!(1&e.i)),l()}}const o=n.L,s=()=>ft(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()})(t,n,e)}l()}})(this),l&&l.call(this)},disconnectedCallback(){(async t=>{_.has(t)&&_.delete(t),t.shadowRoot&&_.has(t.shadowRoot)&&_.delete(t.shadowRoot)})(this),o&&o.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${e.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else M.call(this,e)}}),t.is=e.p,wt(t,e)},Ot=t=>h.$=t,St=t=>Object.assign(h,t);function kt(t,n){ct({$hostElement$:n},t)}function xt(t){return t}function It(t,n,e){return(t||"")+(n?" "+n:"")+(e?" "+e:"")}export{p as H,K as c,It as format,x as getAssetPath,U as h,jt as p,kt as render,I as setAssetPath,Ot as setNonce,St as setPlatformOptions,xt as t}
@@ -1 +1 @@
1
- import{t,p as e,H as o,format as s,h as n}from"./index.js";const d=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}first;middle;last;getText(){return s(this.first,this.middle,this.last)}render(){return n("div",{key:"8a6d28dfa48a307c7e3435580dd1314f34d0446b",style:{color:"red",width:"100%",height:"60px",boxSizing:"border-box",border:"1px solid #eee",backgroundColor:"#f5f5f5",padding:"10px",borderRadius:"4px"}},"Stencil-Component: ",this.getText())}static get style(){return":host{display:block}"}},[513,"my-component",{first:[1],middle:[1],last:[1]}]);function r(){"undefined"!=typeof customElements&&["my-component"].forEach((e=>{"my-component"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))}r();const i=d,c=r;export{i as MyComponent,c as defineCustomElement}
1
+ import{t,p as e,H as s,c as i,format as o,h as n}from"./index.js";const d=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.myClick=i(this,"myClick")}first;middle;last;myClick;getText(){return o(this.first,this.middle,this.last)}handleClick=()=>{this.myClick.emit({first:this.first,middle:this.middle,last:this.last})};render(){return n("div",{key:"7b797ef9d028ff9aadbcfa34b9f678b05989cd3c",onClick:this.handleClick,style:{color:"red",width:"100%",height:"60px",boxSizing:"border-box",border:"1px solid #eee",backgroundColor:"#f5f5f5",padding:"10px",borderRadius:"4px"}},"Stencil-Component: ",this.getText())}static get style(){return":host{display:block}"}},[513,"my-component",{first:[1],middle:[1],last:[1]}]);function r(){"undefined"!=typeof customElements&&["my-component"].forEach((e=>{"my-component"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))}r();const c=d,l=r;export{c as MyComponent,l as defineCustomElement}
@@ -97,6 +97,7 @@ var registerHost = (hostElement, cmpMeta) => {
97
97
  hostElement.__stencil__getHostRef = () => ref;
98
98
  return ref;
99
99
  };
100
+ var isMemberInElement = (elm, memberName) => memberName in elm;
100
101
  var consoleError = (e, el) => (0, console.error)(e, el);
101
102
 
102
103
  // src/client/client-load-module.ts
@@ -1030,6 +1031,25 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1030
1031
  }
1031
1032
  return propValue;
1032
1033
  };
1034
+ var getElement = (ref) => {
1035
+ var _a;
1036
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
1037
+ };
1038
+
1039
+ // src/runtime/event-emitter.ts
1040
+ var createEvent = (ref, name, flags) => {
1041
+ const elm = getElement(ref);
1042
+ return {
1043
+ emit: (detail) => {
1044
+ return emitEvent(elm, name, {
1045
+ bubbles: true,
1046
+ composed: true,
1047
+ cancelable: true,
1048
+ detail
1049
+ });
1050
+ }
1051
+ };
1052
+ };
1033
1053
  var emitEvent = (elm, name, opts) => {
1034
1054
  const ev = plt.ce(name, opts);
1035
1055
  elm.dispatchEvent(ev);
@@ -1039,7 +1059,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1039
1059
  if (oldValue === newValue) {
1040
1060
  return;
1041
1061
  }
1042
- memberName.toLowerCase();
1062
+ let isProp = isMemberInElement(elm, memberName);
1063
+ let ln = memberName.toLowerCase();
1043
1064
  if (memberName === "style") {
1044
1065
  {
1045
1066
  for (const prop in oldValue) {
@@ -1061,8 +1082,28 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1061
1082
  }
1062
1083
  }
1063
1084
  }
1085
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1086
+ if (memberName[2] === "-") {
1087
+ memberName = memberName.slice(3);
1088
+ } else if (isMemberInElement(win, ln)) {
1089
+ memberName = ln.slice(2);
1090
+ } else {
1091
+ memberName = ln[2] + memberName.slice(3);
1092
+ }
1093
+ if (oldValue || newValue) {
1094
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1095
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1096
+ if (oldValue) {
1097
+ plt.rel(elm, memberName, oldValue, capture);
1098
+ }
1099
+ if (newValue) {
1100
+ plt.ael(elm, memberName, newValue, capture);
1101
+ }
1102
+ }
1064
1103
  } else ;
1065
1104
  };
1105
+ var CAPTURE_EVENT_SUFFIX = "Capture";
1106
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1066
1107
 
1067
1108
  // src/runtime/vdom/update-element.ts
1068
1109
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -1933,4 +1974,4 @@ function transformTag(tag) {
1933
1974
  return tag;
1934
1975
  }
1935
1976
 
1936
- export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
1977
+ export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-CyyVqcfg.js';
2
- export { s as setNonce } from './index-CyyVqcfg.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-CvuugvXI.js';
2
+ export { s as setNonce } from './index-CvuugvXI.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  /*
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-CyyVqcfg.js';
2
- export { s as setNonce } from './index-CyyVqcfg.js';
1
+ import { b as bootstrapLazy } from './index-CvuugvXI.js';
2
+ export { s as setNonce } from './index-CvuugvXI.js';
3
3
  import { g as globalScripts } from './app-globals-DQuL1Twl.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-CyyVqcfg.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-CvuugvXI.js';
2
2
  import { format } from './index.js';
3
3
 
4
4
  const myComponentCss = () => `:host{display:block}`;
@@ -6,6 +6,7 @@ const myComponentCss = () => `:host{display:block}`;
6
6
  const MyComponent = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
+ this.myClick = createEvent(this, "myClick");
9
10
  }
10
11
  /**
11
12
  * The first name
@@ -19,11 +20,22 @@ const MyComponent = class {
19
20
  * The last name
20
21
  */
21
22
  last;
23
+ /**
24
+ * Click event - 点击事件
25
+ */
26
+ myClick;
22
27
  getText() {
23
28
  return format(this.first, this.middle, this.last);
24
29
  }
30
+ handleClick = () => {
31
+ this.myClick.emit({
32
+ first: this.first,
33
+ middle: this.middle,
34
+ last: this.last,
35
+ });
36
+ };
25
37
  render() {
26
- return h("div", { key: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
38
+ return h("div", { key: '7b797ef9d028ff9aadbcfa34b9f678b05989cd3c', onClick: this.handleClick, style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
27
39
  }
28
40
  };
29
41
  MyComponent.style = myComponentCss();
@@ -1 +1 @@
1
- import{p as t,b as o}from"./p-CyyVqcfg.js";export{s as setNonce}from"./p-CyyVqcfg.js";import{g as m}from"./p-DQuL1Twl.js";(()=>{const s=import.meta.url,o={};return""!==s&&(o.resourcesUrl=new URL(".",s).href),t(o)})().then((async s=>(await m(),o([["p-183ce8bc",[[513,"my-component",{first:[1],middle:[1],last:[1]}]]]],s))));
1
+ import{p as t,b as o}from"./p-CvuugvXI.js";export{s as setNonce}from"./p-CvuugvXI.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const s=import.meta.url,o={};return""!==s&&(o.resourcesUrl=new URL(".",s).href),t(o)})().then((async s=>(await a(),o([["p-a0788c27",[[513,"my-component",{first:[1],middle:[1],last:[1]}]]]],s))));
@@ -0,0 +1,2 @@
1
+ var t,n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(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",t))(e||{}),o="type",l="value",s="serialized:",i=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.l.has(e)?n.l.get(e):o}}))},r=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&i(t,n))},u=(t,n)=>n in t,a=(t,n)=>(0,console.error)(t,n),f=new Map,d=new Map,p="s-id",$="sty-id",h="c-id",m="undefined"!=typeof window?window:{},v={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},y=t=>Promise.resolve(t),b=(()=>{try{return!!m.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),g=!!b&&(()=>!!m.document&&Object.getOwnPropertyDescriptor(m.document.adoptedStyleSheets,"length").writable)(),w=!1,j=[],S=[],O=(t,n)=>e=>{t.push(e),w||(w=!0,n&&4&v.u?E(x):v.raf(x))},k=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){a(t)}t.length=0},x=()=>{k(j),k(S),(w=j.length>0)&&v.raf(x)},E=t=>y().then(t),M=O(S,!0);function C(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(g?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var N=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=I(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=I(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]};function I(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function L(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var R=new WeakMap,D=(t,n,e)=>{let o=d.get(t);b&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,d.set(t,o)},A=(t,n)=>{var e,o,l;const s=P(n),i=d.get(s);if(!m.document)return s;if(t=11===t.nodeType?t:m.document,i)if("string"==typeof i){let l,r=R.get(t=t.head||t);r||R.set(t,r=new Set);const c=t.querySelector(`[${$}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=m.document.createElement("style"),l.textContent=i;const c=null!=(e=v.$)?e:L(m.document);if(null!=c&&l.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(b){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),g?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let n=R.get(t);if(n||R.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}g?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s)}}return s},P=t=>"sc-"+t.h,U=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),V=t=>"object"==(t=typeof t)||"function"===t,_=(t,n,...e)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!V(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?T(null,o):o),i=s)};c(e),n&&n.key&&(l=n.key);const u=T(t,null);return u.v=n,r.length>0&&(u.j=r),u.S=l,u},T=(t,n)=>({u:0,O:t,m:null!=n?n:null,k:null,j:null,v:null,S:null}),W={},z=(t,n,e,o,l,s,i,r=[])=>{let c,u,a,f;if(1===s.nodeType){if(c=s.getAttribute(h),c&&(u=c.split("."),u[0]===i||"0"===u[0])){a=F({u:0,M:u[0],C:u[1],N:u[2],I:u[3],O:s.tagName.toLowerCase(),k:s,v:{class:s.className||""}}),n.push(a),s.removeAttribute(h),t.j||(t.j=[]);const l=a.k.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===a.O&&H(l,u[2],a,s,t,n,e,o,r),a.k["s-sn"]=l,a.k.removeAttribute("s-sn")),void 0!==a.I&&(t.j[a.I]=a),t=a,o&&"0"===a.N&&(o[a.I]=a.k)}if(s.shadowRoot)for(f=s.shadowRoot.childNodes.length-1;f>=0;f--)z(t,n,e,o,l,s.shadowRoot.childNodes[f],i,r);const d=s.__childNodes||s.childNodes;for(f=d.length-1;f>=0;f--)z(t,n,e,o,l,d[f],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],a=F({M:u[1],C:u[2],N:u[3],I:u[4]||"0",k:s,v:null,j:null,S:null,L:null,O:null,m:null}),"t"===c?(a.k=G(s,3),a.k&&3===a.k.nodeType&&(a.m=a.k.textContent,n.push(a),s.remove(),i===a.M&&(t.j||(t.j=[]),t.j[a.I]=a),o&&"0"===a.N&&(o[a.I]=a.k))):"c"===c?(a.k=G(s,8),a.k&&8===a.k.nodeType&&(n.push(a),s.remove())):a.M===i&&("s"===c?H(s["s-sn"]=u[5]||"",u[2],a,s,t,n,e,o,r):"r"===c&&o&&s.remove()));else if(t&&"style"===t.O){const n=T(null,s.textContent);n.k=s,n.I="0",t.j=[n]}return t},B=(t,n)=>{if(1===t.nodeType){const e=t[p]||t.getAttribute(p);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)B(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)B(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},F=t=>({u:0,M:null,C:null,N:null,I:"0",k:null,v:null,j:null,S:null,L:null,O:null,m:null,...t});function H(t,n,e,o,l,s,i,r,c){o["s-sr"]=!0,e.L=t||null,e.O="slot";const u=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";if(r&&m.document){const s=e.k=m.document.createElement(e.O);e.L&&e.k.setAttribute("name",t),l.k.shadowRoot&&u&&u!==e.M?I(l.k,"insertBefore")(s,I(l.k,"children")[0]):I(I(o,"parentNode"),"insertBefore")(s,o),Y(c,n,t,o,e.M),o.remove(),"0"===e.N&&(r[e.I]=e.k)}else{const s=e.k,i=u&&u!==e.M&&l.k.shadowRoot;Y(c,n,t,o,i?u:e.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?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 l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(o),i&&l.k.insertBefore(s,l.k.children[0])}s.push(e),i.push(e),l.j||(l.j=[]),l.j[e.I]=e}var q,Y=(t,n,e,o,l)=>{var s,i;let r=o.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},G=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},J=class t{static fromLocalValue(n){const e=n[o],s=l in n?n[l]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,o]of s){const l="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(o);n.set(l,s)}return n;case"object":const o={};for(const[n,e]of s)o[n]=t.fromLocalValue(e);return o;case"regexp":const{pattern:l,flags:i}=s;return RegExp(l,i);case"set":const r=new Set;for(const n of s)r.add(t.fromLocalValue(n));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+e)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(o))return!1;const s=t[o];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(l))}},K=(t,n)=>"string"==typeof t&&t.startsWith(s)?t=function(t){return"string"==typeof t&&t.startsWith(s)?J.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||V(t)?t:1&n?t+"":t,Q=(t,n)=>{const e=(t=>{var n;return null==(n=r(t))?void 0:n.$hostElement$})(t);return{emit:t=>X(e,n,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},X=(t,n,e)=>{const o=v.ce(n,e);return t.dispatchEvent(o),o},Z=(t,n,e,o)=>{if(e===o)return;let l=u(t,n),s=n.toLowerCase();if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if(!l&&"o"===n[0]&&"n"===n[1]&&(n="-"===n[2]?n.slice(3):u(m,s)?s.slice(2):s[2]+n.slice(3),e||o)){const l=n.endsWith(tt);n=n.replace(nt,""),e&&v.rel(t,n,e,l),o&&v.ael(t,n,o,l)}},tt="Capture",nt=RegExp(tt+"$"),et=(t,n)=>{const e=11===n.k.nodeType&&n.k.host?n.k.host:n.k,o=t&&t.v||{},l=n.v||{};for(const t of ot(Object.keys(o)))t in l||Z(e,t,o[t],void 0);for(const t of ot(Object.keys(l)))Z(e,t,o[t],l[t])};function ot(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var lt=(t,n,e)=>{const o=n.j[e];let l,s,i=0;if(null!=o.m)l=o.k=m.document.createTextNode(o.m);else{if(!m.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.k=m.document.createElement(o.O),et(null,o),o.j){const n="template"===o.O?l.content:l;for(i=0;i<o.j.length;++i)s=lt(t,o,i),s&&n.appendChild(s)}}return l["s-hn"]=q,l},st=(t,n,e,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===q&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=lt(null,e,l),i&&(o[l].k=i,ut(r,i,n)))},it=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;t&&t.remove()}}},rt=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.S&&n.S&&(t.S=n.S),!0):t.S===n.S),ct=(t,n,e=!1)=>{const o=n.k=t.k,l=t.j,s=n.j,i=n.m;null==i?(et(t,n),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=n.length-1,d=n[0],p=n[f],$=o.length-1,h=o[0],m=o[$];const v="template"===e.O?t.content:t;for(;r<=f&&c<=$;)if(null==d)d=n[++r];else if(null==p)p=n[--f];else if(null==h)h=o[++c];else if(null==m)m=o[--$];else if(rt(d,h,l))ct(d,h,l),d=n[++r],h=o[++c];else if(rt(p,m,l))ct(p,m,l),p=n[--f],m=o[--$];else if(rt(d,m,l))ct(d,m,l),ut(v,d.k,p.k.nextSibling),d=n[++r],m=o[--$];else if(rt(p,h,l))ct(p,h,l),ut(v,p.k,d.k),p=n[--f],h=o[++c];else{for(u=-1,a=r;a<=f;++a)if(n[a]&&null!==n[a].S&&n[a].S===h.S){u=a;break}u>=0?(i=n[u],i.O!==h.O?s=lt(n&&n[c],e,u):(ct(i,h,l),n[u]=void 0,s=i.k),h=o[++c]):(s=lt(n&&n[c],e,c),h=o[++c]),s&&ut(d.k.parentNode,s,d.k)}r>f?st(t,null==o[$+1]?null:o[$+1].k,e,o,c,$):c>$&&it(n,r,f)})(o,l,n,s,e):null!==s?(null!==t.m&&(o.textContent=""),st(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.j=l):it(l,0,l.length-1)):t.m!==i&&(o.data=i)},ut=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),at=(t,n)=>{if(n&&!t.R&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.R=()=>{n["s-p"].splice(e-1,1),o()})))}},ft=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);at(t,t.D);const e=()=>dt(t,n);if(!n)return M(e);queueMicrotask((()=>{e()}))},dt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.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 l;return n?(t.A.length&&t.A.forEach((t=>t(e))),l=bt(o,"componentWillLoad",void 0,e)):l=bt(o,"componentWillUpdate",void 0,e),l=pt(l,(()=>bt(o,"componentWillRender",void 0,e))),pt(l,(()=>ht(t,o,n)))},pt=(t,n)=>$t(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),$t=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ht=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=A(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);mt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>vt(t);0===n.length?e():(Promise.all(n).then(e),t.u|=4,n.length=0)}},mt=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{const o=t.$hostElement$,l=t.P||T(null,null),s=(t=>t&&t.O===W)(n)?n:_(null,null,n);if(q=o.tagName,e&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.O=null,s.u|=4,t.P=s,s.k=l.k=o.shadowRoot||o,ct(l,s,e)})(t,n,o)}catch(n){a(n,t.$hostElement$)}return null},vt=t=>{const n=t.$hostElement$,e=t.i,o=t.D;bt(e,"componentDidRender",void 0,n),64&t.u?bt(e,"componentDidUpdate",void 0,n):(t.u|=64,gt(n),bt(e,"componentDidLoad",void 0,n),t.U(n),o||yt()),t.R&&(t.R(),t.R=void 0),512&t.u&&E((()=>ft(t,!1))),t.u&=-517},yt=()=>{var t;E((()=>X(m,"appload",{detail:{namespace:"joe-stencil-library"}}))),(null==(t=v.V)?void 0:t.size)&&v.V.clear()},bt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){a(t,o)}},gt=t=>t.classList.add("hydrated"),wt=(t,n,e,o)=>{const l=r(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.h}" 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/stenciljs/core/issues/5457).`);const s=l.l.get(n),i=l.u,c=l.i;if(e=K(e,o.t[n][0]),!(8&i&&void 0!==s||e===s||Number.isNaN(s)&&Number.isNaN(e)||(l.l.set(n,e),2!=(18&i)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(e,s,n))return;ft(l,!1)}},jt=(t,n,e)=>{var o,l;const s=t.prototype;if(n.t){const i=Object.entries(null!=(o=n.t)?o:{});if(i.map((([t,[o]])=>{if(31&o||2&e&&32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(n.t[t][0]|=2048),i&&(n.t[t][0]|=4096),(1&e||!l)&&Object.defineProperty(s,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>r(this).l.get(n))(0,t);const e=r(this),o=e?e.i:s;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=r(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.call(this,K(l,o)),void wt(this,t,l=32&o?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return wt(this,t,l,n),void(1&e&&!s.i&&s.A.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const i=()=>{const e=s.i[t];!s.l.get(t)&&e&&s.l.set(t,e),s.i[t]=K(l,o),wt(this,t,s.i[t],n)};s.i?i():s.A.push((()=>{i()}))}}}})}})),1&e){const e=new Map;s.attributeChangedCallback=function(t,o,l){v.jmp((()=>{var c;const u=e.get(t),a=r(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const e=null==a?void 0:a.u;if(a&&e&&!(8&e)&&l!==o){const s=a.i,i=null==(c=n._)?void 0:c[t];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=s[i]&&(128&e||1&r)&&s[i].call(s,l,o,t)}))}return}const f=i.find((([t])=>t===u));f&&4&f[1][0]&&(l=null!==l&&"false"!==l);const d=Object.getOwnPropertyDescriptor(s,u);l==this[u]||d.get&&!d.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n._)?l:{}),...i.filter((([t,n])=>31&n[0])).map((([t,n])=>{const o=n[1]||t;return e.set(o,t),o}))]))}}return t},St=(t,n)=>{bt(t,"connectedCallback",void 0,n)},Ot=t=>{if(!(1&v.u)){const n=r(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.u)(null==n?void 0:n.i)?St(n.i,t):(null==n?void 0:n.T)&&n.T.then((()=>St(n.i,t)));else{let o;if(n.u|=1,o=t.getAttribute(p),o){if(1&e.u){const n=A(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,o)=>{var l,s,i,c;const u=t.shadowRoot,a=[],f=[],d=u?[]:null,$=T(n,null);$.k=t,!m.document||v.V&&v.V.size||B(m.document.body,v.V=new Map),t[p]=e,t.removeAttribute(p),o.P=z($,a,[],d,t,t,e,f);let h=0;const y=a.length;let b;for(;h<y;h++){b=a[h];const e=b.M+"."+b.C,o=v.V.get(e),s=b.k;if(u){if((null==(l=b.O)?void 0:(""+l).includes("-"))&&"slot-fb"!==b.O&&!b.k.shadowRoot){const t=r(b.k);if(t){const n=P(t.o),e=m.document.querySelector(`style[sty-id="${n}"]`);e&&d.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===b.O&&(s["s-cr"]=t["s-cr"]);"slot"===b.O&&(b.L=b.k["s-sn"]||b.k.name||null,b.j?(b.u|=2,b.k.childNodes.length||b.j.forEach((t=>{b.k.appendChild(t.k)}))):b.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt(b.C))),o&&!o["s-id"]&&v.V.delete(e)}const g=[],w=f.length;let j,S,O,k,x=0,E=0;for(;x<w;x++)if(j=f[x],j&&j.length)for(O=j.length,S=0;S<O;S++){if(k=j[S],g[k.hostId]||(g[k.hostId]=v.V.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(i=null==(s=j[S-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),N(k.node,k.slot,0,k.node["s-oo"]||E),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),E=(k.node["s-oo"]||E)+1}if(u&&!u.childNodes.length){let n=0;const e=d.length;if(e){for(;n<e;n++){const t=d[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,e.h,o,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){at(n,n.D=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;if(!(32&n.u)){if(n.u|=32,e.W){const l=((t,n)=>{const e=t.h.replace(/-/g,"_"),o=t.W;if(!o)return;const l=f.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(f.set(o,t),t[e])),(t=>{a(t,n.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.h}#${n.B}" was not found`);o.isProxied||(jt(o,e,2),o.isProxied=!0);const s=()=>{};n.u|=8;try{new o(n)}catch(n){a(n,t)}n.u&=-9,s(),St(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=P(e);if(!d.has(n)){const o=()=>{};D(n,t,!!(1&e.u)),o()}}}const l=n.D,s=()=>ft(n,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()})(t,n,e)}o()}},kt=(t,n)=>{bt(t,"disconnectedCallback",void 0,n||t)},xt=(t,n={})=>{var e;if(!m.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=n.exclude||[],s=m.customElements,i=m.document.head,c=i.querySelector("meta[charset]"),u=m.document.createElement("style"),a=[];let f,d=!0;if(Object.assign(v,n),v.p=new URL(n.resourcesUrl||"./",m.document.baseURI).href,v.u|=2,(()=>{if(!m.document)return;const t=m.document.querySelectorAll(`[${$}]`);let n=0;for(;n<t.length;n++)D(t[n].getAttribute($),U(t[n].innerHTML),!0)})(),t.map((t=>{t[1].map((n=>{const e={u:n[0],h:n[1],t:n[2],F:n[3]};e.t=n[2];const i=e.h,c=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,H:new Map};e.T=new Promise((t=>e.U=t)),t["s-p"]=[],t["s-rc"]=[],e.A=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,e),1&e.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${e.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else C.call(t,e)}connectedCallback(){r(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),f&&(clearTimeout(f),f=null),d?a.push(this):v.jmp((()=>Ot(this))))}disconnectedCallback(){v.jmp((()=>(async t=>{if(!(1&v.u)){const n=r(t);(null==n?void 0:n.i)?kt(n.i,t):(null==n?void 0:n.T)&&n.T.then((()=>kt(n.i,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),v.raf((()=>{var t;const n=r(this);if(!n)return;const e=a.findIndex((t=>t===this));e>-1&&a.splice(e,1),(null==(t=null==n?void 0:n.P)?void 0:t.k)instanceof Node&&!n.P.k.isConnected&&delete n.P.k}))}componentOnReady(){var t;return null==(t=r(this))?void 0:t.T}};e.W=t[0],l.includes(i)||s.get(i)||(o.push(i),s.define(i,jt(c,e,1)))}))})),o.length>0&&(u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=v.$)?e:L(m.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((t=>t.connectedCallback())):v.jmp((()=>f=setTimeout(yt,30)))},Et=t=>v.$=t;export{xt as b,Q as c,_ as h,y as p,c as r,Et as s}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s}from"./p-CvuugvXI.js";import{format as e}from"./index.esm.js";const o=class{constructor(s){i(this,s),this.myClick=t(this,"myClick")}first;middle;last;myClick;getText(){return e(this.first,this.middle,this.last)}handleClick=()=>{this.myClick.emit({first:this.first,middle:this.middle,last:this.last})};render(){return s("div",{key:"7b797ef9d028ff9aadbcfa34b9f678b05989cd3c",onClick:this.handleClick,style:{color:"red",width:"100%",height:"60px",boxSizing:"border-box",border:"1px solid #eee",backgroundColor:"#f5f5f5",padding:"10px",borderRadius:"4px"}},"Stencil-Component: ",this.getText())}};o.style=":host{display:block}";export{o as my_component}
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
1
2
  export declare class MyComponent {
2
3
  /**
3
4
  * The first name
@@ -11,6 +12,15 @@ export declare class MyComponent {
11
12
  * The last name
12
13
  */
13
14
  last: string;
15
+ /**
16
+ * Click event - 点击事件
17
+ */
18
+ myClick: EventEmitter<{
19
+ first: string;
20
+ middle: string;
21
+ last: string;
22
+ }>;
14
23
  private getText;
24
+ private handleClick;
15
25
  render(): any;
16
26
  }
@@ -21,8 +21,23 @@ export namespace Components {
21
21
  "middle": string;
22
22
  }
23
23
  }
24
+ export interface MyComponentCustomEvent<T> extends CustomEvent<T> {
25
+ detail: T;
26
+ target: HTMLMyComponentElement;
27
+ }
24
28
  declare global {
29
+ interface HTMLMyComponentElementEventMap {
30
+ "myClick": { first: string; middle: string; last: string };
31
+ }
25
32
  interface HTMLMyComponentElement extends Components.MyComponent, HTMLStencilElement {
33
+ addEventListener<K extends keyof HTMLMyComponentElementEventMap>(type: K, listener: (this: HTMLMyComponentElement, ev: MyComponentCustomEvent<HTMLMyComponentElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
34
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
35
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
36
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
37
+ removeEventListener<K extends keyof HTMLMyComponentElementEventMap>(type: K, listener: (this: HTMLMyComponentElement, ev: MyComponentCustomEvent<HTMLMyComponentElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
38
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
39
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
40
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
26
41
  }
27
42
  var HTMLMyComponentElement: {
28
43
  prototype: HTMLMyComponentElement;
@@ -46,6 +61,10 @@ declare namespace LocalJSX {
46
61
  * The middle name
47
62
  */
48
63
  "middle"?: string;
64
+ /**
65
+ * Click event - 点击事件
66
+ */
67
+ "onMyClick"?: (event: MyComponentCustomEvent<{ first: string; middle: string; last: string }>) => void;
49
68
  }
50
69
  interface IntrinsicElements {
51
70
  "my-component": MyComponent;
package/hydrate/index.js CHANGED
@@ -1734,6 +1734,25 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1734
1734
  }
1735
1735
  return propValue;
1736
1736
  };
1737
+ var getElement = (ref) => {
1738
+ var _a;
1739
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
1740
+ };
1741
+
1742
+ // src/runtime/event-emitter.ts
1743
+ var createEvent = (ref, name, flags) => {
1744
+ const elm = getElement(ref);
1745
+ return {
1746
+ emit: (detail) => {
1747
+ return emitEvent(elm, name, {
1748
+ bubbles: true,
1749
+ composed: true,
1750
+ cancelable: true,
1751
+ detail
1752
+ });
1753
+ }
1754
+ };
1755
+ };
1737
1756
  var emitEvent = (elm, name, opts) => {
1738
1757
  const ev = plt.ce(name, opts);
1739
1758
  elm.dispatchEvent(ev);
@@ -1743,8 +1762,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1743
1762
  if (oldValue === newValue) {
1744
1763
  return;
1745
1764
  }
1746
- isMemberInElement(elm, memberName);
1747
- memberName.toLowerCase();
1765
+ let isProp = isMemberInElement(elm, memberName);
1766
+ let ln = memberName.toLowerCase();
1748
1767
  if (memberName === "style") {
1749
1768
  {
1750
1769
  for (const prop in oldValue) {
@@ -1762,8 +1781,28 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1762
1781
  }
1763
1782
  }
1764
1783
  }
1784
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1785
+ if (memberName[2] === "-") {
1786
+ memberName = memberName.slice(3);
1787
+ } else if (isMemberInElement(win, ln)) {
1788
+ memberName = ln.slice(2);
1789
+ } else {
1790
+ memberName = ln[2] + memberName.slice(3);
1791
+ }
1792
+ if (oldValue || newValue) {
1793
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1794
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1795
+ if (oldValue) {
1796
+ plt.rel(elm, memberName, oldValue, capture);
1797
+ }
1798
+ if (newValue) {
1799
+ plt.ael(elm, memberName, newValue, capture);
1800
+ }
1801
+ }
1765
1802
  } else ;
1766
1803
  };
1804
+ var CAPTURE_EVENT_SUFFIX = "Capture";
1805
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1767
1806
 
1768
1807
  // src/runtime/vdom/update-element.ts
1769
1808
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -4796,6 +4835,7 @@ const myComponentCss = () => `:host{display:block}`;
4796
4835
  class MyComponent {
4797
4836
  constructor(hostRef) {
4798
4837
  registerInstance(this, hostRef);
4838
+ this.myClick = createEvent(this, "myClick");
4799
4839
  }
4800
4840
  /**
4801
4841
  * The first name
@@ -4809,11 +4849,22 @@ class MyComponent {
4809
4849
  * The last name
4810
4850
  */
4811
4851
  last;
4852
+ /**
4853
+ * Click event - 点击事件
4854
+ */
4855
+ myClick;
4812
4856
  getText() {
4813
4857
  return format(this.first, this.middle, this.last);
4814
4858
  }
4859
+ handleClick = () => {
4860
+ this.myClick.emit({
4861
+ first: this.first,
4862
+ middle: this.middle,
4863
+ last: this.last,
4864
+ });
4865
+ };
4815
4866
  render() {
4816
- return hAsync("div", { key: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
4867
+ return hAsync("div", { key: '7b797ef9d028ff9aadbcfa34b9f678b05989cd3c', onClick: this.handleClick, style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
4817
4868
  }
4818
4869
  static get style() { return myComponentCss(); }
4819
4870
  static get cmpMeta() { return {
package/hydrate/index.mjs CHANGED
@@ -1732,6 +1732,25 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1732
1732
  }
1733
1733
  return propValue;
1734
1734
  };
1735
+ var getElement = (ref) => {
1736
+ var _a;
1737
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
1738
+ };
1739
+
1740
+ // src/runtime/event-emitter.ts
1741
+ var createEvent = (ref, name, flags) => {
1742
+ const elm = getElement(ref);
1743
+ return {
1744
+ emit: (detail) => {
1745
+ return emitEvent(elm, name, {
1746
+ bubbles: true,
1747
+ composed: true,
1748
+ cancelable: true,
1749
+ detail
1750
+ });
1751
+ }
1752
+ };
1753
+ };
1735
1754
  var emitEvent = (elm, name, opts) => {
1736
1755
  const ev = plt.ce(name, opts);
1737
1756
  elm.dispatchEvent(ev);
@@ -1741,8 +1760,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1741
1760
  if (oldValue === newValue) {
1742
1761
  return;
1743
1762
  }
1744
- isMemberInElement(elm, memberName);
1745
- memberName.toLowerCase();
1763
+ let isProp = isMemberInElement(elm, memberName);
1764
+ let ln = memberName.toLowerCase();
1746
1765
  if (memberName === "style") {
1747
1766
  {
1748
1767
  for (const prop in oldValue) {
@@ -1760,8 +1779,28 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1760
1779
  }
1761
1780
  }
1762
1781
  }
1782
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1783
+ if (memberName[2] === "-") {
1784
+ memberName = memberName.slice(3);
1785
+ } else if (isMemberInElement(win, ln)) {
1786
+ memberName = ln.slice(2);
1787
+ } else {
1788
+ memberName = ln[2] + memberName.slice(3);
1789
+ }
1790
+ if (oldValue || newValue) {
1791
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1792
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1793
+ if (oldValue) {
1794
+ plt.rel(elm, memberName, oldValue, capture);
1795
+ }
1796
+ if (newValue) {
1797
+ plt.ael(elm, memberName, newValue, capture);
1798
+ }
1799
+ }
1763
1800
  } else ;
1764
1801
  };
1802
+ var CAPTURE_EVENT_SUFFIX = "Capture";
1803
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1765
1804
 
1766
1805
  // src/runtime/vdom/update-element.ts
1767
1806
  var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
@@ -4794,6 +4833,7 @@ const myComponentCss = () => `:host{display:block}`;
4794
4833
  class MyComponent {
4795
4834
  constructor(hostRef) {
4796
4835
  registerInstance(this, hostRef);
4836
+ this.myClick = createEvent(this, "myClick");
4797
4837
  }
4798
4838
  /**
4799
4839
  * The first name
@@ -4807,11 +4847,22 @@ class MyComponent {
4807
4847
  * The last name
4808
4848
  */
4809
4849
  last;
4850
+ /**
4851
+ * Click event - 点击事件
4852
+ */
4853
+ myClick;
4810
4854
  getText() {
4811
4855
  return format(this.first, this.middle, this.last);
4812
4856
  }
4857
+ handleClick = () => {
4858
+ this.myClick.emit({
4859
+ first: this.first,
4860
+ middle: this.middle,
4861
+ last: this.last,
4862
+ });
4863
+ };
4813
4864
  render() {
4814
- return hAsync("div", { key: '8a6d28dfa48a307c7e3435580dd1314f34d0446b', style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
4865
+ return hAsync("div", { key: '7b797ef9d028ff9aadbcfa34b9f678b05989cd3c', onClick: this.handleClick, style: { color: 'red', width: '100%', height: '60px', boxSizing: 'border-box', border: '1px solid #eee', backgroundColor: '#f5f5f5', padding: '10px', borderRadius: '4px' } }, "Stencil-Component: ", this.getText());
4815
4866
  }
4816
4867
  static get style() { return myComponentCss(); }
4817
4868
  static get cmpMeta() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joe-stencil-library",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1 +0,0 @@
1
- import{r as o,h as r}from"./p-CyyVqcfg.js";import{format as e}from"./index.esm.js";const t=class{constructor(r){o(this,r)}first;middle;last;getText(){return e(this.first,this.middle,this.last)}render(){return r("div",{key:"8a6d28dfa48a307c7e3435580dd1314f34d0446b",style:{color:"red",width:"100%",height:"60px",boxSizing:"border-box",border:"1px solid #eee",backgroundColor:"#f5f5f5",padding:"10px",borderRadius:"4px"}},"Stencil-Component: ",this.getText())}};t.style=":host{display:block}";export{t as my_component}
@@ -1,2 +0,0 @@
1
- var t,n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(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",t))(e||{}),o="type",l="value",s="serialized:",i=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.l.has(e)?n.l.get(e):o}}))},r=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},c=(t,n)=>{n&&(t.__stencil__getHostRef=()=>n,n.i=t,512&n.o.u&&i(t,n))},u=(t,n)=>(0,console.error)(t,n),a=new Map,f=new Map,d="s-id",$="sty-id",p="c-id",h="undefined"!=typeof window?window:{},m={u:0,$:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},v=t=>Promise.resolve(t),y=(()=>{try{return!!h.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),b=!!y&&(()=>!!h.document&&Object.getOwnPropertyDescriptor(h.document.adoptedStyleSheets,"length").writable)(),g=!1,w=[],j=[],S=(t,n)=>e=>{t.push(e),g||(g=!0,n&&4&m.u?x(k):m.raf(k))},O=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){u(t)}t.length=0},k=()=>{O(w),O(j),(g=w.length>0)&&m.raf(k)},x=t=>v().then(t),M=S(j,!0);function E(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(b?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var N=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,i=C(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=C(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>i.call(s,t)))}else i.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]};function C(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function I(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var L=new WeakMap,D=(t,n,e)=>{let o=f.get(t);y&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,f.set(t,o)},R=(t,n)=>{var e,o,l;const s=A(n),i=f.get(s);if(!h.document)return s;if(t=11===t.nodeType?t:h.document,i)if("string"==typeof i){let l,r=L.get(t=t.head||t);r||L.set(t,r=new Set);const c=t.querySelector(`[${$}="${s}"]`);if(c)c.textContent=i;else if(!r.has(s)){l=h.document.createElement("style"),l.textContent=i;const c=null!=(e=m.p)?e:I(h.document);if(null!=c&&l.setAttribute("nonce",c),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(y){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),b?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(s)}}else{let n=L.get(t);if(n||L.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}b?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s)}}return s},A=t=>"sc-"+t.h,P=t=>t.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),U=t=>"object"==(t=typeof t)||"function"===t,V=(t,n,...e)=>{let o=null,l=null,s=!1,i=!1;const r=[],c=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!U(o))&&(o+=""),s&&i?r[r.length-1].m+=o:r.push(s?_(null,o):o),i=s)};c(e),n&&n.key&&(l=n.key);const u=_(t,null);return u.v=n,r.length>0&&(u.j=r),u.S=l,u},_=(t,n)=>({u:0,O:t,m:null!=n?n:null,k:null,j:null,v:null,S:null}),T={},W=(t,n,e,o,l,s,i,r=[])=>{let c,u,a,f;if(1===s.nodeType){if(c=s.getAttribute(p),c&&(u=c.split("."),u[0]===i||"0"===u[0])){a=B({u:0,M:u[0],N:u[1],C:u[2],I:u[3],O:s.tagName.toLowerCase(),k:s,v:{class:s.className||""}}),n.push(a),s.removeAttribute(p),t.j||(t.j=[]);const l=a.k.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===a.O&&F(l,u[2],a,s,t,n,e,o,r),a.k["s-sn"]=l,a.k.removeAttribute("s-sn")),void 0!==a.I&&(t.j[a.I]=a),t=a,o&&"0"===a.C&&(o[a.I]=a.k)}if(s.shadowRoot)for(f=s.shadowRoot.childNodes.length-1;f>=0;f--)W(t,n,e,o,l,s.shadowRoot.childNodes[f],i,r);const d=s.__childNodes||s.childNodes;for(f=d.length-1;f>=0;f--)W(t,n,e,o,l,d[f],i,r)}else if(8===s.nodeType)u=s.nodeValue.split("."),(u[1]===i||"0"===u[1])&&(c=u[0],a=B({M:u[1],N:u[2],C:u[3],I:u[4]||"0",k:s,v:null,j:null,S:null,L:null,O:null,m:null}),"t"===c?(a.k=Y(s,3),a.k&&3===a.k.nodeType&&(a.m=a.k.textContent,n.push(a),s.remove(),i===a.M&&(t.j||(t.j=[]),t.j[a.I]=a),o&&"0"===a.C&&(o[a.I]=a.k))):"c"===c?(a.k=Y(s,8),a.k&&8===a.k.nodeType&&(n.push(a),s.remove())):a.M===i&&("s"===c?F(s["s-sn"]=u[5]||"",u[2],a,s,t,n,e,o,r):"r"===c&&o&&s.remove()));else if(t&&"style"===t.O){const n=_(null,s.textContent);n.k=s,n.I="0",t.j=[n]}return t},z=(t,n)=>{if(1===t.nodeType){const e=t[d]||t.getAttribute(d);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)z(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)z(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},B=t=>({u:0,M:null,N:null,C:null,I:"0",k:null,v:null,j:null,S:null,L:null,O:null,m:null,...t});function F(t,n,e,o,l,s,i,r,c){o["s-sr"]=!0,e.L=t||null,e.O="slot";const u=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";if(r&&h.document){const s=e.k=h.document.createElement(e.O);e.L&&e.k.setAttribute("name",t),l.k.shadowRoot&&u&&u!==e.M?C(l.k,"insertBefore")(s,C(l.k,"children")[0]):C(C(o,"parentNode"),"insertBefore")(s,o),q(c,n,t,o,e.M),o.remove(),"0"===e.C&&(r[e.I]=e.k)}else{const s=e.k,i=u&&u!==e.M&&l.k.shadowRoot;q(c,n,t,o,i?u:e.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?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 l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===(t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0)(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(o),i&&l.k.insertBefore(s,l.k.children[0])}s.push(e),i.push(e),l.j||(l.j=[]),l.j[e.I]=e}var H,q=(t,n,e,o,l)=>{var s,i;let r=o.nextSibling;if(t[n]=t[n]||[],r&&!(null==(s=r.nodeValue)?void 0:s.startsWith("s.")))do{!r||(r.getAttribute&&r.getAttribute("slot")||r["s-sn"])!==e&&(""!==e||r["s-sn"]||r.getAttribute&&r.getAttribute("slot")||8!==r.nodeType&&3!==r.nodeType)||(r["s-sn"]=e,t[n].push({slot:o,node:r,hostId:l})),r=null==r?void 0:r.nextSibling}while(r&&!(null==(i=r.nodeValue)?void 0:i.startsWith("s.")))},Y=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},G=class t{static fromLocalValue(n){const e=n[o],s=l in n?n[l]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,o]of s){const l="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(o);n.set(l,s)}return n;case"object":const o={};for(const[n,e]of s)o[n]=t.fromLocalValue(e);return o;case"regexp":const{pattern:l,flags:i}=s;return RegExp(l,i);case"set":const r=new Set;for(const n of s)r.add(t.fromLocalValue(n));return r;case"symbol":return Symbol(s);default:throw Error("Unsupported type: "+e)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(o))return!1;const s=t[o];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(l))}},J=(t,n)=>"string"==typeof t&&t.startsWith(s)?t=function(t){return"string"==typeof t&&t.startsWith(s)?G.fromLocalValue(JSON.parse(atob(t.slice(11)))):t}(t):null==t||U(t)?t:1&n?t+"":t,K=(t,n,e,o)=>{if(e!==o&&(n.toLowerCase(),"style"===n)){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}},Q=(t,n)=>{const e=11===n.k.nodeType&&n.k.host?n.k.host:n.k,o=t&&t.v||{},l=n.v||{};for(const t of X(Object.keys(o)))t in l||K(e,t,o[t],void 0);for(const t of X(Object.keys(l)))K(e,t,o[t],l[t])};function X(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var Z=(t,n,e)=>{const o=n.j[e];let l,s,i=0;if(null!=o.m)l=o.k=h.document.createTextNode(o.m);else{if(!h.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.k=h.document.createElement(o.O),Q(null,o),o.j){const n="template"===o.O?l.content:l;for(i=0;i<o.j.length;++i)s=Z(t,o,i),s&&n.appendChild(s)}}return l["s-hn"]=H,l},tt=(t,n,e,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===H&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=Z(null,e,l),i&&(o[l].k=i,lt(r,i,n)))},nt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;t&&t.remove()}}},et=(t,n,e=!1)=>t.O===n.O&&(e?(e&&!t.S&&n.S&&(t.S=n.S),!0):t.S===n.S),ot=(t,n,e=!1)=>{const o=n.k=t.k,l=t.j,s=n.j,i=n.m;null==i?(Q(t,n),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=n.length-1,d=n[0],$=n[f],p=o.length-1,h=o[0],m=o[p];const v="template"===e.O?t.content:t;for(;r<=f&&c<=p;)if(null==d)d=n[++r];else if(null==$)$=n[--f];else if(null==h)h=o[++c];else if(null==m)m=o[--p];else if(et(d,h,l))ot(d,h,l),d=n[++r],h=o[++c];else if(et($,m,l))ot($,m,l),$=n[--f],m=o[--p];else if(et(d,m,l))ot(d,m,l),lt(v,d.k,$.k.nextSibling),d=n[++r],m=o[--p];else if(et($,h,l))ot($,h,l),lt(v,$.k,d.k),$=n[--f],h=o[++c];else{for(u=-1,a=r;a<=f;++a)if(n[a]&&null!==n[a].S&&n[a].S===h.S){u=a;break}u>=0?(i=n[u],i.O!==h.O?s=Z(n&&n[c],e,u):(ot(i,h,l),n[u]=void 0,s=i.k),h=o[++c]):(s=Z(n&&n[c],e,c),h=o[++c]),s&&lt(d.k.parentNode,s,d.k)}r>f?tt(t,null==o[p+1]?null:o[p+1].k,e,o,c,p):c>p&&nt(n,r,f)})(o,l,n,s,e):null!==s?(null!==t.m&&(o.textContent=""),tt(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.j=l):nt(l,0,l.length-1)):t.m!==i&&(o.data=i)},lt=(t,n,e)=>t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e),st=(t,n)=>{if(n&&!t.D&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.D=()=>{n["s-p"].splice(e-1,1),o()})))}},it=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);st(t,t.R);const e=()=>rt(t,n);if(!n)return M(e);queueMicrotask((()=>{e()}))},rt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.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 l;return n?(t.A.length&&t.A.forEach((t=>t(e))),l=pt(o,"componentWillLoad",void 0,e)):l=pt(o,"componentWillUpdate",void 0,e),l=ct(l,(()=>pt(o,"componentWillRender",void 0,e))),ct(l,(()=>at(t,o,n)))},ct=(t,n)=>ut(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),ut=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,at=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=R(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);ft(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>dt(t);0===n.length?e():(Promise.all(n).then(e),t.u|=4,n.length=0)}},ft=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{const o=t.$hostElement$,l=t.P||_(null,null),s=(t=>t&&t.O===T)(n)?n:V(null,null,n);if(H=o.tagName,e&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.O=null,s.u|=4,t.P=s,s.k=l.k=o.shadowRoot||o,ot(l,s,e)})(t,n,o)}catch(n){u(n,t.$hostElement$)}return null},dt=t=>{const n=t.$hostElement$,e=t.i,o=t.R;pt(e,"componentDidRender",void 0,n),64&t.u?pt(e,"componentDidUpdate",void 0,n):(t.u|=64,ht(n),pt(e,"componentDidLoad",void 0,n),t.U(n),o||$t()),t.D&&(t.D(),t.D=void 0),512&t.u&&x((()=>it(t,!1))),t.u&=-517},$t=()=>{var t;x((()=>(t=>{const n=m.ce("appload",{detail:{namespace:"joe-stencil-library"}});return t.dispatchEvent(n),n})(h))),(null==(t=m.V)?void 0:t.size)&&m.V.clear()},pt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){u(t,o)}},ht=t=>t.classList.add("hydrated"),mt=(t,n,e,o)=>{const l=r(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.h}" 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/stenciljs/core/issues/5457).`);const s=l.l.get(n),i=l.u,c=l.i;if(e=J(e,o.t[n][0]),!(8&i&&void 0!==s||e===s||Number.isNaN(s)&&Number.isNaN(e)||(l.l.set(n,e),2!=(18&i)))){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(e,s,n))return;it(l,!1)}},vt=(t,n,e)=>{var o,l;const s=t.prototype;if(n.t){const i=Object.entries(null!=(o=n.t)?o:{});if(i.map((([t,[o]])=>{if(31&o||2&e&&32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(n.t[t][0]|=2048),i&&(n.t[t][0]|=4096),(1&e||!l)&&Object.defineProperty(s,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>r(this).l.get(n))(0,t);const e=r(this),o=e?e.i:s;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=r(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.call(this,J(l,o)),void mt(this,t,l=32&o?this[t]:s.$hostElement$[t],n);{if(!(1&e&&4096&n.t[t][0]))return mt(this,t,l,n),void(1&e&&!s.i&&s.A.push((()=>{4096&n.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=l)})));const i=()=>{const e=s.i[t];!s.l.get(t)&&e&&s.l.set(t,e),s.i[t]=J(l,o),mt(this,t,s.i[t],n)};s.i?i():s.A.push((()=>{i()}))}}}})}})),1&e){const e=new Map;s.attributeChangedCallback=function(t,o,l){m.jmp((()=>{var c;const u=e.get(t),a=r(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),s.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const e=null==a?void 0:a.u;if(a&&e&&!(8&e)&&l!==o){const s=a.i,i=null==(c=n._)?void 0:c[t];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=s[i]&&(128&e||1&r)&&s[i].call(s,l,o,t)}))}return}const f=i.find((([t])=>t===u));f&&4&f[1][0]&&(l=null!==l&&"false"!==l);const d=Object.getOwnPropertyDescriptor(s,u);l==this[u]||d.get&&!d.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n._)?l:{}),...i.filter((([t,n])=>31&n[0])).map((([t,n])=>{const o=n[1]||t;return e.set(o,t),o}))]))}}return t},yt=(t,n)=>{pt(t,"connectedCallback",void 0,n)},bt=t=>{if(!(1&m.u)){const n=r(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.u)(null==n?void 0:n.i)?yt(n.i,t):(null==n?void 0:n.T)&&n.T.then((()=>yt(n.i,t)));else{let o;if(n.u|=1,o=t.getAttribute(d),o){if(1&e.u){const n=R(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}((t,n,e,o)=>{var l,s,i,c;const u=t.shadowRoot,a=[],f=[],$=u?[]:null,p=_(n,null);p.k=t,!h.document||m.V&&m.V.size||z(h.document.body,m.V=new Map),t[d]=e,t.removeAttribute(d),o.P=W(p,a,[],$,t,t,e,f);let v=0;const y=a.length;let b;for(;v<y;v++){b=a[v];const e=b.M+"."+b.N,o=m.V.get(e),s=b.k;if(u){if((null==(l=b.O)?void 0:(""+l).includes("-"))&&"slot-fb"!==b.O&&!b.k.shadowRoot){const t=r(b.k);if(t){const n=A(t.o),e=h.document.querySelector(`style[sty-id="${n}"]`);e&&$.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===b.O&&(s["s-cr"]=t["s-cr"]);"slot"===b.O&&(b.L=b.k["s-sn"]||b.k.name||null,b.j?(b.u|=2,b.k.childNodes.length||b.j.forEach((t=>{b.k.appendChild(t.k)}))):b.u|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),u||(s["s-oo"]=parseInt(b.N))),o&&!o["s-id"]&&m.V.delete(e)}const g=[],w=f.length;let j,S,O,k,x=0,M=0;for(;x<w;x++)if(j=f[x],j&&j.length)for(O=j.length,S=0;S<O;S++){if(k=j[S],g[k.hostId]||(g[k.hostId]=m.V.get(k.hostId)),!g[k.hostId])continue;const t=g[k.hostId];t.shadowRoot&&k.node.parentElement!==t&&t.insertBefore(k.node,null==(i=null==(s=j[S-1])?void 0:s.node)?void 0:i.nextSibling),t.shadowRoot&&u||(k.slot["s-cr"]||(k.slot["s-cr"]=t["s-cr"],k.slot["s-cr"]=!k.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),N(k.node,k.slot,0,k.node["s-oo"]||M),(null==(c=k.node.parentElement)?void 0:c.shadowRoot)&&k.node.getAttribute&&k.node.getAttribute("slot")&&k.node.removeAttribute("slot")),M=(k.node["s-oo"]||M)+1}if(u&&!u.childNodes.length){let n=0;const e=$.length;if(e){for(;n<e;n++){const t=$[n];t&&u.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,e.h,o,n)}{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){st(n,n.R=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;if(!(32&n.u)){if(n.u|=32,e.W){const l=((t,n)=>{const e=t.h.replace(/-/g,"_"),o=t.W;if(!o)return;const l=a.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(a.set(o,t),t[e])),(t=>{u(t,n.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.h}#${n.B}" was not found`);o.isProxied||(vt(o,e,2),o.isProxied=!0);const s=()=>{};n.u|=8;try{new o(n)}catch(n){u(n,t)}n.u&=-9,s(),yt(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=A(e);if(!f.has(n)){const o=()=>{};D(n,t,!!(1&e.u)),o()}}}const l=n.R,s=()=>it(n,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()})(t,n,e)}o()}},gt=(t,n)=>{pt(t,"disconnectedCallback",void 0,n||t)},wt=(t,n={})=>{var e;if(!h.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=n.exclude||[],s=h.customElements,i=h.document.head,c=i.querySelector("meta[charset]"),u=h.document.createElement("style"),a=[];let f,d=!0;if(Object.assign(m,n),m.$=new URL(n.resourcesUrl||"./",h.document.baseURI).href,m.u|=2,(()=>{if(!h.document)return;const t=h.document.querySelectorAll(`[${$}]`);let n=0;for(;n<t.length;n++)D(t[n].getAttribute($),P(t[n].innerHTML),!0)})(),t.map((t=>{t[1].map((n=>{const e={u:n[0],h:n[1],t:n[2],F:n[3]};e.t=n[2];const i=e.h,c=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,H:new Map};e.T=new Promise((t=>e.U=t)),t["s-p"]=[],t["s-rc"]=[],e.A=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,e),1&e.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${e.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else E.call(t,e)}connectedCallback(){r(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),f&&(clearTimeout(f),f=null),d?a.push(this):m.jmp((()=>bt(this))))}disconnectedCallback(){m.jmp((()=>(async t=>{if(!(1&m.u)){const n=r(t);(null==n?void 0:n.i)?gt(n.i,t):(null==n?void 0:n.T)&&n.T.then((()=>gt(n.i,t)))}L.has(t)&&L.delete(t),t.shadowRoot&&L.has(t.shadowRoot)&&L.delete(t.shadowRoot)})(this))),m.raf((()=>{var t;const n=r(this);if(!n)return;const e=a.findIndex((t=>t===this));e>-1&&a.splice(e,1),(null==(t=null==n?void 0:n.P)?void 0:t.k)instanceof Node&&!n.P.k.isConnected&&delete n.P.k}))}componentOnReady(){var t;return null==(t=r(this))?void 0:t.T}};e.W=t[0],l.includes(i)||s.get(i)||(o.push(i),s.define(i,vt(c,e,1)))}))})),o.length>0&&(u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(e=m.p)?e:I(h.document);null!=t&&u.setAttribute("nonce",t),i.insertBefore(u,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((t=>t.connectedCallback())):m.jmp((()=>f=setTimeout($t,30)))},jt=t=>m.p=t;export{wt as b,V as h,v as p,c as r,jt as s}