@devschile/chucao 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +15 -12
  2. package/dist/chucao/chucao.css +1 -1
  3. package/dist/chucao/chucao.esm.js +1 -1
  4. package/dist/chucao/chucao.esm.js.map +1 -1
  5. package/dist/chucao/index.esm.js +1 -1
  6. package/dist/chucao/index.esm.js.map +1 -1
  7. package/dist/chucao/{p-175aee94.entry.js → p-13ab5f9a.entry.js} +2 -2
  8. package/dist/chucao/{p-dde82d7d.entry.js → p-1cc7042e.entry.js} +2 -2
  9. package/dist/chucao/p-23c5220b.entry.js +2 -0
  10. package/dist/chucao/p-23c5220b.entry.js.map +1 -0
  11. package/dist/chucao/p-2d7e81b2.entry.js +2 -0
  12. package/dist/chucao/p-2d7e81b2.entry.js.map +1 -0
  13. package/dist/chucao/{p-af2c57b5.entry.js → p-421cda05.entry.js} +2 -2
  14. package/dist/chucao/p-Bvah_WQV.js +3 -0
  15. package/dist/chucao/p-Bvah_WQV.js.map +1 -0
  16. package/dist/chucao/{p-d75eeeea.entry.js → p-c16b18b7.entry.js} +2 -2
  17. package/dist/chucao/p-cbb2b478.entry.js +2 -0
  18. package/dist/chucao/p-cbb2b478.entry.js.map +1 -0
  19. package/dist/chucao/{p-fcc70c8d.entry.js → p-cfb6db53.entry.js} +2 -2
  20. package/dist/chucao/p-df73f786.entry.js +2 -0
  21. package/dist/chucao/{p-85a49fd7.entry.js → p-e8fe65bb.entry.js} +2 -2
  22. package/dist/cjs/ch-accordion.cjs.entry.js +1 -1
  23. package/dist/cjs/{ch-badge_6.cjs.entry.js → ch-alert_8.cjs.entry.js} +73 -9
  24. package/dist/cjs/ch-alert_8.cjs.entry.js.map +1 -0
  25. package/dist/cjs/ch-checkbox.cjs.entry.js +2 -2
  26. package/dist/cjs/ch-divider.cjs.entry.js +2 -2
  27. package/dist/cjs/ch-link.cjs.entry.js +1 -1
  28. package/dist/cjs/ch-modal.cjs.entry.js +167 -0
  29. package/dist/cjs/ch-modal.cjs.entry.js.map +1 -0
  30. package/dist/cjs/ch-radio.cjs.entry.js +2 -2
  31. package/dist/cjs/ch-tabs.cjs.entry.js +2 -2
  32. package/dist/cjs/ch-textarea.cjs.entry.js +2 -2
  33. package/dist/cjs/ch-tooltip.cjs.entry.js +82 -0
  34. package/dist/cjs/ch-tooltip.cjs.entry.js.map +1 -0
  35. package/dist/cjs/chucao.cjs.js +3 -3
  36. package/dist/cjs/chucao.cjs.js.map +1 -1
  37. package/dist/cjs/{index-CiYvuUBV.js → index-DMeDkSQU.js} +183 -11
  38. package/dist/cjs/index-DMeDkSQU.js.map +1 -0
  39. package/dist/cjs/index.cjs.js +12 -1
  40. package/dist/cjs/index.cjs.js.map +1 -1
  41. package/dist/cjs/loader.cjs.js +2 -2
  42. package/dist/collection/collection-manifest.json +5 -1
  43. package/dist/collection/components/ch-alert/ch-alert.css +77 -0
  44. package/dist/collection/components/ch-alert/ch-alert.js +118 -0
  45. package/dist/collection/components/ch-alert/ch-alert.js.map +1 -0
  46. package/dist/collection/components/ch-badge/ch-badge.js +1 -1
  47. package/dist/collection/components/ch-button/ch-button.js +1 -1
  48. package/dist/collection/components/ch-button/ch-button.js.map +1 -1
  49. package/dist/collection/components/ch-card/ch-card.js +1 -1
  50. package/dist/collection/components/ch-checkbox/ch-checkbox.js +1 -1
  51. package/dist/collection/components/ch-divider/ch-divider.js +1 -1
  52. package/dist/collection/components/ch-input/ch-input.js +1 -1
  53. package/dist/collection/components/ch-modal/ch-modal.css +69 -0
  54. package/dist/collection/components/ch-modal/ch-modal.js +278 -0
  55. package/dist/collection/components/ch-modal/ch-modal.js.map +1 -0
  56. package/dist/collection/components/ch-radio/ch-radio.js +1 -1
  57. package/dist/collection/components/ch-select/ch-select.js +1 -1
  58. package/dist/collection/components/ch-spinner/ch-spinner.css +39 -0
  59. package/dist/collection/components/ch-spinner/ch-spinner.js +90 -0
  60. package/dist/collection/components/ch-spinner/ch-spinner.js.map +1 -0
  61. package/dist/collection/components/ch-switch/ch-switch.js +1 -1
  62. package/dist/collection/components/ch-tabs/ch-tabs.js +1 -1
  63. package/dist/collection/components/ch-textarea/ch-textarea.js +1 -1
  64. package/dist/collection/components/ch-tooltip/ch-tooltip.css +100 -0
  65. package/dist/collection/components/ch-tooltip/ch-tooltip.js +168 -0
  66. package/dist/collection/components/ch-tooltip/ch-tooltip.js.map +1 -0
  67. package/dist/collection/tokens/tokens.js +9 -1
  68. package/dist/collection/tokens/tokens.js.map +1 -1
  69. package/dist/collection/tokens/types.js.map +1 -1
  70. package/dist/components/ch-accordion.js +1 -1
  71. package/dist/components/ch-alert.d.ts +11 -0
  72. package/dist/components/ch-alert.js +2 -0
  73. package/dist/components/ch-alert.js.map +1 -0
  74. package/dist/components/ch-badge.js +1 -1
  75. package/dist/components/ch-button.js +1 -1
  76. package/dist/components/ch-button.js.map +1 -1
  77. package/dist/components/ch-card.js +1 -1
  78. package/dist/components/ch-card.js.map +1 -1
  79. package/dist/components/ch-checkbox.js +1 -1
  80. package/dist/components/ch-divider.js +1 -1
  81. package/dist/components/ch-input.js +1 -1
  82. package/dist/components/ch-link.js +1 -1
  83. package/dist/components/ch-modal.d.ts +11 -0
  84. package/dist/components/ch-modal.js +2 -0
  85. package/dist/components/ch-modal.js.map +1 -0
  86. package/dist/components/ch-radio.js +1 -1
  87. package/dist/components/ch-select.js +1 -1
  88. package/dist/components/ch-spinner.d.ts +11 -0
  89. package/dist/components/ch-spinner.js +2 -0
  90. package/dist/components/ch-spinner.js.map +1 -0
  91. package/dist/components/ch-switch.js +1 -1
  92. package/dist/components/ch-tabs.js +1 -1
  93. package/dist/components/ch-textarea.js +1 -1
  94. package/dist/components/ch-tooltip.d.ts +11 -0
  95. package/dist/components/ch-tooltip.js +2 -0
  96. package/dist/components/ch-tooltip.js.map +1 -0
  97. package/dist/components/index.js +1 -1
  98. package/dist/components/index.js.map +1 -1
  99. package/dist/components/p-hyy-cLgi.js +2 -0
  100. package/dist/components/p-hyy-cLgi.js.map +1 -0
  101. package/dist/esm/ch-accordion.entry.js +1 -1
  102. package/dist/esm/{ch-badge_6.entry.js → ch-alert_8.entry.js} +72 -10
  103. package/dist/esm/ch-alert_8.entry.js.map +1 -0
  104. package/dist/esm/ch-checkbox.entry.js +2 -2
  105. package/dist/esm/ch-divider.entry.js +2 -2
  106. package/dist/esm/ch-link.entry.js +1 -1
  107. package/dist/esm/ch-modal.entry.js +165 -0
  108. package/dist/esm/ch-modal.entry.js.map +1 -0
  109. package/dist/esm/ch-radio.entry.js +2 -2
  110. package/dist/esm/ch-tabs.entry.js +2 -2
  111. package/dist/esm/ch-textarea.entry.js +2 -2
  112. package/dist/esm/ch-tooltip.entry.js +80 -0
  113. package/dist/esm/ch-tooltip.entry.js.map +1 -0
  114. package/dist/esm/chucao.js +4 -4
  115. package/dist/esm/chucao.js.map +1 -1
  116. package/dist/esm/{index-ImsAHlk9.js → index-Bvah_WQV.js} +183 -12
  117. package/dist/esm/index-Bvah_WQV.js.map +1 -0
  118. package/dist/esm/index.js +10 -2
  119. package/dist/esm/index.js.map +1 -1
  120. package/dist/esm/loader.js +3 -3
  121. package/dist/types/components/ch-alert/ch-alert.d.ts +34 -0
  122. package/dist/types/components/ch-modal/ch-modal.d.ts +67 -0
  123. package/dist/types/components/ch-spinner/ch-spinner.d.ts +25 -0
  124. package/dist/types/components/ch-tooltip/ch-tooltip.d.ts +47 -0
  125. package/dist/types/components.d.ts +369 -0
  126. package/dist/types/stencil-public-runtime.d.ts +11 -0
  127. package/dist/types/tokens/tokens.d.ts +8 -0
  128. package/dist/types/tokens/types.d.ts +3 -3
  129. package/dist-react/components.d.ts +18 -1
  130. package/dist-react/components.js +39 -0
  131. package/dist-react/components.ts +55 -1
  132. package/dist-vue/index.d.ts +4 -0
  133. package/dist-vue/index.js +28 -0
  134. package/dist-vue/index.ts +36 -0
  135. package/hydrate/index.js +542 -19
  136. package/hydrate/index.mjs +542 -19
  137. package/package.json +6 -2
  138. package/dist/chucao/p-ImsAHlk9.js +0 -3
  139. package/dist/chucao/p-ImsAHlk9.js.map +0 -1
  140. package/dist/chucao/p-b4520f1c.entry.js +0 -2
  141. package/dist/chucao/p-b4520f1c.entry.js.map +0 -1
  142. package/dist/chucao/p-fe0c9320.entry.js +0 -2
  143. package/dist/cjs/ch-badge_6.cjs.entry.js.map +0 -1
  144. package/dist/cjs/index-CiYvuUBV.js.map +0 -1
  145. package/dist/components/p-x4aZoujY.js +0 -2
  146. package/dist/components/p-x4aZoujY.js.map +0 -1
  147. package/dist/esm/ch-badge_6.entry.js.map +0 -1
  148. package/dist/esm/index-ImsAHlk9.js.map +0 -1
  149. /package/dist/chucao/{p-175aee94.entry.js.map → p-13ab5f9a.entry.js.map} +0 -0
  150. /package/dist/chucao/{p-dde82d7d.entry.js.map → p-1cc7042e.entry.js.map} +0 -0
  151. /package/dist/chucao/{p-af2c57b5.entry.js.map → p-421cda05.entry.js.map} +0 -0
  152. /package/dist/chucao/{p-d75eeeea.entry.js.map → p-c16b18b7.entry.js.map} +0 -0
  153. /package/dist/chucao/{p-fcc70c8d.entry.js.map → p-cfb6db53.entry.js.map} +0 -0
  154. /package/dist/chucao/{p-fe0c9320.entry.js.map → p-df73f786.entry.js.map} +0 -0
  155. /package/dist/chucao/{p-85a49fd7.entry.js.map → p-e8fe65bb.entry.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CiYvuUBV.js');
3
+ var index = require('./index-DMeDkSQU.js');
4
4
 
5
5
  const chRadioCss = () => `:host{display:inline-block}.group-label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.radio-group{display:flex;flex-direction:column;gap:var(--spacing-lg)}.control{display:inline-flex;align-items:center;gap:var(--spacing-lg);cursor:pointer}.control--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.input{appearance:none;-webkit-appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--spacing-4xl);height:var(--spacing-4xl);margin:0;flex-shrink:0;border:var(--border-width) solid var(--border);border-radius:50%;background:var(--surface);cursor:pointer;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.input:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.input:checked{border-color:var(--accent)}.input:checked::before{content:'';width:var(--spacing-md);height:var(--spacing-md);border-radius:50%;background:var(--accent)}.input--invalid{border-color:var(--color-status-warning)}.input--invalid:focus-visible{outline-color:var(--color-status-warning)}.label-text{color:var(--text)}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
6
6
 
@@ -72,7 +72,7 @@ const ChRadio = class {
72
72
  }
73
73
  render() {
74
74
  const groupName = this.name || `${this.groupId}-group`;
75
- return (index.h(index.Host, { key: 'd9a24c29e5fe841d5c6fefc68bc22db1d9c4ee02' }, this.label && (index.h("span", { key: 'c8dc580a29569ca98f7e6dafce797fa6ac5f7442', class: "group-label", id: this.labelId }, this.label)), index.h("div", { key: '6b10d53fbf83286ad18b29d3238df4927b3341db', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (index.h("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, index.h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), index.h("span", { class: "mark" }), index.h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (index.h("p", { key: '654315541c6b5ed2886283fae2fb72c37f91f575', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (index.h("p", { key: '1ed129bddbf96f3b6562552edf416293a0ba0071', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
75
+ return (index.h(index.Host, { key: '68ce563b4a03669b76ff3822705b1ff92c4c02f2' }, this.label && (index.h("span", { key: '1887f5b70a5bf9f049495d76588458181d3f7735', class: "group-label", id: this.labelId }, this.label)), index.h("div", { key: 'c38ee340f9527e16c5587f2309f91ea463bb7cad', class: "radio-group", role: "radiogroup", "aria-labelledby": this.label ? this.labelId : undefined }, this.options.map(option => (index.h("label", { class: { 'control': true, 'control--disabled': this.disabled || option.disabled } }, index.h("input", { class: { 'input': true, 'input--invalid': this.invalid }, type: "radio", name: groupName, value: option.value, checked: option.value === this.value, disabled: this.disabled || option.disabled, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onChange: this.handleChange }), index.h("span", { class: "mark" }), index.h("span", { class: "label-text" }, option.label))))), this.hint && !(this.invalid && this.errorMessage) && (index.h("p", { key: 'ad60ce772279809ee334fc30182be1d0350d5586', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (index.h("p", { key: '316c911f9e1a29d17cc2d6b0e60ed35755420ae2', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
76
76
  }
77
77
  };
78
78
  ChRadio.style = chRadioCss();
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CiYvuUBV.js');
3
+ var index = require('./index-DMeDkSQU.js');
4
4
 
5
5
  const chTabsCss = () => `:host{display:block}.tablist{display:flex;gap:var(--spacing-2xl);border-bottom:var(--border-width) solid var(--border)}.tab{appearance:none;position:relative;background:transparent;border:none;padding:var(--spacing-md) 0 var(--spacing-xl);margin-bottom:calc(-1 * var(--border-width));color:var(--text-muted);font-family:inherit;font-size:inherit;font-weight:var(--typography-weight-semibold);cursor:pointer;transition:color var(--duration-normal) var(--easing-default), border-color var(--duration-normal) var(--easing-default)}.tab::after{content:'';position:absolute;left:0;right:0;bottom:0;height:var(--border-accent-bar);background:var(--accent);opacity:0;transition:opacity var(--duration-normal) var(--easing-default)}.tab:hover{color:var(--text)}.tab:focus-visible{outline:var(--focus-outline-width) solid var(--accent);outline-offset:var(--focus-outline-offset)}.tab--active{color:var(--text)}.tab--active::after{opacity:1}.tab--disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.tabpanel{padding-top:var(--spacing-2xl);color:var(--text)}.tabpanel[hidden]{display:none}`;
6
6
 
@@ -86,7 +86,7 @@ const ChTabs = class {
86
86
  }
87
87
  render() {
88
88
  const active = this.activeValue;
89
- return (index.h(index.Host, { key: '76a7f50b0cfa62b3a9a97114c99ab217da83aeb3' }, index.h("div", { key: '544691573ac6940ec8406e8377ac0ed5fd95140e', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
89
+ return (index.h(index.Host, { key: '0467e7ea24884d4c19c33b736a07303569dfaa3b' }, index.h("div", { key: '8ad451816ef31809c82486f3c9dd36b6e89e77e5', class: "tablist", role: "tablist", "aria-label": this.label, onKeyDown: this.handleKeyDown, ref: el => (this.tablistEl = el) }, this.tabs.map(tab => {
90
90
  const selected = tab.value === active;
91
91
  return (index.h("button", { key: tab.value, type: "button", class: { 'tab': true, 'tab--active': selected, 'tab--disabled': Boolean(tab.disabled) }, role: "tab", id: this.tabId(tab.value), "data-value": tab.value, "aria-selected": selected ? 'true' : 'false', "aria-controls": this.panelId(tab.value), tabIndex: selected ? FIRST_TAB_INDEX : LAST_TAB_INDEX, disabled: tab.disabled, onClick: () => this.select(tab.value) }, tab.label));
92
92
  })), this.tabs.map(tab => (index.h("div", { key: `${tab.value}-panel`, class: "tabpanel", id: this.panelId(tab.value), role: "tabpanel", "aria-labelledby": this.tabId(tab.value), tabIndex: FIRST_TAB_INDEX, hidden: tab.value !== active }, index.h("slot", { name: `panel-${tab.value}` }))))));
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CiYvuUBV.js');
3
+ var index = require('./index-DMeDkSQU.js');
4
4
 
5
5
  const chTextareaCss = () => `:host{display:inline-block;width:100%}.label{display:block;margin-bottom:var(--spacing-sm);font-size:var(--typography-size-sm);font-weight:var(--typography-weight-semibold);color:var(--text)}.textarea{box-sizing:border-box;width:100%;min-height:var(--spacing-6xl);padding:var(--spacing-xl) var(--spacing-3xl);border-radius:var(--radius);border:var(--border-width) solid var(--border);background:var(--surface);color:var(--text);backdrop-filter:blur(var(--effect-blur));font-family:inherit;font-size:inherit;line-height:var(--spacing-5xl);resize:vertical;transition:border-color var(--duration-normal) var(--easing-default), box-shadow var(--duration-normal) var(--easing-default)}.textarea::placeholder{color:var(--text-muted)}.textarea:focus{border-color:var(--accent);box-shadow:var(--shadow-focus-ring);outline:none}.textarea--invalid{border-color:var(--color-status-warning)}.textarea--invalid:focus{border-color:var(--color-status-warning);box-shadow:0 0 0 3px var(--color-status-warning-background)}.textarea:disabled{opacity:var(--opacity-disabled);cursor:not-allowed}.hint,.error{margin:var(--spacing-sm) 0 0;font-size:var(--typography-size-sm);color:var(--text-muted)}.error{color:var(--color-status-warning)}`;
6
6
 
@@ -83,7 +83,7 @@ const ChTextarea = class {
83
83
  return undefined;
84
84
  }
85
85
  render() {
86
- return (index.h(index.Host, { key: '90ce8125e93dee720379afabe1aaa5de55534581' }, this.label && (index.h("label", { key: '6b34d5e3a2a765b1ef799952e40f8661fd747daf', class: "label", htmlFor: this.textareaId }, this.label)), index.h("textarea", { key: '096be417a6e7fee736a246ab19f894d4ba2da9c7', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (index.h("p", { key: 'fedff430ddcfe43965696683203465c1d6e03edc', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (index.h("p", { key: 'f4a68f2976b14eca667c6ed4b648aa8df88d548a', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
86
+ return (index.h(index.Host, { key: '1e5846687f73807b36da2328106aec84bdecb7cb' }, this.label && (index.h("label", { key: '9a8d410d07bb6b9cc9a5329088786de6365af507', class: "label", htmlFor: this.textareaId }, this.label)), index.h("textarea", { key: '7353cc267072e7df111d94ad0466588d0b7e77d8', id: this.label ? this.textareaId : undefined, class: { 'textarea': true, 'textarea--invalid': this.invalid }, rows: this.rows, name: this.name, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.value, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.describedBy, onInput: this.handleInput, onChange: this.handleChange }), this.hint && !(this.invalid && this.errorMessage) && (index.h("p", { key: '5b953e2c568b151c502404fccc4a79d6d6e516f9', class: "hint", id: this.hintId }, this.hint)), this.invalid && this.errorMessage && (index.h("p", { key: 'bc500a5bd32ac35cf4de723b02cb42f459614c39', class: "error", id: this.errorId, role: "alert" }, this.errorMessage))));
87
87
  }
88
88
  };
89
89
  ChTextarea.style = chTextareaCss();
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-DMeDkSQU.js');
4
+
5
+ const chTooltipCss = () => `:host{display:inline-block}.anchor{position:relative;display:inline-flex}.bubble{position:absolute;z-index:var(--z-index-dropdown);width:max-content;max-width:16rem;padding:var(--spacing-md) var(--spacing-2xl);border:var(--border-width) solid var(--border);border-radius:var(--radius-sm);background:var(--color-background-base);color:var(--text);font-family:var(--font-body);font-size:var(--typography-size-sm);line-height:1.4;opacity:0;visibility:hidden;transition:opacity var(--duration-fast) var(--easing-default), visibility var(--duration-fast) var(--easing-default)}.bubble--visible{opacity:1;visibility:visible}.bubble::before{content:'';position:absolute}.bubble--top{bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:var(--spacing-md)}.bubble--top::before{top:100%;left:0;right:0;height:var(--spacing-md)}.bubble--bottom{top:100%;left:50%;transform:translateX(-50%);margin-top:var(--spacing-md)}.bubble--bottom::before{bottom:100%;left:0;right:0;height:var(--spacing-md)}.bubble--left{right:100%;top:50%;transform:translateY(-50%);margin-right:var(--spacing-md)}.bubble--left::before{left:100%;top:0;bottom:0;width:var(--spacing-md)}.bubble--right{left:100%;top:50%;transform:translateY(-50%);margin-left:var(--spacing-md)}.bubble--right::before{right:100%;top:0;bottom:0;width:var(--spacing-md)}@media (prefers-reduced-motion: reduce){.bubble{transition:none}}`;
6
+
7
+ let tooltipIds = 0;
8
+ const ChTooltip = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ }
12
+ get el() { return index.getElement(this); }
13
+ fallbackId = `ch-tooltip-${++tooltipIds}`;
14
+ /**
15
+ * Which side of the trigger the bubble is placed on.
16
+ */
17
+ placement = 'top';
18
+ // Hover and focus are tracked apart so that neither cancels the other: a
19
+ // pointer passing over and away must not hide a tooltip whose trigger still
20
+ // holds keyboard focus.
21
+ hovered = false;
22
+ focused = false;
23
+ dismissed = false;
24
+ get visible() {
25
+ return (this.hovered || this.focused) && !this.dismissed;
26
+ }
27
+ componentDidLoad() {
28
+ this.associate();
29
+ }
30
+ handleMouseEnter() {
31
+ this.hovered = true;
32
+ this.dismissed = false;
33
+ }
34
+ handleMouseLeave() {
35
+ this.hovered = false;
36
+ }
37
+ handleFocusIn() {
38
+ this.focused = true;
39
+ this.dismissed = false;
40
+ }
41
+ handleFocusOut() {
42
+ this.focused = false;
43
+ }
44
+ /**
45
+ * Listens on the document because a tooltip opened by hovering leaves focus
46
+ * wherever it was, so a host-scoped handler would never see the key.
47
+ */
48
+ handleKeyDown(event) {
49
+ if (event.key === 'Escape' && this.visible) {
50
+ this.dismissed = true;
51
+ }
52
+ }
53
+ slotted(name) {
54
+ return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);
55
+ }
56
+ /**
57
+ * Points the trigger at the text with `aria-describedby`. Re-run on
58
+ * `slotchange` because a framework re-render can replace the slotted nodes
59
+ * and take the attributes with them.
60
+ */
61
+ associate = () => {
62
+ const trigger = this.slotted('trigger');
63
+ const content = this.slotted('content');
64
+ if (!trigger || !content) {
65
+ return;
66
+ }
67
+ if (!content.id) {
68
+ content.id = this.fallbackId;
69
+ }
70
+ content.setAttribute('role', 'tooltip');
71
+ trigger.setAttribute('aria-describedby', content.id);
72
+ };
73
+ render() {
74
+ return (index.h(index.Host, { key: '654d4a12f84c94e014691e911e7c63c6c45b8755' }, index.h("span", { key: '726269e02fedc37efc39f1561d8b9baf83d6a4cc', class: "anchor" }, index.h("slot", { key: '876cb19249032d6d1c66f22bd2c255683b6a7f66', name: "trigger", onSlotchange: this.associate }), index.h("span", { key: '7436eb75b40b33d0b6c8ce194245d4a08a29facb', class: { 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible } }, index.h("slot", { key: '24648cc6078d61803793df011058da9515b466b5', name: "content", onSlotchange: this.associate })))));
75
+ }
76
+ };
77
+ ChTooltip.style = chTooltipCss();
78
+
79
+ exports.ch_tooltip = ChTooltip;
80
+ //# sourceMappingURL=ch-tooltip.entry.cjs.js.map
81
+
82
+ //# sourceMappingURL=ch-tooltip.cjs.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"ch-tooltip.cjs.entry.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,MAAM,CAAC,02CAA02C,CAAC;;ACIv4C,IAAI,UAAU,GAAG,CAAC;MAuBL,SAAS,GAAA,MAAA;;;;;AAGH,IAAA,UAAU,GAAG,CAAA,WAAA,EAAc,EAAE,UAAU,EAAE;AAE1D;;AAEG;IACK,SAAS,GAAuB,KAAK;;;;IAKpC,OAAO,GAAG,KAAK;IACf,OAAO,GAAG,KAAK;IACf,SAAS,GAAG,KAAK;AAE1B,IAAA,IAAY,OAAO,GAAA;AACjB,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS;;IAG1D,gBAAgB,GAAA;QACd,IAAI,CAAC,SAAS,EAAE;;IAIlB,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;;IAIxB,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;IAItB,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,QAAA,IAAI,CAAC,SAAS,GAAG,KAAK;;IAIxB,cAAc,GAAA;AACZ,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;AAGtB;;;AAGG;AAEH,IAAA,aAAa,CAAC,KAAoB,EAAA;QAChC,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;AAC1C,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI;;;AAIjB,IAAA,OAAO,CAAC,IAAY,EAAA;QAC1B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;;AAGxF;;;;AAIG;IACK,SAAS,GAAG,MAAK;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;AACvC,QAAA,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,EAAE;YACxB;;AAEF,QAAA,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE;AACf,YAAA,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU;;AAE9B,QAAA,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;QACvC,OAAO,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAE,CAAC;AACtD,KAAC;IAED,MAAM,GAAA;QACJ,QACEA,QAACC,UAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACHD,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAC,QAAQ,EAAA,EAClBA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAA,CAAS,EAC1DA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA,QAAA,EAAW,IAAI,CAAC,SAAS,CAAA,CAAE,GAAG,IAAI,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,EAAE,EAAA,EACnGA,OAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,IAAI,CAAC,SAAS,EAAA,CAAS,CACrD,CACF,CACF;;;;;;;","names":["h","Host"],"sources":["src/components/ch-tooltip/ch-tooltip.css?tag=ch-tooltip&encapsulation=shadow","src/components/ch-tooltip/ch-tooltip.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n.anchor {\n position: relative;\n display: inline-flex;\n}\n\n.bubble {\n position: absolute;\n z-index: var(--z-index-dropdown);\n width: max-content;\n max-width: 16rem;\n padding: var(--spacing-md) var(--spacing-2xl);\n border: var(--border-width) solid var(--border);\n border-radius: var(--radius-sm);\n background: var(--color-background-base);\n color: var(--text);\n font-family: var(--font-body);\n font-size: var(--typography-size-sm);\n line-height: 1.4;\n opacity: 0;\n visibility: hidden;\n transition:\n opacity var(--duration-fast) var(--easing-default),\n visibility var(--duration-fast) var(--easing-default);\n}\n\n.bubble--visible {\n opacity: 1;\n visibility: visible;\n}\n\n.bubble::before {\n content: '';\n position: absolute;\n}\n\n.bubble--top {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: var(--spacing-md);\n}\n\n.bubble--top::before {\n top: 100%;\n left: 0;\n right: 0;\n height: var(--spacing-md);\n}\n\n.bubble--bottom {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: var(--spacing-md);\n}\n\n.bubble--bottom::before {\n bottom: 100%;\n left: 0;\n right: 0;\n height: var(--spacing-md);\n}\n\n.bubble--left {\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--spacing-md);\n}\n\n.bubble--left::before {\n left: 100%;\n top: 0;\n bottom: 0;\n width: var(--spacing-md);\n}\n\n.bubble--right {\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: var(--spacing-md);\n}\n\n.bubble--right::before {\n right: 100%;\n top: 0;\n bottom: 0;\n width: var(--spacing-md);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .bubble {\n transition: none;\n }\n}\n","import { Component, Element, Host, Listen, Prop, State, h } from '@stencil/core';\n\nexport type ChTooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nlet tooltipIds = 0;\n\n/**\n * Short help text shown on hover and on focus.\n *\n * Both the trigger and the text come from the consumer's light DOM through\n * named slots. That is what makes the accessible association work: an\n * `aria-describedby` IDREF only resolves within a single tree, and slotted\n * nodes stay in the document tree even though they render inside the shadow\n * root. Keeping the text in the shadow root instead would need a reference\n * pointing into a shadow tree, which the platform does not allow — element\n * reflection only points outwards, and `referenceTarget` is not available yet.\n *\n * The trigger has to be a natively focusable element (`<button>`, `<a>`,\n * `<input>`). A chucao component such as `ch-button` will not be described,\n * because `aria-*` set on a custom element host does not reach the native\n * element inside it — see the discussion in issue #47.\n */\n@Component({\n tag: 'ch-tooltip',\n styleUrl: 'ch-tooltip.css',\n shadow: true,\n})\nexport class ChTooltip {\n @Element() private el: HTMLElement;\n\n private readonly fallbackId = `ch-tooltip-${++tooltipIds}`;\n\n /**\n * Which side of the trigger the bubble is placed on.\n */\n @Prop() placement: ChTooltipPlacement = 'top';\n\n // Hover and focus are tracked apart so that neither cancels the other: a\n // pointer passing over and away must not hide a tooltip whose trigger still\n // holds keyboard focus.\n @State() hovered = false;\n @State() focused = false;\n @State() dismissed = false;\n\n private get visible() {\n return (this.hovered || this.focused) && !this.dismissed;\n }\n\n componentDidLoad() {\n this.associate();\n }\n\n @Listen('mouseenter')\n handleMouseEnter() {\n this.hovered = true;\n this.dismissed = false;\n }\n\n @Listen('mouseleave')\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Listen('focusin')\n handleFocusIn() {\n this.focused = true;\n this.dismissed = false;\n }\n\n @Listen('focusout')\n handleFocusOut() {\n this.focused = false;\n }\n\n /**\n * Listens on the document because a tooltip opened by hovering leaves focus\n * wherever it was, so a host-scoped handler would never see the key.\n */\n @Listen('keydown', { target: 'document' })\n handleKeyDown(event: KeyboardEvent) {\n if (event.key === 'Escape' && this.visible) {\n this.dismissed = true;\n }\n }\n\n private slotted(name: string) {\n return Array.from(this.el.children).find(child => child.getAttribute('slot') === name);\n }\n\n /**\n * Points the trigger at the text with `aria-describedby`. Re-run on\n * `slotchange` because a framework re-render can replace the slotted nodes\n * and take the attributes with them.\n */\n private associate = () => {\n const trigger = this.slotted('trigger');\n const content = this.slotted('content');\n if (!trigger || !content) {\n return;\n }\n if (!content.id) {\n content.id = this.fallbackId;\n }\n content.setAttribute('role', 'tooltip');\n trigger.setAttribute('aria-describedby', content.id);\n };\n\n render() {\n return (\n <Host>\n <span class=\"anchor\">\n <slot name=\"trigger\" onSlotchange={this.associate}></slot>\n <span class={{ 'bubble': true, [`bubble--${this.placement}`]: true, 'bubble--visible': this.visible }}>\n <slot name=\"content\" onSlotchange={this.associate}></slot>\n </span>\n </span>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CiYvuUBV.js');
3
+ var index = require('./index-DMeDkSQU.js');
4
4
 
5
5
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
6
6
  /*
7
- Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
7
+ Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com
8
8
  */
9
9
 
10
10
  var patchBrowser = () => {
@@ -18,7 +18,7 @@ var patchBrowser = () => {
18
18
 
19
19
  patchBrowser().then(async (options) => {
20
20
  await index.globalScripts();
21
- return index.bootstrapLazy([["ch-badge_6.cjs",[[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[513,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion.cjs",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox.cjs",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider.cjs",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link.cjs",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-radio.cjs",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs.cjs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea.cjs",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]]], options);
21
+ return index.bootstrapLazy([["ch-alert_8.cjs",[[769,"ch-alert",{"variant":[1],"dismissLabel":[1,"dismiss-label"]}],[769,"ch-badge",{"variant":[1]}],[769,"ch-button",{"variant":[1],"disabled":[4],"label":[1]}],[257,"ch-card"],[513,"ch-input",{"label":[1],"type":[1],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-select",{"label":[1],"options":[16],"value":[1025],"placeholder":[1],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}],[513,"ch-spinner",{"size":[1],"label":[1]}],[513,"ch-switch",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-accordion.cjs",[[769,"ch-accordion",{"items":[16],"value":[1025]}]]],["ch-checkbox.cjs",[[513,"ch-checkbox",{"label":[1],"name":[1],"value":[1],"checked":[1028],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-divider.cjs",[[513,"ch-divider",{"orientation":[1]}]]],["ch-link.cjs",[[769,"ch-link",{"href":[1],"target":[1],"variant":[1],"disabled":[4]}]]],["ch-modal.cjs",[[769,"ch-modal",{"open":[1028],"label":[1],"closeLabel":[1,"close-label"]},null,{"open":[{"handleOpenChange":0}]}]]],["ch-radio.cjs",[[513,"ch-radio",{"label":[1],"options":[16],"value":[1025],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tabs.cjs",[[769,"ch-tabs",{"tabs":[16],"value":[1025],"label":[1]}]]],["ch-textarea.cjs",[[513,"ch-textarea",{"label":[1],"value":[1025],"placeholder":[1],"rows":[2],"name":[1],"disabled":[4],"required":[4],"hint":[1],"errorMessage":[1,"error-message"],"invalid":[4]}]]],["ch-tooltip.cjs",[[769,"ch-tooltip",{"placement":[1],"hovered":[32],"focused":[32],"dismissed":[32]},[[1,"mouseenter","handleMouseEnter"],[1,"mouseleave","handleMouseLeave"],[0,"focusin","handleFocusIn"],[0,"focusout","handleFocusOut"],[4,"keydown","handleKeyDown"]]]]]], options);
22
22
  });
23
23
 
24
24
  exports.setNonce = index.setNonce;
@@ -1 +1 @@
1
- {"version":3,"file":"chucao.cjs.js","sources":["node_modules/.pnpm/@stencil+core@4.43.5/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":["promiseResolve","globalScripts","bootstrapLazy"],"mappings":";;;;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,+PAAe;AACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;AAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;AACrD;AACA,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,mBAAa,EAAE;AACvB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"chucao.cjs.js","sources":["node_modules/.pnpm/@stencil+core@4.44.0/node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.44.0 | MIT Licensed | https://stenciljs.com\n */\n\n// src/client/client-patch-browser.ts\nimport { BUILD, NAMESPACE } from \"@stencil/core/internal/app-data\";\nimport { consoleDevInfo, H, promiseResolve, win } from \"@stencil/core\";\nvar patchBrowser = () => {\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo(\"Running in development mode.\");\n }\n if (BUILD.cloneNodeFix) {\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll(\"script\")).find(\n (s) => new RegExp(`/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) || s.getAttribute(\"data-stencil-namespace\") === NAMESPACE\n ) : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})[\"data-opts\"] || {} : {};\n if (importMeta !== \"\") {\n opts.resourcesUrl = new URL(\".\", importMeta).href;\n }\n return promiseResolve(opts);\n};\nvar patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function(deep) {\n if (this.nodeName === \"TEMPLATE\") {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport {\n patchBrowser\n};\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"names":["promiseResolve","globalScripts","bootstrapLazy"],"mappings":";;;;;AAAA;AACA;AACA;;AAKA,IAAI,YAAY,GAAG,MAAM;AAUzB,EAAE,MAAM,UAAU,GAAG,+PAAe;AACpC,EAAE,MAAM,IAAI,GAAiE,EAAE;AAC/E,EAAE,IAAI,UAAU,KAAK,EAAE,EAAE;AACzB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI;AACrD;AACA,EAAE,OAAOA,oBAAc,CAAC,IAAI,CAAC;AAC7B,CAAC;;ACnBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,OAAO,KAAK;AACvC,EAAE,MAAMC,mBAAa,EAAE;AACvB,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC;AAC7D,CAAC,CAAC;;;;","x_google_ignoreList":[0]}
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
3
  const NAMESPACE = 'chucao';
4
- const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, prop: true, propChangeCallback: false, updatable: true};
4
+ const BUILD = /* chucao */ { hotModuleReplacement: false, lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
5
5
 
6
6
  const globalScripts = () => {};
7
- const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--easing-default:ease;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
7
+ const globalStyles = ":root{--color-background-base:#100a1c;--color-background-top-glow:#201e40;--color-background-bottom-glow:#261226;--color-surface-default:rgba(32, 30, 64, 0.6);--color-surface-hover:rgba(45, 212, 191, 0.08);--color-scrim-default:rgba(0, 0, 0, 0.6);--color-border-default:rgba(255, 255, 255, 0.08);--color-border-hover:rgba(45, 212, 191, 0.3);--color-accent-default:#2dd4bf;--color-accent-hover:#5ee8d4;--color-accent-text:#06210f;--color-status-positive:#4ade80;--color-status-positive-background:rgba(34, 197, 94, 0.18);--color-status-warning:#f87171;--color-status-warning-background:rgba(248, 113, 113, 0.15);--color-text-primary:#ffffff;--color-text-secondary:rgba(255, 255, 255, 0.55);--color-brand-huemul-dark:#85422b;--color-brand-huemul-light:#b45b38;--color-brand-stroke:#1d1d1b;--typography-body:Fira Sans, Droid Sans, Helvetica Neue, sans-serif;--typography-heading:Inconsolata, monospace;--typography-size-xs:0.68rem;--typography-size-sm:0.85rem;--typography-size-md:1rem;--typography-size-lg:1.25rem;--typography-size-xl:1.5rem;--typography-weight-regular:400;--typography-weight-semibold:600;--typography-weight-bold:700;--typography-tracking-badge:0.03em;--spacing-2xs:0.18rem;--spacing-xs:0.25rem;--spacing-sm:0.35rem;--spacing-md:0.5rem;--spacing-lg:0.6rem;--spacing-xl:0.8rem;--spacing-2xl:1rem;--spacing-3xl:1.25rem;--spacing-4xl:1.35rem;--spacing-5xl:1.5rem;--spacing-6xl:2rem;--spacing-shift:2px;--spacing-elevate:1px;--radius-sm:6px;--radius-md:8px;--radius-pill:999px;--border-width:1px;--border-accent-bar:3px;--shadow-focus-ring:0 0 0 3px rgba(45, 212, 191, 0.12);--shadow-card-hover:0 4px 20px rgba(45, 212, 191, 0.06);--effect-blur:10px;--duration-fast:150ms;--duration-normal:200ms;--duration-spin:800ms;--easing-default:ease;--easing-linear:linear;--focus-outline-width:2px;--focus-outline-offset:2px;--opacity-disabled:0.5;--z-index-base:0;--z-index-dropdown:100;--z-index-modal:1000;--layout-max-width:68rem}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-400-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:600;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-600-normal.woff2') format('woff2')}@font-face{font-family:'Fira Sans';font-style:normal;font-weight:700;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/fira-sans-latin-700-normal.woff2') format('woff2')}@font-face{font-family:'Inconsolata';font-style:normal;font-weight:400;font-display:swap;src:url('https://static.devschile.cl/chucao/fonts/inconsolata-latin-400-normal.woff2') format('woff2')}:root{--bg:var(--color-background-base);--bg-gradient:radial-gradient(50% 30% ellipse at center top, var(--color-background-top-glow) 0%, rgba(0, 0, 0, 0) 100%),\n radial-gradient(60% 50% ellipse at center bottom, var(--color-background-bottom-glow) 0%, var(--color-background-base) 100%);--surface:var(--color-surface-default);--surface-hover:var(--color-surface-hover);--border:var(--color-border-default);--border-hover:var(--color-border-hover);--text:var(--color-text-primary);--text-muted:var(--color-text-secondary);--accent:var(--color-accent-default);--accent-hover:var(--color-accent-hover);--font-body:var(--typography-body);--font-heading:var(--typography-heading);--radius:var(--radius-sm)}body{font-family:var(--font-body)}.ch-container{width:100%;max-width:var(--layout-max-width);margin-inline:auto}.ch-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.ch-flex{display:flex}.ch-flex-col{display:flex;flex-direction:column}.ch-items-center{align-items:center}.ch-justify-center{justify-content:center}.ch-justify-between{justify-content:space-between}.ch-gap-sm{gap:var(--spacing-md)}.ch-gap-md{gap:var(--spacing-2xl)}.ch-text-center{text-align:center}.ch-text-primary{color:var(--text)}.ch-text-muted{color:var(--text-muted)}.ch-text-accent{color:var(--accent)}.ch-heading{font-family:var(--font-heading)}";
8
8
 
9
9
  /*
10
- Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
10
+ Stencil Client Platform v4.44.0 | MIT Licensed | https://stenciljs.com
11
11
  */
12
12
 
13
13
  var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
@@ -87,7 +87,7 @@ var registerInstance = (lazyInstance, hostRef) => {
87
87
  if (!hostRef) return;
88
88
  lazyInstance.__stencil__getHostRef = () => hostRef;
89
89
  hostRef.$lazyInstance$ = lazyInstance;
90
- if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.prop)) {
90
+ if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
91
91
  reWireGetterSetter(lazyInstance, hostRef);
92
92
  }
