analog-clock-components 0.1.315 → 0.1.317

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.
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-bd83218f.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-d97e4317",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e)));
1
+ import{p as e,b as o}from"./p-5e33b1cd.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-1b2be8fb",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e)));
@@ -1 +1 @@
1
- import{r as t,h as e}from"./p-bd83218f.js";const r=class{constructor(e){t(this,e),this.size=void 0,this.timeZone=0,this.time=Date.now()}componentDidLoad(){this.timer=window.setInterval((()=>{this.time=Date.now()}),250)}disconnectedCallback(){clearInterval(this.timer)}get hour(){return new Date(this.time).getHours()}get minute(){return new Date(this.time).getMinutes()}get second(){return new Date(this.time).getSeconds()}hourToDegrees(){const t=this.hour+this.timeZone;return Math.floor(this.minute/2)+30*t}minuteToDegrees(){return Math.floor(this.second/10)+6*this.minute}secondToDegrees(){return 6*this.second}render(){return e("svg",{class:"clock",viewBox:"0 0 200 200",width:this.size,height:this.size},e("circle",{id:"circle",cx:"100",cy:"100",r:"95","stroke-width":"10",fill:"transparent"}),e("line",{id:"hour",transform:`rotate(${this.hourToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"60","stroke-width":"10","stroke-linecap":"round"}),e("line",{id:"minute",transform:`rotate(${this.minuteToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"30","stroke-width":"8","stroke-linecap":"round"}),e("line",{id:"second",transform:`rotate(${this.secondToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"20","stroke-width":"2","stroke-linecap":"round"}))}};r.style=".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";export{r as analog_clock}
1
+ import{r as t,h as e}from"./p-5e33b1cd.js";const r=class{constructor(e){t(this,e),this.size=void 0,this.timeZone=0,this.time=Date.now()}componentDidLoad(){this.timer=window.setInterval((()=>{this.time=Date.now()}),250)}disconnectedCallback(){clearInterval(this.timer)}get hour(){return new Date(this.time).getHours()}get minute(){return new Date(this.time).getMinutes()}get second(){return new Date(this.time).getSeconds()}hourToDegrees(){const t=this.hour+this.timeZone;return Math.floor(this.minute/2)+30*t}minuteToDegrees(){return Math.floor(this.second/10)+6*this.minute}secondToDegrees(){return 6*this.second}render(){return e("svg",{class:"clock",viewBox:"0 0 200 200",width:this.size,height:this.size},e("circle",{id:"circle",cx:"100",cy:"100",r:"95","stroke-width":"10",fill:"transparent"}),e("line",{id:"hour",transform:`rotate(${this.hourToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"60","stroke-width":"10","stroke-linecap":"round"}),e("line",{id:"minute",transform:`rotate(${this.minuteToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"30","stroke-width":"8","stroke-linecap":"round"}),e("line",{id:"second",transform:`rotate(${this.secondToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"20","stroke-width":"2","stroke-linecap":"round"}))}};r.style=".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";export{r as analog_clock}
@@ -0,0 +1,2 @@
1
+ let t,e,n=!1,l=!1;const s={},o=t=>"object"==(t=typeof t)||"function"===t,r=(t,e,...n)=>{let l=null,s=!1,r=!1;const i=[],a=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!o(l))&&(l+=""),s&&r?i[i.length-1].t+=l:i.push(s?c(null,l):l),r=s)};if(a(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const u=c(t,null);return u.l=e,i.length>0&&(u.o=i),u},c=(t,e)=>({i:0,u:t,t:e,h:null,o:null,l:null}),i={},a=new WeakMap,u=t=>"sc-"+t.$,f=(t,e,n,l,s,r)=>{if(n!==l){let c=R(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,s=$(n),o=$(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else{const i=o(l);if((c||i&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?c=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!c||4&r||s)&&!i&&t.setAttribute(e,l=!0===l?"":l)}}},h=/\s/,$=t=>t?t.split(h):[],d=(t,e,n,l)=>{const o=11===e.h.nodeType&&e.h.host?e.h.host:e.h,r=t&&t.l||s,c=e.l||s;for(l in r)l in c||f(o,l,r[l],void 0,n,e.i);for(l in c)f(o,l,r[l],c[l],n,e.i)},p=(e,l,s)=>{const o=l.o[s];let r,c,i=0;if(n||(n="svg"===o.u),r=o.h=V.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.u),n&&"foreignObject"===o.u&&(n=!1),d(null,o,n),null!=t&&r["s-si"]!==t&&r.classList.add(r["s-si"]=t),o.o)for(i=0;i<o.o.length;++i)c=p(e,o,i),c&&r.appendChild(c);return"svg"===o.u?n=!1:"foreignObject"===r.tagName&&(n=!0),r},y=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=p(null,l,o),c&&(s[o].h=c,i.insertBefore(c,n)))},m=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.h.remove()},w=(t,e)=>t.u===e.u,b=(t,e)=>{const l=e.h=t.h,s=t.o,o=e.o,r=e.u;n="svg"===r||"foreignObject"!==r&&n,d(t,e,n),null!==s&&null!==o?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],a=e[c],u=l.length-1,f=l[0],h=l[u];for(;o<=c&&r<=u;)null==i?i=e[++o]:null==a?a=e[--c]:null==f?f=l[++r]:null==h?h=l[--u]:w(i,f)?(b(i,f),i=e[++o],f=l[++r]):w(a,h)?(b(a,h),a=e[--c],h=l[--u]):w(i,h)?(b(i,h),t.insertBefore(i.h,a.h.nextSibling),i=e[++o],h=l[--u]):w(a,f)?(b(a,f),t.insertBefore(a.h,i.h),a=e[--c],f=l[++r]):(s=p(e&&e[r],n,r),f=l[++r],s&&i.h.parentNode.insertBefore(s,i.h));o>c?y(t,null==l[u+1]?null:l[u+1].h,n,l,r,u):r>u&&m(e,o,c)})(l,s,e,o):null!==o?y(l,null,e,o,0,o.length-1):null!==s&&m(s,0,s.length-1),n&&"svg"===r&&(n=!1)},g=(t,e)=>{e&&!t.p&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.p=e)))},v=(t,e)=>{if(t.i|=16,!(4&t.i))return g(t,t.m),Y((()=>S(t,e)));t.i|=512},S=(t,e)=>{const n=t.g;return x(void 0,(()=>j(t,n,e)))},j=async(t,e,n)=>{const l=t.v,s=l["s-rc"];n&&(t=>{const e=t.S,n=t.v,l=e.i,s=((t,e)=>{let n=u(e);const l=D.get(n);if(t=11===t.nodeType?t:V,l)if("string"==typeof l){let e,s=a.get(t=t.head||t);s||a.set(t,s=new Set),s.has(n)||(e=V.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);O(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>k(t);0===e.length?n():(Promise.all(e).then(n),t.i|=4,e.length=0)}},O=(n,l)=>{try{l=l.render(),n.i&=-17,n.i|=2,((n,l)=>{const s=n.v,o=n.j||c(null,null),a=(t=>t&&t.u===i)(l)?l:r(null,null,l);e=s.tagName,a.u=null,a.i|=4,n.j=a,a.h=o.h=s.shadowRoot||s,t=s["s-sc"],b(o,a)})(n,l)}catch(t){U(t,n.v)}return null},k=t=>{const e=t.v,n=t.g,l=t.m;64&t.i||(t.i|=64,P(e),C(n,"componentDidLoad"),t.O(e),l||M()),t.p&&(t.p(),t.p=void 0),512&t.i&&X((()=>v(t,!1))),t.i&=-517},M=()=>{P(V.documentElement),X((()=>(t=>{const e=_.ce("appload",{detail:{namespace:"analog-clock"}});return t.dispatchEvent(e),e})(H)))},C=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){U(t)}},x=(t,e)=>t&&t.then?t.then(e):e(),P=t=>t.classList.add("hydrated"),E=(t,e,n)=>{if(e.k){const l=Object.entries(e.k),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>T(this).M.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=T(t),r=s.M.get(e),c=s.i,i=s.g;n=((t,e)=>null==t||o(t)?t:2&e?parseFloat(t):t)(n,l.k[e][0]),8&c&&void 0!==r||n===r||Number.isNaN(r)&&Number.isNaN(n)||(s.M.set(e,n),i&&2==(18&c)&&v(s,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){_.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},L=(t,e={})=>{const n=[],l=e.exclude||[],s=H.customElements,o=V.head,r=o.querySelector("meta[charset]"),c=V.createElement("style"),i=[];let a,f=!0;Object.assign(_,e),_.C=new URL(e.resourcesUrl||"./",V.baseURI).href,t.map((t=>{t[1].map((e=>{const o={i:e[0],$:e[1],k:e[2],P:e[3]};o.k=e[2];const r=o.$,c=class extends HTMLElement{constructor(t){super(t),F(t=this,o),1&o.i&&t.attachShadow({mode:"open"})}connectedCallback(){a&&(clearTimeout(a),a=null),f?i.push(this):_.jmp((()=>(t=>{if(0==(1&_.i)){const e=T(t),n=e.S,l=()=>{};if(!(1&e.i)){e.i|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){g(e,e.m=n);break}}n.k&&Object.entries(n.k).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.i)){{if(e.i|=32,(s=q(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(E(s,n,2),s.isProxied=!0);const t=()=>{};e.i|=8;try{new s(e)}catch(t){U(t)}e.i&=-9,t()}if(s.style){let t=s.style;const e=u(n);if(!D.has(e)){const l=()=>{};((t,e,n)=>{let l=D.get(t);B&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,D.set(t,l)})(e,t,!!(1&n.i)),l()}}}const o=e.m,r=()=>v(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){_.jmp((()=>(()=>{0==(1&_.i)&&C(T(this).g,"disconnectedCallback")})()))}componentOnReady(){return T(this).L}};o.N=t[0],l.includes(r)||s.get(r)||(n.push(r),s.define(r,E(c,o,1)))}))})),c.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",c.setAttribute("data-styles",""),o.insertBefore(c,r?r.nextSibling:o.firstChild),f=!1,i.length?i.map((t=>t.connectedCallback())):_.jmp((()=>a=setTimeout(M,30)))},N=new WeakMap,T=t=>N.get(t),A=(t,e)=>N.set(e.g=t,e),F=(t,e)=>{const n={i:0,v:t,S:e,M:new Map};return n.L=new Promise((t=>n.O=t)),t["s-p"]=[],t["s-rc"]=[],N.set(t,n)},R=(t,e)=>e in t,U=(t,e)=>(0,console.error)(t,e),W=new Map,q=t=>{const e=t.$.replace(/-/g,"_"),n=t.N,l=W.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(W.set(n,t),t[e])),U)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},D=new Map,H="undefined"!=typeof window?window:{},V=H.document||{head:{}},_={i:0,C:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},z=t=>Promise.resolve(t),B=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),G=[],I=[],J=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&_.i?X(Q):_.raf(Q))},K=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){U(t)}t.length=0},Q=()=>{K(G),K(I),(l=G.length>0)&&_.raf(Q)},X=t=>z().then(t),Y=J(I,!0);export{L as b,r as h,z as p,A as r}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5ea1be96.js');
5
+ const index = require('./index-f1da3c5e.js');
6
6
 
7
7
  const analogClockCss = ".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";
8
8
 
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-5ea1be96.js');
3
+ const index = require('./index-f1da3c5e.js');
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v2.18.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('analog-clock.cjs.js', document.baseURI).href));
@@ -22,32 +22,18 @@ function _interopNamespace(e) {
22
22
 
23
23
  const NAMESPACE = 'analog-clock';
24
24
 
25
+ /**
26
+ * Virtual DOM patching algorithm based on Snabbdom by
27
+ * Simon Friis Vindum (@paldepind)
28
+ * Licensed under the MIT License
29
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
30
+ *
31
+ * Modified for Stencil's renderer and slot projection
32
+ */
25
33
  let scopeId;
26
34
  let hostTagName;
27
35
  let isSvgMode = false;
28
36
  let queuePending = false;
29
- const win = typeof window !== 'undefined' ? window : {};
30
- const doc = win.document || { head: {} };
31
- const plt = {
32
- $flags$: 0,
33
- $resourcesUrl$: '',
34
- jmp: (h) => h(),
35
- raf: (h) => requestAnimationFrame(h),
36
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
37
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
38
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
39
- };
40
- const promiseResolve = (v) => Promise.resolve(v);
41
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
42
- try {
43
- new CSSStyleSheet();
44
- return typeof new CSSStyleSheet().replaceSync === 'function';
45
- }
46
- catch (e) { }
47
- return false;
48
- })()
49
- ;
50
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
51
37
  const createTime = (fnName, tagName = '') => {
52
38
  {
53
39
  return () => {
@@ -62,76 +48,7 @@ const uniqueTime = (key, measureText) => {
62
48
  };
63
49
  }
64
50
  };
65
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
66
- const registerStyle = (scopeId, cssText, allowCS) => {
67
- let style = styles.get(scopeId);
68
- if (supportsConstructableStylesheets && allowCS) {
69
- style = (style || new CSSStyleSheet());
70
- if (typeof style === 'string') {
71
- style = cssText;
72
- }
73
- else {
74
- style.replaceSync(cssText);
75
- }
76
- }
77
- else {
78
- style = cssText;
79
- }
80
- styles.set(scopeId, style);
81
- };
82
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
83
- let scopeId = getScopeId(cmpMeta);
84
- const style = styles.get(scopeId);
85
- // if an element is NOT connected then getRootNode() will return the wrong root node
86
- // so the fallback is to always use the document for the root node in those cases
87
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
88
- if (style) {
89
- if (typeof style === 'string') {
90
- styleContainerNode = styleContainerNode.head || styleContainerNode;
91
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
92
- let styleElm;
93
- if (!appliedStyles) {
94
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
95
- }
96
- if (!appliedStyles.has(scopeId)) {
97
- {
98
- {
99
- styleElm = doc.createElement('style');
100
- styleElm.innerHTML = style;
101
- }
102
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
103
- }
104
- if (appliedStyles) {
105
- appliedStyles.add(scopeId);
106
- }
107
- }
108
- }
109
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
110
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
111
- }
112
- }
113
- return scopeId;
114
- };
115
- const attachStyles = (hostRef) => {
116
- const cmpMeta = hostRef.$cmpMeta$;
117
- const elm = hostRef.$hostElement$;
118
- const flags = cmpMeta.$flags$;
119
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
120
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
121
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
122
- // only required when we're NOT using native shadow dom (slot)
123
- // or this browser doesn't support native shadow dom
124
- // and this host element was NOT created with SSR
125
- // let's pick out the inner content for slot projection
126
- // create a node to represent where the original
127
- // content was first placed, which is useful later on
128
- // DOM WRITE!!
129
- elm['s-sc'] = scopeId;
130
- elm.classList.add(scopeId + '-h');
131
- }
132
- endAttachStyles();
133
- };
134
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
51
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
135
52
  /**
136
53
  * Default style mode id
137
54
  */
@@ -225,6 +142,125 @@ const newVNode = (tag, text) => {
225
142
  };
226
143
  const Host = {};
227
144
  const isHost = (node) => node && node.$tag$ === Host;
145
+ /**
146
+ * Parse a new property value for a given property type.
147
+ *
148
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
149
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
150
+ * 1. `any`, the type given to `propValue` in the function signature
151
+ * 2. the type stored from `propType`.
152
+ *
153
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
154
+ *
155
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
156
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
157
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
158
+ * ```tsx
159
+ * <my-cmp prop-val={0}></my-cmp>
160
+ * ```
161
+ *
162
+ * HTML prop values on the other hand, will always a string
163
+ *
164
+ * @param propValue the new value to coerce to some type
165
+ * @param propType the type of the prop, expressed as a binary number
166
+ * @returns the parsed/coerced value
167
+ */
168
+ const parsePropertyValue = (propValue, propType) => {
169
+ // ensure this value is of the correct prop type
170
+ if (propValue != null && !isComplexType(propValue)) {
171
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
172
+ // force it to be a number
173
+ return parseFloat(propValue);
174
+ }
175
+ // redundant return here for better minification
176
+ return propValue;
177
+ }
178
+ // not sure exactly what type we want
179
+ // so no need to change to a different type
180
+ return propValue;
181
+ };
182
+ /**
183
+ * Helper function to create & dispatch a custom Event on a provided target
184
+ * @param elm the target of the Event
185
+ * @param name the name to give the custom Event
186
+ * @param opts options for configuring a custom Event
187
+ * @returns the custom Event
188
+ */
189
+ const emitEvent = (elm, name, opts) => {
190
+ const ev = plt.ce(name, opts);
191
+ elm.dispatchEvent(ev);
192
+ return ev;
193
+ };
194
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
195
+ const registerStyle = (scopeId, cssText, allowCS) => {
196
+ let style = styles.get(scopeId);
197
+ if (supportsConstructableStylesheets && allowCS) {
198
+ style = (style || new CSSStyleSheet());
199
+ if (typeof style === 'string') {
200
+ style = cssText;
201
+ }
202
+ else {
203
+ style.replaceSync(cssText);
204
+ }
205
+ }
206
+ else {
207
+ style = cssText;
208
+ }
209
+ styles.set(scopeId, style);
210
+ };
211
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
212
+ let scopeId = getScopeId(cmpMeta);
213
+ const style = styles.get(scopeId);
214
+ // if an element is NOT connected then getRootNode() will return the wrong root node
215
+ // so the fallback is to always use the document for the root node in those cases
216
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
217
+ if (style) {
218
+ if (typeof style === 'string') {
219
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
220
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
221
+ let styleElm;
222
+ if (!appliedStyles) {
223
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
224
+ }
225
+ if (!appliedStyles.has(scopeId)) {
226
+ {
227
+ {
228
+ styleElm = doc.createElement('style');
229
+ styleElm.innerHTML = style;
230
+ }
231
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
232
+ }
233
+ if (appliedStyles) {
234
+ appliedStyles.add(scopeId);
235
+ }
236
+ }
237
+ }
238
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
239
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
240
+ }
241
+ }
242
+ return scopeId;
243
+ };
244
+ const attachStyles = (hostRef) => {
245
+ const cmpMeta = hostRef.$cmpMeta$;
246
+ const elm = hostRef.$hostElement$;
247
+ const flags = cmpMeta.$flags$;
248
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
249
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
250
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
251
+ // only required when we're NOT using native shadow dom (slot)
252
+ // or this browser doesn't support native shadow dom
253
+ // and this host element was NOT created with SSR
254
+ // let's pick out the inner content for slot projection
255
+ // create a node to represent where the original
256
+ // content was first placed, which is useful later on
257
+ // DOM WRITE!!
258
+ elm['s-sc'] = scopeId;
259
+ elm.classList.add(scopeId + '-h');
260
+ }
261
+ endAttachStyles();
262
+ };
263
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
228
264
  /**
229
265
  * Production setAccessor() function based on Preact by
230
266
  * Jason Miller (@developit)
@@ -645,18 +681,6 @@ const renderVdom = (hostRef, renderFnResults) => {
645
681
  // synchronous patch
646
682
  patch(oldVNode, rootVnode);
647
683
  };
648
- /**
649
- * Helper function to create & dispatch a custom Event on a provided target
650
- * @param elm the target of the Event
651
- * @param name the name to give the custom Event
652
- * @param opts options for configuring a custom Event
653
- * @returns the custom Event
654
- */
655
- const emitEvent = (elm, name, opts) => {
656
- const ev = plt.ce(name, opts);
657
- elm.dispatchEvent(ev);
658
- return ev;
659
- };
660
684
  const attachToAncestor = (hostRef, ancestorComponent) => {
661
685
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
662
686
  ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
@@ -810,43 +834,6 @@ const then = (promise, thenFn) => {
810
834
  };
811
835
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
812
836
  ;
813
- /**
814
- * Parse a new property value for a given property type.
815
- *
816
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
817
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
818
- * 1. `any`, the type given to `propValue` in the function signature
819
- * 2. the type stored from `propType`.
820
- *
821
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
822
- *
823
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
824
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
825
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
826
- * ```tsx
827
- * <my-cmp prop-val={0}></my-cmp>
828
- * ```
829
- *
830
- * HTML prop values on the other hand, will always a string
831
- *
832
- * @param propValue the new value to coerce to some type
833
- * @param propType the type of the prop, expressed as a binary number
834
- * @returns the parsed/coerced value
835
- */
836
- const parsePropertyValue = (propValue, propType) => {
837
- // ensure this value is of the correct prop type
838
- if (propValue != null && !isComplexType(propValue)) {
839
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
840
- // force it to be a number
841
- return parseFloat(propValue);
842
- }
843
- // redundant return here for better minification
844
- return propValue;
845
- }
846
- // not sure exactly what type we want
847
- // so no need to change to a different type
848
- return propValue;
849
- };
850
837
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
851
838
  const setValue = (ref, propName, newVal, cmpMeta) => {
852
839
  // check our new property value against our internal value
@@ -873,6 +860,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
873
860
  }
874
861
  }
875
862
  };
863
+ /**
864
+ * Attach a series of runtime constructs to a compiled Stencil component
865
+ * constructor, including getters and setters for the `@Prop` and `@State`
866
+ * decorators, callbacks for when attributes change, and so on.
867
+ *
868
+ * @param Cstr the constructor for a component that we need to process
869
+ * @param cmpMeta metadata collected previously about the component
870
+ * @param flags a number used to store a series of bit flags
871
+ * @returns a reference to the same constructor passed in (but now mutated)
872
+ */
876
873
  const proxyComponent = (Cstr, cmpMeta, flags) => {
877
874
  if (cmpMeta.$members$) {
878
875
  // It's better to have a const than two Object.entries()
@@ -1212,6 +1209,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1212
1209
  }, consoleError);
1213
1210
  };
1214
1211
  const styles = /*@__PURE__*/ new Map();
1212
+ const win = typeof window !== 'undefined' ? window : {};
1213
+ const doc = win.document || { head: {} };
1214
+ const plt = {
1215
+ $flags$: 0,
1216
+ $resourcesUrl$: '',
1217
+ jmp: (h) => h(),
1218
+ raf: (h) => requestAnimationFrame(h),
1219
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1220
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1221
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1222
+ };
1223
+ const promiseResolve = (v) => Promise.resolve(v);
1224
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1225
+ try {
1226
+ new CSSStyleSheet();
1227
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1228
+ }
1229
+ catch (e) { }
1230
+ return false;
1231
+ })()
1232
+ ;
1215
1233
  const queueDomReads = [];
