analog-clock-components 0.1.473 → 0.1.474

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-4638241c.js";export{s as setNonce}from"./p-4638241c.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((async e=>(await t(),o([["p-aee66fcf",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e))));
1
+ import{p as e,b as o}from"./p-bbd14f29.js";export{s as setNonce}from"./p-bbd14f29.js";import{g as t}from"./p-e1255160.js";(()=>{const o=import.meta.url,s={};return""!==o&&(s.resourcesUrl=new URL(".",o).href),e(s)})().then((async e=>(await t(),o([["p-2a069278",[[1,"analog-clock",{size:[2],timeZone:[2,"time-zone"],time:[32]}]]]],e))));
@@ -1 +1 @@
1
- import{r as e,h as t}from"./p-4638241c.js";const c=class{constructor(t){e(this,t),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 e=this.hour+this.timeZone;return Math.floor(this.minute/2)+30*e}minuteToDegrees(){return Math.floor(this.second/10)+6*this.minute}secondToDegrees(){return 6*this.second}render(){return t("svg",{key:"39e3465d3bf04035966b00bb15186d1f712163cd",class:"clock",viewBox:"0 0 200 200",width:this.size,height:this.size},t("circle",{key:"e4c4288aa0efc9cf98027eef1f5bd7c550c23a18",id:"circle",cx:"100",cy:"100",r:"95","stroke-width":"10",fill:"transparent"}),t("line",{key:"296fb8ac19749103439f2ce1878db5ccfb214c20",id:"hour",transform:`rotate(${this.hourToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"60","stroke-width":"10","stroke-linecap":"round"}),t("line",{key:"acbe2c6ebdf05ff46e06144839dec43c45e8b40d",id:"minute",transform:`rotate(${this.minuteToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"30","stroke-width":"8","stroke-linecap":"round"}),t("line",{key:"f275abf7169379b2f61c9cdd185068f5e2373d4a",id:"second",transform:`rotate(${this.secondToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"20","stroke-width":"2","stroke-linecap":"round"}))}};c.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{c as analog_clock}
1
+ import{r as e,h as t}from"./p-bbd14f29.js";const c=class{constructor(t){e(this,t),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 e=this.hour+this.timeZone;return Math.floor(this.minute/2)+30*e}minuteToDegrees(){return Math.floor(this.second/10)+6*this.minute}secondToDegrees(){return 6*this.second}render(){return t("svg",{key:"39e3465d3bf04035966b00bb15186d1f712163cd",class:"clock",viewBox:"0 0 200 200",width:this.size,height:this.size},t("circle",{key:"e4c4288aa0efc9cf98027eef1f5bd7c550c23a18",id:"circle",cx:"100",cy:"100",r:"95","stroke-width":"10",fill:"transparent"}),t("line",{key:"296fb8ac19749103439f2ce1878db5ccfb214c20",id:"hour",transform:`rotate(${this.hourToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"60","stroke-width":"10","stroke-linecap":"round"}),t("line",{key:"acbe2c6ebdf05ff46e06144839dec43c45e8b40d",id:"minute",transform:`rotate(${this.minuteToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"30","stroke-width":"8","stroke-linecap":"round"}),t("line",{key:"f275abf7169379b2f61c9cdd185068f5e2373d4a",id:"second",transform:`rotate(${this.secondToDegrees()}, 100, 100)`,x1:"100",y1:"100",x2:"100",y2:"20","stroke-width":"2","stroke-linecap":"round"}))}};c.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{c as analog_clock}
@@ -0,0 +1,2 @@
1
+ let e,n,t=!1,l=!1;const o="slot-fb{display:contents}slot-fb[hidden]{display:none}",s={},i=e=>"object"==(e=typeof e)||"function"===e;function c(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const r=(e,n,...t)=>{let l=null,o=null,s=!1,c=!1;const r=[],f=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!i(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?u(null,l):l),c=s)};if(f(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}const a=u(e,null);return a.l=n,r.length>0&&(a.o=r),a.i=o,a},u=(e,n)=>({u:0,h:e,t:n,v:null,o:null,l:null,i:null}),f={},a=new WeakMap,d=e=>"sc-"+e.p,y=(e,n,t,l,o,s)=>{if(t!==l){let c=_(e,n);if(n.toLowerCase(),"class"===n){const n=e.classList,o=v(t),s=v(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===n);else{const r=i(l);if((c||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&s||o)&&!r&&e.setAttribute(n,l=!0===l?"":l)}}},h=/\s/,v=e=>e?e.split(h):[],p=(e,n,t,l)=>{const o=11===n.v.nodeType&&n.v.host?n.v.host:n.v,i=e&&e.l||s,c=n.l||s;for(l of $(Object.keys(i)))l in c||y(o,l,i[l],void 0,t,n.u);for(l of $(Object.keys(c)))y(o,l,i[l],c[l],t,n.u)};function $(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}const m=(l,o,s)=>{const i=o.o[s];let c,r,u=0;if(t||(t="svg"===i.h),c=i.v=K.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.h),t&&"foreignObject"===i.h&&(t=!1),p(null,i,t),null!=e&&c["s-si"]!==e&&c.classList.add(c["s-si"]=e),i.o)for(u=0;u<i.o.length;++u)r=m(l,i,u),r&&c.appendChild(r);return"svg"===i.h?t=!1:"foreignObject"===c.tagName&&(t=!0),c["s-hn"]=n,c},b=(e,t,l,o,s,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=m(null,l,s),c&&(o[s].v=c,r.insertBefore(c,t)))},w=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.v;e&&e.remove()}}},g=(e,n,t=!1)=>e.h===n.h&&(!!t||e.i===n.i),j=(e,n,l=!1)=>{const o=n.v=e.v,s=e.o,i=n.o,c=n.h;t="svg"===c||"foreignObject"!==c&&t,p(e,n,t),null!==s&&null!==i?((e,n,t,l,o=!1)=>{let s,i,c=0,r=0,u=0,f=0,a=n.length-1,d=n[0],y=n[a],h=l.length-1,v=l[0],p=l[h];for(;c<=a&&r<=h;)if(null==d)d=n[++c];else if(null==y)y=n[--a];else if(null==v)v=l[++r];else if(null==p)p=l[--h];else if(g(d,v,o))j(d,v,o),d=n[++c],v=l[++r];else if(g(y,p,o))j(y,p,o),y=n[--a],p=l[--h];else if(g(d,p,o))j(d,p,o),e.insertBefore(d.v,y.v.nextSibling),d=n[++c],p=l[--h];else if(g(y,v,o))j(y,v,o),e.insertBefore(y.v,d.v),y=n[--a],v=l[++r];else{for(u=-1,f=c;f<=a;++f)if(n[f]&&null!==n[f].i&&n[f].i===v.i){u=f;break}u>=0?(i=n[u],i.h!==v.h?s=m(n&&n[r],t,u):(j(i,v,o),n[u]=void 0,s=i.v),v=l[++r]):(s=m(n&&n[r],t,r),v=l[++r]),s&&d.v.parentNode.insertBefore(s,d.v)}c>a?b(e,null==l[h+1]?null:l[h+1].v,t,l,r,h):r>h&&w(n,c,a)})(o,s,n,i,l):null!==i?b(o,null,n,i,0,i.length-1):null!==s&&w(s,0,s.length-1),t&&"svg"===c&&(t=!1)},S=(e,n)=>{n&&!e.$&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.$=n)))},O=(e,n)=>{if(e.u|=16,!(4&e.u))return S(e,e.m),se((()=>k(e,n)));e.u|=512},k=(e,n)=>{const t=e.j;return M(void 0,(()=>P(e,t,n)))},M=(e,n)=>C(e)?e.then(n):n(),C=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,P=async(e,n,t)=>{var l;const s=e.$hostElement$,i=s["s-rc"];t&&(e=>{const n=e.S,t=e.$hostElement$,l=n.u,s=((e,n)=>{var t;const l=d(n),s=I.get(l);if(e=11===e.nodeType?e:K,s)if("string"==typeof s){let i,r=a.get(e=e.head||e);if(r||a.set(e,r=new Set),!r.has(l)){{i=K.createElement("style"),i.innerHTML=s;const n=null!==(t=Q.O)&&void 0!==t?t:c(K);null!=n&&i.setAttribute("nonce",n),e.insertBefore(i,e.querySelector("link"))}4&n.u&&(i.innerHTML+=o),r&&r.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);x(e,n,s,t),i&&(i.map((e=>e())),s["s-rc"]=void 0);{const n=null!==(l=s["s-p"])&&void 0!==l?l:[],t=()=>E(e);0===n.length?t():(Promise.all(n).then(t),e.u|=4,n.length=0)}},x=(t,l,o,s)=>{try{l=l.render(),t.u&=-17,t.u|=2,((t,l,o=!1)=>{const s=t.$hostElement$,i=t.k||u(null,null),c=(e=>e&&e.h===f)(l)?l:r(null,null,l);if(n=s.tagName,o&&c.l)for(const e of Object.keys(c.l))s.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(c.l[e]=s[e]);c.h=null,c.u|=4,t.k=c,c.v=i.v=s.shadowRoot||s,e=s["s-sc"],j(i,c,o)})(t,l,s)}catch(e){z(e,t.$hostElement$)}return null},E=e=>{const n=e.$hostElement$,t=e.j,l=e.m;64&e.u||(e.u|=64,N(n),L(t,"componentDidLoad"),e.M(n),l||A()),e.$&&(e.$(),e.$=void 0),512&e.u&&oe((()=>O(e,!1))),e.u&=-517},A=()=>{N(K.documentElement),oe((()=>(e=>{const n=Q.ce("appload",{detail:{namespace:"analog-clock"}});return e.dispatchEvent(n),n})(J)))},L=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){z(e)}},N=e=>e.classList.add("hydrated"),T=(e,n,t)=>{var l;const o=e.prototype;if(n.C){const s=Object.entries(n.C);if(s.map((([e,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(o,e,{get(){return((e,n)=>D(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=D(e),s=o.P.get(n),c=o.u,r=o.j;t=((e,n)=>null==e||i(e)?e:2&n?parseFloat(e):e)(t,l.C[n][0]),8&c&&void 0!==s||t===s||Number.isNaN(s)&&Number.isNaN(t)||(o.P.set(n,t),r&&2==(18&c)&&O(o,!1))})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const t=new Map;o.attributeChangedCallback=function(e,l,s){Q.jmp((()=>{var i;const c=t.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(o.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const t=D(this),o=null==t?void 0:t.u;if(o&&!(8&o)&&128&o&&s!==l){const o=t.j,c=null===(i=n.A)||void 0===i?void 0:i[e];null==c||c.forEach((n=>{null!=o[n]&&o[n].call(o,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=n.A)&&void 0!==l?l:{}),...s.filter((([e,n])=>15&n[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},F=async(e,n,t)=>{let l;if(!(32&n.u)){if(n.u|=32,t.L){if(l=G(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(T(l,t,2),l.isProxied=!0);const e=()=>{};n.u|=8;try{new l(n)}catch(e){z(e)}n.u&=-9,e()}else l=e.constructor,customElements.whenDefined(t.p).then((()=>n.u|=128));if(l.style){let e=l.style;const n=d(t);if(!I.has(n)){const l=()=>{};((e,n,t)=>{let l=I.get(e);Y&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,I.set(e,l)})(n,e,!!(1&t.u)),l()}}}const o=n.m,s=()=>O(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()},R=e=>{L(e,"disconnectedCallback")},U=(e,n={})=>{var t;const l=[],s=n.exclude||[],i=J.customElements,r=K.head,u=r.querySelector("meta[charset]"),f=K.createElement("style"),a=[];let d,y=!0;Object.assign(Q,n),Q.N=new URL(n.resourcesUrl||"./",K.baseURI).href;let h=!1;if(e.map((e=>{e[1].map((n=>{const t={u:n[0],p:n[1],C:n[2],T:n[3]};4&t.u&&(h=!0),t.C=n[2];const o=t.p,c=class extends HTMLElement{constructor(e){super(e),V(e=this,t),1&t.u&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),y?a.push(this):Q.jmp((()=>(e=>{if(!(1&Q.u)){const n=D(e),t=n.S,l=()=>{};if(1&n.u)(null==n?void 0:n.j)||(null==n?void 0:n.F)&&n.F.then((()=>{}));else{n.u|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){S(n,n.m=t);break}}t.C&&Object.entries(t.C).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),F(e,n,t)}l()}})(this)))}disconnectedCallback(){Q.jmp((()=>(async()=>{if(!(1&Q.u)){const e=D(this);(null==e?void 0:e.j)?R(e.j):(null==e?void 0:e.F)&&e.F.then((()=>R(e.j)))}})()))}componentOnReady(){return D(this).F}};t.L=e[0],s.includes(o)||i.get(o)||(l.push(o),i.define(o,T(c,t,1)))}))})),l.length>0&&(h&&(f.textContent+=o),f.textContent+=l+"{visibility:hidden}.hydrated{visibility:inherit}",f.innerHTML.length)){f.setAttribute("data-styles","");const e=null!==(t=Q.O)&&void 0!==t?t:c(K);null!=e&&f.setAttribute("nonce",e),r.insertBefore(f,u?u.nextSibling:r.firstChild)}y=!1,a.length?a.map((e=>e.connectedCallback())):Q.jmp((()=>d=setTimeout(A,30)))},W=e=>Q.O=e,q=new WeakMap,D=e=>q.get(e),H=(e,n)=>q.set(n.j=e,n),V=(e,n)=>{const t={u:0,$hostElement$:e,S:n,P:new Map};return t.F=new Promise((e=>t.M=e)),e["s-p"]=[],e["s-rc"]=[],q.set(e,t)},_=(e,n)=>n in e,z=(e,n)=>(0,console.error)(e,n),B=new Map,G=e=>{const n=e.p.replace(/-/g,"_"),t=e.L,l=B.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(B.set(t,e),e[n])),z)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},I=new Map,J="undefined"!=typeof window?window:{},K=J.document||{head:{}},Q={u:0,N:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},X=e=>Promise.resolve(e),Y=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),Z=[],ee=[],ne=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&Q.u?oe(le):Q.raf(le))},te=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){z(e)}e.length=0},le=()=>{te(Z),te(ee),(l=Z.length>0)&&Q.raf(le)},oe=e=>X().then(e),se=ne(ee,!0);export{U as b,r as h,X as p,H as r,W as s}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-46885873.js');
5
+ const index = require('./index-f61302bf.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
  const AnalogClockStyle0 = analogClockCss;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-46885873.js');
5
+ const index = require('./index-f61302bf.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.14.0 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.14.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  const patchBrowser = () => {
12
12
  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));
@@ -414,17 +414,35 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
414
414
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
415
415
  {
416
416
  // remove attributes no longer present on the vnode by setting them to undefined
417
- for (memberName in oldVnodeAttrs) {
417
+ for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
418
418
  if (!(memberName in newVnodeAttrs)) {
419
419
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
420
420
  }
421
421
  }
422
422
  }
423
423
  // add new & update changed attributes
424
- for (memberName in newVnodeAttrs) {
424
+ for (memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
425
425
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
426
426
  }
427
427
  };
428
+ /**
429
+ * Sort a list of attribute names to ensure that all the attribute names which
430
+ * are _not_ `"ref"` come before `"ref"`. Preserve the order of the non-ref
431
+ * attributes.
432
+ *
433
+ * **Note**: if the supplied attributes do not include `'ref'` then the same
434
+ * (by reference) array will be returned without modification.
435
+ *
436
+ * @param attrNames attribute names to sort
437
+ * @returns a list of attribute names, sorted if they include `"ref"`
438
+ */
439
+ function sortedAttrNames(attrNames) {
440
+ return attrNames.includes('ref')
441
+ ? // we need to sort these to ensure that `'ref'` is the last attr
442
+ [...attrNames.filter((attr) => attr !== 'ref'), 'ref']
443
+ : // no need to sort, return the original array
444
+ attrNames;
445
+ }
428
446
  /**
429
447
  * Create a DOM Node corresponding to one of the children of a given VNode.
430
448
  *
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-46885873.js');
5
+ const index = require('./index-f61302bf.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -4,7 +4,7 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.14.0",
7
+ "version": "4.14.1",
8
8
  "typescriptVersion": "5.4.3"
9
9
  },
10
10
  "collections": [],
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-c32339ae.js';
1
+ import { r as registerInstance, h } from './index-e8bf6a68.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
  const AnalogClockStyle0 = analogClockCss;
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-c32339ae.js';
2
- export { s as setNonce } from './index-c32339ae.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-e8bf6a68.js';
2
+ export { s as setNonce } from './index-e8bf6a68.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.14.0 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.14.1 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  const patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -392,17 +392,35 @@ const updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {
392
392
  const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
393
393
  {
394
394
  // remove attributes no longer present on the vnode by setting them to undefined
395
- for (memberName in oldVnodeAttrs) {
395
+ for (memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
396
396
  if (!(memberName in newVnodeAttrs)) {
397
397
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);
398
398
  }
399
399
  }
400
400
  }
401
401
  // add new & update changed attributes
402
- for (memberName in newVnodeAttrs) {
402
+ for (memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
403
403
  setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);
404
404
  }
405
405
  };
406
+ /**
407
+ * Sort a list of attribute names to ensure that all the attribute names which
408
+ * are _not_ `"ref"` come before `"ref"`. Preserve the order of the non-ref
409
+ * attributes.
410
+ *
411
+ * **Note**: if the supplied attributes do not include `'ref'` then the same
412
+ * (by reference) array will be returned without modification.
413
+ *
414
+ * @param attrNames attribute names to sort
415
+ * @returns a list of attribute names, sorted if they include `"ref"`
416
+ */
417
+ function sortedAttrNames(attrNames) {
418
+ return attrNames.includes('ref')
419
+ ? // we need to sort these to ensure that `'ref'` is the last attr
420
+ [...attrNames.filter((attr) => attr !== 'ref'), 'ref']
421
+ : // no need to sort, return the original array
422
+ attrNames;
423
+ }
406
424
  /**
407
425
  * Create a DOM Node corresponding to one of the children of a given VNode.
408
426
  *
@@ -1,5 +1,5 @@
1
- import { b as bootstrapLazy } from './index-c32339ae.js';
2
- export { s as setNonce } from './index-c32339ae.js';
1
+ import { b as bootstrapLazy } from './index-e8bf6a68.js';
2
+ export { s as setNonce } from './index-e8bf6a68.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analog-clock-components",
3
- "version": "0.1.473",
3
+ "version": "0.1.474",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "format": "prettier --write src"
26
26
  },
27
27
  "dependencies": {
28
- "@stencil/core": "4.14.0"
28
+ "@stencil/core": "4.14.1"
29
29
  },
30
30
  "license": "MIT",
31
31
  "devDependencies": {
@@ -1,2 +0,0 @@
1
- let e,n,t=!1,l=!1;const o="slot-fb{display:contents}slot-fb[hidden]{display:none}",s={},i=e=>"object"==(e=typeof e)||"function"===e;function c(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const r=(e,n,...t)=>{let l=null,o=null,s=!1,c=!1;const r=[],a=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!i(l))&&(l+=""),s&&c?r[r.length-1].t+=l:r.push(s?u(null,l):l),c=s)};if(a(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}const f=u(e,null);return f.l=n,r.length>0&&(f.o=r),f.i=o,f},u=(e,n)=>({u:0,h:e,t:n,v:null,o:null,l:null,i:null}),a={},f=new WeakMap,d=e=>"sc-"+e.p,y=(e,n,t,l,o,s)=>{if(t!==l){let c=V(e,n);if(n.toLowerCase(),"class"===n){const n=e.classList,o=v(t),s=v(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===n);else{const r=i(l);if((c||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(n)||e.removeAttribute(n):(!c||4&s||o)&&!r&&e.setAttribute(n,l=!0===l?"":l)}}},h=/\s/,v=e=>e?e.split(h):[],p=(e,n,t,l)=>{const o=11===n.v.nodeType&&n.v.host?n.v.host:n.v,i=e&&e.l||s,c=n.l||s;for(l in i)l in c||y(o,l,i[l],void 0,t,n.u);for(l in c)y(o,l,i[l],c[l],t,n.u)},$=(l,o,s)=>{const i=o.o[s];let c,r,u=0;if(t||(t="svg"===i.h),c=i.v=J.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",i.h),t&&"foreignObject"===i.h&&(t=!1),p(null,i,t),null!=e&&c["s-si"]!==e&&c.classList.add(c["s-si"]=e),i.o)for(u=0;u<i.o.length;++u)r=$(l,i,u),r&&c.appendChild(r);return"svg"===i.h?t=!1:"foreignObject"===c.tagName&&(t=!0),c["s-hn"]=n,c},m=(e,t,l,o,s,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=$(null,l,s),c&&(o[s].v=c,r.insertBefore(c,t)))},b=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.v;e&&e.remove()}}},w=(e,n,t=!1)=>e.h===n.h&&(!!t||e.i===n.i),g=(e,n,l=!1)=>{const o=n.v=e.v,s=e.o,i=n.o,c=n.h;t="svg"===c||"foreignObject"!==c&&t,p(e,n,t),null!==s&&null!==i?((e,n,t,l,o=!1)=>{let s,i,c=0,r=0,u=0,a=0,f=n.length-1,d=n[0],y=n[f],h=l.length-1,v=l[0],p=l[h];for(;c<=f&&r<=h;)if(null==d)d=n[++c];else if(null==y)y=n[--f];else if(null==v)v=l[++r];else if(null==p)p=l[--h];else if(w(d,v,o))g(d,v,o),d=n[++c],v=l[++r];else if(w(y,p,o))g(y,p,o),y=n[--f],p=l[--h];else if(w(d,p,o))g(d,p,o),e.insertBefore(d.v,y.v.nextSibling),d=n[++c],p=l[--h];else if(w(y,v,o))g(y,v,o),e.insertBefore(y.v,d.v),y=n[--f],v=l[++r];else{for(u=-1,a=c;a<=f;++a)if(n[a]&&null!==n[a].i&&n[a].i===v.i){u=a;break}u>=0?(i=n[u],i.h!==v.h?s=$(n&&n[r],t,u):(g(i,v,o),n[u]=void 0,s=i.v),v=l[++r]):(s=$(n&&n[r],t,r),v=l[++r]),s&&d.v.parentNode.insertBefore(s,d.v)}c>f?m(e,null==l[h+1]?null:l[h+1].v,t,l,r,h):r>h&&b(n,c,f)})(o,s,n,i,l):null!==i?m(o,null,n,i,0,i.length-1):null!==s&&b(s,0,s.length-1),t&&"svg"===c&&(t=!1)},j=(e,n)=>{n&&!e.$&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.$=n)))},S=(e,n)=>{if(e.u|=16,!(4&e.u))return j(e,e.m),oe((()=>k(e,n)));e.u|=512},k=(e,n)=>{const t=e.j;return O(void 0,(()=>C(e,t,n)))},O=(e,n)=>M(e)?e.then(n):n(),M=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,C=async(e,n,t)=>{var l;const s=e.$hostElement$,i=s["s-rc"];t&&(e=>{const n=e.S,t=e.$hostElement$,l=n.u,s=((e,n)=>{var t;const l=d(n),s=G.get(l);if(e=11===e.nodeType?e:J,s)if("string"==typeof s){let i,r=f.get(e=e.head||e);if(r||f.set(e,r=new Set),!r.has(l)){{i=J.createElement("style"),i.innerHTML=s;const n=null!==(t=K.k)&&void 0!==t?t:c(J);null!=n&&i.setAttribute("nonce",n),e.insertBefore(i,e.querySelector("link"))}4&n.u&&(i.innerHTML+=o),r&&r.add(l)}}else e.adoptedStyleSheets.includes(s)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,s]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=s,t.classList.add(s+"-h"))})(e);P(e,n,s,t),i&&(i.map((e=>e())),s["s-rc"]=void 0);{const n=null!==(l=s["s-p"])&&void 0!==l?l:[],t=()=>x(e);0===n.length?t():(Promise.all(n).then(t),e.u|=4,n.length=0)}},P=(t,l,o,s)=>{try{l=l.render(),t.u&=-17,t.u|=2,((t,l,o=!1)=>{const s=t.$hostElement$,i=t.O||u(null,null),c=(e=>e&&e.h===a)(l)?l:r(null,null,l);if(n=s.tagName,o&&c.l)for(const e of Object.keys(c.l))s.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(c.l[e]=s[e]);c.h=null,c.u|=4,t.O=c,c.v=i.v=s.shadowRoot||s,e=s["s-sc"],g(i,c,o)})(t,l,s)}catch(e){_(e,t.$hostElement$)}return null},x=e=>{const n=e.$hostElement$,t=e.j,l=e.m;64&e.u||(e.u|=64,L(n),A(t,"componentDidLoad"),e.M(n),l||E()),e.$&&(e.$(),e.$=void 0),512&e.u&&le((()=>S(e,!1))),e.u&=-517},E=()=>{L(J.documentElement),le((()=>(e=>{const n=K.ce("appload",{detail:{namespace:"analog-clock"}});return e.dispatchEvent(n),n})(I)))},A=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){_(e)}},L=e=>e.classList.add("hydrated"),N=(e,n,t)=>{var l;const o=e.prototype;if(n.C){const s=Object.entries(n.C);if(s.map((([e,[l]])=>{(31&l||2&t&&32&l)&&Object.defineProperty(o,e,{get(){return((e,n)=>q(this).P.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=q(e),s=o.P.get(n),c=o.u,r=o.j;t=((e,n)=>null==e||i(e)?e:2&n?parseFloat(e):e)(t,l.C[n][0]),8&c&&void 0!==s||t===s||Number.isNaN(s)&&Number.isNaN(t)||(o.P.set(n,t),r&&2==(18&c)&&S(o,!1))})(this,e,t,n)},configurable:!0,enumerable:!0})})),1&t){const t=new Map;o.attributeChangedCallback=function(e,l,s){K.jmp((()=>{var i;const c=t.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(o.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const t=q(this),o=null==t?void 0:t.u;if(o&&!(8&o)&&128&o&&s!==l){const o=t.j,c=null===(i=n.A)||void 0===i?void 0:i[e];null==c||c.forEach((n=>{null!=o[n]&&o[n].call(o,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=n.A)&&void 0!==l?l:{}),...s.filter((([e,n])=>15&n[0])).map((([e,n])=>{const l=n[1]||e;return t.set(l,e),l}))]))}}return e},T=async(e,n,t)=>{let l;if(!(32&n.u)){if(n.u|=32,t.L){if(l=B(t),l.then){const e=()=>{};l=await l,e()}l.isProxied||(N(l,t,2),l.isProxied=!0);const e=()=>{};n.u|=8;try{new l(n)}catch(e){_(e)}n.u&=-9,e()}else l=e.constructor,customElements.whenDefined(t.p).then((()=>n.u|=128));if(l.style){let e=l.style;const n=d(t);if(!G.has(n)){const l=()=>{};((e,n,t)=>{let l=G.get(e);X&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,G.set(e,l)})(n,e,!!(1&t.u)),l()}}}const o=n.m,s=()=>S(n,!0);o&&o["s-rc"]?o["s-rc"].push(s):s()},F=e=>{A(e,"disconnectedCallback")},R=(e,n={})=>{var t;const l=[],s=n.exclude||[],i=I.customElements,r=J.head,u=r.querySelector("meta[charset]"),a=J.createElement("style"),f=[];let d,y=!0;Object.assign(K,n),K.N=new URL(n.resourcesUrl||"./",J.baseURI).href;let h=!1;if(e.map((e=>{e[1].map((n=>{const t={u:n[0],p:n[1],C:n[2],T:n[3]};4&t.u&&(h=!0),t.C=n[2];const o=t.p,c=class extends HTMLElement{constructor(e){super(e),H(e=this,t),1&t.u&&e.attachShadow({mode:"open"})}connectedCallback(){d&&(clearTimeout(d),d=null),y?f.push(this):K.jmp((()=>(e=>{if(!(1&K.u)){const n=q(e),t=n.S,l=()=>{};if(1&n.u)(null==n?void 0:n.j)||(null==n?void 0:n.F)&&n.F.then((()=>{}));else{n.u|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){j(n,n.m=t);break}}t.C&&Object.entries(t.C).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),T(e,n,t)}l()}})(this)))}disconnectedCallback(){K.jmp((()=>(async()=>{if(!(1&K.u)){const e=q(this);(null==e?void 0:e.j)?F(e.j):(null==e?void 0:e.F)&&e.F.then((()=>F(e.j)))}})()))}componentOnReady(){return q(this).F}};t.L=e[0],s.includes(o)||i.get(o)||(l.push(o),i.define(o,N(c,t,1)))}))})),l.length>0&&(h&&(a.textContent+=o),a.textContent+=l+"{visibility:hidden}.hydrated{visibility:inherit}",a.innerHTML.length)){a.setAttribute("data-styles","");const e=null!==(t=K.k)&&void 0!==t?t:c(J);null!=e&&a.setAttribute("nonce",e),r.insertBefore(a,u?u.nextSibling:r.firstChild)}y=!1,f.length?f.map((e=>e.connectedCallback())):K.jmp((()=>d=setTimeout(E,30)))},U=e=>K.k=e,W=new WeakMap,q=e=>W.get(e),D=(e,n)=>W.set(n.j=e,n),H=(e,n)=>{const t={u:0,$hostElement$:e,S:n,P:new Map};return t.F=new Promise((e=>t.M=e)),e["s-p"]=[],e["s-rc"]=[],W.set(e,t)},V=(e,n)=>n in e,_=(e,n)=>(0,console.error)(e,n),z=new Map,B=e=>{const n=e.p.replace(/-/g,"_"),t=e.L,l=z.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(z.set(t,e),e[n])),_)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},G=new Map,I="undefined"!=typeof window?window:{},J=I.document||{head:{}},K={u:0,N:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},Q=e=>Promise.resolve(e),X=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),Y=[],Z=[],ee=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&K.u?le(te):K.raf(te))},ne=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){_(e)}e.length=0},te=()=>{ne(Y),ne(Z),(l=Y.length>0)&&K.raf(te)},le=e=>Q().then(e),oe=ee(Z,!0);export{R as b,r as h,Q as p,D as r,U as s}