@kubex/zinc 1.1.4 → 1.1.5
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.
|
@@ -47,79 +47,6 @@
|
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
"kind": "javascript-module",
|
|
52
|
-
"path": "components/action-bar/action-bar.js",
|
|
53
|
-
"declarations": [
|
|
54
|
-
{
|
|
55
|
-
"kind": "class",
|
|
56
|
-
"description": "",
|
|
57
|
-
"name": "ZnActionBar",
|
|
58
|
-
"cssProperties": [
|
|
59
|
-
{
|
|
60
|
-
"description": "An example CSS custom property.",
|
|
61
|
-
"name": "--example"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"cssParts": [
|
|
65
|
-
{
|
|
66
|
-
"description": "The component's base wrapper.",
|
|
67
|
-
"name": "base"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"slots": [
|
|
71
|
-
{
|
|
72
|
-
"description": "The default slot.",
|
|
73
|
-
"name": ""
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"description": "An example slot.",
|
|
77
|
-
"name": "example"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"members": [
|
|
81
|
-
{
|
|
82
|
-
"kind": "field",
|
|
83
|
-
"name": "localize",
|
|
84
|
-
"privacy": "private",
|
|
85
|
-
"readonly": true,
|
|
86
|
-
"default": "new LocalizeController(this)"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"events": [
|
|
90
|
-
{
|
|
91
|
-
"description": "Emitted as an example.",
|
|
92
|
-
"name": "zn-event-name"
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
"superclass": {
|
|
96
|
-
"name": "ZincElement",
|
|
97
|
-
"module": "/src/internal/zinc-element"
|
|
98
|
-
},
|
|
99
|
-
"summary": "Short summary of the component's intended use.",
|
|
100
|
-
"tagNameWithoutPrefix": "action-bar",
|
|
101
|
-
"tagName": "zn-action-bar",
|
|
102
|
-
"customElement": true,
|
|
103
|
-
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
104
|
-
"documentation": "https://zinc.style/components/action-bar",
|
|
105
|
-
"status": "experimental",
|
|
106
|
-
"since": "1.0",
|
|
107
|
-
"dependencies": [
|
|
108
|
-
"zn-example"
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"exports": [
|
|
113
|
-
{
|
|
114
|
-
"kind": "js",
|
|
115
|
-
"name": "default",
|
|
116
|
-
"declaration": {
|
|
117
|
-
"name": "ZnActionBar",
|
|
118
|
-
"module": "components/action-bar/action-bar.js"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
]
|
|
122
|
-
},
|
|
123
50
|
{
|
|
124
51
|
"kind": "javascript-module",
|
|
125
52
|
"path": "components/alert/alert.js",
|
|
@@ -296,6 +223,79 @@
|
|
|
296
223
|
}
|
|
297
224
|
]
|
|
298
225
|
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "javascript-module",
|
|
228
|
+
"path": "components/action-bar/action-bar.js",
|
|
229
|
+
"declarations": [
|
|
230
|
+
{
|
|
231
|
+
"kind": "class",
|
|
232
|
+
"description": "",
|
|
233
|
+
"name": "ZnActionBar",
|
|
234
|
+
"cssProperties": [
|
|
235
|
+
{
|
|
236
|
+
"description": "An example CSS custom property.",
|
|
237
|
+
"name": "--example"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"cssParts": [
|
|
241
|
+
{
|
|
242
|
+
"description": "The component's base wrapper.",
|
|
243
|
+
"name": "base"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"slots": [
|
|
247
|
+
{
|
|
248
|
+
"description": "The default slot.",
|
|
249
|
+
"name": ""
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"description": "An example slot.",
|
|
253
|
+
"name": "example"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"members": [
|
|
257
|
+
{
|
|
258
|
+
"kind": "field",
|
|
259
|
+
"name": "localize",
|
|
260
|
+
"privacy": "private",
|
|
261
|
+
"readonly": true,
|
|
262
|
+
"default": "new LocalizeController(this)"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"events": [
|
|
266
|
+
{
|
|
267
|
+
"description": "Emitted as an example.",
|
|
268
|
+
"name": "zn-event-name"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"superclass": {
|
|
272
|
+
"name": "ZincElement",
|
|
273
|
+
"module": "/src/internal/zinc-element"
|
|
274
|
+
},
|
|
275
|
+
"summary": "Short summary of the component's intended use.",
|
|
276
|
+
"tagNameWithoutPrefix": "action-bar",
|
|
277
|
+
"tagName": "zn-action-bar",
|
|
278
|
+
"customElement": true,
|
|
279
|
+
"jsDoc": "/**\n * @summary Short summary of the component's intended use.\n * @documentation https://zinc.style/components/action-bar\n * @status experimental\n * @since 1.0\n *\n * @dependency zn-example\n *\n * @event zn-event-name - Emitted as an example.\n *\n * @slot - The default slot.\n * @slot example - An example slot.\n *\n * @csspart base - The component's base wrapper.\n *\n * @cssproperty --example - An example CSS custom property.\n */",
|
|
280
|
+
"documentation": "https://zinc.style/components/action-bar",
|
|
281
|
+
"status": "experimental",
|
|
282
|
+
"since": "1.0",
|
|
283
|
+
"dependencies": [
|
|
284
|
+
"zn-example"
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"exports": [
|
|
289
|
+
{
|
|
290
|
+
"kind": "js",
|
|
291
|
+
"name": "default",
|
|
292
|
+
"declaration": {
|
|
293
|
+
"name": "ZnActionBar",
|
|
294
|
+
"module": "components/action-bar/action-bar.js"
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
299
|
{
|
|
300
300
|
"kind": "javascript-module",
|
|
301
301
|
"path": "components/animated-button/animated-button.js",
|
|
@@ -36316,7 +36316,7 @@
|
|
|
36316
36316
|
"package": {
|
|
36317
36317
|
"name": "@kubex/zinc",
|
|
36318
36318
|
"description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
|
|
36319
|
-
"version": "1.1.
|
|
36319
|
+
"version": "1.1.5",
|
|
36320
36320
|
"author": "",
|
|
36321
36321
|
"license": "MIT"
|
|
36322
36322
|
}
|
|
@@ -13,17 +13,6 @@
|
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
"name": "zn-action-bar",
|
|
18
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
19
|
-
"attributes": [],
|
|
20
|
-
"references": [
|
|
21
|
-
{
|
|
22
|
-
"name": "Documentation",
|
|
23
|
-
"url": "https://zinc.style/components/action-bar"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
16
|
{
|
|
28
17
|
"name": "zn-alert",
|
|
29
18
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -63,6 +52,17 @@
|
|
|
63
52
|
}
|
|
64
53
|
]
|
|
65
54
|
},
|
|
55
|
+
{
|
|
56
|
+
"name": "zn-action-bar",
|
|
57
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
58
|
+
"attributes": [],
|
|
59
|
+
"references": [
|
|
60
|
+
{
|
|
61
|
+
"name": "Documentation",
|
|
62
|
+
"url": "https://zinc.style/components/action-bar"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
66
|
{
|
|
67
67
|
"name": "zn-animated-button",
|
|
68
68
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@kubex/zinc",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.5",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -15,28 +15,6 @@
|
|
|
15
15
|
"events": [],
|
|
16
16
|
"js": { "properties": [], "events": [] }
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"name": "zn-action-bar",
|
|
20
|
-
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
21
|
-
"doc-url": "",
|
|
22
|
-
"attributes": [],
|
|
23
|
-
"slots": [
|
|
24
|
-
{ "name": "", "description": "The default slot." },
|
|
25
|
-
{ "name": "example", "description": "An example slot." }
|
|
26
|
-
],
|
|
27
|
-
"events": [
|
|
28
|
-
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
29
|
-
],
|
|
30
|
-
"js": {
|
|
31
|
-
"properties": [],
|
|
32
|
-
"events": [
|
|
33
|
-
{
|
|
34
|
-
"name": "zn-event-name",
|
|
35
|
-
"description": "Emitted as an example."
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
18
|
{
|
|
41
19
|
"name": "zn-alert",
|
|
42
20
|
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
@@ -100,6 +78,28 @@
|
|
|
100
78
|
]
|
|
101
79
|
}
|
|
102
80
|
},
|
|
81
|
+
{
|
|
82
|
+
"name": "zn-action-bar",
|
|
83
|
+
"description": "Short summary of the component's intended use.\n---\n\n\n### **Events:**\n - **zn-event-name** - Emitted as an example.\n\n### **Slots:**\n - _default_ - The default slot.\n- **example** - An example slot.\n\n### **CSS Properties:**\n - **--example** - An example CSS custom property. _(default: undefined)_\n\n### **CSS Parts:**\n - **base** - The component's base wrapper.",
|
|
84
|
+
"doc-url": "",
|
|
85
|
+
"attributes": [],
|
|
86
|
+
"slots": [
|
|
87
|
+
{ "name": "", "description": "The default slot." },
|
|
88
|
+
{ "name": "example", "description": "An example slot." }
|
|
89
|
+
],
|
|
90
|
+
"events": [
|
|
91
|
+
{ "name": "zn-event-name", "description": "Emitted as an example." }
|
|
92
|
+
],
|
|
93
|
+
"js": {
|
|
94
|
+
"properties": [],
|
|
95
|
+
"events": [
|
|
96
|
+
{
|
|
97
|
+
"name": "zn-event-name",
|
|
98
|
+
"description": "Emitted as an example."
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
103
|
{
|
|
104
104
|
"name": "zn-animated-button",
|
|
105
105
|
"description": "\n---\n\n\n### **Methods:**\n - **purchase(): _void_** - Programmatically trigger the purchase flow\n- **setSuccess(): _void_** - Set the button to success state manually\n- **setFailure(message): _void_** - Set the button to failure state manually with optional error message\n- **reset(): _void_** - Reset the button to idle state",
|
package/dist/zn.min.js
CHANGED
|
@@ -92,7 +92,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
92
92
|
stroke-linejoin="round"
|
|
93
93
|
aria-hidden="true"
|
|
94
94
|
>${t.map(([n,o])=>`<${n}${this.getSvgAttributes(o)} />`).join("")}</svg>
|
|
95
|
-
`}getSvgAttributes(t){return Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>` ${i}="${this.escapeSvgAttribute(String(n))}"`).join("")}escapeSvgAttribute(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}getColorForAvatar(t){let i=["#00AA55","#0882a8","#ed55ed","#5eae00","#09389e","#d17300","#5e0be2","#5b7a13","#ddb100","#d400c2","#DC2A2A","#a967ff"],n=Array.from(t).reduce((o,s)=>o+s.charCodeAt(0),0);return i[n%i.length]}};ci.styles=Q(xde),ci.presetColors=new Set(["default","primary","accent","info","warning","error","success","white","disabled","red","blue","green","orange","yellow","indigo","violet","pink","grey"]),_([w({reflect:!0})],ci.prototype,"src",2),_([w({reflect:!0})],ci.prototype,"alt",2),_([w({type:Number,reflect:!0})],ci.prototype,"size",2),_([w({type:Boolean,reflect:!0})],ci.prototype,"round",2),_([w({type:Boolean,reflect:!0})],ci.prototype,"tile",2),_([w({type:Boolean,reflect:!0})],ci.prototype,"depth",2),_([w({reflect:!0})],ci.prototype,"library",2),_([w({reflect:!0})],ci.prototype,"color",2),_([w({reflect:!0})],ci.prototype,"fill",2),_([w({type:Boolean})],ci.prototype,"padded",2),_([w({type:Boolean})],ci.prototype,"blink",2),_([w({type:Boolean})],ci.prototype,"squared",2);var kc=ci;var tr=kc;kc.define("zn-icon");var wde=J`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.tooltip{--arrow-size:6px}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.tooltip__body{display:block;width:-moz-max-content;width:max-content;max-width:-moz-max-content;max-width:max-content;border-radius:5px;background-color:var(--arrow-color);
|
|
95
|
+
`}getSvgAttributes(t){return Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>` ${i}="${this.escapeSvgAttribute(String(n))}"`).join("")}escapeSvgAttribute(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}getColorForAvatar(t){let i=["#00AA55","#0882a8","#ed55ed","#5eae00","#09389e","#d17300","#5e0be2","#5b7a13","#ddb100","#d400c2","#DC2A2A","#a967ff"],n=Array.from(t).reduce((o,s)=>o+s.charCodeAt(0),0);return i[n%i.length]}};ci.styles=Q(xde),ci.presetColors=new Set(["default","primary","accent","info","warning","error","success","white","disabled","red","blue","green","orange","yellow","indigo","violet","pink","grey"]),_([w({reflect:!0})],ci.prototype,"src",2),_([w({reflect:!0})],ci.prototype,"alt",2),_([w({type:Number,reflect:!0})],ci.prototype,"size",2),_([w({type:Boolean,reflect:!0})],ci.prototype,"round",2),_([w({type:Boolean,reflect:!0})],ci.prototype,"tile",2),_([w({type:Boolean,reflect:!0})],ci.prototype,"depth",2),_([w({reflect:!0})],ci.prototype,"library",2),_([w({reflect:!0})],ci.prototype,"color",2),_([w({reflect:!0})],ci.prototype,"fill",2),_([w({type:Boolean})],ci.prototype,"padded",2),_([w({type:Boolean})],ci.prototype,"blink",2),_([w({type:Boolean})],ci.prototype,"squared",2);var kc=ci;var tr=kc;kc.define("zn-icon");var wde=J`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{display:contents}.tooltip{--arrow-size:6px}.tooltip[placement^=top]::part(popup){transform-origin:bottom}.tooltip[placement^=bottom]::part(popup){transform-origin:top}.tooltip[placement^=left]::part(popup){transform-origin:right}.tooltip[placement^=right]::part(popup){transform-origin:left}.tooltip__body{font-family:var(--zn-font-sans);font-size:var(--zn-text-paragraph-font-size);font-weight:var(--zn-text-paragraph-font-weight);line-height:var(--zn-text-paragraph-line-height);color:var(--zn-text-paragraph-color);text-transform:var(--zn-text-paragraph-transform);display:block;width:-moz-max-content;width:max-content;max-width:-moz-max-content;max-width:max-content;border-radius:5px;background-color:var(--arrow-color);text-align:start;white-space:normal;color:white;padding:5px;pointer-events:none;-moz-user-select:none;user-select:none;-webkit-user-select:none}`;var pa=class extends X{constructor(){super();this.content="";this.placement="top";this.disabled=!1;this.distance=4;this.open=!1;this.skidding=0;this.trigger="hover focus";this.hoist=!0;this.handleBlur=()=>{this.hasTrigger("focus")&&!ms.isDropdownOpen()&&this.hide()};this.handleClick=()=>{this.hasTrigger("click")&&!ms.isDropdownOpen()&&(this.open&&this.hide(),this.show())};this.handleFocus=()=>{this.hasTrigger("focus")&&!ms.isDropdownOpen()&&this.show()};this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())};this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var t;(t=this.closeWatcher)==null||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(t){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition()),super.firstUpdated(t)}hasTrigger(t){return this.trigger.split(" ").includes(t)}handleMouseOver(){this.hasTrigger("hover")&&!ms.isDropdownOpen()&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),0))}handleMouseOut(){this.hasTrigger("hover")&&!ms.isDropdownOpen()&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),0))}handleOpenChange(){var t;if(this.open){if(ms.registerTooltip(this),this.disabled)return;this.emit("zn-show"),"CloseWatcher"in window?((t=this.closeWatcher)==null||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),this.body.hidden=!1,this.popup.active=!0,this.popup.reposition(),this.emit("zn-after-show")}else ms.unregisterTooltip(this),this.emit("zn-hide"),this.popup.active=!1,this.body.hidden=!0,this.emit("zn-after-hide")}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Mo(this,"zn-after-show")}hide(){this.open&&(this.open=!1,Mo(this,"zn-after-hide"))}render(){return C`
|
|
96
96
|
<zn-popup
|
|
97
97
|
part="base"
|
|
98
98
|
exportparts="popup:base__popup,arrow:base__arrow"
|
|
@@ -154,7 +154,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
154
154
|
${this.loadingText}<span class="loading-countdown"></span>
|
|
155
155
|
</span>
|
|
156
156
|
</div>
|
|
157
|
-
`:null}`}};dt.styles=Q(kde),dt.dependencies={"zn-tooltip":gs,"zn-icon":tr},_([ce(".button")],dt.prototype,"button",2),_([I_(".loading-countdown")],dt.prototype,"countdownContainer",2),_([w({})],dt.prototype,"color",2),_([w({attribute:"hover-color"})],dt.prototype,"hoverColor",2),_([w({type:Boolean})],dt.prototype,"text",2),_([w({type:Boolean})],dt.prototype,"outline",2),_([w({type:Boolean})],dt.prototype,"disabled",2),_([w({type:Boolean})],dt.prototype,"grow",2),_([w({type:Boolean})],dt.prototype,"square",2),_([w({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],dt.prototype,"iconButton",2),_([w({type:Boolean})],dt.prototype,"plain",2),_([w({type:Boolean,attribute:"no-hover"})],dt.prototype,"noHover",2),_([w({type:Boolean,attribute:"panel-bg"})],dt.prototype,"panelBackground",2),_([w({attribute:"dropdown-closer",type:Boolean})],dt.prototype,"dropdownCloser",2),_([w({type:Number})],dt.prototype,"notification",2),_([w({attribute:"muted-notifications",type:Boolean})],dt.prototype,"mutedNotifications",2),_([w()],dt.prototype,"verticalAlign",2),_([w()],dt.prototype,"content",2),_([w()],dt.prototype,"icon",2),_([w()],dt.prototype,"gaid",2),_([w({attribute:"icon-position"})],dt.prototype,"iconPosition",2),_([w({attribute:"icon-size"})],dt.prototype,"iconSize",2),_([w({attribute:"icon-color"})],dt.prototype,"iconColor",2),_([w({attribute:"icon-fill"})],dt.prototype,"iconFill",2),_([w({attribute:"icon-library"})],dt.prototype,"iconLibrary",2),_([w()],dt.prototype,"type",2),_([w()],dt.prototype,"name",2),_([w()],dt.prototype,"value",2),_([w()],dt.prototype,"form",2),_([w({attribute:"formaction"})],dt.prototype,"formAction",2),_([w({attribute:"formenctype"})],dt.prototype,"formEnctype",2),_([w({attribute:"formmethod"})],dt.prototype,"formMethod",2),_([w({attribute:"formnovalidate",type:Boolean})],dt.prototype,"formNoValidate",2),_([w({attribute:"formtarget"})],dt.prototype,"formTarget",2),_([w()],dt.prototype,"href",2),_([w()],dt.prototype,"target",2),_([w({attribute:"data-target"})],dt.prototype,"dataTarget",2),_([w()],dt.prototype,"rel",2),_([w()],dt.prototype,"tooltip",2),_([w({type:Boolean,attribute:"auto-click"})],dt.prototype,"autoClick",2),_([w({type:Number,attribute:"auto-click-delay"})],dt.prototype,"autoClickDelay",2),_([w({type:String,attribute:"loading-text"})],dt.prototype,"loadingText",2),_([w({type:String,attribute:"loading-text-position"})],dt.prototype,"loadingTextPosition",2),_([w({type:Boolean})],dt.prototype,"loading",2),_([He("autoClick")],dt.prototype,"handleAutoClickChange",1);var ua=dt;dt.define("zn-button");var vr=class{constructor(r,{target:t,config:i,callback:n,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=r,t!==null&&this.t.add(t!=null?t:r),this.l=i,this.o=o!=null?o:this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),r.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(r){var t;this.value=(t=this.callback)==null?void 0:t.call(this,r,this.u)}hostConnected(){for(let r of this.t)this.observe(r)}hostDisconnected(){this.disconnect()}async hostUpdated(){let r=this.u.takeRecords();(r.length||!this.o&&this.i)&&this.handleChanges(r),this.i=!1}observe(r){this.t.add(r),this.u.observe(r,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var Eh=class extends X{constructor(){super(),new vr(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(r){super.firstUpdated(r),this.resize()}resize(){let r=0;Array.from(this.children).forEach(t=>{r+=t.getBoundingClientRect().height}),this.style.minHeight=r+"px"}createRenderRoot(){return this}};var TAe=Eh;Eh.define("zn-absolute-container");var sl=Math.min,$i=Math.max,z0=Math.round,M0=Math.floor,vs=a=>({x:a,y:a}),AAe={left:"right",right:"left",bottom:"top",top:"bottom"};function n2(a,r,t){return $i(a,sl(r,t))}function vp(a,r){return typeof a=="function"?a(r):a}function sd(a){return a.split("-")[0]}function bp(a){return a.split("-")[1]}function jM(a){return a==="x"?"y":"x"}function o2(a){return a==="y"?"height":"width"}function ll(a){let r=a[0];return r==="t"||r==="b"?"y":"x"}function s2(a){return jM(ll(a))}function Sde(a,r,t){t===void 0&&(t=!1);let i=bp(a),n=s2(a),o=o2(n),s=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[o]>r.floating[o]&&(s=k0(s)),[s,k0(s)]}function Cde(a){let r=k0(a);return[i2(a),r,i2(r)]}function i2(a){return a.includes("start")?a.replace("start","end"):a.replace("end","start")}var zde=["left","right"],Mde=["right","left"],EAe=["top","bottom"],LAe=["bottom","top"];function DAe(a,r,t){switch(a){case"top":case"bottom":return t?r?Mde:zde:r?zde:Mde;case"left":case"right":return r?EAe:LAe;default:return[]}}function Tde(a,r,t,i){let n=bp(a),o=DAe(sd(a),t==="start",i);return n&&(o=o.map(s=>s+"-"+n),r&&(o=o.concat(o.map(i2)))),o}function k0(a){let r=sd(a);return AAe[r]+a.slice(r.length)}function RAe(a){return he({top:0,right:0,bottom:0,left:0},a)}function KM(a){return typeof a!="number"?RAe(a):{top:a,right:a,bottom:a,left:a}}function _p(a){let{x:r,y:t,width:i,height:n}=a;return{width:i,height:n,top:t,left:r,right:r+i,bottom:t+n,x:r,y:t}}function Ade(a,r,t){let{reference:i,floating:n}=a,o=ll(r),s=s2(r),l=o2(s),d=sd(r),c=o==="y",f=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,h=i[l]/2-n[l]/2,m;switch(d){case"top":m={x:f,y:i.y-n.height};break;case"bottom":m={x:f,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:p};break;case"left":m={x:i.x-n.width,y:p};break;default:m={x:i.x,y:i.y}}switch(bp(r)){case"start":m[s]-=h*(t&&c?-1:1);break;case"end":m[s]+=h*(t&&c?-1:1);break}return m}async function Ede(a,r){var t;r===void 0&&(r={});let{x:i,y:n,platform:o,rects:s,elements:l,strategy:d}=a,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=vp(r,a),v=KM(m),x=l[h?p==="floating"?"reference":"floating":p],y=_p(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(x)))==null||t?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:d})),z=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),S=await(o.isElement==null?void 0:o.isElement(M))?await(o.getScale==null?void 0:o.getScale(M))||{x:1,y:1}:{x:1,y:1},T=_p(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:z,offsetParent:M,strategy:d}):z);return{top:(y.top-T.top+v.top)/S.y,bottom:(T.bottom-y.bottom+v.bottom)/S.y,left:(y.left-T.left+v.left)/S.x,right:(T.right-y.right+v.right)/S.x}}var OAe=50,Lde=async(a,r,t)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=t,l=s.detectOverflow?s:ot(he({},s),{detectOverflow:Ede}),d=await(s.isRTL==null?void 0:s.isRTL(r)),c=await s.getElementRects({reference:a,floating:r,strategy:n}),{x:f,y:p}=Ade(c,i,d),h=i,m=0,v={};for(let b=0;b<o.length;b++){let x=o[b];if(!x)continue;let{name:y,fn:z}=x,{x:M,y:S,data:T,reset:E}=await z({x:f,y:p,initialPlacement:i,placement:h,strategy:n,middlewareData:v,rects:c,platform:l,elements:{reference:a,floating:r}});f=M!=null?M:f,p=S!=null?S:p,v[y]=he(he({},v[y]),T),E&&m<OAe&&(m++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:a,floating:r,strategy:n}):E.rects),{x:f,y:p}=Ade(c,h,d)),b=-1)}return{x:f,y:p,placement:h,strategy:n,middlewareData:v}},Dde=a=>({name:"arrow",options:a,async fn(r){let{x:t,y:i,placement:n,rects:o,platform:s,elements:l,middlewareData:d}=r,{element:c,padding:f=0}=vp(a,r)||{};if(c==null)return{};let p=KM(f),h={x:t,y:i},m=s2(n),v=o2(m),b=await s.getDimensions(c),x=m==="y",y=x?"top":"left",z=x?"bottom":"right",M=x?"clientHeight":"clientWidth",S=o.reference[v]+o.reference[m]-h[m]-o.floating[v],T=h[m]-o.reference[m],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),L=E?E[M]:0;(!L||!await(s.isElement==null?void 0:s.isElement(E)))&&(L=l.floating[M]||o.floating[v]);let q=S/2-T/2,H=L/2-b[v]/2-1,B=sl(p[y],H),$=sl(p[z],H),K=B,U=L-b[v]-$,te=L/2-b[v]/2+q,ne=n2(K,te,U),le=!d.arrow&&bp(n)!=null&&te!==ne&&o.reference[v]/2-(te<K?B:$)-b[v]/2<0,_e=le?te<K?te-K:te-U:0;return{[m]:h[m]+_e,data:he({[m]:ne,centerOffset:te-ne-_e},le&&{alignmentOffset:_e}),reset:le}}});var Rde=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(r){var t,i;let{placement:n,middlewareData:o,rects:s,initialPlacement:l,platform:d,elements:c}=r,te=vp(a,r),{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0}=te,x=lp(te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let y=sd(n),z=ll(l),M=sd(l)===l,S=await(d.isRTL==null?void 0:d.isRTL(c.floating)),T=h||(M||!b?[k0(l)]:Cde(l)),E=v!=="none";!h&&E&&T.push(...Tde(l,b,v,S));let L=[l,...T],q=await d.detectOverflow(r,x),H=[],B=((i=o.flip)==null?void 0:i.overflows)||[];if(f&&H.push(q[y]),p){let ne=Sde(n,s,S);H.push(q[ne[0]],q[ne[1]])}if(B=[...B,{placement:n,overflows:H}],!H.every(ne=>ne<=0)){var $,K;let ne=((($=o.flip)==null?void 0:$.index)||0)+1,le=L[ne];if(le&&(!(p==="alignment"?z!==ll(le):!1)||B.every(ze=>ll(ze.placement)===z?ze.overflows[0]>0:!0)))return{data:{index:ne,overflows:B},reset:{placement:le}};let _e=(K=B.filter(ye=>ye.overflows[0]<=0).sort((ye,ze)=>ye.overflows[1]-ze.overflows[1])[0])==null?void 0:K.placement;if(!_e)switch(m){case"bestFit":{var U;let ye=(U=B.filter(ze=>{if(E){let Oe=ll(ze.placement);return Oe===z||Oe==="y"}return!0}).map(ze=>[ze.placement,ze.overflows.filter(Oe=>Oe>0).reduce((Oe,$e)=>Oe+$e,0)]).sort((ze,Oe)=>ze[1]-Oe[1])[0])==null?void 0:U[0];ye&&(_e=ye);break}case"initialPlacement":_e=l;break}if(n!==_e)return{reset:{placement:_e}}}return{}}}};var PAe=new Set(["left","top"]);async function IAe(a,r){let{placement:t,platform:i,elements:n}=a,o=await(i.isRTL==null?void 0:i.isRTL(n.floating)),s=sd(t),l=bp(t),d=ll(t)==="y",c=PAe.has(s)?-1:1,f=o&&d?-1:1,p=vp(r,a),{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),d?{x:m*f,y:h*c}:{x:h*c,y:m*f}}var Ode=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(r){var t,i;let{x:n,y:o,placement:s,middlewareData:l}=r,d=await IAe(r,a);return s===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:n+d.x,y:o+d.y,data:ot(he({},d),{placement:s})}}}},Pde=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(r){let{x:t,y:i,placement:n,platform:o}=r,y=vp(a,r),{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:z=>{let{x:M,y:S}=z;return{x:M,y:S}}}}=y,c=lp(y,["mainAxis","crossAxis","limiter"]),f={x:t,y:i},p=await o.detectOverflow(r,c),h=ll(sd(n)),m=jM(h),v=f[m],b=f[h];if(s){let z=m==="y"?"top":"left",M=m==="y"?"bottom":"right",S=v+p[z],T=v-p[M];v=n2(S,v,T)}if(l){let z=h==="y"?"top":"left",M=h==="y"?"bottom":"right",S=b+p[z],T=b-p[M];b=n2(S,b,T)}let x=d.fn(ot(he({},r),{[m]:v,[h]:b}));return ot(he({},x),{data:{x:x.x-t,y:x.y-i,enabled:{[m]:s,[h]:l}}})}}};var Ide=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(r){var t,i;let{placement:n,rects:o,platform:s,elements:l}=r,B=vp(a,r),{apply:d=()=>{}}=B,c=lp(B,["apply"]),f=await s.detectOverflow(r,c),p=sd(n),h=bp(n),m=ll(n)==="y",{width:v,height:b}=o.floating,x,y;p==="top"||p==="bottom"?(x=p,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,x=h==="end"?"top":"bottom");let z=b-f.top-f.bottom,M=v-f.left-f.right,S=sl(b-f[x],z),T=sl(v-f[y],M),E=!r.middlewareData.shift,L=S,q=T;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(q=M),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(L=z),E&&!h){let $=$i(f.left,0),K=$i(f.right,0),U=$i(f.top,0),te=$i(f.bottom,0);m?q=v-2*($!==0||K!==0?$+K:$i(f.left,f.right)):L=b-2*(U!==0||te!==0?U+te:$i(f.top,f.bottom))}await d(ot(he({},r),{availableWidth:q,availableHeight:L}));let H=await s.getDimensions(l.floating);return v!==H.width||b!==H.height?{reset:{rects:!0}}:{}}}};function l2(){return typeof window!="undefined"}function xp(a){return Nde(a)?(a.nodeName||"").toLowerCase():"#document"}function hn(a){var r;return(a==null||(r=a.ownerDocument)==null?void 0:r.defaultView)||window}function bs(a){var r;return(r=(Nde(a)?a.ownerDocument:a.document)||window.document)==null?void 0:r.documentElement}function Nde(a){return l2()?a instanceof Node||a instanceof hn(a).Node:!1}function So(a){return l2()?a instanceof Element||a instanceof hn(a).Element:!1}function dl(a){return l2()?a instanceof HTMLElement||a instanceof hn(a).HTMLElement:!1}function qde(a){return!l2()||typeof ShadowRoot=="undefined"?!1:a instanceof ShadowRoot||a instanceof hn(a).ShadowRoot}function Dh(a){let{overflow:r,overflowX:t,overflowY:i,display:n}=Co(a);return/auto|scroll|overlay|hidden|clip/.test(r+i+t)&&n!=="inline"&&n!=="contents"}function Hde(a){return/^(table|td|th)$/.test(xp(a))}function S0(a){try{if(a.matches(":popover-open"))return!0}catch(r){}try{return a.matches(":modal")}catch(r){return!1}}var qAe=/transform|translate|scale|rotate|perspective|filter/,NAe=/paint|layout|strict|content/,yp=a=>!!a&&a!=="none",YM;function Rh(a){let r=So(a)?Co(a):a;return yp(r.transform)||yp(r.translate)||yp(r.scale)||yp(r.rotate)||yp(r.perspective)||!d2()&&(yp(r.backdropFilter)||yp(r.filter))||qAe.test(r.willChange||"")||NAe.test(r.contain||"")}function Bde(a){let r=ld(a);for(;dl(r)&&!wp(r);){if(Rh(r))return r;if(S0(r))return null;r=ld(r)}return null}function d2(){return YM==null&&(YM=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),YM}function wp(a){return/^(html|body|#document)$/.test(xp(a))}function Co(a){return hn(a).getComputedStyle(a)}function C0(a){return So(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function ld(a){if(xp(a)==="html")return a;let r=a.assignedSlot||a.parentNode||qde(a)&&a.host||bs(a);return qde(r)?r.host:r}function Fde(a){let r=ld(a);return wp(r)?a.ownerDocument?a.ownerDocument.body:a.body:dl(r)&&Dh(r)?r:Fde(r)}function Lh(a,r,t){var i;r===void 0&&(r=[]),t===void 0&&(t=!0);let n=Fde(a),o=n===((i=a.ownerDocument)==null?void 0:i.body),s=hn(n);if(o){let l=c2(s);return r.concat(s,s.visualViewport||[],Dh(n)?n:[],l&&t?Lh(l):[])}else return r.concat(n,Lh(n,[],t))}function c2(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function Gde(a){let r=Co(a),t=parseFloat(r.width)||0,i=parseFloat(r.height)||0,n=dl(a),o=n?a.offsetWidth:t,s=n?a.offsetHeight:i,l=z0(t)!==o||z0(i)!==s;return l&&(t=o,i=s),{width:t,height:i,$:l}}function QM(a){return So(a)?a:a.contextElement}function Oh(a){let r=QM(a);if(!dl(r))return vs(1);let t=r.getBoundingClientRect(),{width:i,height:n,$:o}=Gde(r),s=(o?z0(t.width):t.width)/i,l=(o?z0(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var HAe=vs(0);function Wde(a){let r=hn(a);return!d2()||!r.visualViewport?HAe:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function BAe(a,r,t){return r===void 0&&(r=!1),!t||r&&t!==hn(a)?!1:r}function kp(a,r,t,i){r===void 0&&(r=!1),t===void 0&&(t=!1);let n=a.getBoundingClientRect(),o=QM(a),s=vs(1);r&&(i?So(i)&&(s=Oh(i)):s=Oh(a));let l=BAe(o,t,i)?Wde(o):vs(0),d=(n.left+l.x)/s.x,c=(n.top+l.y)/s.y,f=n.width/s.x,p=n.height/s.y;if(o){let h=hn(o),m=i&&So(i)?hn(i):i,v=h,b=c2(v);for(;b&&i&&m!==v;){let x=Oh(b),y=b.getBoundingClientRect(),z=Co(b),M=y.left+(b.clientLeft+parseFloat(z.paddingLeft))*x.x,S=y.top+(b.clientTop+parseFloat(z.paddingTop))*x.y;d*=x.x,c*=x.y,f*=x.x,p*=x.y,d+=M,c+=S,v=hn(b),b=c2(v)}}return _p({width:f,height:p,x:d,y:c})}function f2(a,r){let t=C0(a).scrollLeft;return r?r.left+t:kp(bs(a)).left+t}function jde(a,r){let t=a.getBoundingClientRect(),i=t.left+r.scrollLeft-f2(a,t),n=t.top+r.scrollTop;return{x:i,y:n}}function FAe(a){let{elements:r,rect:t,offsetParent:i,strategy:n}=a,o=n==="fixed",s=bs(i),l=r?S0(r.floating):!1;if(i===s||l&&o)return t;let d={scrollLeft:0,scrollTop:0},c=vs(1),f=vs(0),p=dl(i);if((p||!p&&!o)&&((xp(i)!=="body"||Dh(s))&&(d=C0(i)),p)){let m=kp(i);c=Oh(i),f.x=m.x+i.clientLeft,f.y=m.y+i.clientTop}let h=s&&!p&&!o?jde(s,d):vs(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-d.scrollLeft*c.x+f.x+h.x,y:t.y*c.y-d.scrollTop*c.y+f.y+h.y}}function $Ae(a){return Array.from(a.getClientRects())}function VAe(a){let r=bs(a),t=C0(a),i=a.ownerDocument.body,n=$i(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),o=$i(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight),s=-t.scrollLeft+f2(a),l=-t.scrollTop;return Co(i).direction==="rtl"&&(s+=$i(r.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:l}}var $de=25;function UAe(a,r){let t=hn(a),i=bs(a),n=t.visualViewport,o=i.clientWidth,s=i.clientHeight,l=0,d=0;if(n){o=n.width,s=n.height;let f=d2();(!f||f&&r==="fixed")&&(l=n.offsetLeft,d=n.offsetTop)}let c=f2(i);if(c<=0){let f=i.ownerDocument,p=f.body,h=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(i.clientWidth-p.clientWidth-m);v<=$de&&(o-=v)}else c<=$de&&(o+=c);return{width:o,height:s,x:l,y:d}}function GAe(a,r){let t=kp(a,!0,r==="fixed"),i=t.top+a.clientTop,n=t.left+a.clientLeft,o=dl(a)?Oh(a):vs(1),s=a.clientWidth*o.x,l=a.clientHeight*o.y,d=n*o.x,c=i*o.y;return{width:s,height:l,x:d,y:c}}function Vde(a,r,t){let i;if(r==="viewport")i=UAe(a,t);else if(r==="document")i=VAe(bs(a));else if(So(r))i=GAe(r,t);else{let n=Wde(a);i={x:r.x-n.x,y:r.y-n.y,width:r.width,height:r.height}}return _p(i)}function Kde(a,r){let t=ld(a);return t===r||!So(t)||wp(t)?!1:Co(t).position==="fixed"||Kde(t,r)}function WAe(a,r){let t=r.get(a);if(t)return t;let i=Lh(a,[],!1).filter(l=>So(l)&&xp(l)!=="body"),n=null,o=Co(a).position==="fixed",s=o?ld(a):a;for(;So(s)&&!wp(s);){let l=Co(s),d=Rh(s);!d&&l.position==="fixed"&&(n=null),(o?!d&&!n:!d&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Dh(s)&&!d&&Kde(a,s))?i=i.filter(f=>f!==s):n=l,s=ld(s)}return r.set(a,i),i}function jAe(a){let{element:r,boundary:t,rootBoundary:i,strategy:n}=a,s=[...t==="clippingAncestors"?S0(r)?[]:WAe(r,this._c):[].concat(t),i],l=Vde(r,s[0],n),d=l.top,c=l.right,f=l.bottom,p=l.left;for(let h=1;h<s.length;h++){let m=Vde(r,s[h],n);d=$i(m.top,d),c=sl(m.right,c),f=sl(m.bottom,f),p=$i(m.left,p)}return{width:c-p,height:f-d,x:p,y:d}}function KAe(a){let{width:r,height:t}=Gde(a);return{width:r,height:t}}function YAe(a,r,t){let i=dl(r),n=bs(r),o=t==="fixed",s=kp(a,!0,o,r),l={scrollLeft:0,scrollTop:0},d=vs(0);function c(){d.x=f2(n)}if(i||!i&&!o)if((xp(r)!=="body"||Dh(n))&&(l=C0(r)),i){let m=kp(r,!0,o,r);d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}else n&&c();o&&!i&&n&&c();let f=n&&!i&&!o?jde(n,l):vs(0),p=s.left+l.scrollLeft-d.x-f.x,h=s.top+l.scrollTop-d.y-f.y;return{x:p,y:h,width:s.width,height:s.height}}function XM(a){return Co(a).position==="static"}function Ude(a,r){if(!dl(a)||Co(a).position==="fixed")return null;if(r)return r(a);let t=a.offsetParent;return bs(a)===t&&(t=t.ownerDocument.body),t}function Yde(a,r){let t=hn(a);if(S0(a))return t;if(!dl(a)){let n=ld(a);for(;n&&!wp(n);){if(So(n)&&!XM(n))return n;n=ld(n)}return t}let i=Ude(a,r);for(;i&&Hde(i)&&XM(i);)i=Ude(i,r);return i&&wp(i)&&XM(i)&&!Rh(i)?t:i||Bde(a)||t}var XAe=async function(a){let r=this.getOffsetParent||Yde,t=this.getDimensions,i=await t(a.floating);return{reference:YAe(a.reference,await r(a.floating),a.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function QAe(a){return Co(a).direction==="rtl"}var T0={convertOffsetParentRelativeRectToViewportRelativeRect:FAe,getDocumentElement:bs,getClippingRect:jAe,getOffsetParent:Yde,getElementRects:XAe,getClientRects:$Ae,getDimensions:KAe,getScale:Oh,isElement:So,isRTL:QAe};function Xde(a,r){return a.x===r.x&&a.y===r.y&&a.width===r.width&&a.height===r.height}function JAe(a,r){let t=null,i,n=bs(a);function o(){var l;clearTimeout(i),(l=t)==null||l.disconnect(),t=null}function s(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),o();let c=a.getBoundingClientRect(),{left:f,top:p,width:h,height:m}=c;if(l||r(),!h||!m)return;let v=M0(p),b=M0(n.clientWidth-(f+h)),x=M0(n.clientHeight-(p+m)),y=M0(f),M={rootMargin:-v+"px "+-b+"px "+-x+"px "+-y+"px",threshold:$i(0,sl(1,d))||1},S=!0;function T(E){let L=E[0].intersectionRatio;if(L!==d){if(!S)return s();L?s(!1,L):i=setTimeout(()=>{s(!1,1e-7)},1e3)}L===1&&!Xde(c,a.getBoundingClientRect())&&s(),S=!1}try{t=new IntersectionObserver(T,ot(he({},M),{root:n.ownerDocument}))}catch(E){t=new IntersectionObserver(T,M)}t.observe(a)}return s(!0),o}function Qde(a,r,t,i){i===void 0&&(i={});let{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,c=QM(a),f=n||o?[...c?Lh(c):[],...r?Lh(r):[]]:[];f.forEach(y=>{n&&y.addEventListener("scroll",t,{passive:!0}),o&&y.addEventListener("resize",t)});let p=c&&l?JAe(c,t):null,h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[z]=y;z&&z.target===c&&m&&r&&(m.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var M;(M=m)==null||M.observe(r)})),t()}),c&&!d&&m.observe(c),r&&m.observe(r));let v,b=d?kp(a):null;d&&x();function x(){let y=kp(a);b&&!Xde(b,y)&&t(),b=y,v=requestAnimationFrame(x)}return t(),()=>{var y;f.forEach(z=>{n&&z.removeEventListener("scroll",t),o&&z.removeEventListener("resize",t)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(v)}}var Jde=Ode;var Zde=Pde,ece=Rde,JM=Ide;var tce=Dde;var rce=(a,r,t)=>{let i=new Map,n=he({platform:T0},t),o=ot(he({},n.platform),{_c:i});return Lde(a,r,ot(he({},n),{platform:o}))};function ace(a){return ZAe(a)}function ZM(a){return a.assignedSlot?a.assignedSlot:a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}function ZAe(a){for(let r=a;r;r=ZM(r))if(r instanceof Element&&getComputedStyle(r).display==="none")return null;for(let r=ZM(a);r;r=ZM(r)){if(!(r instanceof Element))continue;let t=getComputedStyle(r);if(t.display!=="contents"&&(t.position!=="static"||Rh(t)||r.tagName==="BODY"))return r}return null}var ice=J`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(0,0,0,0.9);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function eEe(a){return a!==null&&typeof a=="object"&&"getBoundingClientRect"in a&&("contextElement"in a?a instanceof Element:!0)}var Yt=class extends X{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),i=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),o,s,l,d,c,f,p,h;n?t.top<i.top?(o=t.left,s=t.bottom,l=t.right,d=t.bottom,c=i.left,f=i.top,p=i.right,h=i.top):(o=i.left,s=i.bottom,l=i.right,d=i.bottom,c=t.left,f=t.top,p=t.right,h=t.top):t.left<i.left?(o=t.right,s=t.top,l=i.left,d=i.top,c=t.right,f=t.bottom,p=i.left,h=i.bottom):(o=i.right,s=i.top,l=t.left,d=t.top,c=i.right,f=i.bottom,p=t.left,h=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${o}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${c}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${p}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${h}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||eEe(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup=Qde(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Jde({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(JM({apply:({rects:n})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=o?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(ece({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Zde({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(JM({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(tce({element:this.arrowEl,padding:this.arrowPadding}));let i=this.strategy==="absolute"?n=>T0.getOffsetParent(n,ace):T0.getOffsetParent;rce(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:ot(he({},T0),{getOffsetParent:i})}).then(({x:n,y:o,middlewareData:s,placement:l})=>{var c;let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${o}px`}),!!((c=this.popup)!=null&&c.isConnected)&&(this.popup.showPopover(),this.arrow)){let f=s.arrow.x,p=s.arrow.y,h="",m="",v="",b;this.arrowPlacement==="start"?(h=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m="",b=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(m=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(b=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(b=typeof f=="number"?`${f}px`:"",h=typeof p=="number"?`${p}px`:""),Object.assign(this.arrowEl.style,{top:h,right:m,bottom:v,left:b,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return C`
|
|
157
|
+
`:null}`}};dt.styles=Q(kde),dt.dependencies={"zn-tooltip":gs,"zn-icon":tr},_([ce(".button")],dt.prototype,"button",2),_([I_(".loading-countdown")],dt.prototype,"countdownContainer",2),_([w({})],dt.prototype,"color",2),_([w({attribute:"hover-color"})],dt.prototype,"hoverColor",2),_([w({type:Boolean})],dt.prototype,"text",2),_([w({type:Boolean})],dt.prototype,"outline",2),_([w({type:Boolean})],dt.prototype,"disabled",2),_([w({type:Boolean})],dt.prototype,"grow",2),_([w({type:Boolean})],dt.prototype,"square",2),_([w({attribute:"icon-button",converter:{fromAttribute:t=>t==="small"||t==="round"?t:t!==null,toAttribute:t=>t==="small"||t==="round"?t:t?"":null}})],dt.prototype,"iconButton",2),_([w({type:Boolean})],dt.prototype,"plain",2),_([w({type:Boolean,attribute:"no-hover"})],dt.prototype,"noHover",2),_([w({type:Boolean,attribute:"panel-bg"})],dt.prototype,"panelBackground",2),_([w({attribute:"dropdown-closer",type:Boolean})],dt.prototype,"dropdownCloser",2),_([w({type:Number})],dt.prototype,"notification",2),_([w({attribute:"muted-notifications",type:Boolean})],dt.prototype,"mutedNotifications",2),_([w()],dt.prototype,"verticalAlign",2),_([w()],dt.prototype,"content",2),_([w()],dt.prototype,"icon",2),_([w()],dt.prototype,"gaid",2),_([w({attribute:"icon-position"})],dt.prototype,"iconPosition",2),_([w({attribute:"icon-size"})],dt.prototype,"iconSize",2),_([w({attribute:"icon-color"})],dt.prototype,"iconColor",2),_([w({attribute:"icon-fill"})],dt.prototype,"iconFill",2),_([w({attribute:"icon-library"})],dt.prototype,"iconLibrary",2),_([w()],dt.prototype,"type",2),_([w()],dt.prototype,"name",2),_([w()],dt.prototype,"value",2),_([w()],dt.prototype,"form",2),_([w({attribute:"formaction"})],dt.prototype,"formAction",2),_([w({attribute:"formenctype"})],dt.prototype,"formEnctype",2),_([w({attribute:"formmethod"})],dt.prototype,"formMethod",2),_([w({attribute:"formnovalidate",type:Boolean})],dt.prototype,"formNoValidate",2),_([w({attribute:"formtarget"})],dt.prototype,"formTarget",2),_([w()],dt.prototype,"href",2),_([w()],dt.prototype,"target",2),_([w({attribute:"data-target"})],dt.prototype,"dataTarget",2),_([w()],dt.prototype,"rel",2),_([w()],dt.prototype,"tooltip",2),_([w({type:Boolean,attribute:"auto-click"})],dt.prototype,"autoClick",2),_([w({type:Number,attribute:"auto-click-delay"})],dt.prototype,"autoClickDelay",2),_([w({type:String,attribute:"loading-text"})],dt.prototype,"loadingText",2),_([w({type:String,attribute:"loading-text-position"})],dt.prototype,"loadingTextPosition",2),_([w({type:Boolean})],dt.prototype,"loading",2),_([He("autoClick")],dt.prototype,"handleAutoClickChange",1);var ua=dt;dt.define("zn-button");var vr=class{constructor(r,{target:t,config:i,callback:n,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=r,t!==null&&this.t.add(t!=null?t:r),this.l=i,this.o=o!=null?o:this.o,this.callback=n,window.MutationObserver?(this.u=new MutationObserver(s=>{this.handleChanges(s),this.h.requestUpdate()}),r.addController(this)):console.warn("MutationController error: browser does not support MutationObserver.")}handleChanges(r){var t;this.value=(t=this.callback)==null?void 0:t.call(this,r,this.u)}hostConnected(){for(let r of this.t)this.observe(r)}hostDisconnected(){this.disconnect()}async hostUpdated(){let r=this.u.takeRecords();(r.length||!this.o&&this.i)&&this.handleChanges(r),this.i=!1}observe(r){this.t.add(r),this.u.observe(r,this.l),this.i=!0,this.h.requestUpdate()}disconnect(){this.u.disconnect()}};var Eh=class extends X{constructor(){super(),new vr(this,{config:{childList:!0,subtree:!0,attributes:!0,characterData:!0},callback:()=>this.resize(),skipInitial:!0})}firstUpdated(r){super.firstUpdated(r),this.resize()}resize(){let r=0;Array.from(this.children).forEach(t=>{r+=t.getBoundingClientRect().height}),this.style.minHeight=r+"px"}createRenderRoot(){return this}};var TAe=Eh;Eh.define("zn-absolute-container");var sl=Math.min,$i=Math.max,z0=Math.round,M0=Math.floor,vs=a=>({x:a,y:a}),AAe={left:"right",right:"left",bottom:"top",top:"bottom"};function n2(a,r,t){return $i(a,sl(r,t))}function vp(a,r){return typeof a=="function"?a(r):a}function sd(a){return a.split("-")[0]}function bp(a){return a.split("-")[1]}function jM(a){return a==="x"?"y":"x"}function o2(a){return a==="y"?"height":"width"}function ll(a){let r=a[0];return r==="t"||r==="b"?"y":"x"}function s2(a){return jM(ll(a))}function Sde(a,r,t){t===void 0&&(t=!1);let i=bp(a),n=s2(a),o=o2(n),s=n==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[o]>r.floating[o]&&(s=k0(s)),[s,k0(s)]}function Cde(a){let r=k0(a);return[i2(a),r,i2(r)]}function i2(a){return a.includes("start")?a.replace("start","end"):a.replace("end","start")}var zde=["left","right"],Mde=["right","left"],EAe=["top","bottom"],LAe=["bottom","top"];function DAe(a,r,t){switch(a){case"top":case"bottom":return t?r?Mde:zde:r?zde:Mde;case"left":case"right":return r?EAe:LAe;default:return[]}}function Tde(a,r,t,i){let n=bp(a),o=DAe(sd(a),t==="start",i);return n&&(o=o.map(s=>s+"-"+n),r&&(o=o.concat(o.map(i2)))),o}function k0(a){let r=sd(a);return AAe[r]+a.slice(r.length)}function RAe(a){return he({top:0,right:0,bottom:0,left:0},a)}function KM(a){return typeof a!="number"?RAe(a):{top:a,right:a,bottom:a,left:a}}function _p(a){let{x:r,y:t,width:i,height:n}=a;return{width:i,height:n,top:t,left:r,right:r+i,bottom:t+n,x:r,y:t}}function Ade(a,r,t){let{reference:i,floating:n}=a,o=ll(r),s=s2(r),l=o2(s),d=sd(r),c=o==="y",f=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2,h=i[l]/2-n[l]/2,m;switch(d){case"top":m={x:f,y:i.y-n.height};break;case"bottom":m={x:f,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:p};break;case"left":m={x:i.x-n.width,y:p};break;default:m={x:i.x,y:i.y}}switch(bp(r)){case"start":m[s]-=h*(t&&c?-1:1);break;case"end":m[s]+=h*(t&&c?-1:1);break}return m}async function Ede(a,r){var t;r===void 0&&(r={});let{x:i,y:n,platform:o,rects:s,elements:l,strategy:d}=a,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=vp(r,a),v=KM(m),x=l[h?p==="floating"?"reference":"floating":p],y=_p(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(x)))==null||t?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:d})),z=p==="floating"?{x:i,y:n,width:s.floating.width,height:s.floating.height}:s.reference,M=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),S=await(o.isElement==null?void 0:o.isElement(M))?await(o.getScale==null?void 0:o.getScale(M))||{x:1,y:1}:{x:1,y:1},T=_p(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:z,offsetParent:M,strategy:d}):z);return{top:(y.top-T.top+v.top)/S.y,bottom:(T.bottom-y.bottom+v.bottom)/S.y,left:(y.left-T.left+v.left)/S.x,right:(T.right-y.right+v.right)/S.x}}var OAe=50,Lde=async(a,r,t)=>{let{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:s}=t,l=s.detectOverflow?s:ot(he({},s),{detectOverflow:Ede}),d=await(s.isRTL==null?void 0:s.isRTL(r)),c=await s.getElementRects({reference:a,floating:r,strategy:n}),{x:f,y:p}=Ade(c,i,d),h=i,m=0,v={};for(let b=0;b<o.length;b++){let x=o[b];if(!x)continue;let{name:y,fn:z}=x,{x:M,y:S,data:T,reset:E}=await z({x:f,y:p,initialPlacement:i,placement:h,strategy:n,middlewareData:v,rects:c,platform:l,elements:{reference:a,floating:r}});f=M!=null?M:f,p=S!=null?S:p,v[y]=he(he({},v[y]),T),E&&m<OAe&&(m++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await s.getElementRects({reference:a,floating:r,strategy:n}):E.rects),{x:f,y:p}=Ade(c,h,d)),b=-1)}return{x:f,y:p,placement:h,strategy:n,middlewareData:v}},Dde=a=>({name:"arrow",options:a,async fn(r){let{x:t,y:i,placement:n,rects:o,platform:s,elements:l,middlewareData:d}=r,{element:c,padding:f=0}=vp(a,r)||{};if(c==null)return{};let p=KM(f),h={x:t,y:i},m=s2(n),v=o2(m),b=await s.getDimensions(c),x=m==="y",y=x?"top":"left",z=x?"bottom":"right",M=x?"clientHeight":"clientWidth",S=o.reference[v]+o.reference[m]-h[m]-o.floating[v],T=h[m]-o.reference[m],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),L=E?E[M]:0;(!L||!await(s.isElement==null?void 0:s.isElement(E)))&&(L=l.floating[M]||o.floating[v]);let q=S/2-T/2,H=L/2-b[v]/2-1,B=sl(p[y],H),$=sl(p[z],H),K=B,U=L-b[v]-$,te=L/2-b[v]/2+q,ne=n2(K,te,U),le=!d.arrow&&bp(n)!=null&&te!==ne&&o.reference[v]/2-(te<K?B:$)-b[v]/2<0,_e=le?te<K?te-K:te-U:0;return{[m]:h[m]+_e,data:he({[m]:ne,centerOffset:te-ne-_e},le&&{alignmentOffset:_e}),reset:le}}});var Rde=function(a){return a===void 0&&(a={}),{name:"flip",options:a,async fn(r){var t,i;let{placement:n,middlewareData:o,rects:s,initialPlacement:l,platform:d,elements:c}=r,te=vp(a,r),{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0}=te,x=lp(te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let y=sd(n),z=ll(l),M=sd(l)===l,S=await(d.isRTL==null?void 0:d.isRTL(c.floating)),T=h||(M||!b?[k0(l)]:Cde(l)),E=v!=="none";!h&&E&&T.push(...Tde(l,b,v,S));let L=[l,...T],q=await d.detectOverflow(r,x),H=[],B=((i=o.flip)==null?void 0:i.overflows)||[];if(f&&H.push(q[y]),p){let ne=Sde(n,s,S);H.push(q[ne[0]],q[ne[1]])}if(B=[...B,{placement:n,overflows:H}],!H.every(ne=>ne<=0)){var $,K;let ne=((($=o.flip)==null?void 0:$.index)||0)+1,le=L[ne];if(le&&(!(p==="alignment"?z!==ll(le):!1)||B.every(ze=>ll(ze.placement)===z?ze.overflows[0]>0:!0)))return{data:{index:ne,overflows:B},reset:{placement:le}};let _e=(K=B.filter(ye=>ye.overflows[0]<=0).sort((ye,ze)=>ye.overflows[1]-ze.overflows[1])[0])==null?void 0:K.placement;if(!_e)switch(m){case"bestFit":{var U;let ye=(U=B.filter(ze=>{if(E){let Oe=ll(ze.placement);return Oe===z||Oe==="y"}return!0}).map(ze=>[ze.placement,ze.overflows.filter(Oe=>Oe>0).reduce((Oe,$e)=>Oe+$e,0)]).sort((ze,Oe)=>ze[1]-Oe[1])[0])==null?void 0:U[0];ye&&(_e=ye);break}case"initialPlacement":_e=l;break}if(n!==_e)return{reset:{placement:_e}}}return{}}}};var PAe=new Set(["left","top"]);async function IAe(a,r){let{placement:t,platform:i,elements:n}=a,o=await(i.isRTL==null?void 0:i.isRTL(n.floating)),s=sd(t),l=bp(t),d=ll(t)==="y",c=PAe.has(s)?-1:1,f=o&&d?-1:1,p=vp(r,a),{mainAxis:h,crossAxis:m,alignmentAxis:v}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof v=="number"&&(m=l==="end"?v*-1:v),d?{x:m*f,y:h*c}:{x:h*c,y:m*f}}var Ode=function(a){return a===void 0&&(a=0),{name:"offset",options:a,async fn(r){var t,i;let{x:n,y:o,placement:s,middlewareData:l}=r,d=await IAe(r,a);return s===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:n+d.x,y:o+d.y,data:ot(he({},d),{placement:s})}}}},Pde=function(a){return a===void 0&&(a={}),{name:"shift",options:a,async fn(r){let{x:t,y:i,placement:n,platform:o}=r,y=vp(a,r),{mainAxis:s=!0,crossAxis:l=!1,limiter:d={fn:z=>{let{x:M,y:S}=z;return{x:M,y:S}}}}=y,c=lp(y,["mainAxis","crossAxis","limiter"]),f={x:t,y:i},p=await o.detectOverflow(r,c),h=ll(sd(n)),m=jM(h),v=f[m],b=f[h];if(s){let z=m==="y"?"top":"left",M=m==="y"?"bottom":"right",S=v+p[z],T=v-p[M];v=n2(S,v,T)}if(l){let z=h==="y"?"top":"left",M=h==="y"?"bottom":"right",S=b+p[z],T=b-p[M];b=n2(S,b,T)}let x=d.fn(ot(he({},r),{[m]:v,[h]:b}));return ot(he({},x),{data:{x:x.x-t,y:x.y-i,enabled:{[m]:s,[h]:l}}})}}};var Ide=function(a){return a===void 0&&(a={}),{name:"size",options:a,async fn(r){var t,i;let{placement:n,rects:o,platform:s,elements:l}=r,B=vp(a,r),{apply:d=()=>{}}=B,c=lp(B,["apply"]),f=await s.detectOverflow(r,c),p=sd(n),h=bp(n),m=ll(n)==="y",{width:v,height:b}=o.floating,x,y;p==="top"||p==="bottom"?(x=p,y=h===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,x=h==="end"?"top":"bottom");let z=b-f.top-f.bottom,M=v-f.left-f.right,S=sl(b-f[x],z),T=sl(v-f[y],M),E=!r.middlewareData.shift,L=S,q=T;if((t=r.middlewareData.shift)!=null&&t.enabled.x&&(q=M),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(L=z),E&&!h){let $=$i(f.left,0),K=$i(f.right,0),U=$i(f.top,0),te=$i(f.bottom,0);m?q=v-2*($!==0||K!==0?$+K:$i(f.left,f.right)):L=b-2*(U!==0||te!==0?U+te:$i(f.top,f.bottom))}await d(ot(he({},r),{availableWidth:q,availableHeight:L}));let H=await s.getDimensions(l.floating);return v!==H.width||b!==H.height?{reset:{rects:!0}}:{}}}};function l2(){return typeof window!="undefined"}function xp(a){return Nde(a)?(a.nodeName||"").toLowerCase():"#document"}function hn(a){var r;return(a==null||(r=a.ownerDocument)==null?void 0:r.defaultView)||window}function bs(a){var r;return(r=(Nde(a)?a.ownerDocument:a.document)||window.document)==null?void 0:r.documentElement}function Nde(a){return l2()?a instanceof Node||a instanceof hn(a).Node:!1}function So(a){return l2()?a instanceof Element||a instanceof hn(a).Element:!1}function dl(a){return l2()?a instanceof HTMLElement||a instanceof hn(a).HTMLElement:!1}function qde(a){return!l2()||typeof ShadowRoot=="undefined"?!1:a instanceof ShadowRoot||a instanceof hn(a).ShadowRoot}function Dh(a){let{overflow:r,overflowX:t,overflowY:i,display:n}=Co(a);return/auto|scroll|overlay|hidden|clip/.test(r+i+t)&&n!=="inline"&&n!=="contents"}function Hde(a){return/^(table|td|th)$/.test(xp(a))}function S0(a){try{if(a.matches(":popover-open"))return!0}catch(r){}try{return a.matches(":modal")}catch(r){return!1}}var qAe=/transform|translate|scale|rotate|perspective|filter/,NAe=/paint|layout|strict|content/,yp=a=>!!a&&a!=="none",YM;function Rh(a){let r=So(a)?Co(a):a;return yp(r.transform)||yp(r.translate)||yp(r.scale)||yp(r.rotate)||yp(r.perspective)||!d2()&&(yp(r.backdropFilter)||yp(r.filter))||qAe.test(r.willChange||"")||NAe.test(r.contain||"")}function Bde(a){let r=ld(a);for(;dl(r)&&!wp(r);){if(Rh(r))return r;if(S0(r))return null;r=ld(r)}return null}function d2(){return YM==null&&(YM=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),YM}function wp(a){return/^(html|body|#document)$/.test(xp(a))}function Co(a){return hn(a).getComputedStyle(a)}function C0(a){return So(a)?{scrollLeft:a.scrollLeft,scrollTop:a.scrollTop}:{scrollLeft:a.scrollX,scrollTop:a.scrollY}}function ld(a){if(xp(a)==="html")return a;let r=a.assignedSlot||a.parentNode||qde(a)&&a.host||bs(a);return qde(r)?r.host:r}function Fde(a){let r=ld(a);return wp(r)?a.ownerDocument?a.ownerDocument.body:a.body:dl(r)&&Dh(r)?r:Fde(r)}function Lh(a,r,t){var i;r===void 0&&(r=[]),t===void 0&&(t=!0);let n=Fde(a),o=n===((i=a.ownerDocument)==null?void 0:i.body),s=hn(n);if(o){let l=c2(s);return r.concat(s,s.visualViewport||[],Dh(n)?n:[],l&&t?Lh(l):[])}else return r.concat(n,Lh(n,[],t))}function c2(a){return a.parent&&Object.getPrototypeOf(a.parent)?a.frameElement:null}function Gde(a){let r=Co(a),t=parseFloat(r.width)||0,i=parseFloat(r.height)||0,n=dl(a),o=n?a.offsetWidth:t,s=n?a.offsetHeight:i,l=z0(t)!==o||z0(i)!==s;return l&&(t=o,i=s),{width:t,height:i,$:l}}function QM(a){return So(a)?a:a.contextElement}function Oh(a){let r=QM(a);if(!dl(r))return vs(1);let t=r.getBoundingClientRect(),{width:i,height:n,$:o}=Gde(r),s=(o?z0(t.width):t.width)/i,l=(o?z0(t.height):t.height)/n;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}var HAe=vs(0);function Wde(a){let r=hn(a);return!d2()||!r.visualViewport?HAe:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function BAe(a,r,t){return r===void 0&&(r=!1),!t||r&&t!==hn(a)?!1:r}function kp(a,r,t,i){r===void 0&&(r=!1),t===void 0&&(t=!1);let n=a.getBoundingClientRect(),o=QM(a),s=vs(1);r&&(i?So(i)&&(s=Oh(i)):s=Oh(a));let l=BAe(o,t,i)?Wde(o):vs(0),d=(n.left+l.x)/s.x,c=(n.top+l.y)/s.y,f=n.width/s.x,p=n.height/s.y;if(o){let h=hn(o),m=i&&So(i)?hn(i):i,v=h,b=c2(v);for(;b&&i&&m!==v;){let x=Oh(b),y=b.getBoundingClientRect(),z=Co(b),M=y.left+(b.clientLeft+parseFloat(z.paddingLeft))*x.x,S=y.top+(b.clientTop+parseFloat(z.paddingTop))*x.y;d*=x.x,c*=x.y,f*=x.x,p*=x.y,d+=M,c+=S,v=hn(b),b=c2(v)}}return _p({width:f,height:p,x:d,y:c})}function f2(a,r){let t=C0(a).scrollLeft;return r?r.left+t:kp(bs(a)).left+t}function jde(a,r){let t=a.getBoundingClientRect(),i=t.left+r.scrollLeft-f2(a,t),n=t.top+r.scrollTop;return{x:i,y:n}}function FAe(a){let{elements:r,rect:t,offsetParent:i,strategy:n}=a,o=n==="fixed",s=bs(i),l=r?S0(r.floating):!1;if(i===s||l&&o)return t;let d={scrollLeft:0,scrollTop:0},c=vs(1),f=vs(0),p=dl(i);if((p||!p&&!o)&&((xp(i)!=="body"||Dh(s))&&(d=C0(i)),p)){let m=kp(i);c=Oh(i),f.x=m.x+i.clientLeft,f.y=m.y+i.clientTop}let h=s&&!p&&!o?jde(s,d):vs(0);return{width:t.width*c.x,height:t.height*c.y,x:t.x*c.x-d.scrollLeft*c.x+f.x+h.x,y:t.y*c.y-d.scrollTop*c.y+f.y+h.y}}function $Ae(a){return Array.from(a.getClientRects())}function VAe(a){let r=bs(a),t=C0(a),i=a.ownerDocument.body,n=$i(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),o=$i(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight),s=-t.scrollLeft+f2(a),l=-t.scrollTop;return Co(i).direction==="rtl"&&(s+=$i(r.clientWidth,i.clientWidth)-n),{width:n,height:o,x:s,y:l}}var $de=25;function UAe(a,r){let t=hn(a),i=bs(a),n=t.visualViewport,o=i.clientWidth,s=i.clientHeight,l=0,d=0;if(n){o=n.width,s=n.height;let f=d2();(!f||f&&r==="fixed")&&(l=n.offsetLeft,d=n.offsetTop)}let c=f2(i);if(c<=0){let f=i.ownerDocument,p=f.body,h=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,v=Math.abs(i.clientWidth-p.clientWidth-m);v<=$de&&(o-=v)}else c<=$de&&(o+=c);return{width:o,height:s,x:l,y:d}}function GAe(a,r){let t=kp(a,!0,r==="fixed"),i=t.top+a.clientTop,n=t.left+a.clientLeft,o=dl(a)?Oh(a):vs(1),s=a.clientWidth*o.x,l=a.clientHeight*o.y,d=n*o.x,c=i*o.y;return{width:s,height:l,x:d,y:c}}function Vde(a,r,t){let i;if(r==="viewport")i=UAe(a,t);else if(r==="document")i=VAe(bs(a));else if(So(r))i=GAe(r,t);else{let n=Wde(a);i={x:r.x-n.x,y:r.y-n.y,width:r.width,height:r.height}}return _p(i)}function Kde(a,r){let t=ld(a);return t===r||!So(t)||wp(t)?!1:Co(t).position==="fixed"||Kde(t,r)}function WAe(a,r){let t=r.get(a);if(t)return t;let i=Lh(a,[],!1).filter(l=>So(l)&&xp(l)!=="body"),n=null,o=Co(a).position==="fixed",s=o?ld(a):a;for(;So(s)&&!wp(s);){let l=Co(s),d=Rh(s);!d&&l.position==="fixed"&&(n=null),(o?!d&&!n:!d&&l.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||Dh(s)&&!d&&Kde(a,s))?i=i.filter(f=>f!==s):n=l,s=ld(s)}return r.set(a,i),i}function jAe(a){let{element:r,boundary:t,rootBoundary:i,strategy:n}=a,s=[...t==="clippingAncestors"?S0(r)?[]:WAe(r,this._c):[].concat(t),i],l=Vde(r,s[0],n),d=l.top,c=l.right,f=l.bottom,p=l.left;for(let h=1;h<s.length;h++){let m=Vde(r,s[h],n);d=$i(m.top,d),c=sl(m.right,c),f=sl(m.bottom,f),p=$i(m.left,p)}return{width:c-p,height:f-d,x:p,y:d}}function KAe(a){let{width:r,height:t}=Gde(a);return{width:r,height:t}}function YAe(a,r,t){let i=dl(r),n=bs(r),o=t==="fixed",s=kp(a,!0,o,r),l={scrollLeft:0,scrollTop:0},d=vs(0);function c(){d.x=f2(n)}if(i||!i&&!o)if((xp(r)!=="body"||Dh(n))&&(l=C0(r)),i){let m=kp(r,!0,o,r);d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}else n&&c();o&&!i&&n&&c();let f=n&&!i&&!o?jde(n,l):vs(0),p=s.left+l.scrollLeft-d.x-f.x,h=s.top+l.scrollTop-d.y-f.y;return{x:p,y:h,width:s.width,height:s.height}}function XM(a){return Co(a).position==="static"}function Ude(a,r){if(!dl(a)||Co(a).position==="fixed")return null;if(r)return r(a);let t=a.offsetParent;return bs(a)===t&&(t=t.ownerDocument.body),t}function Yde(a,r){let t=hn(a);if(S0(a))return t;if(!dl(a)){let n=ld(a);for(;n&&!wp(n);){if(So(n)&&!XM(n))return n;n=ld(n)}return t}let i=Ude(a,r);for(;i&&Hde(i)&&XM(i);)i=Ude(i,r);return i&&wp(i)&&XM(i)&&!Rh(i)?t:i||Bde(a)||t}var XAe=async function(a){let r=this.getOffsetParent||Yde,t=this.getDimensions,i=await t(a.floating);return{reference:YAe(a.reference,await r(a.floating),a.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function QAe(a){return Co(a).direction==="rtl"}var T0={convertOffsetParentRelativeRectToViewportRelativeRect:FAe,getDocumentElement:bs,getClippingRect:jAe,getOffsetParent:Yde,getElementRects:XAe,getClientRects:$Ae,getDimensions:KAe,getScale:Oh,isElement:So,isRTL:QAe};function Xde(a,r){return a.x===r.x&&a.y===r.y&&a.width===r.width&&a.height===r.height}function JAe(a,r){let t=null,i,n=bs(a);function o(){var l;clearTimeout(i),(l=t)==null||l.disconnect(),t=null}function s(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),o();let c=a.getBoundingClientRect(),{left:f,top:p,width:h,height:m}=c;if(l||r(),!h||!m)return;let v=M0(p),b=M0(n.clientWidth-(f+h)),x=M0(n.clientHeight-(p+m)),y=M0(f),M={rootMargin:-v+"px "+-b+"px "+-x+"px "+-y+"px",threshold:$i(0,sl(1,d))||1},S=!0;function T(E){let L=E[0].intersectionRatio;if(L!==d){if(!S)return s();L?s(!1,L):i=setTimeout(()=>{s(!1,1e-7)},1e3)}L===1&&!Xde(c,a.getBoundingClientRect())&&s(),S=!1}try{t=new IntersectionObserver(T,ot(he({},M),{root:n.ownerDocument}))}catch(E){t=new IntersectionObserver(T,M)}t.observe(a)}return s(!0),o}function Qde(a,r,t,i){i===void 0&&(i={});let{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,c=QM(a),f=n||o?[...c?Lh(c):[],...r?Lh(r):[]]:[];f.forEach(y=>{n&&y.addEventListener("scroll",t,{passive:!0}),o&&y.addEventListener("resize",t)});let p=c&&l?JAe(c,t):null,h=-1,m=null;s&&(m=new ResizeObserver(y=>{let[z]=y;z&&z.target===c&&m&&r&&(m.unobserve(r),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var M;(M=m)==null||M.observe(r)})),t()}),c&&!d&&m.observe(c),r&&m.observe(r));let v,b=d?kp(a):null;d&&x();function x(){let y=kp(a);b&&!Xde(b,y)&&t(),b=y,v=requestAnimationFrame(x)}return t(),()=>{var y;f.forEach(z=>{n&&z.removeEventListener("scroll",t),o&&z.removeEventListener("resize",t)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(v)}}var Jde=Ode;var Zde=Pde,ece=Rde,JM=Ide;var tce=Dde;var rce=(a,r,t)=>{let i=new Map,n=he({platform:T0},t),o=ot(he({},n.platform),{_c:i});return Lde(a,r,ot(he({},n),{platform:o}))};function ace(a){return ZAe(a)}function ZM(a){return a.assignedSlot?a.assignedSlot:a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}function ZAe(a){for(let r=a;r;r=ZM(r))if(r instanceof Element&&getComputedStyle(r).display==="none")return null;for(let r=ZM(a);r;r=ZM(r)){if(!(r instanceof Element))continue;let t=getComputedStyle(r);if(t.display!=="contents"&&(t.position!=="static"||Rh(t)||r.tagName==="BODY"))return r}return null}var ice=J`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}:host{--arrow-color:rgb(var(--zn-color-text));--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}.popup{position:absolute;isolation:isolate;margin:0;border:0;padding:0;background:transparent;overflow:visible;max-width:var(--auto-size-available-width,none)}.popup--fixed{position:fixed}.popup:not(.popup--active){display:none}.popup__arrow{position:absolute;width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);rotate:45deg;background:var(--arrow-color);z-index:-1}.popup{}.popup-hover-bridge:not(.popup-hover-bridge--visible){display:none}.popup-hover-bridge{position:fixed;z-index:calc(var(--zn-z-index-dropdown) - 1);top:0;right:0;bottom:0;left:0;clip-path:polygon(var(--hover-bridge-top-left-x,0) var(--hover-bridge-top-left-y,0),var(--hover-bridge-top-right-x,0) var(--hover-bridge-top-right-y,0),var(--hover-bridge-bottom-right-x,0) var(--hover-bridge-bottom-right-y,0),var(--hover-bridge-bottom-left-x,0) var(--hover-bridge-bottom-left-y,0))}`;function eEe(a){return a!==null&&typeof a=="object"&&"getBoundingClientRect"in a&&("contextElement"in a?a instanceof Element:!0)}var Yt=class extends X{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="fixed";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0;this.hoverBridge=!1;this.handleAnchorHover=()=>{this.active||this.start()};this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){let t=this.anchorEl.getBoundingClientRect(),i=this.popup.getBoundingClientRect(),n=this.placement.includes("top")||this.placement.includes("bottom"),o,s,l,d,c,f,p,h;n?t.top<i.top?(o=t.left,s=t.bottom,l=t.right,d=t.bottom,c=i.left,f=i.top,p=i.right,h=i.top):(o=i.left,s=i.bottom,l=i.right,d=i.bottom,c=t.left,f=t.top,p=t.right,h=t.top):t.left<i.left?(o=t.right,s=t.top,l=i.left,d=i.top,c=t.right,f=t.bottom,p=i.left,h=i.bottom):(o=i.right,s=i.top,l=t.left,d=t.top,c=i.right,f=i.bottom,p=t.left,h=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${o}px`),this.style.setProperty("--hover-bridge-top-left-y",`${s}px`),this.style.setProperty("--hover-bridge-top-right-x",`${l}px`),this.style.setProperty("--hover-bridge-top-right-y",`${d}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${c}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${f}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${p}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${h}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.active&&this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||eEe(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&!this.active&&this.anchorEl instanceof Element&&(this.anchorEl.removeEventListener("mouseover",this.handleAnchorHover),this.anchorEl.addEventListener("mouseover",this.handleAnchorHover))}start(){this.anchorEl&&(this.cleanup=Qde(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.popup.hidePopover(),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Jde({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(JM({apply:({rects:n})=>{let o=this.sync==="width"||this.sync==="both",s=this.sync==="height"||this.sync==="both";this.popup.style.minWidth=o?`${n.reference.width}px`:"",this.popup.style.minHeight=s?`${n.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(ece({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(Zde({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(JM({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:n,availableHeight:o})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${o}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${n}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(tce({element:this.arrowEl,padding:this.arrowPadding}));let i=this.strategy==="absolute"?n=>T0.getOffsetParent(n,ace):T0.getOffsetParent;rce(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:ot(he({},T0),{getOffsetParent:i})}).then(({x:n,y:o,middlewareData:s,placement:l})=>{var c;let d={top:"bottom",right:"left",bottom:"top",left:"right"}[l.split("-")[0]];if(this.setAttribute("data-current-placement",l),Object.assign(this.popup.style,{left:`${n}px`,top:`${o}px`}),!!((c=this.popup)!=null&&c.isConnected)&&(this.popup.showPopover(),this.arrow)){let f=s.arrow.x,p=s.arrow.y,h="",m="",v="",b;this.arrowPlacement==="start"?(h=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",m="",b=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="end"?(m=typeof f=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b="",v=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""):this.arrowPlacement==="center"?(b=typeof f=="number"?"calc(50% - var(--arrow-size-diagonal))":"",h=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(b=typeof f=="number"?`${f}px`:"",h=typeof p=="number"?`${p}px`:""),Object.assign(this.arrowEl.style,{top:h,right:m,bottom:v,left:b,[d]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge())}render(){return C`
|
|
158
158
|
<slot class="anchor" name="anchor" @slotchange="${this.handleAnchorChange}"></slot>
|
|
159
159
|
|
|
160
160
|
<span
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use "../../wc";
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
|
-
--arrow-color: rgb(
|
|
4
|
+
--arrow-color: rgb(var(--zn-color-text));
|
|
5
5
|
--arrow-size: 6px;
|
|
6
6
|
--arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
|
|
7
7
|
--arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));
|
|
@@ -26,12 +26,13 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.tooltip__body {
|
|
29
|
+
@include wc.text-style("paragraph");
|
|
30
|
+
|
|
29
31
|
display: block;
|
|
30
32
|
width: max-content;
|
|
31
33
|
max-width: max-content;
|
|
32
34
|
border-radius: 5px;
|
|
33
35
|
background-color: var(--arrow-color);
|
|
34
|
-
font-size: 12px;
|
|
35
36
|
text-align: start;
|
|
36
37
|
white-space: normal;
|
|
37
38
|
color: white;
|