1216
1234
  const queueDomWrites = [];
1217
1235
  const queueTask = (queue, write) => (cb) => {
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-5ea1be96.js');
5
+ const index = require('./index-f1da3c5e.js');
6
6
 
7
7
  /*
8
- Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  const patchEsm = () => {
11
11
  return index.promiseResolve();
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "2.18.0",
7
+ "version": "2.18.1",
8
8
  "typescriptVersion": "4.7.4"
9
9
  },
10
10
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-feecb2c4.js';
1
+ import { r as registerInstance, h } from './index-9b09bb32.js';
2
2
 
3
3
  const analogClockCss = ".clock #circle{stroke:var(--clock-circle-color, black)}.clock #hour{stroke:var(--clock-hour-color, black)}.clock #minute{stroke:var(--clock-minute-color, black)}.clock #second{stroke:var(--clock-second-color, black)}";
4
4
 
@@ -1,7 +1,7 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-feecb2c4.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-9b09bb32.js';
2
2
 
3
3
  /*
4
- Stencil Client Patch Browser v2.18.0 | MIT Licensed | https://stenciljs.com
4
+ Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
5
5
  */
6
6
  const patchBrowser = () => {
7
7
  const importMeta = import.meta.url;
@@ -1,31 +1,17 @@
1
1
  const NAMESPACE = 'analog-clock';
2
2
 
3
+ /**
4
+ * Virtual DOM patching algorithm based on Snabbdom by
5
+ * Simon Friis Vindum (@paldepind)
6
+ * Licensed under the MIT License
7
+ * https://github.com/snabbdom/snabbdom/blob/master/LICENSE
8
+ *
9
+ * Modified for Stencil's renderer and slot projection
10
+ */
3
11
  let scopeId;
4
12
  let hostTagName;
5
13
  let isSvgMode = false;
6
14
  let queuePending = false;
7
- const win = typeof window !== 'undefined' ? window : {};
8
- const doc = win.document || { head: {} };
9
- const plt = {
10
- $flags$: 0,
11
- $resourcesUrl$: '',
12
- jmp: (h) => h(),
13
- raf: (h) => requestAnimationFrame(h),
14
- ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
15
- rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
16
- ce: (eventName, opts) => new CustomEvent(eventName, opts),
17
- };
18
- const promiseResolve = (v) => Promise.resolve(v);
19
- const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
20
- try {
21
- new CSSStyleSheet();
22
- return typeof new CSSStyleSheet().replaceSync === 'function';
23
- }
24
- catch (e) { }
25
- return false;
26
- })()
27
- ;
28
- const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
29
15
  const createTime = (fnName, tagName = '') => {
30
16
  {
31
17
  return () => {
@@ -40,76 +26,7 @@ const uniqueTime = (key, measureText) => {
40
26
  };
41
27
  }
42
28
  };
43
- const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
44
- const registerStyle = (scopeId, cssText, allowCS) => {
45
- let style = styles.get(scopeId);
46
- if (supportsConstructableStylesheets && allowCS) {
47
- style = (style || new CSSStyleSheet());
48
- if (typeof style === 'string') {
49
- style = cssText;
50
- }
51
- else {
52
- style.replaceSync(cssText);
53
- }
54
- }
55
- else {
56
- style = cssText;
57
- }
58
- styles.set(scopeId, style);
59
- };
60
- const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
61
- let scopeId = getScopeId(cmpMeta);
62
- const style = styles.get(scopeId);
63
- // if an element is NOT connected then getRootNode() will return the wrong root node
64
- // so the fallback is to always use the document for the root node in those cases
65
- styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
66
- if (style) {
67
- if (typeof style === 'string') {
68
- styleContainerNode = styleContainerNode.head || styleContainerNode;
69
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
70
- let styleElm;
71
- if (!appliedStyles) {
72
- rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
73
- }
74
- if (!appliedStyles.has(scopeId)) {
75
- {
76
- {
77
- styleElm = doc.createElement('style');
78
- styleElm.innerHTML = style;
79
- }
80
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
81
- }
82
- if (appliedStyles) {
83
- appliedStyles.add(scopeId);
84
- }
85
- }
86
- }
87
- else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
88
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
89
- }
90
- }
91
- return scopeId;
92
- };
93
- const attachStyles = (hostRef) => {
94
- const cmpMeta = hostRef.$cmpMeta$;
95
- const elm = hostRef.$hostElement$;
96
- const flags = cmpMeta.$flags$;
97
- const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
98
- const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
99
- if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
100
- // only required when we're NOT using native shadow dom (slot)
101
- // or this browser doesn't support native shadow dom
102
- // and this host element was NOT created with SSR
103
- // let's pick out the inner content for slot projection
104
- // create a node to represent where the original
105
- // content was first placed, which is useful later on
106
- // DOM WRITE!!
107
- elm['s-sc'] = scopeId;
108
- elm.classList.add(scopeId + '-h');
109
- }
110
- endAttachStyles();
111
- };
112
- const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
29
+ const HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';
113
30
  /**
114
31
  * Default style mode id
115
32
  */