93
93
  };
@@ -116,7 +116,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
116
116
 
117
117
  // src/client/client-load-module.ts
118
118
  var cmpModules = /* @__PURE__ */ new Map();
119
+ var failedLoadAttempts = /* @__PURE__ */ new Map();
119
120
  var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
121
+ var _a;
120
122
  const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
121
123
  const bundleId = cmpMeta.$lazyBundleId$;
122
124
  if (!bundleId) {
@@ -126,21 +128,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
126
128
  if (module) {
127
129
  return module[exportName];
128
130
  }
131
+ const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
132
+ const cacheBustParams = [
133
+ retryCount > 0 ? `s-retry=${retryCount}` : "",
134
+ ""
135
+ ].filter(Boolean).join("&");
129
136
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
130
137
  return import(
131
138
  /* @vite-ignore */
132
139
  /* webpackInclude: /\.entry\.js$/ */
133
140
  /* webpackExclude: /\.system\.entry\.js$/ */
134
141
  /* webpackMode: "lazy" */
135
- `./${bundleId}.entry.js${""}`
142
+ `./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
136
143
  ).then(
137
144
  (importedModule) => {
138
145
  {
146
+ failedLoadAttempts.delete(bundleId);
139
147
  cmpModules.set(bundleId, importedModule);
140
148
  }
141
149
  return importedModule[exportName];
142
150
  },
143
151
  (e) => {
152
+ failedLoadAttempts.set(bundleId, retryCount + 1);
144
153
  consoleError(e, hostRef.$hostElement$);
145
154
  }
146
155
  );
@@ -159,6 +168,8 @@ var HYDRATE_ID = "s-id";
159
168
  var HYDRATED_STYLE_ID = "sty-id";
160
169
  var HYDRATE_CHILD_ID = "c-id";
161
170
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
171
+ var MAX_LAZY_LOAD_RETRIES = 3;
172
+ var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
162
173
  var win = typeof window !== "undefined" ? window : {};
163
174
  var plt = {
164
175
  $flags$: 0,
@@ -169,6 +180,23 @@ var plt = {
169
180
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
170
181
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
171
182
  };
183
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
184
+ var _a;
185
+ let supportsListenerOptions2 = false;
186
+ try {
187
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
188
+ "e",
189
+ null,
190
+ Object.defineProperty({}, "passive", {
191
+ get() {
192
+ supportsListenerOptions2 = true;
193
+ }
194
+ })
195
+ );
196
+ } catch (e) {
197
+ }
198
+ return supportsListenerOptions2;
199
+ })();
172
200
  var promiseResolve = (v) => Promise.resolve(v);
173
201
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
174
202
  try {
@@ -185,6 +213,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
185
213
  var queuePending = false;
186
214
  var queueDomReads = [];
187
215
  var queueDomWrites = [];
216
+ var scheduleFlush = () => {
217
+ var _a;
218
+ return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
219
+ };
188
220
  var queueTask = (queue, write) => (cb) => {
189
221
  queue.push(cb);
190
222
  if (!queuePending) {
@@ -192,7 +224,7 @@ var queueTask = (queue, write) => (cb) => {
192
224
  if (write && plt.$flags$ & 4 /* queueSync */) {
193
225
  nextTick(flush);
194
226
  } else {
195
- plt.raf(flush);
227
+ scheduleFlush();
196
228
  }
197
229
  }
198
230
  };
@@ -211,7 +243,7 @@ var flush = () => {
211
243
  {
212
244
  consume(queueDomWrites);
213
245
  if (queuePending = queueDomReads.length > 0) {
214
- plt.raf(flush);
246
+ scheduleFlush();
215
247
  }
216
248
  }
217
249
  };
@@ -506,6 +538,11 @@ var h = (nodeName, vnodeData, ...children) => {
506
538
  } else if (child != null && typeof child !== "boolean") {
507
539
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
508
540
  child = String(child);
541
+ } else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
542
+ {
543
+ consoleError("Invalid vNode child");
544
+ }
545
+ continue;
509
546
  }
510
547
  if (simple && lastSimple) {
511
548
  vNodeChildren[vNodeChildren.length - 1].$text$ += child;
@@ -946,6 +983,31 @@ var findCorrespondingNode = (node, type) => {
946
983
  return sibling;
947
984
  };
948
985
 
986
+ // src/runtime/normalize-watchers.ts
987
+ var normalizeWatchers = (raw) => {
988
+ if (!raw) return void 0;
989
+ const keys = Object.keys(raw);
990
+ if (keys.length === 0) return void 0;
991
+ let hasLegacy = false;
992
+ for (const propName of keys) {
993
+ if (hasLegacy) break;
994
+ for (const h2 of raw[propName]) {
995
+ if (typeof h2 === "string") {
996
+ hasLegacy = true;
997
+ break;
998
+ }
999
+ }
1000
+ }
1001
+ if (!hasLegacy) return raw;
1002
+ const out = {};
1003
+ for (const propName of keys) {
1004
+ out[propName] = raw[propName].map(
1005
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
1006
+ );
1007
+ }
1008
+ return out;
1009
+ };
1010
+
949
1011
  // src/utils/remote-value.ts
950
1012
  var RemoteValue = class _RemoteValue {
951
1013
  /**
@@ -1577,6 +1639,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1577
1639
  let maybePromise;
1578
1640
  if (isInitialLoad) {
1579
1641
  {
1642
+ {
1643
+ hostRef.$flags$ |= 256 /* isListenReady */;
1644
+ if (hostRef.$queuedListeners$) {
1645
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1646
+ hostRef.$queuedListeners$ = void 0;
1647
+ }
1648
+ }
1580
1649
  if (hostRef.$fetchedCbList$.length) {
1581
1650
  hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1582
1651
  }
@@ -1709,6 +1778,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1709
1778
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1710
1779
  );
1711
1780
  }
1781
+ const elm = hostRef.$hostElement$ ;
1712
1782
  const oldVal = hostRef.$instanceValues$.get(propName);
1713
1783
  const flags = hostRef.$flags$;
1714
1784
  const instance = hostRef.$lazyInstance$ ;
@@ -1719,6 +1789,27 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1719
1789
  const didValueChange = newVal !== oldVal && !areBothNaN;
1720
1790
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1721
1791
  hostRef.$instanceValues$.set(propName, newVal);
1792
+ if (cmpMeta.$watchers$) {
1793
+ const watchMethods = cmpMeta.$watchers$[propName];
1794
+ if (watchMethods) {
1795
+ watchMethods.map((watcher) => {
1796
+ try {
1797
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
1798
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
1799
+ if (!instance) {
1800
+ hostRef.$fetchedCbList$.push(() => {
1801
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
1802
+ });
1803
+ } else {
1804
+ instance[watchMethodName](newVal, oldVal, propName);
1805
+ }
1806
+ }
1807
+ } catch (e) {
1808
+ consoleError(e, elm);
1809
+ }
1810
+ });
1811
+ }
1812
+ }
1722
1813
  if (flags & 2 /* hasRendered */) {
1723
1814
  if (instance.componentShouldUpdate) {
1724
1815
  const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
@@ -1738,6 +1829,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1738
1829
  var _a, _b;
1739
1830
  const prototype = Cstr.prototype;
1740
1831
  if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1832
+ {
1833
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1834
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
1835
+ }
1836
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1837
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1838
+ }
1839
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
1840
+ cmpMeta.$serializers$ = Cstr.serializers;
1841
+ }
1842
+ }
1741
1843
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1742
1844
  members.map(([memberName, [memberFlags]]) => {
1743
1845
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1872,10 +1974,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1872
1974
 
1873
1975
  // src/runtime/initialize-component.ts
1874
1976
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1977
+ var _a;
1875
1978
  let Cstr;
1876
1979
  try {
1877
1980
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1878
1981
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1982
+ hostRef.$flags$ &= -1025 /* hasFailedLoad */;
1879
1983
  const bundleId = cmpMeta.$lazyBundleId$;
1880
1984
  if (bundleId) {
1881
1985
  const CstrImport = loadModule(cmpMeta, hostRef);
@@ -1887,9 +1991,19 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1887
1991
  Cstr = CstrImport;
1888
1992
  }
1889
1993
  if (!Cstr) {
1994
+ hostRef.$flags$ &= -33 /* hasInitializedComponent */;
1995
+ hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
1996
+ if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
1997
+ hostRef.$flags$ |= 1024 /* hasFailedLoad */;
1998
+ }
1890
1999
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1891
2000
  }
1892
2001
  if (!Cstr.isProxied) {
2002
+ {
2003
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
2004
+ cmpMeta.$serializers$ = Cstr.serializers;
2005
+ cmpMeta.$deserializers$ = Cstr.deserializers;
2006
+ }
1893
2007
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1894
2008
  Cstr.isProxied = true;
1895
2009
  }
@@ -1905,6 +2019,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1905
2019
  {
1906
2020
  hostRef.$flags$ &= -9 /* isConstructingInstance */;
1907
2021
  }
2022
+ {
2023
+ hostRef.$flags$ |= 128 /* isWatchReady */;
2024
+ }
1908
2025
  endNewInstance();
1909
2026
  {
1910
2027
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
@@ -1940,7 +2057,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1940
2057
  hostRef.$onRenderResolve$();
1941
2058
  hostRef.$onRenderResolve$ = void 0;
1942
2059
  }
1943
- if (hostRef.$onReadyResolve$) {
2060
+ if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
1944
2061
  hostRef.$onReadyResolve$(elm);
1945
2062
  }
1946
2063
  }
@@ -1995,8 +2112,11 @@ var connectedCallback = (elm) => {
1995
2112
  initializeComponent(elm, hostRef, cmpMeta);
1996
2113
  }
1997
2114
  } else {
2115
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1998
2116
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1999
2117
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
2118
+ } else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
2119
+ setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
2000
2120
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2001
2121
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
2002
2122
  }
@@ -2012,6 +2132,12 @@ var disconnectInstance = (instance, elm) => {
2012
2132
  var disconnectedCallback = async (elm) => {
2013
2133
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2014
2134
  const hostRef = getHostRef(elm);
2135
+ {
2136
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
2137
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
2138
+ hostRef.$rmListeners$ = void 0;
2139
+ }
2140
+ }
2015
2141
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2016
2142
  disconnectInstance(hostRef.$lazyInstance$, elm);
2017
2143
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -2053,6 +2179,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2053
2179
  }
2054
2180
  lazyBundles.map((lazyBundle) => {
2055
2181
  lazyBundle[1].map((compactMeta) => {
2182
+ var _a2, _b;
2056
2183
  const cmpMeta = {
2057
2184
  $flags$: compactMeta[0],
2058
2185
  $tagName$: compactMeta[1],
@@ -2062,6 +2189,14 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2062
2189
  {
2063
2190
  cmpMeta.$members$ = compactMeta[2];
2064
2191
  }
2192
+ {
2193
+ cmpMeta.$listeners$ = compactMeta[3];
2194
+ }
2195
+ {
2196
+ cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
2197
+ cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
2198
+ cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
2199
+ }
2065
2200
  const tagName = transformTag(cmpMeta.$tagName$);
2066
2201
  const HostElement = class extends HTMLElement {
2067
2202
  ["s-p"];
@@ -2093,6 +2228,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2093
2228
  }
2094
2229
  if (!this.hasRegisteredEventListeners) {
2095
2230
  this.hasRegisteredEventListeners = true;
2231
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
2096
2232
  }
2097
2233
  if (appLoadFallback) {
2098
2234
  clearTimeout(appLoadFallback);
@@ -2106,7 +2242,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2106
2242
  }
2107
2243
  disconnectedCallback() {
2108
2244
  plt.jmp(() => disconnectedCallback(this));
2109
- plt.raf(() => {
2245
+ nextTick(() => {
2110
2246
  var _a3;
2111
2247
  const hostRef = getHostRef(this);
2112
2248
  if (!hostRef) {
@@ -2156,6 +2292,41 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2156
2292
  }
2157
2293
  endBootstrap();
2158
2294
  };
2295
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2296
+ if (listeners && win.document) {
2297
+ listeners.map(([flags, name, method]) => {
2298
+ const target = getHostListenerTarget(win.document, elm, flags) ;
2299
+ const handler = hostListenerProxy(hostRef, method);
2300
+ const opts = hostListenerOpts(flags);
2301
+ plt.ael(target, name, handler, opts);
2302
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
2303
+ });
2304
+ }
2305
+ };
2306
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2307
+ var _a;
2308
+ try {
2309
+ {
2310
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
2311
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
2312
+ } else {
2313
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
2314
+ }
2315
+ }
2316
+ } catch (e) {
2317
+ consoleError(e, hostRef.$hostElement$);
2318
+ }
2319
+ };
2320
+ var getHostListenerTarget = (doc, elm, flags) => {
2321
+ if (flags & 4 /* TargetDocument */) {
2322
+ return doc;
2323
+ }
2324
+ return elm;
2325
+ };
2326
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
2327
+ passive: (flags & 1 /* Passive */) !== 0,
2328
+ capture: (flags & 2 /* Capture */) !== 0
2329
+ } : (flags & 2 /* Capture */) !== 0;
2159
2330
 
2160
2331
  // src/runtime/nonce.ts
2161
2332
  var setNonce = (nonce) => plt.$nonce$ = nonce;
@@ -2166,11 +2337,12 @@ function transformTag(tag) {
2166
2337
  exports.Host = Host;
2167
2338
  exports.bootstrapLazy = bootstrapLazy;
2168
2339
  exports.createEvent = createEvent;
2340
+ exports.getElement = getElement;
2169
2341
  exports.globalScripts = globalScripts;
2170
2342
  exports.h = h;
2171
2343
  exports.promiseResolve = promiseResolve;
2172
2344
  exports.registerInstance = registerInstance;
2173
2345
  exports.setNonce = setNonce;
2174
- //# sourceMappingURL=index-CiYvuUBV.js.map
2346
+ //# sourceMappingURL=index-DMeDkSQU.js.map
2175
2347
 
2176
- //# sourceMappingURL=index-CiYvuUBV.js.map
2348
+ //# sourceMappingURL=index-DMeDkSQU.js.map