@pie-qti/player-elements 0.1.23 → 0.1.24

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 (66) hide show
  1. package/dist/ar-SA-BDmOol_3.js +854 -0
  2. package/dist/ar-SA-BDmOol_3.js.map +1 -0
  3. package/dist/{define-CqE08oOW.js → define-D7_K0JFy.js} +2131 -1146
  4. package/dist/define-D7_K0JFy.js.map +1 -0
  5. package/dist/{dist-CQEJemjs.js → dist-BRTWr852.js} +2385 -1637
  6. package/dist/dist-BRTWr852.js.map +1 -0
  7. package/dist/{dist-DQ_jFQFX.js → dist-BaQdJU08.js} +192 -121
  8. package/dist/dist-BaQdJU08.js.map +1 -0
  9. package/dist/{dist-B1Rc9Jhz.js → dist-DwvskOs6.js} +2 -2
  10. package/dist/{dist-B1Rc9Jhz.js.map → dist-DwvskOs6.js.map} +1 -1
  11. package/dist/{dist-CsEP48m1.js → dist-ffJZTPTU.js} +859 -770
  12. package/dist/dist-ffJZTPTU.js.map +1 -0
  13. package/dist/{element-DU-n15ch.js → element-DSCNeDLu.js} +2 -2
  14. package/dist/{element-DU-n15ch.js.map → element-DSCNeDLu.js.map} +1 -1
  15. package/dist/{element-class-DBV-1lkb-BeszDwN_.js → element-class-DQy2cIPM-CldZrSRR.js} +3379 -3154
  16. package/dist/element-class-DQy2cIPM-CldZrSRR.js.map +1 -0
  17. package/dist/elements/BaseSvelteMountElement.d.ts +1 -0
  18. package/dist/elements/QtiAssessmentPlayerElement.d.ts +1 -0
  19. package/dist/elements.js +3 -3
  20. package/dist/es-ES-C98YtDtb.js +802 -0
  21. package/dist/es-ES-C98YtDtb.js.map +1 -0
  22. package/dist/fr-FR-CrmmiRPf.js +802 -0
  23. package/dist/fr-FR-CrmmiRPf.js.map +1 -0
  24. package/dist/index.js +2 -2
  25. package/dist/item-toolbar-element-BW9Y_n5x.js +1990 -0
  26. package/dist/item-toolbar-element-BW9Y_n5x.js.map +1 -0
  27. package/dist/{types-BFOGFD4R.js → language-tags-DVlRltrl.js} +24 -3
  28. package/dist/language-tags-DVlRltrl.js.map +1 -0
  29. package/dist/nl-NL-BeQBX6yq.js +505 -0
  30. package/dist/nl-NL-BeQBX6yq.js.map +1 -0
  31. package/dist/nl-NL-CAR7pgVz.js +802 -0
  32. package/dist/nl-NL-CAR7pgVz.js.map +1 -0
  33. package/dist/{pie-assessment-toolkit-element-BGOTMhdG.js → pie-assessment-toolkit-element-CpiB3twr.js} +1382 -1109
  34. package/dist/pie-assessment-toolkit-element-CpiB3twr.js.map +1 -0
  35. package/dist/{pie-tool-calculator-CkQb5qxg.js → pie-tool-calculator-BiWMTJe7.js} +1159 -410
  36. package/dist/pie-tool-calculator-BiWMTJe7.js.map +1 -0
  37. package/dist/{root-Dqg3cyBt.js → provider-Y5PhmTAu.js} +4 -44
  38. package/dist/provider-Y5PhmTAu.js.map +1 -0
  39. package/dist/register-players.js +1 -1
  40. package/dist/register.js +6596 -6737
  41. package/dist/register.js.map +1 -1
  42. package/dist/{resolveItems-DhQQhD2k.js → resolveItems-D8DJkv-4.js} +2 -2
  43. package/dist/{resolveItems-DhQQhD2k.js.map → resolveItems-D8DJkv-4.js.map} +1 -1
  44. package/dist/ro-RO-DTZbhL0e.js +802 -0
  45. package/dist/ro-RO-DTZbhL0e.js.map +1 -0
  46. package/dist/root-DSkIM1v3.js +47 -0
  47. package/dist/root-DSkIM1v3.js.map +1 -0
  48. package/dist/th-TH-aqlT_oK3.js +802 -0
  49. package/dist/th-TH-aqlT_oK3.js.map +1 -0
  50. package/dist/{tool-tts-inline-CA3VjWU4.js → tool-tts-inline-B71NTBbb.js} +1706 -941
  51. package/dist/tool-tts-inline-B71NTBbb.js.map +1 -0
  52. package/dist/zh-CN-DCqaRRhU.js +802 -0
  53. package/dist/zh-CN-DCqaRRhU.js.map +1 -0
  54. package/package.json +7 -7
  55. package/dist/define-CqE08oOW.js.map +0 -1
  56. package/dist/dist-CQEJemjs.js.map +0 -1
  57. package/dist/dist-CsEP48m1.js.map +0 -1
  58. package/dist/dist-DQ_jFQFX.js.map +0 -1
  59. package/dist/element-class-DBV-1lkb-BeszDwN_.js.map +0 -1
  60. package/dist/item-toolbar-element-iE73NEkH.js +0 -1922
  61. package/dist/item-toolbar-element-iE73NEkH.js.map +0 -1
  62. package/dist/pie-assessment-toolkit-element-BGOTMhdG.js.map +0 -1
  63. package/dist/pie-tool-calculator-CkQb5qxg.js.map +0 -1
  64. package/dist/root-Dqg3cyBt.js.map +0 -1
  65. package/dist/tool-tts-inline-CA3VjWU4.js.map +0 -1
  66. package/dist/types-BFOGFD4R.js.map +0 -1