@@ -203,6 +120,125 @@ const newVNode = (tag, text) => {
203
120
  };
204
121
  const Host = {};
205
122
  const isHost = (node) => node && node.$tag$ === Host;
123
+ /**
124
+ * Parse a new property value for a given property type.
125
+ *
126
+ * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
127
+ * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
128
+ * 1. `any`, the type given to `propValue` in the function signature
129
+ * 2. the type stored from `propType`.
130
+ *
131
+ * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
132
+ *
133
+ * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
134
+ * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
135
+ * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
136
+ * ```tsx
137
+ * <my-cmp prop-val={0}></my-cmp>
138
+ * ```
139
+ *
140
+ * HTML prop values on the other hand, will always a string
141
+ *
142
+ * @param propValue the new value to coerce to some type
143
+ * @param propType the type of the prop, expressed as a binary number
144
+ * @returns the parsed/coerced value
145
+ */
146
+ const parsePropertyValue = (propValue, propType) => {
147
+ // ensure this value is of the correct prop type
148
+ if (propValue != null && !isComplexType(propValue)) {
149
+ if (propType & 2 /* MEMBER_FLAGS.Number */) {
150
+ // force it to be a number
151
+ return parseFloat(propValue);
152
+ }
153
+ // redundant return here for better minification
154
+ return propValue;
155
+ }
156
+ // not sure exactly what type we want
157
+ // so no need to change to a different type
158
+ return propValue;
159
+ };
160
+ /**
161
+ * Helper function to create & dispatch a custom Event on a provided target
162
+ * @param elm the target of the Event
163
+ * @param name the name to give the custom Event
164
+ * @param opts options for configuring a custom Event
165
+ * @returns the custom Event
166
+ */
167
+ const emitEvent = (elm, name, opts) => {
168
+ const ev = plt.ce(name, opts);
169
+ elm.dispatchEvent(ev);
170
+ return ev;
171
+ };
172
+ const rootAppliedStyles = /*@__PURE__*/ new WeakMap();
173
+ const registerStyle = (scopeId, cssText, allowCS) => {
174
+ let style = styles.get(scopeId);
175
+ if (supportsConstructableStylesheets && allowCS) {
176
+ style = (style || new CSSStyleSheet());
177
+ if (typeof style === 'string') {
178
+ style = cssText;
179
+ }
180
+ else {
181
+ style.replaceSync(cssText);
182
+ }
183
+ }
184
+ else {
185
+ style = cssText;
186
+ }
187
+ styles.set(scopeId, style);
188
+ };
189
+ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
190
+ let scopeId = getScopeId(cmpMeta);
191
+ const style = styles.get(scopeId);
192
+ // if an element is NOT connected then getRootNode() will return the wrong root node
193
+ // so the fallback is to always use the document for the root node in those cases
194
+ styleContainerNode = styleContainerNode.nodeType === 11 /* NODE_TYPE.DocumentFragment */ ? styleContainerNode : doc;
195
+ if (style) {
196
+ if (typeof style === 'string') {
197
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
198
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
199
+ let styleElm;
200
+ if (!appliedStyles) {
201
+ rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));
202
+ }
203
+ if (!appliedStyles.has(scopeId)) {
204
+ {
205
+ {
206
+ styleElm = doc.createElement('style');
207
+ styleElm.innerHTML = style;
208
+ }
209
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
210
+ }
211
+ if (appliedStyles) {
212
+ appliedStyles.add(scopeId);
213
+ }
214
+ }
215
+ }
216
+ else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
217
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
218
+ }
219
+ }
220
+ return scopeId;
221
+ };
222
+ const attachStyles = (hostRef) => {
223
+ const cmpMeta = hostRef.$cmpMeta$;
224
+ const elm = hostRef.$hostElement$;
225
+ const flags = cmpMeta.$flags$;
226
+ const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);
227
+ const scopeId = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
228
+ if (flags & 10 /* CMP_FLAGS.needsScopedEncapsulation */) {
229
+ // only required when we're NOT using native shadow dom (slot)
230
+ // or this browser doesn't support native shadow dom
231
+ // and this host element was NOT created with SSR
232
+ // let's pick out the inner content for slot projection
233
+ // create a node to represent where the original
234
+ // content was first placed, which is useful later on
235
+ // DOM WRITE!!
236
+ elm['s-sc'] = scopeId;
237
+ elm.classList.add(scopeId + '-h');
238
+ }
239
+ endAttachStyles();
240
+ };
241
+ const getScopeId = (cmp, mode) => 'sc-' + (cmp.$tagName$);
206
242
  /**
207
243
  * Production setAccessor() function based on Preact by
208
244
  * Jason Miller (@developit)
@@ -623,18 +659,6 @@ const renderVdom = (hostRef, renderFnResults) => {
623
659
  // synchronous patch
624
660
  patch(oldVNode, rootVnode);
625
661
  };
626
- /**
627
- * Helper function to create & dispatch a custom Event on a provided target
628
- * @param elm the target of the Event
629
- * @param name the name to give the custom Event
630
- * @param opts options for configuring a custom Event
631
- * @returns the custom Event
632
- */
633
- const emitEvent = (elm, name, opts) => {
634
- const ev = plt.ce(name, opts);
635
- elm.dispatchEvent(ev);
636
- return ev;
637
- };
638
662
  const attachToAncestor = (hostRef, ancestorComponent) => {
639
663
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {
640
664
  ancestorComponent['s-p'].push(new Promise((r) => (hostRef.$onRenderResolve$ = r)));
@@ -788,43 +812,6 @@ const then = (promise, thenFn) => {
788
812
  };
789
813
  const addHydratedFlag = (elm) => elm.classList.add('hydrated')
790
814
  ;
791
- /**
792
- * Parse a new property value for a given property type.
793
- *
794
- * While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
795
- * it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
796
- * 1. `any`, the type given to `propValue` in the function signature
797
- * 2. the type stored from `propType`.
798
- *
799
- * This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
800
- *
801
- * Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
802
- * a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
803
- * based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
804
- * ```tsx
805
- * <my-cmp prop-val={0}></my-cmp>
806
- * ```
807
- *
808
- * HTML prop values on the other hand, will always a string
809
- *
810
- * @param propValue the new value to coerce to some type
811
- * @param propType the type of the prop, expressed as a binary number
812
- * @returns the parsed/coerced value
813
- */
814
- const parsePropertyValue = (propValue, propType) => {
815
- // ensure this value is of the correct prop type
816
- if (propValue != null && !isComplexType(propValue)) {
817
- if (propType & 2 /* MEMBER_FLAGS.Number */) {
818
- // force it to be a number
819
- return parseFloat(propValue);
820
- }
821
- // redundant return here for better minification
822
- return propValue;
823
- }
824
- // not sure exactly what type we want
825
- // so no need to change to a different type
826
- return propValue;
827
- };
828
815
  const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
829
816
  const setValue = (ref, propName, newVal, cmpMeta) => {
830
817
  // check our new property value against our internal value
@@ -851,6 +838,16 @@ const setValue = (ref, propName, newVal, cmpMeta) => {
851
838
  }
852
839
  }
853
840
  };
841
+ /**
842
+ * Attach a series of runtime constructs to a compiled Stencil component
843
+ * constructor, including getters and setters for the `@Prop` and `@State`
844
+ * decorators, callbacks for when attributes change, and so on.
845
+ *
846
+ * @param Cstr the constructor for a component that we need to process
847
+ * @param cmpMeta metadata collected previously about the component
848
+ * @param flags a number used to store a series of bit flags
849
+ * @returns a reference to the same constructor passed in (but now mutated)
850
+ */
854
851
  const proxyComponent = (Cstr, cmpMeta, flags) => {
855
852
  if (cmpMeta.$members$) {
856
853
  // It's better to have a const than two Object.entries()
@@ -1190,6 +1187,27 @@ const loadModule = (cmpMeta, hostRef, hmrVersionId) => {
1190
1187
  }, consoleError);
1191
1188
  };
1192
1189
  const styles = /*@__PURE__*/ new Map();
1190
+ const win = typeof window !== 'undefined' ? window : {};
1191
+ const doc = win.document || { head: {} };
1192
+ const plt = {
1193
+ $flags$: 0,
1194
+ $resourcesUrl$: '',
1195
+ jmp: (h) => h(),
1196
+ raf: (h) => requestAnimationFrame(h),
1197
+ ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
1198
+ rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
1199
+ ce: (eventName, opts) => new CustomEvent(eventName, opts),
1200
+ };
1201
+ const promiseResolve = (v) => Promise.resolve(v);
1202
+ const supportsConstructableStylesheets = /*@__PURE__*/ (() => {
1203
+ try {
1204
+ new CSSStyleSheet();
1205
+ return typeof new CSSStyleSheet().replaceSync === 'function';
1206
+ }
1207
+ catch (e) { }
1208
+ return false;
1209
+ })()
1210
+ ;
1193
1211
  const queueDomReads = [];
1194
1212
  const queueDomWrites = [];
1195
1213
  const queueTask = (queue, write) => (cb) => {
@@ -1,7 +1,7 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-feecb2c4.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-9b09bb32.js';
2
2
 
3
3
  /*
4
- Stencil Client Patch Esm v2.18.0 | MIT Licensed | https://stenciljs.com
4
+ Stencil Client Patch Esm v2.18.1 | MIT Licensed | https://stenciljs.com
5
5
  */
6
6
  const patchEsm = () => {
7
7
  return promiseResolve();
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
1
+ var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
@@ -221,7 +221,8 @@ export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
221
221
  */
222
222
  export declare const setMode: (handler: ResolutionHandler) => void;
223
223
  /**
224
- * getMode
224
+ * `getMode()` is used for libraries which provide multiple "modes" for styles.
225
+ * @param ref a reference to the node to get styles for
225
226
  */
226
227
  export declare function getMode<T = string | undefined>(ref: any): T;
227
228
  export declare function setPlatformHelpers(helpers: {
@@ -234,6 +235,8 @@ export declare function setPlatformHelpers(helpers: {
234
235
  /**
235
236
  * Get the base path to where the assets can be found. Use `setAssetPath(path)`
236
237
  * if the path needs to be customized.
238
+ * @param path the path to use in calculating the asset path. this value will be
239
+ * used in conjunction with the base asset path
237
240
  */
238
241
  export declare function getAssetPath(path: string): string;
239
242
  /**
@@ -246,18 +249,22 @@ export declare function getAssetPath(path: string): string;
246
249
  * `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
247
250
  * dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
248
251
  * But do note that this configuration depends on how your script is bundled, or lack of
249
- * bunding, and where your assets can be loaded from. Additionally custom bundling
252
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
250
253
  * will have to ensure the static assets are copied to its build directory.
254
+ * @param path the asset path to set
251
255
  */
252
256
  export declare function setAssetPath(path: string): string;
253
257
  /**
254
- * getElement
258
+ * Retrieve a Stencil element for a given reference
259
+ * @param ref the ref to get the Stencil element for
255
260
  */
256
261
  export declare function getElement(ref: any): HTMLStencilElement;
257
262
  /**
258
263
  * Schedules a new render of the given instance or element even if no state changed.
259
264
  *
260
- * Notice `forceUpdate()` is not syncronous and might perform the DOM render in the next frame.
265
+ * Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
266
+ *
267
+ * @param ref the node/element to force the re-render of
261
268
  */
262
269
  export declare function forceUpdate(ref: any): void;
263
270
  /**
@@ -272,6 +279,8 @@ export interface HTMLStencilElement extends HTMLElement {
272
279
  * in the best moment to perform DOM mutation without causing layout thrashing.
273
280
  *
274
281
  * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
282
+ *
283
+ * @param task the DOM-write to schedule
275
284
  */
276
285
  export declare function writeTask(task: RafCallback): void;
277
286
  /**
@@ -279,6 +288,8 @@ export declare function writeTask(task: RafCallback): void;
279
288
  * in the best moment to perform DOM reads without causing layout thrashing.
280
289
  *
281
290
  * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
291
+ *
292
+ * @param task the DOM-read to schedule
282
293
  */
283
294
  export declare function readTask(task: RafCallback): void;
284
295
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analog-clock-components",
3
- "version": "0.1.315",
3
+ "version": "0.1.317",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -27,15 +27,15 @@
27
27
  "format": "prettier --write src"
28
28
  },
29
29
  "dependencies": {
30
- "@stencil/core": "2.18.0"
30
+ "@stencil/core": "2.18.1"
31
31
  },
32
32
  "license": "MIT",
33
33
  "devDependencies": {
34
- "@types/jest": "29.1.0",
34
+ "@types/jest": "29.1.1",
35
35
  "@types/puppeteer": "5.4.6",
36
- "cspell": "6.10.1",
36
+ "cspell": "6.12.0",
37
37
  "eslint": "8.24.0",
38
- "jest": "29.1.1",
38
+ "jest": "29.1.2",
39
39
  "prettier": "2.7.1",
40
40
  "puppeteer": "18.0.5",
41
41
  "tslint": "6.1.3",
@@ -1,2 +0,0 @@
1
- let t,e,n=!1,l=!1;const s="undefined"!=typeof window?window:{},o=s.document||{head:{}},r={t:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,l)=>t.addEventListener(e,n,l),rel:(t,e,n,l)=>t.removeEventListener(e,n,l),ce:(t,e)=>new CustomEvent(t,e)},c=t=>Promise.resolve(t),i=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),a=new WeakMap,u=t=>"sc-"+t.o,f={},h=t=>"object"==(t=typeof t)||"function"===t,$=(t,e,...n)=>{let l=null,s=!1,o=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)l=e[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof t&&!h(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?d(null,l):l),o=s)};if(c(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const i=d(t,null);return i.u=e,r.length>0&&(i.h=r),i},d=(t,e)=>({t:0,$:t,i:e,p:null,h:null,u:null}),p={},y=(t,e,n,l,s,o)=>{if(n!==l){let r=H(t,e);if(e.toLowerCase(),"class"===e){const e=t.classList,s=w(n),o=w(l);e.remove(...s.filter((t=>t&&!o.includes(t)))),e.add(...o.filter((t=>t&&!s.includes(t))))}else{const c=h(l);if((r||c&&null!==l)&&!s)try{if(t.tagName.includes("-"))t[e]=l;else{const s=null==l?"":l;"list"===e?r=!1:null!=n&&t[e]==s||(t[e]=s)}}catch(t){}null==l||!1===l?!1===l&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&o||s)&&!c&&t.setAttribute(e,l=!0===l?"":l)}}},m=/\s/,w=t=>t?t.split(m):[],b=(t,e,n,l)=>{const s=11===e.p.nodeType&&e.p.host?e.p.host:e.p,o=t&&t.u||f,r=e.u||f;for(l in o)l in r||y(s,l,o[l],void 0,n,e.t);for(l in r)y(s,l,o[l],r[l],n,e.t)},g=(e,l,s)=>{const r=l.h[s];let c,i,a=0;if(n||(n="svg"===r.$),c=r.p=o.createElementNS(n?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",r.$),n&&"foreignObject"===r.$&&(n=!1),b(null,r,n),null!=t&&c["s-si"]!==t&&c.classList.add(c["s-si"]=t),r.h)for(a=0;a<r.h.length;++a)i=g(e,r,a),i&&c.appendChild(i);return"svg"===r.$?n=!1:"foreignObject"===c.tagName&&(n=!0),c},v=(t,n,l,s,o,r)=>{let c,i=t;for(i.shadowRoot&&i.tagName===e&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=g(null,l,o),c&&(s[o].p=c,i.insertBefore(c,n)))},S=(t,e,n,l)=>{for(;e<=n;++e)(l=t[e])&&l.p.remove()},j=(t,e)=>t.$===e.$,O=(t,e)=>{const l=e.p=t.p,s=t.h,o=e.h,r=e.$;n="svg"===r||"foreignObject"!==r&&n,b(t,e,n),null!==s&&null!==o?((t,e,n,l)=>{let s,o=0,r=0,c=e.length-1,i=e[0],a=e[c],u=l.length-1,f=l[0],h=l[u];for(;o<=c&&r<=u;)null==i?i=e[++o]:null==a?a=e[--c]:null==f?f=l[++r]:null==h?h=l[--u]:j(i,f)?(O(i,f),i=e[++o],f=l[++r]):j(a,h)?(O(a,h),a=e[--c],h=l[--u]):j(i,h)?(O(i,h),t.insertBefore(i.p,a.p.nextSibling),i=e[++o],h=l[--u]):j(a,f)?(O(a,f),t.insertBefore(a.p,i.p),a=e[--c],f=l[++r]):(s=g(e&&e[r],n,r),f=l[++r],s&&i.p.parentNode.insertBefore(s,i.p));o>c?v(t,null==l[u+1]?null:l[u+1].p,n,l,r,u):r>u&&S(e,o,c)})(l,s,e,o):null!==o?v(l,null,e,o,0,o.length-1):null!==s&&S(s,0,s.length-1),n&&"svg"===r&&(n=!1)},k=(t,e)=>{e&&!t.m&&e["s-p"]&&e["s-p"].push(new Promise((e=>t.m=e)))},M=(t,e)=>{if(t.t|=16,!(4&t.t))return k(t,t.g),Y((()=>C(t,e)));t.t|=512},C=(t,e)=>{const n=t.v;return T(void 0,(()=>x(t,n,e)))},x=async(t,e,n)=>{const l=t.S,s=l["s-rc"];n&&(t=>{const e=t.j,n=t.S,l=e.t,s=((t,e)=>{let n=u(e);const l=B.get(n);if(t=11===t.nodeType?t:o,l)if("string"==typeof l){let e,s=a.get(t=t.head||t);s||a.set(t,s=new Set),s.has(n)||(e=o.createElement("style"),e.innerHTML=l,t.insertBefore(e,t.querySelector("link")),s&&s.add(n))}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(t);P(t,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=l["s-p"],n=()=>E(t);0===e.length?n():(Promise.all(e).then(n),t.t|=4,e.length=0)}},P=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.S,o=n.O||d(null,null),r=(t=>t&&t.$===p)(l)?l:$(null,null,l);e=s.tagName,r.$=null,r.t|=4,n.O=r,r.p=o.p=s.shadowRoot||s,t=s["s-sc"],O(o,r)})(n,l)}catch(t){V(t,n.S)}return null},E=t=>{const e=t.S,n=t.v,l=t.g;64&t.t||(t.t|=64,A(e),N(n,"componentDidLoad"),t.k(e),l||L()),t.m&&(t.m(),t.m=void 0),512&t.t&&X((()=>M(t,!1))),t.t&=-517},L=()=>{A(o.documentElement),X((()=>(t=>{const e=r.ce("appload",{detail:{namespace:"analog-clock"}});return t.dispatchEvent(e),e})(s)))},N=(t,e,n)=>{if(t&&t[e])try{return t[e](n)}catch(t){V(t)}},T=(t,e)=>t&&t.then?t.then(e):e(),A=t=>t.classList.add("hydrated"),F=(t,e,n)=>{if(e.M){const l=Object.entries(e.M),s=t.prototype;if(l.map((([t,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,t,{get(){return((t,e)=>W(this).C.get(e))(0,t)},set(n){((t,e,n,l)=>{const s=W(t),o=s.C.get(e),r=s.t,c=s.v;n=((t,e)=>null==t||h(t)?t:2&e?parseFloat(t):t)(n,l.M[e][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.C.set(e,n),c&&2==(18&r)&&M(s,!1))})(this,t,n,e)},configurable:!0,enumerable:!0})})),1&n){const e=new Map;s.attributeChangedCallback=function(t,n,l){r.jmp((()=>{const n=e.get(t);if(this.hasOwnProperty(n))l=this[n],delete this[n];else if(s.hasOwnProperty(n)&&"number"==typeof this[n]&&this[n]==l)return;this[n]=(null!==l||"boolean"!=typeof this[n])&&l}))},t.observedAttributes=l.filter((([t,e])=>15&e[0])).map((([t,n])=>{const l=n[1]||t;return e.set(l,t),l}))}}return t},R=(t,e={})=>{const n=[],l=e.exclude||[],c=s.customElements,a=o.head,f=a.querySelector("meta[charset]"),h=o.createElement("style"),$=[];let d,p=!0;Object.assign(r,e),r.l=new URL(e.resourcesUrl||"./",o.baseURI).href,t.map((t=>{t[1].map((e=>{const s={t:e[0],o:e[1],M:e[2],P:e[3]};s.M=e[2];const o=s.o,a=class extends HTMLElement{constructor(t){super(t),D(t=this,s),1&s.t&&t.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),p?$.push(this):r.jmp((()=>(t=>{if(0==(1&r.t)){const e=W(t),n=e.j,l=()=>{};if(!(1&e.t)){e.t|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){k(e,e.g=n);break}}n.M&&Object.entries(n.M).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n,l,s)=>{if(0==(32&e.t)){{if(e.t|=32,(s=z(n)).then){const t=()=>{};s=await s,t()}s.isProxied||(F(s,n,2),s.isProxied=!0);const t=()=>{};e.t|=8;try{new s(e)}catch(t){V(t)}e.t&=-9,t()}if(s.style){let t=s.style;const e=u(n);if(!B.has(e)){const l=()=>{};((t,e,n)=>{let l=B.get(t);i&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=e:l.replaceSync(e)):l=e,B.set(t,l)})(e,t,!!(1&n.t)),l()}}}const o=e.g,r=()=>M(e,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,e,n)}l()}})(this)))}disconnectedCallback(){r.jmp((()=>(()=>{0==(1&r.t)&&N(W(this).v,"disconnectedCallback")})()))}componentOnReady(){return W(this).L}};s.N=t[0],l.includes(o)||c.get(o)||(n.push(o),c.define(o,F(a,s,1)))}))})),h.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",h.setAttribute("data-styles",""),a.insertBefore(h,f?f.nextSibling:a.firstChild),p=!1,$.length?$.map((t=>t.connectedCallback())):r.jmp((()=>d=setTimeout(L,30)))},U=new WeakMap,W=t=>U.get(t),q=(t,e)=>U.set(e.v=t,e),D=(t,e)=>{const n={t:0,S:t,j:e,C:new Map};return n.L=new Promise((t=>n.k=t)),t["s-p"]=[],t["s-rc"]=[],U.set(t,n)},H=(t,e)=>e in t,V=(t,e)=>(0,console.error)(t,e),_=new Map,z=t=>{const e=t.o.replace(/-/g,"_"),n=t.N,l=_.get(n);return l?l[e]:import(`./${n}.entry.js`).then((t=>(_.set(n,t),t[e])),V)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},B=new Map,G=[],I=[],J=(t,e)=>n=>{t.push(n),l||(l=!0,e&&4&r.t?X(Q):r.raf(Q))},K=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){V(t)}t.length=0},Q=()=>{K(G),K(I),(l=G.length>0)&&r.raf(Q)},X=t=>c().then(t),Y=J(I,!0);export{R as b,$ as h,c as p,q as r}