@@ -0,0 +1,1990 @@
1
+ import { t as e } from "./provider-Y5PhmTAu.js";
2
+ import { $ as t, A as n, C as r, D as i, F as a, G as o, J as s, K as c, L as l, M as u, O as ee, Q as d, R as f, S as p, T as m, U as h, V as g, W as _, X as v, Z as y, _ as te, b as ne, d as re, et as b, f as x, g as ie, h as ae, i as oe, it as se, j as S, k as C, m as w, n as ce, p as le, q as ue, r as de, t as fe, tt as T, v as E, w as D, x as O, y as pe, z as k } from "./dist-BRTWr852.js";
3
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.68/node_modules/@pie-players/pie-players-shared/dist/ui/zoom-compensation.js
4
+ var me = {
5
+ maxZoom: 2,
6
+ minCompensation: .25
7
+ };
8
+ function he(e, t) {
9
+ let n = e / t;
10
+ return Number.isFinite(n) && n > 0 ? n : 1;
11
+ }
12
+ function ge(e, t, n) {
13
+ return Math.max(n, Math.min(1, t / e));
14
+ }
15
+ //#endregion
16
+ //#region ../../node_modules/.bun/@pie-players+pie-players-shared@0.3.68/node_modules/@pie-players/pie-players-shared/dist/components/vendor/nds/nds-icon-button.js
17
+ var _e = globalThis, ve = _e.ShadowRoot && (_e.ShadyCSS === void 0 || _e.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ye = Symbol(), A = /* @__PURE__ */ new WeakMap(), be = class {
18
+ constructor(e, t, n) {
19
+ if (this._$cssResult$ = !0, n !== ye) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
20
+ this.cssText = e, this.t = t;
21
+ }
22
+ get styleSheet() {
23
+ let e = this.o, t = this.t;
24
+ if (ve && e === void 0) {
25
+ let n = t !== void 0 && t.length === 1;
26
+ n && (e = A.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && A.set(t, e));
27
+ }
28
+ return e;
29
+ }
30
+ toString() {
31
+ return this.cssText;
32
+ }
33
+ }, xe = (e) => new be(typeof e == "string" ? e : e + "", void 0, ye), Se = (e, t) => {
34
+ if (ve) e.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
35
+ else for (let n of t) {
36
+ let t = document.createElement("style"), r = _e.litNonce;
37
+ r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
38
+ }
39
+ }, Ce = ve ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
40
+ let t = "";
41
+ for (let n of e.cssRules) t += n.cssText;
42
+ return xe(t);
43
+ })(e) : e, { is: we, defineProperty: Te, getOwnPropertyDescriptor: Ee, getOwnPropertyNames: j, getOwnPropertySymbols: M, getPrototypeOf: De } = Object, Oe = globalThis, N = Oe.trustedTypes, ke = N ? N.emptyScript : "", Ae = Oe.reactiveElementPolyfillSupport, P = (e, t) => e, F = {
44
+ toAttribute(e, t) {
45
+ switch (t) {
46
+ case Boolean:
47
+ e = e ? ke : null;
48
+ break;
49
+ case Object:
50
+ case Array: e = e == null ? e : JSON.stringify(e);
51
+ }
52
+ return e;
53
+ },
54
+ fromAttribute(e, t) {
55
+ let n = e;
56
+ switch (t) {
57
+ case Boolean:
58
+ n = e !== null;
59
+ break;
60
+ case Number:
61
+ n = e === null ? null : Number(e);
62
+ break;
63
+ case Object:
64
+ case Array: try {
65
+ n = JSON.parse(e);
66
+ } catch {
67
+ n = null;
68
+ }
69
+ }
70
+ return n;
71
+ }
72
+ }, je = (e, t) => !we(e, t), Me = {
73
+ attribute: !0,
74
+ type: String,
75
+ converter: F,
76
+ reflect: !1,
77
+ useDefault: !1,
78
+ hasChanged: je
79
+ };
80
+ Symbol.metadata ??= Symbol("metadata"), Oe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
81
+ var I = class extends HTMLElement {
82
+ static addInitializer(e) {
83
+ this._$Ei(), (this.l ??= []).push(e);
84
+ }
85
+ static get observedAttributes() {
86
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
87
+ }
88
+ static createProperty(e, t = Me) {
89
+ if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
90
+ let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
91
+ r !== void 0 && Te(this.prototype, e, r);
92
+ }
93
+ }
94
+ static getPropertyDescriptor(e, t, n) {
95
+ let { get: r, set: i } = Ee(this.prototype, e) ?? {
96
+ get() {
97
+ return this[t];
98
+ },
99
+ set(e) {
100
+ this[t] = e;
101
+ }
102
+ };
103
+ return {
104
+ get: r,
105
+ set(t) {
106
+ let a = r?.call(this);
107
+ i?.call(this, t), this.requestUpdate(e, a, n);
108
+ },
109
+ configurable: !0,
110
+ enumerable: !0
111
+ };
112
+ }
113
+ static getPropertyOptions(e) {
114
+ return this.elementProperties.get(e) ?? Me;
115
+ }
116
+ static _$Ei() {
117
+ if (this.hasOwnProperty(P("elementProperties"))) return;
118
+ let e = De(this);
119
+ e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
120
+ }
121
+ static finalize() {
122
+ if (this.hasOwnProperty(P("finalized"))) return;
123
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
124
+ let e = this.properties, t = [...j(e), ...M(e)];
125
+ for (let n of t) this.createProperty(n, e[n]);
126
+ }
127
+ let e = this[Symbol.metadata];
128
+ if (e !== null) {
129
+ let t = litPropertyMetadata.get(e);
130
+ if (t !== void 0) for (let [e, n] of t) this.elementProperties.set(e, n);
131
+ }
132
+ this._$Eh = /* @__PURE__ */ new Map();
133
+ for (let [e, t] of this.elementProperties) {
134
+ let n = this._$Eu(e, t);
135
+ n !== void 0 && this._$Eh.set(n, e);
136
+ }
137
+ this.elementStyles = this.finalizeStyles(this.styles);
138
+ }
139
+ static finalizeStyles(e) {
140
+ let t = [];
141
+ if (Array.isArray(e)) {
142
+ let n = new Set(e.flat(1 / 0).reverse());
143
+ for (let e of n) t.unshift(Ce(e));
144
+ } else e !== void 0 && t.push(Ce(e));
145
+ return t;
146
+ }
147
+ static _$Eu(e, t) {
148
+ let n = t.attribute;
149
+ return n === !1 ? void 0 : typeof n == "string" ? n : typeof e == "string" ? e.toLowerCase() : void 0;
150
+ }
151
+ constructor() {
152
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
153
+ }
154
+ _$Ev() {
155
+ this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
156
+ }
157
+ addController(e) {
158
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
159
+ }
160
+ removeController(e) {
161
+ this._$EO?.delete(e);
162
+ }
163
+ _$E_() {
164
+ let e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
165
+ for (let n of t.keys()) this.hasOwnProperty(n) && (e.set(n, this[n]), delete this[n]);
166
+ e.size > 0 && (this._$Ep = e);
167
+ }
168
+ createRenderRoot() {
169
+ let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
170
+ return Se(e, this.constructor.elementStyles), e;
171
+ }
172
+ connectedCallback() {
173
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
174
+ }
175
+ enableUpdating(e) {}
176
+ disconnectedCallback() {
177
+ this._$EO?.forEach(((e) => e.hostDisconnected?.()));
178
+ }
179
+ attributeChangedCallback(e, t, n) {
180
+ this._$AK(e, n);
181
+ }
182
+ _$ET(e, t) {
183
+ let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
184
+ if (r !== void 0 && n.reflect === !0) {
185
+ let i = (n.converter?.toAttribute === void 0 ? F : n.converter).toAttribute(t, n.type);
186
+ this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
187
+ }
188
+ }
189
+ _$AK(e, t) {
190
+ let n = this.constructor, r = n._$Eh.get(e);
191
+ if (r !== void 0 && this._$Em !== r) {
192
+ let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? F : e.converter;
193
+ this._$Em = r;
194
+ let a = i.fromAttribute(t, e.type);
195
+ this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
196
+ }
197
+ }
198
+ requestUpdate(e, t, n) {
199
+ if (e !== void 0) {
200
+ let r = this.constructor, i = this[e];
201
+ if (n ??= r.getPropertyOptions(e), !((n.hasChanged ?? je)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(r._$Eu(e, n)))) return;
202
+ this.C(e, t, n);
203
+ }
204
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
205
+ }
206
+ C(e, t, { useDefault: n, reflect: r, wrapped: i }, a) {
207
+ n && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, a ?? t ?? this[e]), i !== !0 || a !== void 0) || (this._$AL.has(e) || (this.hasUpdated || n || (t = void 0), this._$AL.set(e, t)), r === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
208
+ }
209
+ async _$EP() {
210
+ this.isUpdatePending = !0;
211
+ try {
212
+ await this._$ES;
213
+ } catch (e) {
214
+ Promise.reject(e);
215
+ }
216
+ let e = this.scheduleUpdate();
217
+ return e != null && await e, !this.isUpdatePending;
218
+ }
219
+ scheduleUpdate() {
220
+ return this.performUpdate();
221
+ }
222
+ performUpdate() {
223
+ if (!this.isUpdatePending) return;
224
+ if (!this.hasUpdated) {
225
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
226
+ for (let [e, t] of this._$Ep) this[e] = t;
227
+ this._$Ep = void 0;
228
+ }
229
+ let e = this.constructor.elementProperties;
230
+ if (e.size > 0) for (let [t, n] of e) {
231
+ let { wrapped: e } = n, r = this[t];
232
+ e !== !0 || this._$AL.has(t) || r === void 0 || this.C(t, void 0, n, r);
233
+ }
234
+ }
235
+ let e = !1, t = this._$AL;
236
+ try {
237
+ e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach(((e) => e.hostUpdate?.())), this.update(t)) : this._$EM();
238
+ } catch (t) {
239
+ throw e = !1, this._$EM(), t;
240
+ }
241
+ e && this._$AE(t);
242
+ }
243
+ willUpdate(e) {}
244
+ _$AE(e) {
245
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
246
+ }
247
+ _$EM() {
248
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
249
+ }
250
+ get updateComplete() {
251
+ return this.getUpdateComplete();
252
+ }
253
+ getUpdateComplete() {
254
+ return this._$ES;
255
+ }
256
+ shouldUpdate(e) {
257
+ return !0;
258
+ }
259
+ update(e) {
260
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
261
+ }
262
+ updated(e) {}
263
+ firstUpdated(e) {}
264
+ };
265
+ I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[P("elementProperties")] = /* @__PURE__ */ new Map(), I[P("finalized")] = /* @__PURE__ */ new Map(), Ae?.({ ReactiveElement: I }), (Oe.reactiveElementVersions ??= []).push("2.1.1");
266
+ var L = globalThis, Ne = L.trustedTypes, R = Ne ? Ne.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Pe = "$lit$", z = `lit$${Math.random().toFixed(9).slice(2)}$`, Fe = "?" + z, Ie = `<${Fe}>`, B = document, V = () => B.createComment(""), H = (e) => e === null || typeof e != "object" && typeof e != "function", U = Array.isArray, Le = (e) => U(e) || typeof e?.[Symbol.iterator] == "function", Re = "[ \n\f\r]", ze = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, W = /-->/g, Be = />/g, G = RegExp(`>|${Re}(?:([^\\s"'>=/]+)(${Re}*=${Re}*(?:[^
267
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Ve = /'/g, He = /"/g, K = /^(?:script|style|textarea|title)$/i, Ue = ((e) => (t, ...n) => ({
268
+ _$litType$: e,
269
+ strings: t,
270
+ values: n
271
+ }))(1), q = Symbol.for("lit-noChange"), J = Symbol.for("lit-nothing"), Y = /* @__PURE__ */ new WeakMap(), We = B.createTreeWalker(B, 129);
272
+ function X(e, t) {
273
+ if (!U(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
274
+ return R === void 0 ? t : R.createHTML(t);
275
+ }
276
+ var Z = (e, t) => {
277
+ let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = ze;
278
+ for (let t = 0; t < n; t++) {
279
+ let n = e[t], s, c, l = -1, u = 0;
280
+ for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === ze ? c[1] === "!--" ? o = W : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = G) : (K.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = G) : o = Be : o === G ? c[0] === ">" ? (o = i ?? ze, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? G : c[3] === "\"" ? He : Ve) : o === He || o === Ve ? o = G : o === W || o === Be ? o = ze : (o = G, i = void 0);
281
+ let ee = o === G && e[t + 1].startsWith("/>") ? " " : "";
282
+ a += o === ze ? n + Ie : l >= 0 ? (r.push(s), n.slice(0, l) + Pe + n.slice(l) + z + ee) : n + z + (l === -2 ? t : ee);
283
+ }
284
+ return [X(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
285
+ }, Ge = class e {
286
+ constructor({ strings: t, _$litType$: n }, r) {
287
+ let i;
288
+ this.parts = [];
289
+ let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = Z(t, n);
290
+ if (this.el = e.createElement(l, r), We.currentNode = this.el.content, n === 2 || n === 3) {
291
+ let e = this.el.content.firstChild;
292
+ e.replaceWith(...e.childNodes);
293
+ }
294
+ for (; (i = We.nextNode()) !== null && c.length < s;) {
295
+ if (i.nodeType === 1) {
296
+ if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(Pe)) {
297
+ let t = u[o++], n = i.getAttribute(e).split(z), r = /([.?@])?(.*)/.exec(t);
298
+ c.push({
299
+ type: 1,
300
+ index: a,
301
+ name: r[2],
302
+ strings: n,
303
+ ctor: r[1] === "." ? Xe : r[1] === "?" ? Ze : r[1] === "@" ? Qe : Ye
304
+ }), i.removeAttribute(e);
305
+ } else e.startsWith(z) && (c.push({
306
+ type: 6,
307
+ index: a
308
+ }), i.removeAttribute(e));
309
+ if (K.test(i.tagName)) {
310
+ let e = i.textContent.split(z), t = e.length - 1;
311
+ if (t > 0) {
312
+ i.textContent = Ne ? Ne.emptyScript : "";
313
+ for (let n = 0; n < t; n++) i.append(e[n], V()), We.nextNode(), c.push({
314
+ type: 2,
315
+ index: ++a
316
+ });
317
+ i.append(e[t], V());
318
+ }
319
+ }
320
+ } else if (i.nodeType === 8) {
321
+ if (i.data === Fe) c.push({
322
+ type: 2,
323
+ index: a
324
+ });
325
+ else {
326
+ let e = -1;
327
+ for (; (e = i.data.indexOf(z, e + 1)) !== -1;) c.push({
328
+ type: 7,
329
+ index: a
330
+ }), e += z.length - 1;
331
+ }
332
+ }
333
+ a++;
334
+ }
335
+ }
336
+ static createElement(e, t) {
337
+ let n = B.createElement("template");
338
+ return n.innerHTML = e, n;
339
+ }
340
+ };
341
+ function Ke(e, t, n = e, r) {
342
+ if (t === q) return t;
343
+ let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = H(t) ? void 0 : t._$litDirective$;
344
+ return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = Ke(e, i._$AS(e, t.values), i, r)), t;
345
+ }
346
+ var qe = class {
347
+ constructor(e, t) {
348
+ this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
349
+ }
350
+ get parentNode() {
351
+ return this._$AM.parentNode;
352
+ }
353
+ get _$AU() {
354
+ return this._$AM._$AU;
355
+ }
356
+ u(e) {
357
+ let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? B).importNode(t, !0);
358
+ We.currentNode = r;
359
+ let i = We.nextNode(), a = 0, o = 0, s = n[0];
360
+ for (; s !== void 0;) {
361
+ if (a === s.index) {
362
+ let t;
363
+ s.type === 2 ? t = new Je(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new $e(i, this, e)), this._$AV.push(t), s = n[++o];
364
+ }
365
+ a !== s?.index && (i = We.nextNode(), a++);
366
+ }
367
+ return We.currentNode = B, r;
368
+ }
369
+ p(e) {
370
+ let t = 0;
371
+ for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
372
+ }
373
+ }, Je = class e {
374
+ get _$AU() {
375
+ return this._$AM?._$AU ?? this._$Cv;
376
+ }
377
+ constructor(e, t, n, r) {
378
+ this.type = 2, this._$AH = J, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
379
+ }
380
+ get parentNode() {
381
+ let e = this._$AA.parentNode, t = this._$AM;
382
+ return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
383
+ }
384
+ get startNode() {
385
+ return this._$AA;
386
+ }
387
+ get endNode() {
388
+ return this._$AB;
389
+ }
390
+ _$AI(e, t = this) {
391
+ e = Ke(this, e, t), H(e) ? e === J || e == null || e === "" ? (this._$AH !== J && this._$AR(), this._$AH = J) : e !== this._$AH && e !== q && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Le(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
392
+ }
393
+ O(e) {
394
+ return this._$AA.parentNode.insertBefore(e, this._$AB);
395
+ }
396
+ T(e) {
397
+ this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
398
+ }
399
+ _(e) {
400
+ this._$AH !== J && H(this._$AH) ? this._$AA.nextSibling.data = e : this.T(B.createTextNode(e)), this._$AH = e;
401
+ }
402
+ $(e) {
403
+ let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = Ge.createElement(X(n.h, n.h[0]), this.options)), n);
404
+ if (this._$AH?._$AD === r) this._$AH.p(t);
405
+ else {
406
+ let e = new qe(r, this), n = e.u(this.options);
407
+ e.p(t), this.T(n), this._$AH = e;
408
+ }
409
+ }
410
+ _$AC(e) {
411
+ let t = Y.get(e.strings);
412
+ return t === void 0 && Y.set(e.strings, t = new Ge(e)), t;
413
+ }
414
+ k(t) {
415
+ U(this._$AH) || (this._$AH = [], this._$AR());
416
+ let n = this._$AH, r, i = 0;
417
+ for (let a of t) i === n.length ? n.push(r = new e(this.O(V()), this.O(V()), this, this.options)) : r = n[i], r._$AI(a), i++;
418
+ i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
419
+ }
420
+ _$AR(e = this._$AA.nextSibling, t) {
421
+ for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
422
+ let t = e.nextSibling;
423
+ e.remove(), e = t;
424
+ }
425
+ }
426
+ setConnected(e) {
427
+ this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
428
+ }
429
+ }, Ye = class {
430
+ get tagName() {
431
+ return this.element.tagName;
432
+ }
433
+ get _$AU() {
434
+ return this._$AM._$AU;
435
+ }
436
+ constructor(e, t, n, r, i) {
437
+ this.type = 1, this._$AH = J, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = J;
438
+ }
439
+ _$AI(e, t = this, n, r) {
440
+ let i = this.strings, a = !1;
441
+ if (i === void 0) e = Ke(this, e, t, 0), a = !H(e) || e !== this._$AH && e !== q, a && (this._$AH = e);
442
+ else {
443
+ let r = e, o, s;
444
+ for (e = i[0], o = 0; o < i.length - 1; o++) s = Ke(this, r[n + o], t, o), s === q && (s = this._$AH[o]), a ||= !H(s) || s !== this._$AH[o], s === J ? e = J : e !== J && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
445
+ }
446
+ a && !r && this.j(e);
447
+ }
448
+ j(e) {
449
+ e === J ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
450
+ }
451
+ }, Xe = class extends Ye {
452
+ constructor() {
453
+ super(...arguments), this.type = 3;
454
+ }
455
+ j(e) {
456
+ this.element[this.name] = e === J ? void 0 : e;
457
+ }
458
+ }, Ze = class extends Ye {
459
+ constructor() {
460
+ super(...arguments), this.type = 4;
461
+ }
462
+ j(e) {
463
+ this.element.toggleAttribute(this.name, !!e && e !== J);
464
+ }
465
+ }, Qe = class extends Ye {
466
+ constructor(e, t, n, r, i) {
467
+ super(e, t, n, r, i), this.type = 5;
468
+ }
469
+ _$AI(e, t = this) {
470
+ if ((e = Ke(this, e, t, 0) ?? J) === q) return;
471
+ let n = this._$AH, r = e === J && n !== J || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== J && (n === J || r);
472
+ r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
473
+ }
474
+ handleEvent(e) {
475
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
476
+ }
477
+ }, $e = class {
478
+ constructor(e, t, n) {
479
+ this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
480
+ }
481
+ get _$AU() {
482
+ return this._$AM._$AU;
483
+ }
484
+ _$AI(e) {
485
+ Ke(this, e);
486
+ }
487
+ }, et = L.litHtmlPolyfillSupport;
488
+ et?.(Ge, Je), (L.litHtmlVersions ??= []).push("3.3.1");
489
+ var tt = (e, t, n) => {
490
+ let r = n?.renderBefore ?? t, i = r._$litPart$;
491
+ if (i === void 0) {
492
+ let e = n?.renderBefore ?? null;
493
+ r._$litPart$ = i = new Je(t.insertBefore(V(), e), e, void 0, n ?? {});
494
+ }
495
+ return i._$AI(e), i;
496
+ }, nt = globalThis, rt = class extends I {
497
+ constructor() {
498
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
+ }
500
+ createRenderRoot() {
501
+ let e = super.createRenderRoot();
502
+ return this.renderOptions.renderBefore ??= e.firstChild, e;
503
+ }
504
+ update(e) {
505
+ let t = this.render();
506
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = tt(t, this.renderRoot, this.renderOptions);
507
+ }
508
+ connectedCallback() {
509
+ super.connectedCallback(), this._$Do?.setConnected(!0);
510
+ }
511
+ disconnectedCallback() {
512
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
+ }
514
+ render() {
515
+ return q;
516
+ }
517
+ };
518
+ rt._$litElement$ = !0, rt.finalized = !0, nt.litElementHydrateSupport?.({ LitElement: rt });
519
+ var it = nt.litElementPolyfillSupport;
520
+ it?.({ LitElement: rt }), (nt.litElementVersions ??= []).push("4.2.1");
521
+ var at = (e) => (t, n) => {
522
+ n === void 0 ? customElements.get(e) || customElements.define(e, t) : n.addInitializer((() => {
523
+ customElements.get(e) || customElements.define(e, t);
524
+ }));
525
+ }, ot = {
526
+ attribute: !0,
527
+ type: String,
528
+ converter: F,
529
+ reflect: !1,
530
+ hasChanged: je
531
+ }, st = (e = ot, t, n) => {
532
+ let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
533
+ if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
534
+ let { name: r } = n;
535
+ return {
536
+ set(n) {
537
+ let i = t.get.call(this);
538
+ t.set.call(this, n), this.requestUpdate(r, i, e);
539
+ },
540
+ init(t) {
541
+ return t !== void 0 && this.C(r, void 0, e, t), t;
542
+ }
543
+ };
544
+ }
545
+ if (r === "setter") {
546
+ let { name: r } = n;
547
+ return function(n) {
548
+ let i = this[r];
549
+ t.call(this, n), this.requestUpdate(r, i, e);
550
+ };
551
+ }
552
+ throw Error("Unsupported decorator location: " + r);
553
+ };
554
+ function ct(e) {
555
+ return (t, n) => typeof n == "object" ? st(e, t, n) : ((e, t, n) => {
556
+ let r = t.hasOwnProperty(n);
557
+ return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
558
+ })(e, t, n);
559
+ }
560
+ var lt = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, Q = (e, t, n, r) => {
561
+ for (var i = r > 1 ? void 0 : r ? ut(t, n) : t, a = e.length - 1, o; a >= 0; a--) (o = e[a]) && (i = (r ? o(t, n, i) : o(i)) || i);
562
+ return r && i && lt(t, n, i), i;
563
+ }, $ = class extends rt {
564
+ constructor() {
565
+ super(...arguments), this.variant = "primary", this.size = "default", this.type = "circle", this.state = "default", this.iconName = "home", this.disabled = !1, this.buttonAriaLabel = "Icon button";
566
+ }
567
+ createRenderRoot() {
568
+ return this;
569
+ }
570
+ connectedCallback() {
571
+ if (super.connectedCallback(), !document.querySelector("link[href*=\"Roboto\"]")) {
572
+ let e = document.createElement("link");
573
+ e.rel = "stylesheet", e.href = "https://ui.renaissance.com/fonts/Roboto/style.css", document.head.appendChild(e);
574
+ }
575
+ }
576
+ set shape(e) {
577
+ this.type = e;
578
+ }
579
+ get shape() {
580
+ return this.type;
581
+ }
582
+ get buttonClasses() {
583
+ return [
584
+ "nds-icon-button",
585
+ `nds-icon-button--${this.variant}`,
586
+ `nds-icon-button--${this.size}`,
587
+ `nds-icon-button--${this.type}`,
588
+ this.state === "default" ? "" : `nds-icon-button--${this.state}`,
589
+ this.disabled ? "nds-icon-button--disabled" : ""
590
+ ].filter(Boolean).join(" ");
591
+ }
592
+ handleClick(e) {
593
+ if (this.disabled) {
594
+ e.preventDefault(), e.stopPropagation();
595
+ return;
596
+ }
597
+ this.dispatchEvent(new CustomEvent("icon-button-click", {
598
+ bubbles: !0,
599
+ composed: !0,
600
+ detail: { originalEvent: e }
601
+ }));
602
+ }
603
+ render() {
604
+ return Ue`
605
+ <style>
606
+ nds-icon-button {
607
+ display: inline-block;
608
+ }
609
+
610
+ .nds-icon-button {
611
+ display: inline-flex;
612
+ align-items: center;
613
+ justify-content: center;
614
+ cursor: pointer;
615
+ font-family: var(--font-family-roboto, "Roboto", sans-serif);
616
+ font-weight: var(--font-weight-regular, 400);
617
+ line-height: 1;
618
+ text-decoration: none;
619
+ background: none;
620
+ position: relative;
621
+ box-sizing: border-box;
622
+ margin: 0;
623
+ padding: 0;
624
+ border: none;
625
+ transition: background-color 0.2s ease-in-out,
626
+ color 0.2s ease-in-out,
627
+ box-shadow 0.2s ease-in-out;
628
+ }
629
+
630
+ /* ── Sizes ── */
631
+ .nds-icon-button--small {
632
+ width: var(--height-32, 32px);
633
+ height: var(--height-32, 32px);
634
+ }
635
+
636
+ .nds-icon-button--medium {
637
+ width: var(--height-36, 36px);
638
+ height: var(--height-36, 36px);
639
+ }
640
+
641
+ .nds-icon-button--default {
642
+ width: var(--height-40, 40px);
643
+ height: var(--height-40, 40px);
644
+ }
645
+
646
+ .nds-icon-button--large {
647
+ width: var(--height-48, 48px);
648
+ height: var(--height-48, 48px);
649
+ }
650
+
651
+ /* ── Shapes ── */
652
+ .nds-icon-button--circle {
653
+ border-radius: var(--radius-circle, 50%);
654
+ }
655
+
656
+ .nds-icon-button--rounded {
657
+ border-radius: var(--radius-8, 8px);
658
+ }
659
+
660
+ /* ── Primary ── */
661
+ .nds-icon-button--primary {
662
+ background-color: var(--color-interactive-blue, #146eb3);
663
+ color: var(--color-primary-white, #ffffff);
664
+ }
665
+
666
+ .nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
667
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
668
+ }
669
+
670
+ .nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
671
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
672
+ }
673
+
674
+ /* ── Secondary ── */
675
+ .nds-icon-button--secondary {
676
+ background-color: var(--color-primary-white, #ffffff);
677
+ color: var(--color-interactive-blue, #146eb3);
678
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
679
+ }
680
+
681
+ .nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
682
+ background-color: var(--color-interactive-blue, #146eb3);
683
+ color: var(--color-primary-white, #ffffff);
684
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
685
+ }
686
+
687
+ .nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
688
+ background-color: var(--color-interactive-blue, #146eb3);
689
+ color: var(--color-primary-white, #ffffff);
690
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
691
+ }
692
+
693
+ /* ── Tertiary ── */
694
+ .nds-icon-button--tertiary {
695
+ background-color: var(--color-new-gray, #f3f5f7);
696
+ color: var(--color-interactive-blue, #146eb3);
697
+ }
698
+
699
+ .nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
700
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
701
+ }
702
+
703
+ .nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
704
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
705
+ }
706
+
707
+ /* ── Ghost ── */
708
+ .nds-icon-button--ghost {
709
+ background-color: transparent;
710
+ color: var(--color-interactive-blue, #146eb3);
711
+ }
712
+
713
+ .nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
714
+ background-color: var(--color-new-gray, #f3f5f7);
715
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
716
+ }
717
+
718
+ .nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
719
+ background-color: var(--color-new-gray, #f3f5f7);
720
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
721
+ }
722
+
723
+ /* ── Dark (for dark backgrounds) ── */
724
+ .nds-icon-button--dark {
725
+ background-color: transparent;
726
+ color: var(--color-primary-white, #ffffff);
727
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
728
+ }
729
+
730
+ .nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
731
+ background-color: var(--color-interactive-blue, #146eb3);
732
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
733
+ }
734
+
735
+ .nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
736
+ background-color: var(--color-interactive-blue, #146eb3);
737
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
738
+ }
739
+
740
+ /* ── Disabled ── */
741
+ .nds-icon-button--disabled,
742
+ .nds-icon-button:disabled {
743
+ opacity: 0.5;
744
+ cursor: not-allowed;
745
+ }
746
+
747
+ /* ── Icon sizing ── */
748
+ .nds-icon-button__icon {
749
+ line-height: 1;
750
+ display: inline-flex;
751
+ align-items: center;
752
+ justify-content: center;
753
+ color: inherit;
754
+ }
755
+
756
+ .nds-icon-button--small .nds-icon-button__icon {
757
+ font-size: var(--nds-icon-small, 12px);
758
+ }
759
+
760
+ .nds-icon-button--medium .nds-icon-button__icon {
761
+ font-size: var(--nds-icon-medium, 14px);
762
+ }
763
+
764
+ .nds-icon-button--default .nds-icon-button__icon {
765
+ font-size: var(--nds-icon-default, 16px);
766
+ }
767
+
768
+ .nds-icon-button--large .nds-icon-button__icon {
769
+ font-size: var(--nds-icon-large, 20px);
770
+ }
771
+
772
+ /* ── Focus ── */
773
+ .nds-icon-button:focus-visible {
774
+ outline: 2px solid var(--color-focus-blue, #2b87ff);
775
+ outline-offset: 2px;
776
+ }
777
+
778
+ /* ── Reduced motion ── */
779
+ @media (prefers-reduced-motion: reduce) {
780
+ .nds-icon-button {
781
+ transition: none;
782
+ }
783
+ }
784
+ </style>
785
+ <button
786
+ type="button"
787
+ class="${this.buttonClasses}"
788
+ ?disabled="${this.disabled}"
789
+ aria-disabled="${this.disabled ? "true" : "false"}"
790
+ aria-label="${this.buttonAriaLabel}"
791
+ @click="${this.handleClick}"
792
+ >
793
+ <i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
794
+ </button>
795
+ `;
796
+ }
797
+ };
798
+ Q([ct()], $.prototype, "variant", 2), Q([ct()], $.prototype, "size", 2), Q([ct()], $.prototype, "type", 2), Q([ct()], $.prototype, "state", 2), Q([ct({ attribute: "icon-name" })], $.prototype, "iconName", 2), Q([ct({ type: Boolean })], $.prototype, "disabled", 2), Q([ct({ attribute: "button-aria-label" })], $.prototype, "buttonAriaLabel", 2), Q([ct()], $.prototype, "shape", 1), $ = Q([at("nds-icon-button")], $);
799
+ //#endregion
800
+ //#region ../../node_modules/.bun/@pie-players+pie-assessment-toolkit@0.3.68+0f70b067cf29f19a/node_modules/@pie-players/pie-assessment-toolkit/dist/components/chunks/ItemToolBar-9ymm7pd1.js
801
+ function dt(e) {
802
+ return typeof e.href == "string";
803
+ }
804
+ function ft(e) {
805
+ if (!e || typeof e != "object" || Array.isArray(e)) return !1;
806
+ let t = e;
807
+ if (typeof t.id != "string" || t.id.trim().length === 0 || typeof t.label != "string" || t.label.trim().length === 0 || t.ariaLabel !== void 0 && typeof t.ariaLabel != "string" || t.icon !== void 0 && typeof t.icon != "string" || t.tooltip !== void 0 && typeof t.tooltip != "string" || t.active !== void 0 && typeof t.active != "boolean" || t.disabled !== void 0 && typeof t.disabled != "boolean") return !1;
808
+ let n = typeof t.href == "string", r = typeof t.onClick == "function";
809
+ return n === r ? !1 : n ? !0 : r;
810
+ }
811
+ function pt(e) {
812
+ return typeof e == "string" && e.trimStart().startsWith("<svg");
813
+ }
814
+ function mt(e) {
815
+ return typeof e == "string" && e.trimStart().startsWith("http");
816
+ }
817
+ var ht = {
818
+ calculator: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v4h10V4H7Zm0 6v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z\" fill=\"currentColor\"/></svg>",
819
+ "volume-up": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M14 3.23v2.06A7.002 7.002 0 0 1 19 12a7 7 0 0 1-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77Zm-2 17.75V3L7 8H3v8h4l5 5Zm4.5-9a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12Z\" fill=\"currentColor\"/></svg>",
820
+ swatch: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 3a9 9 0 1 0 9 9c0-.55-.45-1-1-1h-2.5a1.5 1.5 0 0 1 0-3H20a1 1 0 0 0 1-1 8.99 8.99 0 0 0-9-4Zm-5.5 9A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 12Zm3-4A1.5 1.5 0 1 1 11 9.5 1.5 1.5 0 0 1 9.5 8Zm5 0A1.5 1.5 0 1 1 16 9.5 1.5 1.5 0 0 1 14.5 8Z\" fill=\"currentColor\"/></svg>",
821
+ "chart-bar": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z\" fill=\"currentColor\"/></svg>",
822
+ beaker: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z\" fill=\"currentColor\"/></svg>",
823
+ protractor: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z\" fill=\"currentColor\"/></svg>",
824
+ "bars-3": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z\" fill=\"currentColor\"/></svg>",
825
+ ruler: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z\" fill=\"currentColor\"/></svg>",
826
+ "book-open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M12 6.25a6.6 6.6 0 0 0-2.3-1.32A8.6 8.6 0 0 0 7 4.5c-.63 0-1.25.06-1.85.18-.6.12-1.19.3-1.76.54a1.5 1.5 0 0 0-.93 1.4v10.1c0 .52.26.98.68 1.24.42.26.92.28 1.35.06.36-.18.75-.31 1.18-.4.42-.09.86-.13 1.33-.13.78 0 1.53.14 2.24.42.7.28 1.35.7 1.93 1.24l.83-.75.83.75c.58-.54 1.22-.96 1.93-1.24a6.1 6.1 0 0 1 2.24-.42c.47 0 .91.04 1.33.13.43.09.82.22 1.18.4.43.22.93.2 1.35-.06.42-.26.68-.72.68-1.24V6.62c0-.6-.36-1.15-.93-1.4a9.3 9.3 0 0 0-1.76-.54A9.8 9.8 0 0 0 17 4.5a8.6 8.6 0 0 0-2.7.43A6.6 6.6 0 0 0 12 6.25Zm1 10.06V8.02c.55-.5 1.16-.88 1.84-1.13A6 6 0 0 1 17 6.5c.45 0 .89.04 1.32.11.43.08.85.19 1.26.34v9.24a8.2 8.2 0 0 0-1.28-.24A10 10 0 0 0 17 15.85c-.72 0-1.42.09-2.09.26a7.7 7.7 0 0 0-1.91.8Zm-2 0a7.7 7.7 0 0 0-1.91-.8 8.4 8.4 0 0 0-2.09-.26c-.44 0-.87.02-1.3.07-.43.05-.86.13-1.28.24V6.95c.41-.15.83-.26 1.26-.34A7.7 7.7 0 0 1 7 6.5c.76 0 1.48.13 2.16.39.68.25 1.29.63 1.84 1.13Z\" fill=\"currentColor\"/></svg>",
827
+ photo: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M4 21c-.55 0-1.02-.2-1.41-.59A1.93 1.93 0 0 1 2 19V5c0-.55.2-1.02.59-1.41A1.93 1.93 0 0 1 4 3h16c.55 0 1.02.2 1.41.59.39.39.59.86.59 1.41v14c0 .55-.2 1.02-.59 1.41-.39.39-.86.59-1.41.59H4Zm0-2h16V5H4v14Zm1.5-2.5h13l-4.1-5.47-3.4 4.47-2.5-3.25L5.5 16.5ZM8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" fill=\"currentColor\"/></svg>"
828
+ };
829
+ function gt(e) {
830
+ return ht[e] || null;
831
+ }
832
+ var _t = /* @__PURE__ */ new Set([
833
+ "assessment",
834
+ "section",
835
+ "item",
836
+ "passage",
837
+ "rubric"
838
+ ]);
839
+ function vt(e) {
840
+ return _t.has(e);
841
+ }
842
+ function yt(e, t, n) {
843
+ let r = e.trim(), i = n.trim();
844
+ if (!r || !i) throw Error("Tool instance ids require non-empty tool and scope ids");
845
+ if (!vt(t)) throw Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
846
+ return `${r}:${t}:${i}`;
847
+ }
848
+ function bt(e) {
849
+ let t = e.split(":");
850
+ if (t.length !== 3) return null;
851
+ let [n, r, i] = t;
852
+ return !n || !i || !vt(r) ? null : {
853
+ baseToolId: n,
854
+ scopeLevel: r,
855
+ scopeId: i
856
+ };
857
+ }
858
+ var xt = (e, t) => {
859
+ if (!customElements.get(e)) try {
860
+ customElements.define(e, t);
861
+ } catch (t) {
862
+ if (!(t instanceof DOMException && t.name === "NotSupportedError" || t && typeof t == "object" && t.name === "NotSupportedError") || !customElements.get(e)) throw t;
863
+ }
864
+ }, St = b("<span class=\"item-toolbar__element-host svelte-rnx3ie\"></span>"), Ct = b("<span class=\"item-toolbar__nds-button-zoom svelte-rnx3ie\"><nds-icon-button></nds-icon-button></span>", 2), wt = b("<span aria-hidden=\"true\"></span>"), Tt = b("<img class=\"item-toolbar__icon-image svelte-rnx3ie\" alt=\"\"/>"), Et = b("<i aria-hidden=\"true\"></i>"), Dt = b("<a><!></a>"), Ot = b("<button type=\"button\"><!></button>"), kt = b("<span class=\"item-toolbar__controls-host svelte-rnx3ie\"></span>"), At = b("<div></div>"), jt = b("<div><div class=\"item-toolbar__tools-row svelte-rnx3ie\"><!> <!> <!></div> <!></div>"), Mt = {
865
+ hash: "svelte-rnx3ie",
866
+ code: ".item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;\n /* Cap the gap between toolbar items (e.g. TTS play ↔ calculator) at its\n 200%-zoom size with the same factor the buttons use, so the spacing\n doesn't keep growing past 200% while the buttons themselves freeze. */gap:calc(0.5rem * var(--pie-toolbar-zoom-comp, 1));min-height:var(--pie-toolbar-tools-row-height);}\n\n /* A granted section tool must stay reachable even when there isn't room for\n every button: scroll the row rather than clipping items past the edge,\n which left them impossible to focus, tab to, or click. `min-width: 0`\n beats the flex default (`auto`, i.e. never shrink below content), which\n would otherwise keep the row at full content width and make overflow-x\n moot. Scoped to section level: an item's own toolbar hosts far fewer\n tools and, for the inline TTS tool's \"expanding row\" layout, relies on\n this row growing freely to host its reading-controls panel — capping its\n width here clips that panel instead. */.item-toolbar[data-level=\"section\"].svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {overflow-x:auto;max-width:100%;min-width:0;}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-rnx3ie {justify-content:flex-start;}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,\n .item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,\n .item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-rnx3ie {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}\n\n /* Drive the vendored NDS icon button's outer size via its own `--height-32`\n custom property so its light-DOM inner button matches the toolbar's\n md/sm/lg dimensions (32 / 44 / 40 px) without a layout shift. The glyph\n keeps the NDS-native icon size (we render size=\"small\"), so it isn't\n oversized. */\n /* Freeze the calculator's header open/close button at its 200%-zoom size\n (factor is 1 at zoom <= 200%). Zoom on this wrapper, not the host. */.item-toolbar__nds-button-zoom.svelte-rnx3ie {display:inline-flex;zoom:var(--pie-toolbar-zoom-comp, 1);}.item-toolbar.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {\n /* Host-settable button size per toolbar size (drives the NDS outer button\n via its own --height-32). */--height-32: var(--pie-calculator-button-size, 2rem);\n /* Host-settable accent for the calculator button: the NDS tertiary glyph\n colour derives from --color-interactive-blue, remapped here to a\n themeable variable. --pie-calculator-button-color is package-private, so\n nothing sets it and the default is what ships: it now resolves through\n --pie-button-color (DaisyUI base-content) instead of holding the Figma\n blue on every theme, with the literal as the no-theme last resort.\n Not --pie-primary or --pie-tertiary: both are `direct` mappings of\n DaisyUI slots chosen to pair with their own -content colour, so a glyph\n taken from either sits at 1.37:1 against the page under `pastel` and 11\n of the 35 shipped themes fall under SC 1.4.11's 3:1. */--color-interactive-blue: var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)));\n /* NDS palette bridge — keep in sync with the copies in tool-tts-inline\n and section-player SectionItemsPane (asserted by\n scripts/check-theme-tokens.mjs). The vendored button paints its fill,\n its on-accent glyph, its hover ring and its focus ring from the NDS\n design-system palette, which no PIE theme sets, so a tertiary button\n kept a #f3f5f7 pill on every page — and once the glyph followed the\n theme, a light glyph landed on that light pill. */--color-new-gray: var(--pie-background-dark, #f3f5f7);--color-primary-white: var(--pie-white, #ffffff);--color-primary-black: var(--pie-text, #000000);--color-focus-blue: var(--pie-button-focus-outline, #2b87ff);}.item-toolbar--sm.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-sm, 2.75rem);}.item-toolbar--lg.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-lg, 2.5rem);}.item-toolbar__element-host.svelte-rnx3ie {display:contents;}.item-toolbar--sm.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-rnx3ie:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-rnx3ie {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-rnx3ie:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-rnx3ie:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-rnx3ie svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-rnx3ie {width:100%;height:100%;object-fit:contain;}"
867
+ };
868
+ function Nt(n, b) {
869
+ le(b, !0), O(n, Mt);
870
+ let ae = typeof window < "u", _e = ["/_fa-pro/fontawesome.min.css", "/_fa-pro/light.min.css"], ve = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css", ye = /font.?awesome|fa-?pro/i, A = !1, be = () => {
871
+ if (!(!ae || A)) {
872
+ if (A = !0, !document.querySelector("link[href*=\"Roboto\"]")) {
873
+ let e = document.createElement("link");
874
+ e.rel = "stylesheet", e.href = "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap", document.head.appendChild(e);
875
+ }
876
+ if (!Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).some((e) => ye.test(e.href))) {
877
+ if (!document.querySelector(`link[href="${ve}"]`)) {
878
+ let e = document.createElement("link");
879
+ e.rel = "stylesheet", e.href = ve, document.head.appendChild(e);
880
+ }
881
+ for (let e of _e) {
882
+ if (document.querySelector(`link[href="${e}"]`)) continue;
883
+ let t = document.createElement("link");
884
+ t.rel = "stylesheet", t.href = e, document.head.appendChild(t);
885
+ }
886
+ }
887
+ }
888
+ }, xe = "__pieFaToolbarShadowInstalled", Se = (e) => {
889
+ let t = e.getRootNode();
890
+ if (!(t instanceof ShadowRoot)) return;
891
+ let n = t;
892
+ if (n[xe]) return;
893
+ n[xe] = !0;
894
+ let r = /* @__PURE__ */ new Set(), i = (e) => {
895
+ if (!e || r.has(e)) return;
896
+ r.add(e);
897
+ let n = document.createElement("link");
898
+ n.rel = "stylesheet", n.href = e, t.appendChild(n);
899
+ }, a = Array.from(document.querySelectorAll("link[rel=\"stylesheet\"][href]")).filter((e) => ye.test(e.href));
900
+ for (let e of a) i(e.href);
901
+ }, Ce = (e) => (be(), Se(e), {}), we = (e, t) => {
902
+ let n = t, r = () => {
903
+ let t = e.querySelector("button");
904
+ t && t.setAttribute("aria-pressed", n ? "true" : "false");
905
+ };
906
+ r();
907
+ let i = new MutationObserver(r);
908
+ return i.observe(e, {
909
+ childList: !0,
910
+ subtree: !0
911
+ }), {
912
+ update(e) {
913
+ n = e, r();
914
+ },
915
+ destroy() {
916
+ i.disconnect();
917
+ }
918
+ };
919
+ }, Te = (e) => e.faIconName || null, Ee = new k(), j = p(te({})), M = t(b, "level", 7, "item"), De = t(b, "scopeId", 7, ""), Oe = t(b, "itemId", 7, ""), N = t(b, "sectionId", 7, ""), ke = t(b, "catalogId", 7, ""), Ae = t(b, "tools", 7, ""), P = t(b, "contentKind", 7, "assessment-item"), F = t(b, "position", 7, "bottom"), je = t(b, "scopeElement", 7, null), Me = t(b, "toolRegistry", 7, null), I = t(b, "item", 7, null), L = t(b, "hostButtons", 23, () => []), Ne = t(b, "class", 7, ""), R = t(b, "size", 7, "md"), Pe = t(b, "language", 7, "en-US"), z = p(null);
920
+ function Fe() {
921
+ return typeof window > "u" ? 1 : ge(he(window.outerWidth, window.innerWidth), me.maxZoom, me.minCompensation);
922
+ }
923
+ let Ie = p(1);
924
+ T(() => {
925
+ if (typeof window > "u") return;
926
+ let e = () => {
927
+ m(Ie, Fe(), !0);
928
+ };
929
+ return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
930
+ });
931
+ let B = p(null), V = E(() => C(B)?.ndsIcons === !0), H = E(() => se(C(B))), U = p(null), Le = p(0), Re = p(0), ze = p(0);
932
+ T(() => {
933
+ if (C(z)) return s(C(z), (e) => {
934
+ m(B, e, !0);
935
+ });
936
+ }), T(() => {
937
+ if (C(z)) return u(C(z), (e) => {
938
+ m(U, e, !0);
939
+ });
940
+ }), T(() => {
941
+ let e = C(B)?.toolkitCoordinator;
942
+ if (!e || typeof e.onPolicyChange != "function") return;
943
+ let t = e.onPolicyChange(() => {
944
+ m(Re, C(Re) + 1);
945
+ });
946
+ return () => {
947
+ try {
948
+ t?.();
949
+ } catch {}
950
+ };
951
+ }), T(() => {
952
+ let e = C(B)?.toolkitCoordinator;
953
+ if (!e || typeof e.onToolContextResolverChange != "function") return;
954
+ let t = e.onToolContextResolverChange(() => {
955
+ m(ze, C(ze) + 1);
956
+ });
957
+ return () => {
958
+ try {
959
+ t?.();
960
+ } catch {}
961
+ };
962
+ });
963
+ let W = E(() => C(B)?.toolCoordinator), Be = E(() => C(B)?.ttsService), G = E(() => C(B)?.elementToolStateStore), Ve = E(() => C(B)?.assessmentId ?? ""), He = E(() => Oe() || C(U)?.itemId || ""), K = E(() => C(U)?.canonicalItemId || C(He)), Ue = E(() => N() || C(B)?.sectionId || ""), q = E(() => P() || C(U)?.contentKind || (M() === "section" ? "section" : "assessment-item")), J = E(() => M() && M() !== "item" ? M() : C(q) === "rubric-block-stimulus" ? "passage" : "item"), Y = E(() => De() ? De() : C(J) === "section" ? C(Ue) || C(B)?.sectionId || "default-section" : C(J) === "assessment" ? C(B)?.assessmentId || "default-assessment" : C(K) || C(He) || "default-item"), We = E(() => ke() || C(Y)), X = E(() => I() || C(U)?.item || null), Z = E(() => Me() || Ee), Ge = E(() => D(Ae())), Ke = E(() => C(Z).normalizeToolIds(C(Ge)).filter(Boolean)), qe = E(() => C(J) === "section" ? "section" : C(J) === "passage" || C(q) === "rubric-block-stimulus" ? "passage" : "item"), Je = E(() => {
964
+ C(Re);
965
+ let e = C(B)?.toolkitCoordinator;
966
+ return !e || typeof e.decideToolPolicy != "function" ? null : e.decideToolPolicy({
967
+ level: C(qe),
968
+ scope: {
969
+ level: C(J),
970
+ scopeId: C(Y),
971
+ assessmentId: C(B)?.assessmentId,
972
+ sectionId: C(Ue) || void 0,
973
+ itemId: C(He) || void 0,
974
+ canonicalItemId: C(K) || void 0,
975
+ contentKind: C(q)
976
+ }
977
+ });
978
+ }), Ye = E(() => {
979
+ let e = (e) => Array.from(new Set(e));
980
+ return C(Je) ? e(C(Z).normalizeToolIds(C(Je).visibleTools.map((e) => e.toolId)).filter(Boolean)) : e(C(Ke));
981
+ }), Xe = E(() => {
982
+ let e = /* @__PURE__ */ new Set();
983
+ if (!C(Je)) return e;
984
+ for (let t of C(Je).visibleTools) if (!(!t.required && !t.alwaysAvailable)) for (let n of C(Z).normalizeToolIds([t.toolId]).filter(Boolean)) e.add(n);
985
+ return e;
986
+ }), Ze = E(() => {
987
+ if (C(J) === "section" || C(J) === "assessment") return !0;
988
+ let e = C(X)?.config;
989
+ return !!(C(X) && e && typeof e == "object");
990
+ }), Qe = E(() => {
991
+ C(Re);
992
+ let e = C(B)?.toolkitCoordinator;
993
+ return !e || typeof e.getPolicyInputs != "function" ? null : e.getPolicyInputs();
994
+ }), $e = E(() => C(Qe)?.assessment ?? null), et = E(() => C(Qe)?.currentItemRef ?? null), tt = E(() => C(J) === "section" ? {
995
+ level: "section",
996
+ assessment: C($e) || {},
997
+ section: {}
998
+ } : C(J) === "assessment" ? {
999
+ level: "assessment",
1000
+ assessment: C($e) || {}
1001
+ } : !C(Ze) || !C(X) ? null : C(J) === "passage" ? {
1002
+ level: "passage",
1003
+ assessment: C($e) || {},
1004
+ itemRef: C(et) || { id: C(K) },
1005
+ passage: C(X)
1006
+ } : {
1007
+ level: "item",
1008
+ assessment: C($e) || {},
1009
+ itemRef: C(et) || { id: C(K) },
1010
+ item: C(X)
1011
+ }), nt = E(() => C(tt) ? C(tt) : {
1012
+ level: "item",
1013
+ assessment: C($e) || {},
1014
+ itemRef: C(et) || { id: C(K) },
1015
+ item: C(X) || {
1016
+ id: C(K),
1017
+ config: {}
1018
+ }
1019
+ }), rt = E(() => {
1020
+ if (C(J) !== "item" && C(J) !== "passage" || !C(Ze) || !C(X)) return [];
1021
+ let e = C(X)?.config?.models;
1022
+ return (Array.isArray(e) ? e : e && typeof e == "object" ? Object.values(e) : []).filter((e) => e && typeof e == "object" && typeof e.id == "string").map((e) => ({
1023
+ level: "element",
1024
+ assessment: C($e) || {},
1025
+ itemRef: C(et) || { id: C(K) },
1026
+ item: C(X),
1027
+ elementId: e.id
1028
+ }));
1029
+ }), it = E(() => {
1030
+ let e = C(B)?.toolkitCoordinator || null, t = (e) => bt(e) ? e : yt(e, C(J), C(Y));
1031
+ return {
1032
+ scope: {
1033
+ level: C(J),
1034
+ scopeId: C(Y),
1035
+ assessmentId: C(B)?.assessmentId,
1036
+ sectionId: C(Ue),
1037
+ itemId: C(He),
1038
+ canonicalItemId: C(K),
1039
+ contentKind: C(q)
1040
+ },
1041
+ itemId: C(Y),
1042
+ catalogId: C(We),
1043
+ language: Pe(),
1044
+ i18n: C(H),
1045
+ ui: { size: R() },
1046
+ getScopeElement: () => je() || C(U)?.scopeElement || null,
1047
+ getGlobalElementId: () => !C(G) || !C(Ve) || !C(Ue) || !C(K) ? null : C(G).getGlobalElementId(C(Ve), C(Ue), C(K), C(K)),
1048
+ toolCoordinator: C(W) || null,
1049
+ toolkitCoordinator: e,
1050
+ ttsService: C(Be) || null,
1051
+ elementToolStateStore: C(G) || null,
1052
+ toggleTool: (e) => {
1053
+ if (!C(W)) return;
1054
+ let n = t(e);
1055
+ C(W).getToolState(n) || C(W).registerTool(n, e), C(W).toggleTool(n);
1056
+ },
1057
+ isToolVisible: (e) => C(W) ? C(W).isToolVisible(t(e)) : !1,
1058
+ subscribeVisibility: C(W) ? (e) => C(W).subscribe(e) : null
1059
+ };
1060
+ }), at = E(() => {
1061
+ C(ze);
1062
+ let e = C(B)?.toolkitCoordinator;
1063
+ if (!e || typeof e.hasToolContextResolver != "function" || typeof e.resolveToolContext != "function") return {};
1064
+ let t = {};
1065
+ for (let n of C(Ye)) {
1066
+ if (!C(Z).get(n)?.supportedLevels.includes(C(J)) || !e.hasToolContextResolver(n)) continue;
1067
+ let r = e.resolveToolContext({
1068
+ toolId: n,
1069
+ context: C(nt),
1070
+ toolbarContext: C(it)
1071
+ });
1072
+ r && (t[n] = r);
1073
+ }
1074
+ return t;
1075
+ }), ot = E(() => {
1076
+ let e = C(Ye).filter((e) => {
1077
+ let t = C(Z).get(e);
1078
+ return t ? t.supportedLevels.includes(C(J)) : !1;
1079
+ }), t = Object.values(C(at)), n = new Set(t.map((e) => e.toolId)), r = new Set(t.filter((e) => e.visible).map((e) => e.toolId)), i = e.filter((e) => !n.has(e));
1080
+ if (C(J) === "section" || !C(Ze) || !C(tt) && C(rt).length === 0) return i.forEach((e) => r.add(e)), Array.from(r);
1081
+ i.filter((e) => C(Xe).has(e)).forEach((e) => r.add(e)), C(tt) && C(Z).filterVisibleInContext(i, C(tt)).forEach((e) => r.add(e.toolId));
1082
+ for (let e of C(rt)) C(Z).filterVisibleInContext(i, e).forEach((e) => r.add(e.toolId));
1083
+ return Array.from(r);
1084
+ }), st = E(() => C(Z).filterToolIdsByActivation(C(ot), "toolbar-toggle"));
1085
+ T(() => {
1086
+ if (!ae) return;
1087
+ let e = !1;
1088
+ return C(Z).ensureToolModulesLoaded(C(st)).then(() => {
1089
+ e || m(Le, C(Le) + 1);
1090
+ }).catch((e) => {
1091
+ console.error("[ItemToolBar] Failed to load one or more tool modules:", e);
1092
+ }), () => {
1093
+ e = !0;
1094
+ };
1095
+ });
1096
+ function ct() {
1097
+ return je() ? je() : C(U)?.scopeElement || null;
1098
+ }
1099
+ function lt() {
1100
+ return !C(G) || !C(Ve) || !C(Ue) || !C(K) ? null : C(G).getGlobalElementId(C(Ve), C(Ue), C(K), C(K));
1101
+ }
1102
+ let ut = E(() => {
1103
+ let e = C(B)?.toolkitCoordinator || null, t = (e) => bt(e) ? e : yt(e, C(J), C(Y));
1104
+ return {
1105
+ scope: {
1106
+ level: C(J),
1107
+ scopeId: C(Y),
1108
+ assessmentId: C(B)?.assessmentId,
1109
+ sectionId: C(Ue),
1110
+ itemId: C(He),
1111
+ canonicalItemId: C(K),
1112
+ contentKind: C(q)
1113
+ },
1114
+ itemId: C(Y),
1115
+ catalogId: C(We),
1116
+ language: Pe(),
1117
+ i18n: C(H),
1118
+ ui: { size: R() },
1119
+ getScopeElement: ct,
1120
+ getGlobalElementId: lt,
1121
+ toolCoordinator: C(W) || null,
1122
+ toolkitCoordinator: e,
1123
+ ttsService: C(Be) || null,
1124
+ elementToolStateStore: C(G) || null,
1125
+ toggleTool: (e) => {
1126
+ if (!C(W)) return;
1127
+ let n = t(e);
1128
+ C(W).getToolState(n) || C(W).registerTool(n, e), C(W).toggleTool(n);
1129
+ },
1130
+ isToolVisible: (e) => C(W) ? C(W).isToolVisible(t(e)) : !1,
1131
+ subscribeVisibility: C(W) ? (e) => C(W).subscribe(e) : null,
1132
+ getResolvedToolContext: (e) => C(at)[e] ?? null,
1133
+ getToolRenderParams: (e) => {
1134
+ let t = C(at)[e]?.params ?? null, n = Q.get(e);
1135
+ return n ? {
1136
+ ...t ?? {},
1137
+ ...n
1138
+ } : t;
1139
+ }
1140
+ };
1141
+ }), Q = /* @__PURE__ */ new Map(), $ = 0, ht = E(() => {
1142
+ if (!ae) return [];
1143
+ C(Le);
1144
+ let e = [];
1145
+ for (let t of C(st)) {
1146
+ let n = C(Z).renderForToolbar(t, C(nt), C(ut));
1147
+ n && e.push(n);
1148
+ }
1149
+ return e;
1150
+ }), _t = E(() => {
1151
+ if (!Array.isArray(L())) return [];
1152
+ let e = [];
1153
+ return L().forEach((t, n) => {
1154
+ if (ft(t)) {
1155
+ e.push(t);
1156
+ return;
1157
+ }
1158
+ console.warn(`[ItemToolBar] Ignoring invalid host button at index ${n}. Expected { id, label, href | onClick } with valid types.`);
1159
+ }), e;
1160
+ }), vt = E(() => C(ht).filter((e) => !!e.button).map((e) => {
1161
+ let t = e.button;
1162
+ return {
1163
+ id: e.toolId,
1164
+ label: t.label,
1165
+ ariaLabel: t.ariaLabel || t.label,
1166
+ icon: t.icon,
1167
+ faIconName: t.faIconName,
1168
+ tooltip: t.tooltip || t.label,
1169
+ disabled: t.disabled,
1170
+ active: C(j)[e.toolId] ?? t.active ?? !1,
1171
+ onClick: () => {
1172
+ t.onClick(), qt();
1173
+ }
1174
+ };
1175
+ })), xt = E(() => [...C(vt), ...C(_t)]), Nt = E(() => {
1176
+ let e = {};
1177
+ for (let t of C(ht)) e[t.toolId] = C(j)[t.toolId] ?? t.button?.active ?? !1;
1178
+ return e;
1179
+ }), Pt = E(() => C(ht).flatMap((e) => (e.elements || []).filter((e) => e.mount === "before-buttons").filter((e) => !!e.element).map((t, n) => ({
1180
+ key: `before-${e.toolId}-${n}`,
1181
+ toolId: e.toolId,
1182
+ entry: t
1183
+ })))), Ft = E(() => C(ht).flatMap((e) => (e.elements || []).filter((e) => e.mount === "after-buttons").filter((e) => !!e.element).map((t, n) => ({
1184
+ key: `after-${e.toolId}-${n}`,
1185
+ toolId: e.toolId,
1186
+ entry: t
1187
+ })))), It = E(() => C(ht).flatMap((e) => (e.elements || []).filter((e) => e.mount === "controls-row").filter((e) => !!e.element).map((t, n) => ({
1188
+ key: `controls-row-${e.toolId}-${n}`,
1189
+ toolId: e.toolId,
1190
+ entry: t
1191
+ })))), Lt = E(() => C(ht).flatMap((e) => (e.elements || []).map((t) => ({
1192
+ toolId: e.toolId,
1193
+ hint: t.layoutHints?.controlsRow
1194
+ })).filter((e) => !!e.hint))), Rt = E(() => C(ht).flatMap((e) => (e.elements || []).map((t) => ({
1195
+ toolId: e.toolId,
1196
+ hint: t.layoutHints?.headerOverlay
1197
+ })).filter((e) => !!e.hint))), zt = E(() => C(Lt).some((e) => e.hint?.reserveSpace === !0)), Bt = E(() => C(Lt).some((e) => e.hint?.showWhenToolActive === !0 && (C(Nt)[e.toolId] ?? !1))), Vt = E(() => F() === "left" || F() === "right"), Ht = E(() => C(Rt).some((e) => e.hint?.showWhenToolActive === !0 && (C(Nt)[e.toolId] ?? !1))), Ut = E(() => C(It).length > 0 || C(zt) || C(Bt));
1198
+ function Wt() {
1199
+ if (!C(z)) return null;
1200
+ let e = C(z).getRootNode();
1201
+ return e instanceof ShadowRoot ? e.host : null;
1202
+ }
1203
+ T(() => {
1204
+ let e = Wt();
1205
+ if (!e) return;
1206
+ let t = C(Rt).length > 0, n = C(Ht);
1207
+ return e.setAttribute("data-pie-header-overlay", t ? "true" : "false"), e.setAttribute("data-pie-header-overlay-active", n ? "true" : "false"), () => {
1208
+ e.removeAttribute("data-pie-header-overlay"), e.removeAttribute("data-pie-header-overlay-active");
1209
+ };
1210
+ }), T(() => {
1211
+ ae && C(xt).some((e) => !!Te(e)) && be();
1212
+ });
1213
+ function Gt(e) {
1214
+ return e.id in C(j) ? C(j)[e.id] === !0 : e.active === !0;
1215
+ }
1216
+ function Kt(e) {
1217
+ return gt(e);
1218
+ }
1219
+ function qt() {
1220
+ let e = {};
1221
+ for (let t of C(ht)) t.sync?.(), t.button && (e[t.toolId] = t.button.active ?? !1);
1222
+ m(j, e, !0);
1223
+ }
1224
+ T(() => {
1225
+ let e = [];
1226
+ qt();
1227
+ for (let t of C(ht)) if (t.subscribeActive) {
1228
+ let n = !1, r = t.subscribeActive((e) => {
1229
+ queueMicrotask(() => {
1230
+ n || (m(j, {
1231
+ ...C(j),
1232
+ [t.toolId]: e
1233
+ }, !0), t.sync?.());
1234
+ });
1235
+ });
1236
+ e.push(() => {
1237
+ n = !0, r();
1238
+ });
1239
+ }
1240
+ return () => {
1241
+ e.forEach((e) => e());
1242
+ };
1243
+ }), T(() => {
1244
+ let e = C(B)?.toolkitCoordinator;
1245
+ if (typeof e?.registerToolRequestTarget != "function") return;
1246
+ let t = C(qe);
1247
+ return e.registerToolRequestTarget({
1248
+ level: t,
1249
+ hostsTool: (e) => C(st).includes(e),
1250
+ open: (e, t) => {
1251
+ if (!C(W) || !C(st).includes(e)) return;
1252
+ t && Object.keys(t).length > 0 && ($ += 1, Q.set(e, {
1253
+ ...t,
1254
+ toolRequestId: $
1255
+ }));
1256
+ let n = yt(e, C(J), C(Y));
1257
+ C(W).getToolState(n) || C(W).registerTool(n, e), C(W).showTool(n), queueMicrotask(() => qt());
1258
+ }
1259
+ });
1260
+ }), T(() => {
1261
+ if (!C(ut).subscribeVisibility) return;
1262
+ let e = !1, t = C(ut).subscribeVisibility(() => {
1263
+ queueMicrotask(() => {
1264
+ e || qt();
1265
+ });
1266
+ });
1267
+ return () => {
1268
+ e = !0, t?.();
1269
+ };
1270
+ }), T(() => {
1271
+ let e = C(ut).toolkitCoordinator;
1272
+ if (typeof e?.subscribeTelemetry != "function") return;
1273
+ let t = !1, n = e.subscribeTelemetry(({ eventName: e, payload: n }) => {
1274
+ e === "pie-toolkit-tool-config-updated" && (n?.toolId && !C(st).includes(n.toolId) || queueMicrotask(() => {
1275
+ t || (m(Le, C(Le) + 1), qt());
1276
+ }));
1277
+ });
1278
+ return () => {
1279
+ t = !0, n?.();
1280
+ };
1281
+ });
1282
+ function Jt(e, t) {
1283
+ let n = null, r = (e) => {
1284
+ if (!e) return;
1285
+ let t = e.__pieToolElementUnmount;
1286
+ typeof t == "function" && t();
1287
+ }, i = (t) => {
1288
+ n !== t && (n && (r(n), n.parentNode === e && e.removeChild(n)), n = t, n && (n.parentNode && n.parentNode !== e && n.parentNode.removeChild(n), e.appendChild(n)));
1289
+ };
1290
+ return i(t), {
1291
+ update(e) {
1292
+ i(e);
1293
+ },
1294
+ destroy() {
1295
+ i(null);
1296
+ }
1297
+ };
1298
+ }
1299
+ function Yt(t, n) {
1300
+ let r = n, i = null, a = null, o = [], s = null, c = null, l = null, u = null, d = null, f = null, p = null, m = !1, h = !1, g = () => r.mounted.entry.shell?.pageTabOrder === !0, _ = () => r.mounted.entry.shell?.ndsHeaderControls === !0, v = null, y = null, te = null, ne = 0, re = 0, b = 0, x = 0, ie = 0, se = 0, S = 0, w = 0, le = null, ue = [], T = 0, E = 0, D = r.mounted.entry.shell?.initialWidth ?? 720, O = r.mounted.entry.shell?.initialHeight ?? 560, pe = null, k = null, me = !1, he = (e) => {
1301
+ if (!e) return;
1302
+ let t = e.__pieToolElementUnmount;
1303
+ typeof t == "function" && t();
1304
+ }, ge = () => {
1305
+ let e = r.mounted.entry.shell;
1306
+ return e ? {
1307
+ toolId: r.mounted.toolId,
1308
+ toolbarContext: C(ut),
1309
+ shellConfig: e
1310
+ } : null;
1311
+ }, _e = (e) => {
1312
+ let t = C(Z).get(r.mounted.toolId), n = ge();
1313
+ !t?.onHostedMount || !n || t.onHostedMount(e, n);
1314
+ }, ve = () => {
1315
+ let e = C(Z).get(r.mounted.toolId), t = ge();
1316
+ !e?.onHostedResize || !t || e.onHostedResize({
1317
+ width: D,
1318
+ height: O
1319
+ }, r.mounted.entry.element, t);
1320
+ }, ye = () => {
1321
+ let e = C(Z).get(r.mounted.toolId), t = ge();
1322
+ !e?.onHostedUnmount || !t || e.onHostedUnmount(r.mounted.entry.element, t);
1323
+ }, A = (e, t, n) => Math.max(t, Math.min(e, n)), xe = () => {
1324
+ let e = r.mounted.entry.shell;
1325
+ return {
1326
+ minWidth: e?.minWidth ?? 320,
1327
+ minHeight: e?.minHeight ?? 240,
1328
+ maxWidth: e?.maxWidth ?? window.innerWidth,
1329
+ maxHeight: e?.maxHeight ?? window.innerHeight
1330
+ };
1331
+ }, Se = () => {
1332
+ let e = r.mounted.entry.shell?.minWidth, t = typeof e == "number" && e > 0 && D < e, n = t ? `${e}px` : "";
1333
+ v && (v.style.minWidth = n), s && (s.style.minWidth = n), c && (c.style.minWidth = n), i && (i.style.overflowX = t ? "auto" : "visible", i.style.overflowY = "visible");
1334
+ }, Ce = () => r.mounted.entry.shell?.content?.overflowY === "auto" ? "auto" : "hidden", we = () => {
1335
+ if (!s) return 0;
1336
+ let e = s.getBoundingClientRect().height;
1337
+ return e > 0 ? e : s.offsetHeight || 0;
1338
+ }, Te = () => {
1339
+ if (!c) return;
1340
+ let e = r.mounted.entry.shell;
1341
+ if (c.style.overflowX = "hidden", c.style.overflowY = Ce(), v) {
1342
+ if (e?.content?.preserveMinHeight === !0) {
1343
+ let t = we(), n = e.minHeight ?? 240, r = Math.max(0, n - t), i = Math.max(0, O - t), a = Math.max(i, r);
1344
+ v.style.height = `${a}px`, v.style.minHeight = "0", v.style.flex = `0 0 ${a}px`;
1345
+ return;
1346
+ }
1347
+ v.style.height = "100%", v.style.minHeight = "0", v.style.flex = "1 1 auto";
1348
+ }
1349
+ }, Ee = () => {
1350
+ let { minWidth: e, minHeight: t, maxWidth: n, maxHeight: r } = xe(), i = Math.min(e, window.innerWidth), a = Math.min(t, window.innerHeight);
1351
+ D = A(D, i, Math.max(i, Math.min(n, window.innerWidth))), O = A(O, a, Math.max(a, Math.min(r, window.innerHeight))), T = A(T, 0, Math.max(0, window.innerWidth - D)), E = A(E, 0, Math.max(0, window.innerHeight - O)), N(), Se(), Te(), ve();
1352
+ }, j = (e, t) => {
1353
+ T += e, E += t, Ee();
1354
+ }, M = (e, t) => {
1355
+ D += e, O += t, Ee();
1356
+ }, De = (e, t, n, r = "fa-regular") => {
1357
+ let i = document.createElement("nds-icon-button");
1358
+ if (i.setAttribute("variant", "tertiary"), i.setAttribute("size", "small"), i.setAttribute("type", "circle"), i.setAttribute("icon-name", t), i.setAttribute("button-aria-label", e), i.title = e, i.addEventListener("click", (e) => {
1359
+ e.stopPropagation(), n(), P();
1360
+ }), r !== "fa-light") {
1361
+ let e = (e) => {
1362
+ e.classList.remove("fa-light"), e.classList.add(r);
1363
+ }, t = i.querySelector("i.fa-light");
1364
+ if (t) e(t);
1365
+ else {
1366
+ let t = new MutationObserver(() => {
1367
+ let n = i.querySelector("i.fa-light");
1368
+ n && (e(n), t.disconnect());
1369
+ });
1370
+ t.observe(i, {
1371
+ childList: !0,
1372
+ subtree: !0
1373
+ });
1374
+ }
1375
+ }
1376
+ return i;
1377
+ }, Oe = (e, t, n) => {
1378
+ let r = document.createElement("button");
1379
+ return r.type = "button", r.className = "pie-tool-shell__control", r.setAttribute("aria-label", e), r.title = e, r.textContent = t, r.style.border = "1px solid transparent", r.style.background = "color-mix(in srgb, var(--pie-white, #fff) 10%, transparent)", r.style.color = "inherit", r.style.cursor = "pointer", r.style.display = "inline-flex", r.style.alignItems = "center", r.style.justifyContent = "center", r.style.width = "28px", r.style.height = "28px", r.style.padding = "0", r.style.fontSize = "14px", r.style.fontWeight = "700", r.style.borderRadius = "8px", r.style.lineHeight = "1", r.onclick = (e) => {
1380
+ e.stopPropagation(), n(), P();
1381
+ }, r.onfocus = () => {
1382
+ r.style.outline = "2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))", r.style.outlineOffset = "2px";
1383
+ }, r.onblur = () => {
1384
+ r.style.outline = "none", r.style.outlineOffset = "0";
1385
+ }, r;
1386
+ }, N = () => {
1387
+ i && (i.style.left = `${T}px`, i.style.top = `${E}px`, i.style.width = `${D}px`, i.style.height = `${O}px`, i.style.display = r.active ? "flex" : "none", i.style.setProperty("--pie-tool-shell-zoom-comp", String(Fe())));
1388
+ }, ke = () => {
1389
+ l && (l.textContent = r.mounted.entry.shell?.title || r.mounted.toolId);
1390
+ for (let { el: e, key: t } of o) {
1391
+ let n = r.i18n.t(t);
1392
+ e.tagName === "NDS-ICON-BUTTON" ? e.setAttribute("button-aria-label", n) : e.setAttribute("aria-label", n), e.title &&= n;
1393
+ }
1394
+ }, Ae = () => {
1395
+ if (!c) return;
1396
+ let e = r.mounted.entry.element;
1397
+ e.style.display = "block", e.style.width = "100%", e.style.height = "100%", e.style.flex = "1 1 auto", e.style.minHeight = "0", v && v !== e && (v.parentNode === c && (he(v), c.removeChild(v)), v = null), e.parentNode && e.parentNode !== c && e.parentNode.removeChild(e), e.parentNode !== c && c.appendChild(e), v = e, Se(), Te(), _e(e);
1398
+ }, P = () => {
1399
+ C(W) && i && C(W).bringToFront(i);
1400
+ }, F = () => {
1401
+ let { innerWidth: e, innerHeight: t } = window, n = r.mounted.entry.shell, i = n?.initialAlign ?? "center", a = n?.initialMargin ?? 16, o = a + 60;
1402
+ switch (i) {
1403
+ case "top-left":
1404
+ T = a, E = o;
1405
+ break;
1406
+ case "top-right":
1407
+ T = Math.max(0, e - D - a), E = o;
1408
+ break;
1409
+ case "bottom-left":
1410
+ T = a, E = Math.max(0, t - O - o);
1411
+ break;
1412
+ case "bottom-right":
1413
+ T = Math.max(0, e - D - a), E = Math.max(0, t - O - o);
1414
+ break;
1415
+ default: T = Math.max(0, Math.round((e - D) / 2)), E = Math.max(0, Math.round((t - O) / 2));
1416
+ }
1417
+ Ee();
1418
+ }, je = () => {
1419
+ let e = k;
1420
+ e && queueMicrotask(() => {
1421
+ if (e.isConnected) try {
1422
+ e.focus();
1423
+ } catch {}
1424
+ });
1425
+ }, Me = () => {
1426
+ if (typeof document > "u") return null;
1427
+ let e = document.activeElement;
1428
+ for (; e;) {
1429
+ let t = e.shadowRoot;
1430
+ if (t && t.activeElement && t.activeElement !== e) e = t.activeElement;
1431
+ else break;
1432
+ }
1433
+ return e ?? null;
1434
+ }, I = () => {
1435
+ if (!i || pe) return;
1436
+ let e = Me();
1437
+ !k && e && !i.contains(e) && (k = e), g() && !h && (document.addEventListener("keydown", R, !0), h = !0), pe = fe(i, {
1438
+ initialFocus: d,
1439
+ onEscape: () => {
1440
+ Ie();
1441
+ },
1442
+ wrap: !g(),
1443
+ onTabExit: g() ? (e, t) => {
1444
+ if (e === "backward") {
1445
+ if (k?.isConnected) {
1446
+ t.preventDefault();
1447
+ try {
1448
+ k.focus();
1449
+ } catch {}
1450
+ }
1451
+ return;
1452
+ }
1453
+ let n = L();
1454
+ if (n) {
1455
+ t.preventDefault();
1456
+ try {
1457
+ n.focus();
1458
+ } catch {}
1459
+ }
1460
+ } : void 0
1461
+ });
1462
+ }, L = () => {
1463
+ let e = C(ut).getScopeElement?.() ?? null;
1464
+ if (!e) return null;
1465
+ let t = (e) => !!(C(z) && C(z).contains(e) || i && i.contains(e)), n = (e) => {
1466
+ if (e instanceof HTMLElement) {
1467
+ if (t(e)) return null;
1468
+ if (e.matches?.(ce) && oe(e)) return e;
1469
+ }
1470
+ let r = e.shadowRoot;
1471
+ if (r) for (let e = 0; e < r.children.length; e++) {
1472
+ let t = n(r.children[e]);
1473
+ if (t) return t;
1474
+ }
1475
+ for (let t = 0; t < e.children.length; t++) {
1476
+ let r = n(e.children[t]);
1477
+ if (r) return r;
1478
+ }
1479
+ return null;
1480
+ };
1481
+ return n(e);
1482
+ }, Ne = () => i ? de(i).filter((e) => e !== f && e !== p) : [], R = (e) => {
1483
+ if (e.key !== "Tab" || !i || !r.active) return;
1484
+ let t = Me();
1485
+ if (!t || i.contains(t)) return;
1486
+ let n = Ne();
1487
+ if (n.length !== 0) {
1488
+ if (e.shiftKey) {
1489
+ if (t !== L()) return;
1490
+ e.preventDefault();
1491
+ try {
1492
+ n[n.length - 1].focus();
1493
+ } catch {}
1494
+ return;
1495
+ }
1496
+ if (t === k) {
1497
+ e.preventDefault();
1498
+ try {
1499
+ n[0].focus();
1500
+ } catch {}
1501
+ }
1502
+ }
1503
+ }, Pe = () => {
1504
+ if (h &&= (document.removeEventListener("keydown", R, !0), !1), !pe) return;
1505
+ let e = pe;
1506
+ pe = null;
1507
+ try {
1508
+ e();
1509
+ } catch {}
1510
+ je();
1511
+ }, Ie = () => {
1512
+ C(ut).toggleTool(r.mounted.toolId), qt();
1513
+ }, B = (e) => {
1514
+ r.mounted.entry.shell?.draggable && (e.target.closest("button") || !i || (e.preventDefault(), y = e.pointerId, ne = e.clientX - T, re = e.clientY - E, i.setPointerCapture(e.pointerId), P()));
1515
+ }, H = (e) => (t) => {
1516
+ !i || !r.mounted.entry.shell?.resizable || (t.preventDefault(), t.stopPropagation(), te = t.pointerId, le = e, b = D, x = O, ie = t.clientX, se = t.clientY, S = T, w = E, i.setPointerCapture(t.pointerId), P());
1517
+ }, U = (e) => {
1518
+ if (i) {
1519
+ if (y === e.pointerId) {
1520
+ e.preventDefault();
1521
+ let t = Math.max(0, window.innerWidth - D), n = Math.max(0, window.innerHeight - O);
1522
+ T = A(e.clientX - ne, 0, t), E = A(e.clientY - re, 0, n), N();
1523
+ return;
1524
+ }
1525
+ if (te === e.pointerId) {
1526
+ e.preventDefault();
1527
+ let t = r.mounted.entry.shell, n = t?.minWidth ?? 320, i = t?.minHeight ?? 240, a = Math.min(n, window.innerWidth), o = Math.min(i, window.innerHeight), s = t?.maxWidth ?? window.innerWidth, c = t?.maxHeight ?? window.innerHeight, l = e.clientX - ie, u = e.clientY - se;
1528
+ if (le === "se") D = A(b + l, a, Math.max(a, Math.min(s, window.innerWidth - T))), O = A(x + u, o, Math.max(o, Math.min(c, window.innerHeight - E)));
1529
+ else if (le === "sw") {
1530
+ let e = S + b, t = A(b - l, a, Math.min(s, e));
1531
+ T = e - t, D = t, O = A(x + u, o, Math.max(o, Math.min(c, window.innerHeight - E)));
1532
+ } else if (le === "ne") {
1533
+ let e = w + x;
1534
+ D = A(b + l, a, Math.max(a, Math.min(s, window.innerWidth - T)));
1535
+ let t = A(x - u, o, Math.min(c, e));
1536
+ E = e - t, O = t;
1537
+ } else if (le === "nw") {
1538
+ let e = S + b, t = w + x, n = A(b - l, a, Math.min(s, e));
1539
+ T = e - n, D = n;
1540
+ let r = A(x - u, o, Math.min(c, t));
1541
+ E = t - r, O = r;
1542
+ }
1543
+ N(), Se(), Te(), ve();
1544
+ }
1545
+ }
1546
+ }, Le = (e) => {
1547
+ i && (y === e.pointerId && (y = null, i.releasePointerCapture(e.pointerId)), te === e.pointerId && (te = null, i.releasePointerCapture(e.pointerId)));
1548
+ }, Re = () => {
1549
+ Ee();
1550
+ };
1551
+ if (ae && r.mounted.entry.shell) {
1552
+ let t = r.mounted.entry.shell?.ndsHeaderControls === !0 && C(V);
1553
+ t && be(), i = document.createElement("div"), i.className = "pie-tool-shell", i.setAttribute("data-pie-tool-shell", r.mounted.toolId), i.style.position = "fixed", i.style.zIndex = "2000", i.style.background = "var(--pie-background, #fff)", i.style.border = "1px solid var(--pie-border-light, #d1d5db)", i.style.borderRadius = "12px", i.style.boxShadow = "0 10px 40px color-mix(in srgb, var(--pie-black, #000) 25%, transparent)", i.style.setProperty("--color-interactive-blue", "var(--pie-calculator-button-color, var(--pie-button-color, var(--pie-text, #222)))"), i.style.setProperty("--color-new-gray", "var(--pie-background-dark, #f3f5f7)"), i.style.setProperty("--color-primary-white", "var(--pie-white, #ffffff)"), i.style.setProperty("--color-primary-black", "var(--pie-text, #000000)"), i.style.setProperty("--color-focus-blue", "var(--pie-button-focus-outline, #2b87ff)"), i.style.overflow = "visible", i.style.display = r.active ? "flex" : "none", i.style.flexDirection = "column", i.style.userSelect = "none", i.style.webkitUserSelect = "none", i.style.touchAction = "none", i.setAttribute("draggable", "false"), i.addEventListener("dragstart", (e) => e.preventDefault()), s = document.createElement("div"), s.className = "pie-tool-shell__header", s.style.display = "flex", s.style.alignItems = "center", s.style.justifyContent = "space-between", s.style.gap = "6px", s.style.padding = _() ? "12px 12px 12px 28px" : "10px 12px", _() && (s.style.minHeight = "48px"), _() ? (s.style.background = "var(--pie-section-player-card-header-background, var(--pie-button-active-bg, #f3f4f6))", s.style.color = "var(--pie-text, #111827)", s.style.borderBottom = "1px solid var(--pie-border-light, #e5e7eb)") : (s.style.background = "var(--pie-primary-dark, #2c3e50)", s.style.color = "var(--pie-white, #fff)"), s.style.cursor = r.mounted.entry.shell.draggable === !1 ? "default" : "move", s.style.flex = "0 0 auto", s.style.borderRadius = "12px 12px 0 0", s.style.overflow = "hidden", s.style.userSelect = "none", s.style.webkitUserSelect = "none", s.style.touchAction = "none", s.setAttribute("draggable", "false"), s.addEventListener("dragstart", (e) => e.preventDefault()), l = document.createElement("span"), l.className = "pie-tool-shell__title", l.textContent = r.mounted.entry.shell.title || r.mounted.toolId, s.appendChild(l), u = document.createElement("div"), u.className = "pie-tool-shell__controls", u.style.display = "inline-flex", u.style.alignItems = "center", u.style.gap = _() ? "6px" : "4px";
1554
+ let n = r.mounted.entry.shell, h = (e, n, i, a, s = "fa-regular") => {
1555
+ if (!u) return;
1556
+ let c = r.i18n.t(e), l = t ? De(c, i, a, s) : Oe(c, n, a);
1557
+ o.push({
1558
+ el: l,
1559
+ key: e
1560
+ }), u.appendChild(l);
1561
+ };
1562
+ if (n?.draggable !== !1 && (h("toolkit.window.moveLeftA11y", "←", "chevron-left", () => j(-24, 0)), h("toolkit.window.moveRightA11y", "→", "chevron-right", () => j(24, 0)), h("toolkit.window.moveUpA11y", "↑", "chevron-up", () => j(0, -24)), h("toolkit.window.moveDownA11y", "↓", "chevron-down", () => j(0, 24))), n?.resizable !== !1 && (h("toolkit.window.shrinkA11y", "−", "magnifying-glass-minus", () => M(-40, -40)), h("toolkit.window.growA11y", "+", "magnifying-glass-plus", () => M(40, 40))), !_()) {
1563
+ let e = Oe(r.i18n.t("toolkit.window.centerA11y"), "◎", F);
1564
+ o.push({
1565
+ el: e,
1566
+ key: "toolkit.window.centerA11y"
1567
+ }), u.appendChild(e);
1568
+ }
1569
+ let g = null;
1570
+ if (_() ? (g = document.createElement("div"), g.className = "pie-tool-shell__header-right", g.style.display = "inline-flex", g.style.alignItems = "center", g.style.gap = "6px", g.style.setProperty("zoom", "var(--pie-tool-shell-zoom-comp, 1)"), g.appendChild(u), s.appendChild(g)) : s.appendChild(u), t) d = De(r.i18n.t("toolkit.window.closeA11y"), "xmark", Ie, "fa-regular"), o.push({
1571
+ el: d,
1572
+ key: "toolkit.window.closeA11y"
1573
+ }), d.style.display = r.mounted.entry.shell.closeable === !1 ? "none" : "inline-block";
1574
+ else {
1575
+ let e = document.createElement("button");
1576
+ e.type = "button", e.className = "pie-tool-shell__close", e.setAttribute("aria-label", r.i18n.t("toolkit.window.closeA11y")), o.push({
1577
+ el: e,
1578
+ key: "toolkit.window.closeA11y"
1579
+ });
1580
+ let t = "http://www.w3.org/2000/svg", n = document.createElementNS(t, "svg");
1581
+ n.setAttribute("xmlns", t), n.setAttribute("viewBox", "0 0 16 16"), n.setAttribute("aria-hidden", "true");
1582
+ let i = document.createElementNS(t, "path");
1583
+ i.setAttribute("d", "M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5"), i.setAttribute("stroke", "currentColor"), i.setAttribute("stroke-width", "1.8"), i.setAttribute("stroke-linecap", "round"), n.appendChild(i), e.appendChild(n);
1584
+ let a = n.style;
1585
+ a.width = "16px", a.height = "16px", a.display = "block", a.flexShrink = "0", a.pointerEvents = "none";
1586
+ let s = "color-mix(in srgb, var(--pie-white, #fff) 8%, transparent)";
1587
+ e.style.border = "1px solid transparent", e.style.background = s, e.style.color = "inherit", e.style.cursor = "pointer", e.style.display = "inline-flex", e.style.alignItems = "center", e.style.justifyItems = "center", e.style.width = "28px", e.style.height = "28px", e.style.padding = "0", e.style.borderRadius = "8px", e.style.lineHeight = "0", e.style.transition = "background-color 0.15s ease, border-color 0.15s ease", e.style.display = r.mounted.entry.shell.closeable === !1 ? "none" : "inline-flex", e.onmouseenter = () => {
1588
+ e.style.background = "color-mix(in srgb, var(--pie-white, #fff) 18%, transparent)";
1589
+ }, e.onmouseleave = () => {
1590
+ e.style.background = s;
1591
+ }, e.onfocus = () => {
1592
+ e.style.outline = "2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))", e.style.outlineOffset = "2px";
1593
+ }, e.onblur = () => {
1594
+ e.style.outline = "none", e.style.outlineOffset = "0";
1595
+ }, e.onclick = Ie, d = e;
1596
+ }
1597
+ if (g ? g.appendChild(d) : s.appendChild(d), s.tabIndex = 0, s.onkeydown = (e) => {
1598
+ if (e.key === "Home") {
1599
+ e.preventDefault(), F();
1600
+ return;
1601
+ }
1602
+ let t = r.mounted.entry.shell;
1603
+ if (e.shiftKey && t?.resizable !== !1) {
1604
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") {
1605
+ e.preventDefault(), M(40, 40);
1606
+ return;
1607
+ }
1608
+ if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
1609
+ e.preventDefault(), M(-40, -40);
1610
+ return;
1611
+ }
1612
+ }
1613
+ t?.draggable !== !1 && (e.key === "ArrowLeft" ? (e.preventDefault(), j(-24, 0)) : e.key === "ArrowRight" ? (e.preventDefault(), j(24, 0)) : e.key === "ArrowUp" ? (e.preventDefault(), j(0, -24)) : e.key === "ArrowDown" && (e.preventDefault(), j(0, 24)));
1614
+ }, c = document.createElement("div"), c.className = "pie-tool-shell__content", c.style.position = "relative", c.style.width = "100%", c.style.flex = "1 1 auto", c.style.minHeight = "0", c.style.overflowX = "hidden", c.style.overflowY = Ce(), c.style.borderRadius = "0 0 12px 12px", _()) {
1615
+ let e = (e) => {
1616
+ let t = document.createElement("div");
1617
+ return t.tabIndex = 0, t.setAttribute("aria-hidden", "true"), t.setAttribute("data-pie-tool-shell-focus-guard", e), t.style.position = "absolute", t.style.width = "1px", t.style.height = "1px", t.style.padding = "0", t.style.margin = "-1px", t.style.overflow = "hidden", t.style.clipPath = "inset(50%)", t.style.whiteSpace = "nowrap", t.style.border = "0", t;
1618
+ };
1619
+ f = e("start"), p = e("end"), f.addEventListener("focus", (e) => {
1620
+ if (!m) {
1621
+ m = !0;
1622
+ try {
1623
+ if (e.stopPropagation(), k?.isConnected) try {
1624
+ k.focus();
1625
+ } catch {}
1626
+ } finally {
1627
+ queueMicrotask(() => {
1628
+ m = !1;
1629
+ });
1630
+ }
1631
+ }
1632
+ }), p.addEventListener("focus", (e) => {
1633
+ if (!m) {
1634
+ m = !0;
1635
+ try {
1636
+ e.stopPropagation();
1637
+ let t = L();
1638
+ if (t) try {
1639
+ t.focus();
1640
+ } catch {}
1641
+ } finally {
1642
+ queueMicrotask(() => {
1643
+ m = !1;
1644
+ });
1645
+ }
1646
+ }
1647
+ }), i.appendChild(f);
1648
+ }
1649
+ if (i.appendChild(s), i.appendChild(c), _() && p && i.appendChild(p), r.mounted.entry.shell.resizable !== !1) {
1650
+ let e = (e, t, n, r, a, o, s) => {
1651
+ let c = document.createElement("div");
1652
+ c.className = "pie-tool-shell__resize", c.style.position = "absolute", c.style.width = "24px", c.style.height = "24px", c.style.cursor = o, c.style.zIndex = "10", c.style.touchAction = "none", c.setAttribute("draggable", "false"), t !== null && (c.style.top = t), n !== null && (c.style.right = n), r !== null && (c.style.bottom = r), a !== null && (c.style.left = a), s !== null && (c.style.background = `linear-gradient(${s}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`);
1653
+ let l = H(e);
1654
+ c.addEventListener("pointerdown", l), i.appendChild(c), ue.push({
1655
+ el: c,
1656
+ handler: l
1657
+ });
1658
+ };
1659
+ e("se", null, "0", "0", null, "nwse-resize", null), e("nw", "0", null, null, "0", "nwse-resize", "135deg"), e("ne", "0", "0", null, null, "nesw-resize", null), e("sw", null, null, "0", "0", "nesw-resize", null);
1660
+ }
1661
+ s.addEventListener("pointerdown", B), i.addEventListener("pointermove", U), i.addEventListener("pointerup", Le), i.addEventListener("pointerdown", P), window.addEventListener("resize", Re), document.body.appendChild(i), a = new e(i, {
1662
+ context: ee,
1663
+ initialValue: r.runtime
1664
+ }), a.connect(), F(), N(), ke(), Ae(), ve(), r.active && I(), me = r.active;
1665
+ }
1666
+ return {
1667
+ update(e) {
1668
+ if (r = e, !i || !c || !l || !d) return;
1669
+ a?.setValue(r.runtime), ke();
1670
+ let t = d.tagName.toLowerCase() === "nds-icon-button" ? "inline-block" : "inline-flex";
1671
+ d.style.display = r.mounted.entry.shell?.closeable === !1 ? "none" : t, N(), Ae(), ve(), !me && r.active ? I() : me && !r.active && (Pe(), k = null), me = r.active;
1672
+ },
1673
+ destroy() {
1674
+ ye(), a?.disconnect(), a = null, o.length = 0, pe && Pe(), h &&= (document.removeEventListener("keydown", R, !0), !1);
1675
+ for (let { el: e, handler: t } of ue) e.removeEventListener("pointerdown", t);
1676
+ k = null, ue.length = 0, s && (s.removeEventListener("pointerdown", B), s.onkeydown = null), i && (i.removeEventListener("pointermove", U), i.removeEventListener("pointerup", Le), i.removeEventListener("pointerdown", P)), window.removeEventListener("resize", Re), v && c && v.parentNode === c && (he(v), c.removeChild(v)), v = null, i && i.parentElement && i.remove();
1677
+ }
1678
+ };
1679
+ }
1680
+ var Xt = {
1681
+ get level() {
1682
+ return M();
1683
+ },
1684
+ set level(e) {
1685
+ M(e), y();
1686
+ },
1687
+ get scopeId() {
1688
+ return De();
1689
+ },
1690
+ set scopeId(e) {
1691
+ De(e), y();
1692
+ },
1693
+ get itemId() {
1694
+ return Oe();
1695
+ },
1696
+ set itemId(e) {
1697
+ Oe(e), y();
1698
+ },
1699
+ get sectionId() {
1700
+ return N();
1701
+ },
1702
+ set sectionId(e) {
1703
+ N(e), y();
1704
+ },
1705
+ get catalogId() {
1706
+ return ke();
1707
+ },
1708
+ set catalogId(e) {
1709
+ ke(e), y();
1710
+ },
1711
+ get tools() {
1712
+ return Ae();
1713
+ },
1714
+ set tools(e) {
1715
+ Ae(e), y();
1716
+ },
1717
+ get contentKind() {
1718
+ return P();
1719
+ },
1720
+ set contentKind(e) {
1721
+ P(e), y();
1722
+ },
1723
+ get position() {
1724
+ return F();
1725
+ },
1726
+ set position(e) {
1727
+ F(e), y();
1728
+ },
1729
+ get scopeElement() {
1730
+ return je();
1731
+ },
1732
+ set scopeElement(e) {
1733
+ je(e), y();
1734
+ },
1735
+ get toolRegistry() {
1736
+ return Me();
1737
+ },
1738
+ set toolRegistry(e) {
1739
+ Me(e), y();
1740
+ },
1741
+ get item() {
1742
+ return I();
1743
+ },
1744
+ set item(e) {
1745
+ I(e), y();
1746
+ },
1747
+ get hostButtons() {
1748
+ return L();
1749
+ },
1750
+ set hostButtons(e) {
1751
+ L(e), y();
1752
+ },
1753
+ get class() {
1754
+ return Ne();
1755
+ },
1756
+ set class(e) {
1757
+ Ne(e), y();
1758
+ },
1759
+ get size() {
1760
+ return R();
1761
+ },
1762
+ set size(e) {
1763
+ R(e), y();
1764
+ },
1765
+ get language() {
1766
+ return Pe();
1767
+ },
1768
+ set language(e) {
1769
+ Pe(e), y();
1770
+ }
1771
+ }, Zt = _(), Qt = w(Zt), $t = (e) => {
1772
+ var t = jt();
1773
+ let n;
1774
+ var s = x(t), u = x(s);
1775
+ a(u, 17, () => C(Pt), (e) => e.key, (e, t) => {
1776
+ var n = _(), r = w(n), a = (e) => {
1777
+ var n = _(), r = w(n);
1778
+ ue(r, () => C(V), (e) => {
1779
+ var n = St();
1780
+ i(n, (e, t) => Yt?.(e, t), () => ({
1781
+ mounted: C(t),
1782
+ active: C(Nt)[C(t).toolId] ?? !1,
1783
+ runtime: C(B),
1784
+ i18n: C(H)
1785
+ })), c(e, n);
1786
+ }), c(e, n);
1787
+ }, o = (e) => {
1788
+ var n = St();
1789
+ i(n, (e, t) => Jt?.(e, t), () => C(t).entry.element), c(e, n);
1790
+ };
1791
+ d(r, (e) => {
1792
+ C(t).entry.shell ? e(a) : e(o, -1);
1793
+ }), c(e, n);
1794
+ });
1795
+ var ee = ne(u, 2);
1796
+ a(ee, 17, () => C(xt), (e) => e.id, (e, t, n, a) => {
1797
+ let s = E(() => C(V) && !dt(C(t)) ? Te(C(t)) : null);
1798
+ var u = _(), ee = w(u), p = (e) => {
1799
+ var n = Ct(), a = x(n);
1800
+ f(a, 1, "item-toolbar__nds-button svelte-rnx3ie"), r(a, "type", "circle"), r(a, "size", "small"), r(a, "variant", "tertiary"), g(() => r(a, "icon-name", C(s))), g(() => r(a, "button-aria-label", C(t).ariaLabel || C(t).label)), g(() => r(a, "title", C(t).tooltip || C(t).label)), g(() => r(a, "disabled", C(t).disabled)), i(a, (e) => Ce?.(e)), i(a, (e, t) => we?.(e, t), () => Gt(C(t))), S(n), o("click", a, function(...e) {
1801
+ C(t).onClick?.apply(this, e);
1802
+ }), c(e, n);
1803
+ }, m = (e) => {
1804
+ var n = Dt();
1805
+ let r;
1806
+ var i = x(n), a = (e) => {
1807
+ var n = _(), r = w(n), i = (e) => {
1808
+ var n = wt();
1809
+ v(n, () => re(C(t).icon), !0), S(n), c(e, n);
1810
+ }, a = E(() => pt(C(t).icon)), o = (e) => {
1811
+ var n = Tt();
1812
+ g(() => l(n, "src", C(t).icon)), c(e, n);
1813
+ }, s = E(() => mt(C(t).icon)), u = (e) => {
1814
+ let n = E(() => Kt(C(t).icon));
1815
+ var r = _(), i = w(r), a = (e) => {
1816
+ var t = wt();
1817
+ v(t, () => re(C(n)), !0), S(t), c(e, t);
1818
+ }, o = (e) => {
1819
+ var n = Et();
1820
+ g(() => f(n, 1, `icon icon-${C(t).icon}`, "svelte-rnx3ie")), c(e, n);
1821
+ };
1822
+ d(i, (e) => {
1823
+ C(n) ? e(a) : e(o, -1);
1824
+ }), c(e, r);
1825
+ };
1826
+ d(r, (e) => {
1827
+ C(a) ? e(i) : C(s) ? e(o, 1) : e(u, -1);
1828
+ }), c(e, n);
1829
+ };
1830
+ d(i, (e) => {
1831
+ C(t).icon && e(a);
1832
+ }), S(n), g((e) => {
1833
+ r = f(n, 1, "item-toolbar__button svelte-rnx3ie", null, r, e), l(n, "href", C(t).disabled ? void 0 : C(t).href), l(n, "target", C(t).target), l(n, "rel", C(t).rel), l(n, "aria-label", C(t).ariaLabel || C(t).label), l(n, "title", C(t).tooltip || C(t).label), l(n, "aria-disabled", C(t).disabled ? "true" : void 0);
1834
+ }, [() => ({ "item-toolbar__button--active": Gt(C(t)) })]), o("click", n, (e) => {
1835
+ C(t).disabled && e.preventDefault();
1836
+ }), c(e, n);
1837
+ }, h = E(() => dt(C(t))), y = (e) => {
1838
+ var n = Ot();
1839
+ let r;
1840
+ var i = x(n), a = (e) => {
1841
+ var n = _(), r = w(n), i = (e) => {
1842
+ var n = wt();
1843
+ v(n, () => re(C(t).icon), !0), S(n), c(e, n);
1844
+ }, a = E(() => pt(C(t).icon)), o = (e) => {
1845
+ var n = Tt();
1846
+ g(() => l(n, "src", C(t).icon)), c(e, n);
1847
+ }, s = E(() => mt(C(t).icon)), u = (e) => {
1848
+ let n = E(() => Kt(C(t).icon));
1849
+ var r = _(), i = w(r), a = (e) => {
1850
+ var t = wt();
1851
+ v(t, () => re(C(n)), !0), S(t), c(e, t);
1852
+ }, o = (e) => {
1853
+ var n = Et();
1854
+ g(() => f(n, 1, `icon icon-${C(t).icon}`, "svelte-rnx3ie")), c(e, n);
1855
+ };
1856
+ d(i, (e) => {
1857
+ C(n) ? e(a) : e(o, -1);
1858
+ }), c(e, r);
1859
+ };
1860
+ d(r, (e) => {
1861
+ C(a) ? e(i) : C(s) ? e(o, 1) : e(u, -1);
1862
+ }), c(e, n);
1863
+ };
1864
+ d(i, (e) => {
1865
+ C(t).icon && e(a);
1866
+ }), S(n), g((e, i) => {
1867
+ r = f(n, 1, "item-toolbar__button svelte-rnx3ie", null, r, e), l(n, "aria-label", C(t).ariaLabel || C(t).label), l(n, "aria-pressed", i), l(n, "title", C(t).tooltip || C(t).label), n.disabled = C(t).disabled;
1868
+ }, [() => ({ "item-toolbar__button--active": Gt(C(t)) }), () => Gt(C(t))]), o("click", n, function(...e) {
1869
+ C(t).onClick?.apply(this, e);
1870
+ }), c(e, n);
1871
+ };
1872
+ d(ee, (e) => {
1873
+ C(s) ? e(p) : C(h) ? e(m, 1) : e(y, -1);
1874
+ }), c(e, u);
1875
+ });
1876
+ var p = ne(ee, 2);
1877
+ a(p, 17, () => C(Ft), (e) => e.key, (e, t) => {
1878
+ var n = _(), r = w(n), a = (e) => {
1879
+ var n = _(), r = w(n);
1880
+ ue(r, () => C(V), (e) => {
1881
+ var n = St();
1882
+ i(n, (e, t) => Yt?.(e, t), () => ({
1883
+ mounted: C(t),
1884
+ active: C(Nt)[C(t).toolId] ?? !1,
1885
+ runtime: C(B),
1886
+ i18n: C(H)
1887
+ })), c(e, n);
1888
+ }), c(e, n);
1889
+ }, o = (e) => {
1890
+ var n = St();
1891
+ i(n, (e, t) => Jt?.(e, t), () => C(t).entry.element), c(e, n);
1892
+ };
1893
+ d(r, (e) => {
1894
+ C(t).entry.shell ? e(a) : e(o, -1);
1895
+ }), c(e, n);
1896
+ }), S(s);
1897
+ var y = ne(s, 2), te = (e) => {
1898
+ var t = At();
1899
+ let n;
1900
+ a(t, 21, () => C(It), (e) => e.key, (e, t) => {
1901
+ var n = _(), r = w(n), a = (e) => {
1902
+ var n = _(), r = w(n);
1903
+ ue(r, () => C(V), (e) => {
1904
+ var n = kt();
1905
+ i(n, (e, t) => Yt?.(e, t), () => ({
1906
+ mounted: C(t),
1907
+ active: C(Nt)[C(t).toolId] ?? !1,
1908
+ runtime: C(B),
1909
+ i18n: C(H)
1910
+ })), c(e, n);
1911
+ }), c(e, n);
1912
+ }, o = (e) => {
1913
+ var n = kt();
1914
+ i(n, (e, t) => Jt?.(e, t), () => C(t).entry.element), c(e, n);
1915
+ };
1916
+ d(r, (e) => {
1917
+ C(t).entry.shell ? e(a) : e(o, -1);
1918
+ }), c(e, n);
1919
+ }), S(t), g(() => n = f(t, 1, "item-toolbar__controls-row svelte-rnx3ie", null, n, {
1920
+ "item-toolbar__controls-row--reserve": C(zt),
1921
+ "item-toolbar__controls-row--active": C(Bt),
1922
+ "item-toolbar__controls-row--align-start": C(Vt)
1923
+ })), c(e, t);
1924
+ };
1925
+ d(y, (e) => {
1926
+ C(Ut) && e(te);
1927
+ }), S(t), ie(t, (e) => m(z, e), () => C(z)), g(() => {
1928
+ n = f(t, 1, `item-toolbar ${Ne() ?? ""} item-toolbar--${R() ?? ""}`, "svelte-rnx3ie", n, {
1929
+ "item-toolbar--top": F() === "top",
1930
+ "item-toolbar--right": F() === "right",
1931
+ "item-toolbar--bottom": F() === "bottom",
1932
+ "item-toolbar--left": F() === "left",
1933
+ "item-toolbar--header-overlay-active": C(Ht)
1934
+ }), l(t, "data-content-kind", C(q)), l(t, "data-level", C(J)), h(t, `--pie-toolbar-zoom-comp: ${C(Ie)};`);
1935
+ }), c(e, t);
1936
+ };
1937
+ return d(Qt, (e) => {
1938
+ ae && e($t);
1939
+ }), c(n, Zt), pe(Xt);
1940
+ }
1941
+ ae(["click"]), xt("pie-item-toolbar", n(Nt, {
1942
+ level: {
1943
+ attribute: "level",
1944
+ type: "String"
1945
+ },
1946
+ scopeId: {
1947
+ attribute: "scope-id",
1948
+ type: "String"
1949
+ },
1950
+ itemId: {
1951
+ attribute: "item-id",
1952
+ type: "String"
1953
+ },
1954
+ sectionId: {
1955
+ attribute: "section-id",
1956
+ type: "String"
1957
+ },
1958
+ catalogId: {
1959
+ attribute: "catalog-id",
1960
+ type: "String"
1961
+ },
1962
+ tools: {
1963
+ attribute: "tools",
1964
+ type: "String"
1965
+ },
1966
+ contentKind: {
1967
+ attribute: "content-kind",
1968
+ type: "String"
1969
+ },
1970
+ position: {
1971
+ attribute: "position",
1972
+ type: "String"
1973
+ },
1974
+ size: {
1975
+ attribute: "size",
1976
+ type: "String"
1977
+ },
1978
+ language: {
1979
+ attribute: "language",
1980
+ type: "String"
1981
+ },
1982
+ scopeElement: { type: "Object" },
1983
+ toolRegistry: { type: "Object" },
1984
+ item: { type: "Object" },
1985
+ hostButtons: { type: "Object" },
1986
+ class: {}
1987
+ }, [], [], { mode: "open" }));
1988
+ //#endregion
1989
+
1990
+ //# sourceMappingURL=item-toolbar-element-BW9Y_n5x.js.map