@ezeep/ezeep-js 1.0.290 → 1.0.302

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 (75) hide show
  1. package/dist/cjs/ezeep.cjs.js +1 -1
  2. package/dist/cjs/{ezp-auth_15.cjs.entry.js → ezp-auth_16.cjs.entry.js} +572 -139
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -0
  5. package/dist/collection/components/ezp-file-name/ezp-file-name.css +98 -0
  6. package/dist/collection/components/ezp-file-name/ezp-file-name.js +280 -0
  7. package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
  8. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
  9. package/dist/collection/components/ezp-input/ezp-input.css +11 -2
  10. package/dist/collection/components/ezp-input/ezp-input.js +3 -5
  11. package/dist/collection/components/ezp-label/ezp-label.js +39 -1
  12. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +45 -17
  13. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +220 -88
  14. package/dist/collection/components/ezp-printing/ezp-printing.js +1 -1
  15. package/dist/collection/components/ezp-select/ezp-select.css +9 -12
  16. package/dist/collection/components/ezp-select/ezp-select.js +1 -1
  17. package/dist/collection/components/ezp-status/ezp-status.js +2 -2
  18. package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
  19. package/dist/collection/components/ezp-text-button/ezp-text-button.css +3 -1
  20. package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
  21. package/dist/collection/components/ezp-upload/ezp-upload.css +176 -143
  22. package/dist/collection/components/ezp-upload/ezp-upload.js +56 -9
  23. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
  24. package/dist/collection/shared/storage.js +39 -9
  25. package/dist/collection/types/shared/types.d.ts +1 -0
  26. package/dist/collection/utils/printer.js +75 -1
  27. package/dist/components/auth.js +1 -1
  28. package/dist/components/ezp-file-name.d.ts +11 -0
  29. package/dist/components/ezp-file-name.js +1 -0
  30. package/dist/components/ezp-file-name2.js +1 -0
  31. package/dist/components/ezp-icon-button2.js +1 -1
  32. package/dist/components/ezp-icon2.js +1 -1
  33. package/dist/components/ezp-input2.js +1 -1
  34. package/dist/components/ezp-label2.js +1 -1
  35. package/dist/components/ezp-printer-selection2.js +1 -1
  36. package/dist/components/ezp-printing.js +1 -1
  37. package/dist/components/ezp-select2.js +1 -1
  38. package/dist/components/ezp-status2.js +1 -1
  39. package/dist/components/ezp-stepper2.js +1 -1
  40. package/dist/components/ezp-text-button2.js +1 -1
  41. package/dist/components/ezp-upload2.js +1 -1
  42. package/dist/components/ezp-user-menu2.js +1 -1
  43. package/dist/components/utils.js +1 -1
  44. package/dist/directives/proxies.ts +26 -1
  45. package/dist/esm/ezeep.js +1 -1
  46. package/dist/esm/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +572 -140
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm-es5/ezeep.js +1 -1
  49. package/dist/esm-es5/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +2 -2
  50. package/dist/esm-es5/loader.js +1 -1
  51. package/dist/ezeep/ezeep.esm.js +1 -1
  52. package/dist/ezeep/{p-6a494b7b.system.entry.js → p-636e190f.system.entry.js} +2 -2
  53. package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
  54. package/dist/ezeep/p-ff075048.entry.js +1 -0
  55. package/dist/ezeep/types/shared/types.d.ts +1 -0
  56. package/dist/types/components/ezp-file-name/ezp-file-name.d.ts +83 -0
  57. package/dist/types/components/ezp-label/ezp-label.d.ts +10 -0
  58. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +41 -1
  59. package/dist/types/components/ezp-upload/ezp-upload.d.ts +8 -1
  60. package/dist/types/components.d.ts +65 -4
  61. package/dist/types/shared/storage.d.ts +18 -4
  62. package/dist/types/shared/types.d.ts +1 -0
  63. package/dist/types/utils/printer.d.ts +18 -0
  64. package/package.json +1 -1
  65. package/www/build/ezeep.esm.js +1 -1
  66. package/www/build/{p-6a494b7b.system.entry.js → p-636e190f.system.entry.js} +2 -2
  67. package/www/build/p-DCznw2Ee.system.js +1 -1
  68. package/www/build/p-a2a4f55b.js +1 -0
  69. package/www/build/p-ff075048.entry.js +1 -0
  70. package/www/data/locales/de.json +6 -9
  71. package/www/data/locales/en.json +6 -9
  72. package/www/index.html +1 -1
  73. package/dist/ezeep/p-0df147f4.entry.js +0 -1
  74. package/www/build/p-0df147f4.entry.js +0 -1
  75. package/www/build/p-67021add.js +0 -1
@@ -2577,16 +2577,13 @@ const button_actions$1 = {
2577
2577
  select_printer: "Wähle Drucker"
2578
2578
  };
2579
2579
  const upload$1 = {
2580
- description: "Ziehe Dateien hier in den Browser ",
2581
- meta_leading: "oder",
2582
- dropzone_title: "Dateien hier ablegen",
2583
- browse: "vom Gerät auswählen",
2580
+ choose_files: "Dateien auswählen",
2581
+ drag_hint: "oder Dateien hierher ziehen",
2582
+ dropzone_title: "Zum Hochladen ablegen",
2584
2583
  file_type_fallback: "DATEI",
2585
- meta_multiple: "— mehrere Dateien möglich",
2586
- add_more: "Hinzufügen",
2587
- clear_files: "Dateien entfernen",
2588
- files_ready_one: "{{count}} Datei bereit",
2589
- files_ready_other: "{{count}} Dateien bereit",
2584
+ add_more: "Weitere Dateien hinzufügen",
2585
+ remove_file: "Datei entfernen",
2586
+ remove_files: "Dateien entfernen",
2590
2587
  "continue": "Weiter zu Druckoptionen"
2591
2588
  };
2592
2589
  const user_menu$1 = {
@@ -2671,16 +2668,13 @@ const button_actions = {
2671
2668
  select_printer: "Select Printer"
2672
2669
  };
2673
2670
  const upload = {
2674
- description: "Drop files here into the browser ",
2675
- meta_leading: "or",
2676
- dropzone_title: "Drop files here",
2677
- browse: "select from device",
2671
+ choose_files: "Choose files",
2672
+ drag_hint: "or drag files here",
2673
+ dropzone_title: "Drop to upload",
2678
2674
  file_type_fallback: "FILE",
2679
- meta_multiple: "— multiple files supported",
2680
- add_more: "Add",
2681
- clear_files: "Clear files",
2682
- files_ready_one: "{{count}} file ready",
2683
- files_ready_other: "{{count}} files ready",
2675
+ add_more: "Add more files",
2676
+ remove_file: "Remove file",
2677
+ remove_files: "Remove files",
2684
2678
  "continue": "Continue to print options"
2685
2679
  };
2686
2680
  const user_menu = {
@@ -2888,8 +2882,10 @@ const KEY = {
2888
2882
  accessToken: 'access_token',
2889
2883
  refreshToken: 'refreshToken',
2890
2884
  isAuthorized: 'isAuthorized',
2885
+ /** Legacy single-printer settings blob, read once to seed `printerSettings`. */
2891
2886
  properties: 'properties',
2892
2887
  printer: 'printer',
2888
+ printerSettings: 'printerSettings',
2893
2889
  };
2894
2890
  function getJSON(key) {
2895
2891
  const raw = localStorage.getItem(key);
@@ -2920,32 +2916,60 @@ const storage = {
2920
2916
  hasIsAuthorized() {
2921
2917
  return localStorage.getItem(KEY.isAuthorized) !== null;
2922
2918
  },
2923
- getProperties() {
2924
- return getJSON(KEY.properties);
2919
+ /**
2920
+ * Settings the user last printed with on `printerId`, or null if that printer
2921
+ * has none yet. Kept per printer so switching printers never carries another
2922
+ * printer's paper size or tray over to one that may not have it.
2923
+ */
2924
+ getPrinterSettings(printerId) {
2925
+ var _a;
2926
+ return (_a = readPrinterSettings()[printerId]) !== null && _a !== void 0 ? _a : null;
2925
2927
  },
2926
- setProperties(properties) {
2927
- localStorage.setItem(KEY.properties, JSON.stringify(properties));
2928
+ setPrinterSettings(printerId, properties) {
2929
+ const all = readPrinterSettings();
2930
+ all[printerId] = properties;
2931
+ localStorage.setItem(KEY.printerSettings, JSON.stringify(all));
2928
2932
  },
2933
+ /** The printer used for the last print, preselected when the dialog reopens. */
2929
2934
  getPrinter() {
2930
2935
  return getJSON(KEY.printer);
2931
2936
  },
2932
2937
  setPrinter(printer) {
2933
2938
  localStorage.setItem(KEY.printer, JSON.stringify(printer));
2934
2939
  },
2935
- /** Remove everything tied to the current session (used on logout). */
2940
+ /**
2941
+ * Remove everything tied to the current session (used on logout).
2942
+ *
2943
+ * Print settings and the last printer deliberately survive: they belong to
2944
+ * this browser profile rather than to the session, and are validated against
2945
+ * the signed-in user's printers on the next load (an unknown printer resets
2946
+ * the selection), so the next user never inherits a selection they can't use.
2947
+ */
2936
2948
  clearSession() {
2937
- localStorage.removeItem(KEY.properties);
2938
2949
  localStorage.removeItem(KEY.refreshToken);
2939
2950
  localStorage.removeItem(KEY.accessToken);
2940
- localStorage.removeItem(KEY.printer);
2941
2951
  localStorage.removeItem(KEY.isAuthorized);
2942
2952
  },
2943
- /** Remove just the saved printer + its properties (used when the saved printer is gone). */
2953
+ /** Forget which printer was last used (when it is gone from the user's list).
2954
+ * Its settings stay put, ready in case that printer comes back. */
2944
2955
  clearSavedPrinter() {
2945
2956
  localStorage.removeItem(KEY.printer);
2946
- localStorage.removeItem(KEY.properties);
2947
2957
  },
2948
2958
  };
2959
+ /**
2960
+ * Read the per-printer settings map, seeding it once from the pre-upgrade
2961
+ * single-printer blob so a user who already printed keeps those settings.
2962
+ */
2963
+ function readPrinterSettings() {
2964
+ const stored = getJSON(KEY.printerSettings);
2965
+ if (stored)
2966
+ return stored;
2967
+ const legacy = getJSON(KEY.properties);
2968
+ const legacyPrinter = getJSON(KEY.printer);
2969
+ if (legacy && (legacyPrinter === null || legacyPrinter === void 0 ? void 0 : legacyPrinter.id))
2970
+ return { [legacyPrinter.id]: legacy };
2971
+ return {};
2972
+ }
2949
2973
 
2950
2974
  class EzpAuthorizationService {
2951
2975
  constructor(redirectURI, clientID) {
@@ -3361,6 +3385,158 @@ const EzpDialog = class {
3361
3385
  };
3362
3386
  EzpDialog.style = ezpDialogCss();
3363
3387
 
3388
+ const ezpFileNameCss = () => `@charset "UTF-8";:host{display:block;min-width:0}#trigger{-ms-flex-align:baseline;align-items:baseline;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;margin:0;max-width:100%;min-width:0;outline-color:var(--ezp-theme-solid);outline-offset:2px;padding:0;text-align:left}.head{-ms-flex:0 1 auto;flex:0 1 auto;min-width:0}.tail{-ms-flex:0 0 auto;flex:0 0 auto}:host(:not(.expanded)) .head,:host(:not(.expanded)) .tail{--ezp-label-whiteSpace:pre}:host(.expanded) .head{--ezp-label-whiteSpace:pre-wrap}:host(.expanded) #trigger{word-break:break-all}#tooltip{background:var(--ezp-core-surface-tertiary);border-radius:8px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop);color:var(--ezp-core-foreground-primary);font-size:12px;font-weight:500;left:0;line-height:18px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);pointer-events:auto;position:absolute;right:0;word-break:break-all;z-index:10}:host(.place-top) #tooltip{bottom:calc(100% + var(--ezp-spacing-2))}:host(.place-bottom) #tooltip{top:calc(100% + var(--ezp-spacing-2))}`;
3389
+
3390
+ /**
3391
+ * Characters kept at the end of a truncated name. Uploads often differ only in
3392
+ * a suffix like `_DE.pdf`, which a plain end-ellipsis would be the first thing
3393
+ * to hide, so that tail is held back and the middle gives way instead.
3394
+ */
3395
+ const TAIL_LENGTH = 8;
3396
+ /** Hovering across a list shouldn't flash a tooltip over every row in passing. */
3397
+ const OPEN_DELAY_MS = 300;
3398
+ /** Grace period for crossing the gap between the name and the bubble, so the
3399
+ * tooltip can be hovered rather than vanishing on the way (WCAG 1.4.13). */
3400
+ const CLOSE_DELAY_MS = 200;
3401
+ const EzpFileName = class {
3402
+ constructor(hostRef) {
3403
+ index.registerInstance(this, hostRef);
3404
+ /** Invalidates an in-flight open when the pointer leaves. */
3405
+ this.openGeneration = 0;
3406
+ /**
3407
+ *
3408
+ * Properties
3409
+ *
3410
+ */
3411
+ /** The full file name. Always present in the DOM, so screen readers and
3412
+ * copy-paste get it in full however it is truncated on screen. */
3413
+ this.name = '';
3414
+ /** Type scale of the rendered name, passed through to `ezp-label`. */
3415
+ this.level = 'secondary';
3416
+ /** Font weight of the rendered name, passed through to `ezp-label`. */
3417
+ this.weight = 'soft';
3418
+ /** Side the tooltip opens on. Consumers point it away from the edge their
3419
+ * row sits against — `bottom` for the first row of a list, `top` below it. */
3420
+ this.placement = 'top';
3421
+ /**
3422
+ *
3423
+ * States
3424
+ *
3425
+ */
3426
+ /** Set by tapping the name: shows it in full, wrapped over several lines.
3427
+ * This is the touch counterpart of the tooltip, which needs a pointer. */
3428
+ this.expanded = false;
3429
+ this.tooltipOpen = false;
3430
+ this.openTooltip = () => {
3431
+ if (!this.hasHover || this.expanded)
3432
+ return;
3433
+ clearTimeout(this.openTimeout);
3434
+ const generation = ++this.openGeneration;
3435
+ this.openTimeout = setTimeout(async () => {
3436
+ const clipped = await this.isClipped();
3437
+ // Measuring yields, and the pointer may have moved on in the meantime —
3438
+ // opening now would leave a tooltip behind with nothing to dismiss it.
3439
+ if (clipped && generation === this.openGeneration)
3440
+ this.tooltipOpen = true;
3441
+ }, OPEN_DELAY_MS);
3442
+ };
3443
+ this.closeTooltip = () => {
3444
+ this.openGeneration++;
3445
+ clearTimeout(this.openTimeout);
3446
+ clearTimeout(this.closeTimeout);
3447
+ this.tooltipOpen = false;
3448
+ };
3449
+ /** Leaves the tooltip up briefly so the pointer can reach it. */
3450
+ this.scheduleClose = () => {
3451
+ clearTimeout(this.openTimeout);
3452
+ clearTimeout(this.closeTimeout);
3453
+ this.closeTimeout = setTimeout(this.closeTooltip, CLOSE_DELAY_MS);
3454
+ };
3455
+ this.cancelScheduledClose = () => {
3456
+ clearTimeout(this.closeTimeout);
3457
+ };
3458
+ this.toggleExpanded = () => {
3459
+ this.expanded = !this.expanded;
3460
+ // The full name is on screen now; a tooltip repeating it is just in the way.
3461
+ if (this.expanded)
3462
+ this.closeTooltip();
3463
+ };
3464
+ }
3465
+ /**
3466
+ *
3467
+ * Lifecycle methods
3468
+ *
3469
+ */
3470
+ disconnectedCallback() {
3471
+ clearTimeout(this.openTimeout);
3472
+ clearTimeout(this.closeTimeout);
3473
+ }
3474
+ /**
3475
+ *
3476
+ * Listeners
3477
+ *
3478
+ */
3479
+ /**
3480
+ * Escape dismisses the tooltip, and only the tooltip.
3481
+ *
3482
+ * Listening globally catches the key however the tooltip was opened,
3483
+ * including by hover, when nothing here has focus. It has to run in the
3484
+ * capture phase: stopping propagation on the way back up happens after every
3485
+ * ancestor has already seen the key, so a host app that closes its dialog on
3486
+ * Escape would close it as the tooltip was dismissed.
3487
+ *
3488
+ * `window` rather than `document`, because dialog libraries capture on the
3489
+ * document themselves — Radix's `DismissableLayer` does — and register before
3490
+ * a component mounted inside them, so they would still see the key first.
3491
+ * Capture runs window before document, so this transient layer consumes the
3492
+ * key first, and only while it is actually open.
3493
+ */
3494
+ handleKeyDown(event) {
3495
+ if (event.key === 'Escape' && this.tooltipOpen) {
3496
+ event.stopPropagation();
3497
+ this.closeTooltip();
3498
+ }
3499
+ }
3500
+ /**
3501
+ *
3502
+ * Private methods
3503
+ *
3504
+ */
3505
+ /** Tooltips need a pointer; touch devices get the tap-to-expand path instead.
3506
+ * Tapping fires a synthetic `mouseenter` in most mobile browsers, so without
3507
+ * this check a tooltip would open on every tap. */
3508
+ get hasHover() {
3509
+ var _a, _b;
3510
+ return (_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(hover: hover)').matches) !== null && _b !== void 0 ? _b : false;
3511
+ }
3512
+ /** Whether anything is actually hidden. A name that fits needs no tooltip —
3513
+ * repeating text the reader can already see is just noise in the way. */
3514
+ async isClipped() {
3515
+ var _a, _b;
3516
+ const head = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.head');
3517
+ if (!head)
3518
+ return false;
3519
+ await ((_b = head.componentOnReady) === null || _b === void 0 ? void 0 : _b.call(head));
3520
+ return head.isTruncated();
3521
+ }
3522
+ /**
3523
+ *
3524
+ * Render method
3525
+ *
3526
+ */
3527
+ render() {
3528
+ // Splitting is a rendering device only: `head` holds everything but the last
3529
+ // few characters and is the part CSS is allowed to clip, so the two labels
3530
+ // together still spell out the whole name.
3531
+ const split = !this.expanded && this.name.length > TAIL_LENGTH;
3532
+ const head = split ? this.name.slice(0, -TAIL_LENGTH) : this.name;
3533
+ const tail = split ? this.name.slice(-TAIL_LENGTH) : '';
3534
+ return (index.h(index.Host, { key: '4e84aca15abf4d1e59f2418fff0fdc13efd2a7b2', class: { expanded: this.expanded, [`place-${this.placement}`]: true } }, index.h("button", { key: '61de272bffc87cd440cd307ba49bee1f9795f8ae', type: "button", id: "trigger", "aria-label": this.name, "aria-expanded": this.expanded ? 'true' : 'false', onClick: this.toggleExpanded, onMouseEnter: this.openTooltip, onMouseLeave: this.scheduleClose, onFocus: this.openTooltip, onBlur: this.closeTooltip }, index.h("ezp-label", { key: 'd8120b13f24c5921d688431f90f7967b60fe4878', class: "head", ellipsis: split, level: this.level, weight: this.weight, text: head }), split && index.h("ezp-label", { key: '9129bedf96a55bd650efca46a3f2e7e599af2776', class: "tail", level: this.level, weight: this.weight, text: tail })), this.tooltipOpen && (index.h("div", { key: 'fb710729e9262fca148c342bf99c001fd5a760c3', id: "tooltip", "aria-hidden": "true", onMouseEnter: this.cancelScheduledClose, onMouseLeave: this.closeTooltip }, this.name))));
3535
+ }
3536
+ get host() { return index.getElement(this); }
3537
+ };
3538
+ EzpFileName.style = ezpFileNameCss();
3539
+
3364
3540
  const ezpIconCss = () => `:host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-icon-background, transparent);border-radius:var(--ezp-icon-borderRadius, 0);display:grid;grid-template:var(--ezp-icon-gridTemplate)/var(--ezp-icon-gridTemplate);height:var(--ezp-icon-height, var(--ezp-icon-size));-ms-flex-pack:center;justify-content:center;padding:var(--ezp-icon-padding, 0);width:var(--ezp-icon-width, var(--ezp-icon-size))}:host(.framed){--ezp-icon-background:var(--ezp-core-shade-primary);--ezp-icon-borderRadius:50%;--ezp-icon-padding:var(--ezp-icon-frame)}:host(.normal){--ezp-icon-size:18px;--ezp-icon-gridTemplate:24px;--ezp-icon-frame:var(--ezp-spacing-3)}:host(.large){--ezp-icon-size:36px;--ezp-icon-gridTemplate:48px;--ezp-icon-frame:var(--ezp-spacing-4)}:host(.huge){--ezp-icon-size:54px;--ezp-icon-gridTemplate:72px;--ezp-icon-frame:var(--ezp-spacing-5)}svg{display:block;fill:var(--ezp-icon-fill, currentColor);height:100%;width:100%}`;
3365
3541
 
3366
3542
  const EzpIcon = class {
@@ -3395,7 +3571,7 @@ const EzpIcon = class {
3395
3571
  return (
3396
3572
  // Decorative: icons here always sit next to a label or live-region text,
3397
3573
  // so hide them from the accessibility tree to avoid double announcements.
3398
- index.h(index.Host, { key: 'e1b22ece00f1260a34561c8d1efd44c2d5f37c73', class: `${this.size} ${this.framed ? 'framed' : ''}`, "aria-hidden": "true" }, index.h("div", { key: '0734d4b5fdc363303d69b7e5dc138f8caeaa316c', id: "glyph", innerHTML: this.glyph })));
3574
+ index.h(index.Host, { key: 'f1a45d38b75ccf4e0c5e6200d9d04c7e5766bfbc', class: `${this.size} ${this.framed ? 'framed' : ''}`, "aria-hidden": "true" }, index.h("div", { key: '70f6963181d31089fefb662079e1e075540d2fe7', id: "glyph", innerHTML: this.glyph })));
3399
3575
  }
3400
3576
  static get assetsDirs() { return ["assets"]; }
3401
3577
  };
@@ -3437,12 +3613,12 @@ const EzpIconButton = class {
3437
3613
  // Icon-only control: derive an accessible name from the icon so screen
3438
3614
  // readers announce something meaningful (e.g. "menu", "printer").
3439
3615
  const label = this.icon.replace(/[-_]/g, ' ');
3440
- return (index.h(index.Host, { key: '7d3d43ec31503ff7ecc87e9f498ee5b2d09d5d96', class: `${this.level}` }, index.h(TagType, Object.assign({ key: 'b7d5c646bb66ebff92d661574c647f8a2773a908', id: "button", "aria-label": label }, attributes), index.h("ezp-icon", { key: 'bc4c322b7c9389a8aaa27feac7084ae9e1befaa4', name: this.icon }))));
3616
+ return (index.h(index.Host, { key: 'd67a43c2b91eaa4fa79dd8559824f3ffc23757b2', class: `${this.level}` }, index.h(TagType, Object.assign({ key: '3b11b4e0c40c8f900496ae03a4eee11f0980cd80', id: "button", "aria-label": label }, attributes), index.h("ezp-icon", { key: '14a35e8f779628197f7dd89219792d7809990631', name: this.icon }))));
3441
3617
  }
3442
3618
  };
3443
3619
  EzpIconButton.style = ezpIconButtonCss();
3444
3620
 
3445
- const ezpInputCss = () => `:host{-ms-flex-align:center;align-items:center;background:transparent;cursor:text;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto auto 1fr);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:var(--ezp-input-z-index, 3)}:host([suffix]){--ezp-input-grid-template:auto / auto auto 1fr auto;--ezp-input-input-padding-right:0}:host(.focused){--ezp-input-label-color:var(--ezp-core-foreground-primary)}#label{color:var(--ezp-input-label-color, var(--ezp-core-foreground-primary))}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-input-icon-color, var(--ezp-theme-solid))}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;font-weight:600;-webkit-font-smoothing:antialiased;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0 var(--ezp-input-input-padding-right, var(--ezp-spacing-1)) 0 0;text-align:right;width:100%}#input::-webkit-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-moz-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input:-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input[type=number]::-webkit-inner-spin-button,#input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}#suffix{color:var(--ezp-core-foreground-tertiary)}`;
3621
+ const ezpInputCss = () => `:host{-ms-flex-align:center;align-items:center;background:transparent;cursor:text;display:grid;gap:var(--ezp-spacing-3);grid-template:var(--ezp-input-grid-template, auto/auto 1fr);height:56px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);position:relative;z-index:var(--ezp-input-z-index, 3)}:host(.has-icon){--ezp-input-grid-template:auto / auto auto 1fr}:host([suffix]){--ezp-input-grid-template:auto / auto 1fr auto;--ezp-input-input-padding-right:0}:host([suffix].has-icon){--ezp-input-grid-template:auto / auto auto 1fr auto;--ezp-input-input-padding-right:0}:host(.focused){--ezp-input-label-color:var(--ezp-core-foreground-primary)}#label{color:var(--ezp-input-label-color, var(--ezp-core-foreground-primary))}#icon{--ezp-icon-background:var(--ezp-theme-translucent);--ezp-icon-borderRadius:50%;--ezp-icon-height:40px;--ezp-icon-width:40px;color:var(--ezp-input-icon-color, var(--ezp-theme-solid))}#input{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;background:transparent;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);cursor:text;font-family:inherit;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";font-size:14px;-webkit-font-smoothing:antialiased;font-weight:600;height:30px;letter-spacing:-0.0062235443em;margin:0;outline:none;padding:0 var(--ezp-input-input-padding-right, var(--ezp-spacing-1)) 0 0;text-align:right;width:100%}#input::-webkit-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-moz-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input:-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::-ms-input-placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input::placeholder{color:var(--ezp-core-foreground-tertiary);font-weight:400}#input[type=number]::-webkit-inner-spin-button,#input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}#suffix{color:var(--ezp-core-foreground-tertiary)}`;
3446
3622
 
3447
3623
  const EzpInput = class {
3448
3624
  constructor(hostRef) {
@@ -3459,8 +3635,6 @@ const EzpInput = class {
3459
3635
  /** Description... */
3460
3636
  this.type = 'text';
3461
3637
  /** Description... */
3462
- this.icon = 'color';
3463
- /** Description... */
3464
3638
  this.placeholder = '';
3465
3639
  /**
3466
3640
  *
@@ -3493,7 +3667,8 @@ const EzpInput = class {
3493
3667
  }, 500);
3494
3668
  }
3495
3669
  render() {
3496
- return (index.h(index.Host, { key: 'ba8958137bce0592dbe4ec23c03284885f570e27', class: { focused: this.focused }, onClick: this.setFocus }, index.h("ezp-icon", { key: '9d3b108841ffdabec9b9a98d6d6b2ea19fba37fc', id: "icon", name: this.icon }), index.h("ezp-label", { key: '5fee00202e9c6407bddf8a1b7090d983d79e42b3', id: "label", noWrap: true, level: "secondary", text: this.label }), index.h("input", { key: '99c71e9c6d29193046bd0b6094efbac828ffab15', id: "input", type: this.type, value: this.value, placeholder: this.placeholder, "aria-label": this.label, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? index.h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
3670
+ const hasIcon = !!this.icon;
3671
+ return (index.h(index.Host, { key: 'f36f5811ba4e86b0aa3f53be916220136a1d2443', class: { focused: this.focused, 'has-icon': hasIcon }, onClick: this.setFocus }, hasIcon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '88f93411e1463b23ca4ae88d278a69df5038509d', id: "label", noWrap: true, level: "secondary", text: this.label }), index.h("input", { key: 'b23ba3c8fea465a559e9c6d7b3da50152b412a1c', id: "input", type: this.type, value: this.value, placeholder: this.placeholder, "aria-label": this.label, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? index.h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
3497
3672
  }
3498
3673
  };
3499
3674
  EzpInput.style = ezpInputCss();
@@ -3519,14 +3694,31 @@ const EzpLabel = class {
3519
3694
  /** Description... */
3520
3695
  this.weight = 'soft';
3521
3696
  }
3697
+ /**
3698
+ *
3699
+ * Public methods
3700
+ *
3701
+ */
3702
+ /** Whether the text is currently clipped — `ellipsis` only bites when the
3703
+ * text outgrows the space it was given, which callers cannot tell from the
3704
+ * props alone. Lets a caller offer the full text only when it is needed. */
3705
+ async isTruncated() {
3706
+ var _a;
3707
+ const text = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#text');
3708
+ if (!text)
3709
+ return false;
3710
+ // A pixel of slack: sub-pixel layout rounds scrollWidth up on its own.
3711
+ return text.scrollWidth > text.clientWidth + 1;
3712
+ }
3522
3713
  /**
3523
3714
  *
3524
3715
  * Render method
3525
3716
  *
3526
3717
  */
3527
3718
  render() {
3528
- return (index.h(index.Host, { key: '2dc1901cc1a083e659eb7224a3e34566145e89c2', class: `${this.level} ${this.weight} ${this.ellipsis ? 'ellipsis' : ''} ${this.noWrap ? 'no-wrap' : ''}` }, index.h("div", { key: '8919f66e8401b3e2797d0ab9ce50f42c0b244348', id: "text" }, this.text)));
3719
+ return (index.h(index.Host, { key: '42139679511e711132912a1f762d345951fd1774', class: `${this.level} ${this.weight} ${this.ellipsis ? 'ellipsis' : ''} ${this.noWrap ? 'no-wrap' : ''}` }, index.h("div", { key: '5e54e8142d274cacb375cce8d5ef52ccdeaeec84', id: "text" }, this.text)));
3529
3720
  }
3721
+ get host() { return index.getElement(this); }
3530
3722
  };
3531
3723
  EzpLabel.style = ezpLabelCss();
3532
3724
 
@@ -38104,6 +38296,8 @@ const userStore = createStore({
38104
38296
  appearance: '',
38105
38297
  });
38106
38298
 
38299
+ /** Duplex modes the dialog offers: none, long edge, short edge. */
38300
+ const DUPLEX_MODES = [1, 2, 3];
38107
38301
  /**
38108
38302
  * Derive the default print properties for a printer from its configuration.
38109
38303
  *
@@ -38146,6 +38340,78 @@ function applyPrinterDefaults(config, properties) {
38146
38340
  delete properties.PageRanges;
38147
38341
  return properties;
38148
38342
  }
38343
+ /**
38344
+ * Carry the settings the user last printed with on this printer over the
38345
+ * printer's own defaults, dropping anything the printer can no longer do.
38346
+ *
38347
+ * Capabilities change between sessions — a printer loses a tray, an admin
38348
+ * swaps the paper formats — and a stale value would otherwise be sent to the
38349
+ * API or shown as a selection that isn't in the list. Each field is therefore
38350
+ * only restored if the current config still offers it; everything else stays
38351
+ * on the default `applyPrinterDefaults` just put in place. Copies and page
38352
+ * ranges are never part of `saved`, so they are never restored.
38353
+ */
38354
+ function applySavedProperties(config, saved, properties) {
38355
+ var _a, _b, _c, _d, _e;
38356
+ applyPrinterDefaults(config, properties);
38357
+ if (!saved)
38358
+ return properties;
38359
+ if (config.ColorSupported && typeof saved.color === 'boolean') {
38360
+ properties.color = saved.color;
38361
+ }
38362
+ if (config.DuplexSupported && DUPLEX_MODES.includes(Number(saved.duplexmode))) {
38363
+ properties.duplex = true;
38364
+ properties.duplexmode = Number(saved.duplexmode);
38365
+ }
38366
+ const paper = (_a = config.PaperFormats) === null || _a === void 0 ? void 0 : _a.find((format) => format.Id === Number(saved.paperid));
38367
+ if (paper) {
38368
+ properties.paper = paper.Name;
38369
+ properties.paperid = paper.Id;
38370
+ // Only meaningful for the custom format, which carries its own dimensions.
38371
+ if (paper.Id === PAPER_ID) {
38372
+ properties.paperwidth = saved.paperwidth;
38373
+ properties.paperlength = saved.paperlength;
38374
+ }
38375
+ }
38376
+ // Orientations are offered as 1-based positions in `OrientationsSupported`.
38377
+ const orientation = Number(saved.orientation);
38378
+ if (orientation >= 1 && orientation <= ((_c = (_b = config.OrientationsSupported) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0)) {
38379
+ properties.orientation = orientation;
38380
+ }
38381
+ if (typeof saved.resolution === 'string' && ((_d = config.Resolutions) === null || _d === void 0 ? void 0 : _d.includes(saved.resolution))) {
38382
+ properties.resolution = saved.resolution;
38383
+ }
38384
+ if (hasTrays(config)) {
38385
+ const tray = (_e = config.Trays) === null || _e === void 0 ? void 0 : _e.find((option) => (option === null || option === void 0 ? void 0 : option.Index) === Number(saved.defaultSource));
38386
+ if (tray) {
38387
+ properties.trayname = tray.Name;
38388
+ properties.defaultSource = tray.Index;
38389
+ }
38390
+ }
38391
+ return properties;
38392
+ }
38393
+ /**
38394
+ * The slice of the current selection worth remembering for next time: what the
38395
+ * print dialog offers per printer, minus copies and page ranges, which belong
38396
+ * to the one document being printed rather than to the printer.
38397
+ */
38398
+ function pickRememberedProperties(properties) {
38399
+ const { color, duplex, duplexmode, paper, paperid, paperwidth, paperlength } = properties;
38400
+ const { orientation, resolution, trayname, defaultSource } = properties;
38401
+ return {
38402
+ color,
38403
+ duplex,
38404
+ duplexmode,
38405
+ paper,
38406
+ paperid,
38407
+ paperwidth,
38408
+ paperlength,
38409
+ orientation,
38410
+ resolution,
38411
+ trayname,
38412
+ defaultSource,
38413
+ };
38414
+ }
38149
38415
  /** Does this printer config report an explicit "no usable trays" state? */
38150
38416
  function hasNoTrays(config) {
38151
38417
  return !!config.Trays && config.Trays.length >= 0 && config.Trays[0] == null;
@@ -38243,7 +38509,7 @@ async function uploadAndPrintFile(ctx, file, hooks = {}) {
38243
38509
  }
38244
38510
  }
38245
38511
 
38246
- const ezpPrinterSelectionCss = () => `:host{--ezp-drucken-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );--ezp-status-border-radius:16px;background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;inset:var(--ezp-printerSelection-inset, 0);overflow-y:auto;padding:var(--ezp-printerSelection-padding, var(--ezp-spacing-5));position:var(--ezp-printerSelection-position, fixed);z-index:1}:host(.seamless){--ezp-printerSelection-background:transparent;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-box-margin:0;--ezp-printerSelection-box-padding:0;--ezp-printerSelection-inset:auto;--ezp-printerSelection-padding:0;--ezp-printerSelection-position:static;--ezp-printerSelection-width:100%}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:16px;-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));color:var(--ezp-core-foreground-primary);margin:var(--ezp-printerSelection-box-margin, auto);padding:var(--ezp-printerSelection-box-padding, 0);position:relative;width:var(--ezp-printerSelection-width, 384px)}#header{-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;padding:var(--ezp-spacing-4);position:relative;z-index:3}#title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}#title ezp-label{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#files-badge{background:var(--ezp-theme-translucent);border-radius:999px;color:var(--ezp-theme-solid);font-size:12px;font-weight:600;line-height:1;padding:5px 10px;white-space:nowrap}#header-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-4)}#files-card{background:var(--ezp-core-surface-secondary);border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-spacing-3) var(--ezp-spacing-4)}.file-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}.file-row ezp-label{--ezp-label-minWidth:0}.file-row-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px;color:var(--ezp-theme-solid);-ms-flex-negative:0;flex-shrink:0}#printer-card{border-radius:12px;-webkit-box-shadow:inset 0 0 0 1px var(--ezp-core-outline);box-shadow:inset 0 0 0 1px var(--ezp-core-outline);position:relative}#print{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-drucken-gradient);border:0;border-radius:0 0 12px 12px;color:var(--ezp-white-100);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:var(--ezp-spacing-3);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:var(--ezp-spacing-4);-webkit-transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#print ezp-icon{--ezp-icon-size:20px;--ezp-icon-gridTemplate:20px}@media (hover: hover){#print:not(:disabled):hover{opacity:0.9}#print:not(:disabled):active{opacity:0.8}}#print:disabled{background:var(--ezp-core-shade-primary);color:var(--ezp-core-foreground-tertiary);cursor:default}#options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#footer{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end;padding:var(--ezp-spacing-3) var(--ezp-spacing-4) var(--ezp-spacing-4);position:relative;z-index:3}#cancel{--ezp-textButton-background-init:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-borderRadius:999px;--ezp-textButton-color-init:var(--ezp-core-foreground-primary);--ezp-textButton-padding:var(--ezp-spacing-3) var(--ezp-spacing-6)}`;
38512
+ const ezpPrinterSelectionCss = () => `:host{--ezp-status-border-radius:16px;background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;inset:var(--ezp-printerSelection-inset, 0);overflow-y:auto;padding:var(--ezp-printerSelection-padding, var(--ezp-spacing-5));position:var(--ezp-printerSelection-position, fixed);z-index:1}:host(.seamless){--ezp-printerSelection-background:transparent;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-box-margin:0;--ezp-printerSelection-box-padding:0;--ezp-printerSelection-inset:auto;--ezp-printerSelection-padding:0;--ezp-printerSelection-position:static;--ezp-printerSelection-width:100%}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:16px;-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));color:var(--ezp-core-foreground-primary);margin:var(--ezp-printerSelection-box-margin, auto);padding:var(--ezp-printerSelection-box-padding, 0);position:relative;width:var(--ezp-printerSelection-width, 384px)}#header{-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;padding:var(--ezp-spacing-4);position:relative;z-index:3}#title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}#title ezp-label{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#files-badge{background:var(--ezp-theme-translucent);border-radius:999px;color:var(--ezp-theme-solid);font-size:12px;font-weight:600;line-height:1;padding:5px 10px;white-space:nowrap}#header-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-4)}#files-card{background:var(--ezp-core-surface-secondary);border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-spacing-3) var(--ezp-spacing-4)}.file-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0;position:relative}.file-row ezp-file-name{-ms-flex:0 1 auto;flex:0 1 auto}.file-row-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px;color:var(--ezp-theme-solid);-ms-flex-negative:0;flex-shrink:0}#printer-caption{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;padding:0 var(--ezp-spacing-1);text-transform:uppercase}#printer-card{border-radius:12px;-webkit-box-shadow:inset 0 0 0 1px var(--ezp-core-outline);box-shadow:inset 0 0 0 1px var(--ezp-core-outline);position:relative}#printer{--ezp-select-label-display:none;--ezp-select-toggle-gridTemplateAreas:'icon value accessory';--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-textAlign:left}#print{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-theme-solid);border:0;border-radius:8px;color:var(--ezp-white-100);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:var(--ezp-spacing-3);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:13px var(--ezp-spacing-4);-webkit-transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#print ezp-icon{--ezp-icon-size:20px;--ezp-icon-gridTemplate:20px}@media (hover: hover){#print:not(:disabled):hover{opacity:0.9}#print:not(:disabled):active{opacity:0.8}}#print:disabled{background:var(--ezp-core-shade-primary);color:var(--ezp-core-foreground-tertiary);cursor:default}#options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#options>*{-webkit-box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline)}#options>*:last-child{-webkit-box-shadow:none;box-shadow:none}#footer{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));border-radius:0 0 16px 16px;border-top:1px solid var(--ezp-core-outline);bottom:0;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4);position:-webkit-sticky;position:sticky;z-index:3}#cancel{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-borderRadius:8px;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary);--ezp-textButton-padding:13px var(--ezp-spacing-3)}`;
38247
38513
 
38248
38514
  const EzpPrinterSelection = class {
38249
38515
  constructor(hostRef) {
@@ -38296,6 +38562,10 @@ const EzpPrinterSelection = class {
38296
38562
  this.hubDriverError = false;
38297
38563
  this.userMenuOpen = false;
38298
38564
  this.printStopped = false;
38565
+ /** Starts empty so the dialog can still render if the list never arrives. */
38566
+ this.printers = [];
38567
+ /** Starts empty so the dialog renders even if the list never loads. */
38568
+ this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
38299
38569
  this.selectedPrinterConfig = {
38300
38570
  Default: {
38301
38571
  Color: '',
@@ -38328,6 +38598,8 @@ const EzpPrinterSelection = class {
38328
38598
  trayname: '',
38329
38599
  PageRanges: '',
38330
38600
  };
38601
+ /** True while a printer's capabilities are being fetched. */
38602
+ this.loadingPrinterConfig = false;
38331
38603
  this.currentFileIndex = 0;
38332
38604
  this.totalFiles = 0;
38333
38605
  this.failedFiles = [];
@@ -38518,8 +38790,7 @@ const EzpPrinterSelection = class {
38518
38790
  if (hubTimeout)
38519
38791
  clearTimeout(hubTimeout);
38520
38792
  }
38521
- storage.setProperties(this.selectedProperties);
38522
- storage.setPrinter(this.selectedPrinter);
38793
+ this.rememberSelection();
38523
38794
  this.printStopped = false;
38524
38795
  };
38525
38796
  this.handleUserMenu = () => {
@@ -38612,20 +38883,45 @@ const EzpPrinterSelection = class {
38612
38883
  break;
38613
38884
  }
38614
38885
  }
38615
- getPropertiesFromLocalStorage() {
38616
- const savedProperties = storage.getProperties();
38617
- if (savedProperties) {
38618
- this.selectedProperties = savedProperties;
38619
- }
38886
+ /** Print needs a printer with its capabilities in hand, no job in flight and
38887
+ * a valid page range. The config matters: between picking a printer and its
38888
+ * properties arriving, the selection is set but the properties still hold
38889
+ * blank defaults, and printing then saves those as that printer's settings. */
38890
+ get printDisabled() {
38891
+ return (this.selectedPrinter.id === '' ||
38892
+ this.loadingPrinterConfig ||
38893
+ this.printProcessing ||
38894
+ this.pageRangeInvalid);
38895
+ }
38896
+ /** Keep this printer and its settings for the next print. Stored per printer,
38897
+ * so each one keeps its own and no setting follows the user to a printer
38898
+ * that cannot do it. */
38899
+ rememberSelection() {
38900
+ if (!this.selectedPrinter.id)
38901
+ return;
38902
+ storage.setPrinterSettings(this.selectedPrinter.id, pickRememberedProperties(this.selectedProperties));
38903
+ storage.setPrinter(this.selectedPrinter);
38904
+ }
38905
+ /**
38906
+ * Decide which printer the dialog opens on: the one last printed to, or the
38907
+ * user's only printer when there is nothing to choose between. Its settings
38908
+ * follow once its config is in, since they can only be validated against the
38909
+ * printer's capabilities.
38910
+ */
38911
+ selectInitialPrinter() {
38912
+ var _a, _b;
38620
38913
  const savedPrinter = storage.getPrinter();
38621
- if (savedPrinter) {
38622
- if (this.printers.some((printer) => printer.id === savedPrinter.id)) {
38623
- this.selectedPrinter = savedPrinter;
38624
- }
38625
- else {
38626
- this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
38627
- storage.clearSavedPrinter();
38628
- }
38914
+ const savedIsAvailable = (_a = this.printers) === null || _a === void 0 ? void 0 : _a.some((printer) => printer.id === (savedPrinter === null || savedPrinter === void 0 ? void 0 : savedPrinter.id));
38915
+ // A printer the user no longer has must not stay preselected.
38916
+ if (savedPrinter && !savedIsAvailable)
38917
+ storage.clearSavedPrinter();
38918
+ if (savedPrinter && savedIsAvailable) {
38919
+ this.selectedPrinter = savedPrinter;
38920
+ }
38921
+ else if (((_b = this.printers) === null || _b === void 0 ? void 0 : _b.length) === 1) {
38922
+ // Nothing to pick between: opening a dropdown with one entry in it is
38923
+ // busywork, so start on it.
38924
+ this.selectedPrinter = this.printers[0];
38629
38925
  }
38630
38926
  else {
38631
38927
  this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
@@ -38644,17 +38940,22 @@ const EzpPrinterSelection = class {
38644
38940
  }
38645
38941
  async setSelectedProperties(eventDetails) {
38646
38942
  switch (eventDetails.type) {
38647
- case 'printer':
38648
- this.selectedPrinter.id = eventDetails.id;
38649
- this.selectedPrinter.name = eventDetails.title;
38650
- this.selectedPrinter.is_queue = eventDetails.is_queue;
38651
- await this.printService
38652
- .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
38653
- .then((data) => {
38654
- this.selectedPrinterConfig = Object.assign(Object.assign({}, this.selectedPrinterConfig), data[0]);
38655
- applyPrinterDefaults(this.selectedPrinterConfig, this.selectedProperties);
38656
- });
38943
+ case 'printer': {
38944
+ const picked = this.printers.find((printer) => printer.id === eventDetails.id);
38945
+ this.selectedPrinter = picked !== null && picked !== void 0 ? picked : {
38946
+ id: eventDetails.id,
38947
+ name: eventDetails.title,
38948
+ location: '',
38949
+ is_queue: eventDetails.is_queue,
38950
+ };
38951
+ // Same guard as the initial load. Without it a failed fetch left the
38952
+ // printer selected while the config still described the *previous*
38953
+ // one: Print stayed enabled, the job went out with settings nothing
38954
+ // had checked against this printer, and those settings were then
38955
+ // saved under its id and restored on later opens.
38956
+ await this.loadSelectedPrinterConfig();
38657
38957
  break;
38958
+ }
38658
38959
  case 'color':
38659
38960
  this.selectedProperties.color =
38660
38961
  eventDetails.title == instance.t('printer_selection.color_color') ? true : false;
@@ -38719,6 +39020,55 @@ const EzpPrinterSelection = class {
38719
39020
  onJobId: (jobId) => (printStore.state.jobID = jobId),
38720
39021
  });
38721
39022
  }
39023
+ /**
39024
+ * What a dropdown should show: the current selection — restored from the last
39025
+ * print, or just made by the user — and otherwise the printer's own default.
39026
+ *
39027
+ * The fallbacks matter because a config may describe its default only by name
39028
+ * (`Default.Duplex`, `Default.Paper`, `Default.Tray`) without flagging the
39029
+ * matching entry, which is all these dropdowns had to go on before settings
39030
+ * were remembered.
39031
+ */
39032
+ duplexPreSelection() {
39033
+ var _a;
39034
+ if (!this.selectedPrinter.id)
39035
+ return null;
39036
+ const mode = Number(this.selectedProperties.duplexmode);
39037
+ if (mode)
39038
+ return mode;
39039
+ switch ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Duplex) {
39040
+ case 'duplex_simplex':
39041
+ return instance.t('printer_selection.duplex_none');
39042
+ case 'duplex_vertical':
39043
+ return instance.t('printer_selection.duplex_long');
39044
+ case 'duplex_horizontal':
39045
+ return instance.t('printer_selection.duplex_short');
39046
+ default:
39047
+ return null;
39048
+ }
39049
+ }
39050
+ paperPreSelection() {
39051
+ var _a, _b;
39052
+ if (!this.selectedPrinter.id)
39053
+ return null;
39054
+ if (this.selectedProperties.paper)
39055
+ return this.selectedProperties.paper;
39056
+ const name = (_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper;
39057
+ return name && ((_b = this.selectedPrinterConfig.PaperFormats) === null || _b === void 0 ? void 0 : _b.some((el) => el.Name.includes(name)))
39058
+ ? name
39059
+ : null;
39060
+ }
39061
+ trayPreSelection() {
39062
+ var _a, _b;
39063
+ if (!this.selectedPrinter.id)
39064
+ return null;
39065
+ if (this.selectedProperties.trayname)
39066
+ return this.selectedProperties.trayname;
39067
+ const name = (_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Tray;
39068
+ return name && ((_b = this.selectedPrinterConfig.Trays) === null || _b === void 0 ? void 0 : _b.some((el) => el === null || el === void 0 ? void 0 : el.Name.includes(name)))
39069
+ ? name
39070
+ : null;
39071
+ }
38722
39072
  setDefaultPaperFormat() {
38723
39073
  var _a, _b, _c, _d, _e;
38724
39074
  let format;
@@ -38787,46 +39137,105 @@ const EzpPrinterSelection = class {
38787
39137
  this.unsubscribeLanguage = subscribeToLanguageChange(this);
38788
39138
  this.printService = new EzpPrintService(this.redirectURI, this.clientID);
38789
39139
  this.printService.registerFetchInterceptor();
38790
- await this.getUserInfo();
38791
- await this.printService
38792
- .getPrinterList(authStore.state.accessToken)
38793
- .then((printers) => {
38794
- this.printers = printers;
38795
- if (!(this.printers.length > 0)) {
39140
+ try {
39141
+ // A missing display name must not stop the user from printing.
39142
+ await this.getUserInfo().catch(() => undefined);
39143
+ let printersLoaded = false;
39144
+ try {
39145
+ const printers = await this.printService.getPrinterList(authStore.state.accessToken);
39146
+ // A failed request still resolves: the API answers with a `{code,
39147
+ // message}` body, which would survive `?? []` and break on `.some`.
39148
+ if (!Array.isArray(printers))
39149
+ throw new Error('Unexpected printer list payload');
39150
+ this.printers = printers;
39151
+ printersLoaded = true;
39152
+ }
39153
+ catch (_a) {
39154
+ this.printers = [];
39155
+ }
39156
+ if (!printersLoaded) {
39157
+ // Nothing is known about this user's printers, so the saved printer is
39158
+ // left untouched: treating it as gone would clear it from storage and
39159
+ // lose the settings that are only reachable through it.
38796
39160
  this.noPrinters = true;
38797
39161
  }
38798
- });
38799
- this.getPropertiesFromLocalStorage();
38800
- // if printer is stored from previous print, get the config to enable property selection
38801
- if (this.selectedPrinter.id != '') {
38802
- await this.printService
38803
- .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
38804
- .then((data) => {
38805
- this.selectedPrinterConfig = data[0];
38806
- applyPrinterDefaults(this.selectedPrinterConfig, this.selectedProperties);
38807
- });
39162
+ else {
39163
+ if (this.printers.length === 0) {
39164
+ this.noPrinters = true;
39165
+ }
39166
+ this.selectInitialPrinter();
39167
+ // A printer carried over from a previous print, or the only one the
39168
+ // user has, needs its config before its properties can be offered.
39169
+ if (this.selectedPrinter.id != '') {
39170
+ await this.loadSelectedPrinterConfig();
39171
+ }
39172
+ }
39173
+ let supportedExtensionsLoaded = false;
39174
+ try {
39175
+ const response = await (await this.printService.getConfig(authStore.state.accessToken)).json();
39176
+ printStore.state.supportedFileExtensions = response.System.FILEEXT;
39177
+ supportedExtensionsLoaded = true;
39178
+ }
39179
+ catch (_b) {
39180
+ // Handled below: without the list, nothing can be validated against it.
39181
+ }
39182
+ try {
39183
+ await this.printService
39184
+ .getAllPrinterProperties(authStore.state.accessToken)
39185
+ .then((printerConfig) => {
39186
+ this.printerConfig = printerConfig;
39187
+ });
39188
+ }
39189
+ catch (_c) {
39190
+ // Only used to describe other printers; the dialog works without it.
39191
+ }
39192
+ // Skipped when the list never arrived: every file would compare as
39193
+ // unsupported and the user would be told their document cannot be
39194
+ // printed when nothing is actually wrong with it.
39195
+ if (supportedExtensionsLoaded && this.files && this.files.length > 0) {
39196
+ // Validate all files
39197
+ const validationPromises = this.files.map((file) => this.validateFileType(file.name));
39198
+ const validationResults = await Promise.all(validationPromises);
39199
+ const allValid = validationResults.every((valid) => valid);
39200
+ this.notSupported = !allValid;
39201
+ }
39202
+ }
39203
+ finally {
39204
+ // Whatever failed above, the dialog has to become usable: the loading
39205
+ // status carries no close button, so throwing out of here would strand
39206
+ // the user on "Loading My Printers…" with no way back.
39207
+ this.loading = false;
39208
+ }
39209
+ }
39210
+ /**
39211
+ * Fetch the selected printer's capabilities and restore its saved settings.
39212
+ *
39213
+ * A failure drops the selection rather than keeping a printer the dialog
39214
+ * cannot describe: the options would stay disabled while Print stayed
39215
+ * enabled, so the job would go out with properties nothing has verified.
39216
+ * With no selection the user picks from the list, which fetches again.
39217
+ */
39218
+ async loadSelectedPrinterConfig() {
39219
+ this.loadingPrinterConfig = true;
39220
+ try {
39221
+ const data = await this.printService.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id);
39222
+ // An empty list or an error body leaves nothing to configure from.
39223
+ const config = data === null || data === void 0 ? void 0 : data[0];
39224
+ if (!config)
39225
+ throw new Error('No properties returned for the selected printer');
39226
+ this.selectedPrinterConfig = config;
39227
+ applySavedProperties(config, storage.getPrinterSettings(this.selectedPrinter.id), this.selectedProperties);
39228
+ this.setPaperid();
38808
39229
  if (this.selectedProperties.paper === '') {
38809
39230
  this.setDefaultPaperFormat();
38810
39231
  }
38811
39232
  }
38812
- await (await this.printService.getConfig(authStore.state.accessToken))
38813
- .json()
38814
- .then((response) => {
38815
- printStore.state.supportedFileExtensions = response.System.FILEEXT;
38816
- });
38817
- await this.printService
38818
- .getAllPrinterProperties(authStore.state.accessToken)
38819
- .then((printerConfig) => {
38820
- this.printerConfig = printerConfig;
38821
- });
38822
- if (this.files && this.files.length > 0) {
38823
- // Validate all files
38824
- const validationPromises = this.files.map((file) => this.validateFileType(file.name));
38825
- const validationResults = await Promise.all(validationPromises);
38826
- const allValid = validationResults.every((valid) => valid);
38827
- this.notSupported = !allValid;
39233
+ catch (_a) {
39234
+ this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
39235
+ }
39236
+ finally {
39237
+ this.loadingPrinterConfig = false;
38828
39238
  }
38829
- this.loading = false;
38830
39239
  }
38831
39240
  disconnectedCallback() {
38832
39241
  var _a;
@@ -38912,14 +39321,14 @@ const EzpPrinterSelection = class {
38912
39321
  return null;
38913
39322
  }
38914
39323
  render() {
38915
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
39324
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
38916
39325
  const fileNames = this.files && this.files.length > 0
38917
39326
  ? this.files.map((file) => file.name)
38918
39327
  : this.filename
38919
39328
  ? [this.filename]
38920
39329
  : [];
38921
39330
  const fileCount = fileNames.length;
38922
- return this.loading ? (index.h("ezp-status", { processing: true, description: instance.t('printer_selection.loading'), instance: "loading" })) : (index.h(index.Host, { class: { seamless: this.seamless } }, index.h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && this.renderStatus(), !this.hideheader && (index.h("div", { id: "header" }, index.h("div", { id: "title" }, index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }), !this.notSupported && fileCount > 0 && (index.h("span", { id: "files-badge" }, instance.t('printer_selection.file_count', { count: fileCount })))), index.h("div", { id: "header-actions" }, !this.hidemenu && (index.h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })), index.h("ezp-icon-button", { level: "tertiary", icon: "close", id: "close", type: "button", onClick: this.handleCancel })))), index.h("div", { id: "body" }, !this.notSupported && fileNames.length > 0 && (index.h("div", { id: "files-card" }, fileNames.map((name, index$1) => (index.h("div", { class: "file-row", key: index$1 }, index.h("ezp-icon", { name: "file", class: "file-row-icon" }), index.h("ezp-label", { ellipsis: true, text: name })))))), index.h("div", { id: "printer-card" }, index.h("ezp-select", { id: "printer", label: instance.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
39331
+ return this.loading ? (index.h("ezp-status", { processing: true, description: instance.t('printer_selection.loading'), instance: "loading" })) : (index.h(index.Host, { class: { seamless: this.seamless } }, index.h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && this.renderStatus(), !this.hideheader && (index.h("div", { id: "header" }, index.h("div", { id: "title" }, index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }), !this.notSupported && fileCount > 0 && (index.h("span", { id: "files-badge" }, instance.t('printer_selection.file_count', { count: fileCount })))), index.h("div", { id: "header-actions" }, !this.hidemenu && (index.h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })), index.h("ezp-icon-button", { level: "tertiary", icon: "close", id: "close", type: "button", onClick: this.handleCancel })))), index.h("div", { id: "body" }, !this.notSupported && fileNames.length > 0 && (index.h("div", { id: "files-card" }, fileNames.map((name, index$1) => (index.h("div", { class: "file-row", key: index$1 }, index.h("ezp-icon", { name: "file", class: "file-row-icon" }), index.h("ezp-file-name", { name: name, placement: index$1 === 0 ? 'bottom' : 'top' })))))), index.h("ezp-label", { id: "printer-caption", level: "tertiary", weight: "heavy", text: instance.t('printer_selection.printer') }), index.h("div", { id: "printer-card" }, index.h("ezp-select", { id: "printer", label: instance.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
38923
39332
  ? instance.t('printer_selection.select_printer')
38924
39333
  : instance.t('printer_selection.no_printers'), toggleFlow: "vertical", optionFlow: "vertical", options: this.printers.map((printer) => ({
38925
39334
  id: printer.id,
@@ -38927,60 +39336,48 @@ const EzpPrinterSelection = class {
38927
39336
  meta: printer.location !== '' ? printer.location : '',
38928
39337
  type: 'printer',
38929
39338
  is_queue: printer.is_queue,
38930
- })), preSelected: this.selectedPrinter.id ? this.selectedPrinter.name : null, disabled: !(this.printers.length > 0) }), index.h("button", { id: "print", type: "button", disabled: this.selectedPrinter.id === '' || this.printProcessing || this.pageRangeInvalid, onClick: this.handlePrint, ref: (button) => (this.printButton = button) }, index.h("ezp-icon", { name: "printer" }), index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }))), index.h("div", { id: "options" }, index.h("ezp-stepper", { label: instance.t('printer_selection.copies'), icon: "copies" }), index.h("ezp-select", { label: instance.t('printer_selection.color'), icon: "color", placeholder: instance.t('printer_selection.select_color'), toggleFlow: "horizontal", options: (_a = this.ColorOptions) === null || _a === void 0 ? void 0 : _a.map((option) => ({
39339
+ })), preSelected: this.selectedPrinter.id ? this.selectedPrinter.name : null, disabled: !(this.printers.length > 0) })), index.h("div", { id: "options" }, index.h("ezp-stepper", { label: instance.t('printer_selection.copies') }), index.h("ezp-select", { label: instance.t('printer_selection.color'), placeholder: instance.t('printer_selection.select_color'), toggleFlow: "horizontal", options: (_a = this.ColorOptions) === null || _a === void 0 ? void 0 : _a.map((option) => ({
38931
39340
  id: option.id,
38932
39341
  title: option.title,
38933
39342
  meta: '',
38934
39343
  type: 'color',
38935
- })), preSelected: this.selectedPrinter.id && ((_b = this.selectedPrinterConfig.Default) === null || _b === void 0 ? void 0 : _b.Color) == 'color'
38936
- ? instance.t('printer_selection.color_color')
38937
- : instance.t('printer_selection.color_grayscale'), disabled: !this.selectedPrinterConfig.ColorSupported }), index.h("ezp-select", { label: instance.t('printer_selection.duplex'), icon: "duplex", placeholder: instance.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: (_c = this.duplexOptions) === null || _c === void 0 ? void 0 : _c.map((option) => ({
39344
+ })), preSelected: this.selectedPrinter.id
39345
+ ? this.selectedProperties.color
39346
+ ? instance.t('printer_selection.color_color')
39347
+ : instance.t('printer_selection.color_grayscale')
39348
+ : null, disabled: !this.selectedPrinterConfig.ColorSupported }), index.h("ezp-select", { label: instance.t('printer_selection.duplex'), placeholder: instance.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: (_b = this.duplexOptions) === null || _b === void 0 ? void 0 : _b.map((option) => ({
38938
39349
  id: option.id,
38939
39350
  title: option.title,
38940
39351
  meta: '',
38941
39352
  type: 'duplex',
38942
- })), preSelected: this.selectedPrinter.id &&
38943
- ((_d = this.selectedPrinterConfig.Default) === null || _d === void 0 ? void 0 : _d.Duplex) == 'duplex_simplex'
38944
- ? instance.t('printer_selection.duplex_none')
38945
- : ((_e = this.selectedPrinterConfig.Default) === null || _e === void 0 ? void 0 : _e.Duplex) == 'duplex_vertical'
38946
- ? instance.t('printer_selection.duplex_long')
38947
- : ((_f = this.selectedPrinterConfig.Default) === null || _f === void 0 ? void 0 : _f.Duplex) == 'duplex_horizontal'
38948
- ? instance.t('printer_selection.duplex_short')
38949
- : null, disabled: !this.selectedPrinterConfig.DuplexSupported }), index.h("ezp-select", { label: instance.t('printer_selection.size'), icon: "size", placeholder: instance.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats &&
39353
+ })), preSelected: this.duplexPreSelection(), disabled: !this.selectedPrinterConfig.DuplexSupported }), index.h("ezp-select", { label: instance.t('printer_selection.size'), placeholder: instance.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats &&
38950
39354
  this.selectedPrinterConfig.PaperFormats.map((format) => ({
38951
39355
  id: format.Id,
38952
39356
  title: format.Name,
38953
39357
  meta: `${format.XRes} x ${format.YRes}`,
38954
39358
  type: 'format',
38955
- })), preSelected: this.selectedPrinter.id &&
38956
- ((_g = this.selectedPrinterConfig.PaperFormats) === null || _g === void 0 ? void 0 : _g.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper); }))
38957
- ? (_h = this.selectedPrinterConfig.Default) === null || _h === void 0 ? void 0 : _h.Paper
38958
- : null, disabled: !(((_k = (_j = this.selectedPrinterConfig.PaperFormats) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) > 0) }), this.paperid == PAPER_ID ? (index.h(index.Fragment, null, index.h("ezp-input", { icon: "width", suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: instance.t('printer_selection.width') }), index.h("ezp-input", { icon: "height", suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: instance.t('printer_selection.length') }))) : null, index.h("ezp-select", { label: instance.t('printer_selection.orientation'), icon: "orientation", placeholder: instance.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: (_l = this.selectedPrinterConfig.OrientationsSupported) === null || _l === void 0 ? void 0 : _l.map((orientation, index) => ({
39359
+ })), preSelected: this.paperPreSelection(), disabled: !(((_d = (_c = this.selectedPrinterConfig.PaperFormats) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0) }), this.paperid == PAPER_ID ? (index.h(index.Fragment, null, index.h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: instance.t('printer_selection.width') }), index.h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: instance.t('printer_selection.length') }))) : null, index.h("ezp-select", { label: instance.t('printer_selection.orientation'), placeholder: instance.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: (_e = this.selectedPrinterConfig.OrientationsSupported) === null || _e === void 0 ? void 0 : _e.map((orientation, index) => ({
38959
39360
  id: index + 1,
38960
39361
  title: instance.t(`printer_selection.orientation_${orientation}`),
38961
39362
  meta: '',
38962
39363
  type: 'orientation',
38963
- })), preSelected: this.selectedPrinter.id ? this.selectedProperties.orientation : null, disabled: !(((_o = (_m = this.selectedPrinterConfig.OrientationsSupported) === null || _m === void 0 ? void 0 : _m.length) !== null && _o !== void 0 ? _o : 0) > 0) }), index.h("ezp-select", { label: instance.t('printer_selection.quality'), icon: "quality", placeholder: instance.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: (_p = this.selectedPrinterConfig.Resolutions) === null || _p === void 0 ? void 0 : _p.map((option, index) => ({
39364
+ })), preSelected: this.selectedPrinter.id ? this.selectedProperties.orientation : null, disabled: !(((_g = (_f = this.selectedPrinterConfig.OrientationsSupported) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) > 0) }), index.h("ezp-select", { label: instance.t('printer_selection.quality'), placeholder: instance.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: (_h = this.selectedPrinterConfig.Resolutions) === null || _h === void 0 ? void 0 : _h.map((option, index) => ({
38964
39365
  id: index,
38965
39366
  title: option,
38966
39367
  meta: '',
38967
39368
  type: 'quality',
38968
- })), preSelected: this.selectedPrinter.id &&
38969
- ((_q = this.selectedPrinterConfig.Resolutions) === null || _q === void 0 ? void 0 : _q.includes((_r = this.selectedPrinterConfig.Default) === null || _r === void 0 ? void 0 : _r.Resolution))
38970
- ? (_s = this.selectedPrinterConfig.Default) === null || _s === void 0 ? void 0 : _s.Resolution
38971
- : null, disabled: !(((_u = (_t = this.selectedPrinterConfig.Resolutions) === null || _t === void 0 ? void 0 : _t.length) !== null && _u !== void 0 ? _u : 0) > 0) }), this.selectedPrinterConfig.Trays &&
39369
+ })), preSelected: this.selectedPrinter.id
39370
+ ? this.selectedProperties.resolution || null
39371
+ : null, disabled: !(((_k = (_j = this.selectedPrinterConfig.Resolutions) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) > 0) }), this.selectedPrinterConfig.Trays &&
38972
39372
  this.selectedPrinterConfig.Trays.length >= 1 &&
38973
- this.selectedPrinterConfig.Trays[0] != null ? (index.h("ezp-select", { label: instance.t('printer_selection.trays'), icon: "trays", placeholder: instance.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1
39373
+ this.selectedPrinterConfig.Trays[0] != null ? (index.h("ezp-select", { label: instance.t('printer_selection.trays'), placeholder: instance.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1
38974
39374
  ? this.selectedPrinterConfig.Trays.map((trays) => ({
38975
39375
  title: trays.Name,
38976
39376
  id: trays.Index,
38977
39377
  meta: '',
38978
39378
  type: 'tray',
38979
39379
  }))
38980
- : undefined, preSelected: this.selectedPrinter.id &&
38981
- ((_v = this.selectedPrinterConfig.Trays) === null || _v === void 0 ? void 0 : _v.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Tray); }))
38982
- ? (_w = this.selectedPrinterConfig.Default) === null || _w === void 0 ? void 0 : _w.Tray
38983
- : null })) : null, index.h("ezp-input", { icon: "paper_range", suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: instance.t('printer_selection.page_ranges') }))), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: instance.t('button_actions.cancel'), class: "action", id: "cancel" })), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
39380
+ : undefined, preSelected: this.trayPreSelection() })) : null, index.h("ezp-input", { suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: instance.t('printer_selection.page_ranges') }))), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: instance.t('button_actions.cancel'), class: "action", id: "cancel" }), index.h("button", { id: "print", type: "button", disabled: this.printDisabled, onClick: this.handlePrint, ref: (button) => (this.printButton = button) }, index.h("ezp-icon", { name: "printer" }), index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }))), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
38984
39381
  }
38985
39382
  };
38986
39383
  EzpPrinterSelection.style = ezpPrinterSelectionCss();
@@ -39330,7 +39727,7 @@ const EzpPrinting = class {
39330
39727
  *
39331
39728
  */
39332
39729
  render() {
39333
- return (index.h(index.Host, { key: '8eaeae452fb60e1c15265cf970dddf8767e4c849', class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
39730
+ return (index.h(index.Host, { key: '988a7acf819e139fe6d103b122bf9181e848be82', class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
39334
39731
  ? this.systemAppearance
39335
39732
  : userStore.state.appearance} ${this.seamless ? 'seamless' : ''}` }, this.trigger === 'custom' ? (index.h("slot", null)) : this.trigger === 'file' ? (index.h("ezp-upload", null)) : (this.trigger === 'button' && (index.h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (index.h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (index.h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, files: this.files, hidemenu: this.hidemenu, hideheader: this.hideheader, seamless: this.seamless })) : this.noDocumentOpen ? (index.h("ezp-dialog", { heading: instance.t('no_document_dialog.heading'), description: instance.t('no_document_dialog.description'), action: instance.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
39336
39733
  }
@@ -39351,7 +39748,7 @@ const EzpPrinting = class {
39351
39748
  };
39352
39749
  EzpPrinting.style = ezpPrintingCss();
39353
39750
 
39354
- const ezpSelectCss = () => `:host{--ezp-select-duration:var(--ezp-duration-3);--ezp-badge-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(.toggle-horizontal){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label value accessory';--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:56px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:center}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label accessory' 'value accessory';--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:64px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label accessory' 'icon value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:44px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:52px}:host(.toggle-vertical.has-icon){--ezp-select-badge-background:var(--ezp-badge-gradient);--ezp-select-badge-color:var(--ezp-white-100);--ezp-select-badge-height:44px;--ezp-select-badge-width:44px;--ezp-select-label-textTransform:uppercase;--ezp-select-label-letterSpacing:0.08em;--ezp-select-label-fontSize:11px;--ezp-select-value-fontSize:16px;--ezp-select-value-fontWeight:600;--ezp-select-value-color:var(--ezp-core-foreground-primary)}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-toggle-background:var(--ezp-theme-translucent);--ezp-select-wrap-background:var(--ezp-core-surface-tertiary);--ezp-select-wrap-borderRadius:12px;--ezp-select-wrap-boxShadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop)}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-badge-background:var(--ezp-core-shade-primary);--ezp-select-badge-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--ezp-select-value-color:var(--ezp-core-foreground-tertiary);--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-select-wrap-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-shadow:var(--ezp-select-wrap-boxShadow, none);box-shadow:var(--ezp-select-wrap-boxShadow, none);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:2px var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart)}#toggle:hover{--ezp-select-toggle-background:var( --ezp-select-toggle-background-hover, var(--ezp-core-shade-primary) )}#icon{--ezp-icon-background:var(--ezp-select-badge-background, var(--ezp-theme-translucent));--ezp-icon-borderRadius:50%;--ezp-icon-height:var(--ezp-select-badge-height, 40px);--ezp-icon-width:var(--ezp-select-badge-width, 40px);align-self:center;color:var(--ezp-select-badge-color, var(--ezp-theme-solid));grid-area:icon}#label{--ezp-label-fontSize:var(--ezp-select-label-fontSize, 14px);--ezp-label-letterSpacing:var(--ezp-select-label-letterSpacing, normal);align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-primary));grid-area:label;text-transform:var(--ezp-select-label-textTransform, none)}#value{--ezp-label-fontSize:var(--ezp-select-value-fontSize, 14px);--ezp-label-fontWeight:var(--ezp-select-value-fontWeight, 400);align-self:var(--ezp-select-value-alignSelf, auto);color:var(--ezp-select-value-color, var(--value-color, var(--ezp-core-foreground-secondary)));grid-area:value;text-align:right}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-tertiary));grid-area:accessory}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}`;
39751
+ const ezpSelectCss = () => `:host{--ezp-select-duration:var(--ezp-duration-3);display:block;height:var(--ezp-select-toggle-height);position:relative;-webkit-transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));transition:var(--ezp-select-transition, z-index 0s var(--ezp-select-duration));z-index:var(--ezp-select-zIndex, 3)}:host(.toggle-horizontal){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label value accessory';--ezp-select-toggle-gridTemplateColumns:1fr repeat(2, auto);--ezp-select-toggle-height:56px;--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-alignSelf:center}:host(.toggle-horizontal.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr repeat(2, auto)}:host(.toggle-vertical){--ezp-select-label-alignSelf:center;--ezp-select-toggle-gridTemplateAreas:'label accessory' 'value accessory';--ezp-select-toggle-gridTemplateColumns:1fr auto;--ezp-select-toggle-height:64px;--ezp-select-toggle-gridTemplateRows:repeat(2, auto);--ezp-select-value-alignSelf:center}:host(.toggle-vertical.has-icon){--ezp-select-toggle-gridTemplateAreas:'icon label accessory' 'icon value accessory';--ezp-select-toggle-gridTemplateColumns:auto 1fr auto}:host(.option-horizontal){--ezp-select-details-gridTemplateColumns:repeat(2, 1fr);--ezp-select-details-gridTemplateRows:auto;--ezp-select-option-height:44px}:host(.option-vertical){--ezp-select-details-gridTemplateColumns:1fr;--ezp-select-details-gridTemplateRows:repeat(2, auto);--ezp-select-option-height:52px}:host(.toggle-vertical.has-icon){--ezp-select-badge-borderRadius:10px;--ezp-select-badge-height:40px;--ezp-select-badge-width:40px;--ezp-select-label-textTransform:uppercase;--ezp-select-label-letterSpacing:0.08em;--ezp-select-label-fontSize:11px;--ezp-select-value-fontSize:16px;--ezp-select-value-fontWeight:600;--ezp-select-value-color:var(--ezp-core-foreground-primary)}:host(.is-expanded){--ezp-select-accessory-color:var(--ezp-theme-solid);--ezp-select-transition:z-index 0s 0s;--ezp-select-zIndex:9999;--ezp-select-label-color:var(--ezp-theme-solid);--ezp-select-toggle-background:var(--ezp-theme-translucent);--ezp-select-wrap-background:var(--ezp-core-surface-tertiary);--ezp-select-wrap-borderRadius:12px;--ezp-select-wrap-boxShadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop)}:host(.disabled){--ezp-select-accessory-color:var(--ezp-core-foreground-tertiary);--ezp-select-badge-background:var(--ezp-core-shade-primary);--ezp-select-badge-color:var(--ezp-core-foreground-tertiary);--ezp-select-label-color:var(--ezp-core-foreground-tertiary);--ezp-select-toggle-background-hover:transparent;--ezp-select-toggle-cursor:default;--ezp-select-value-color:var(--ezp-core-foreground-tertiary);--value-color:var(--ezp-core-foreground-tertiary)}#wrap{background:var(--ezp-select-wrap-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-shadow:var(--ezp-select-wrap-boxShadow, none);box-shadow:var(--ezp-select-wrap-boxShadow, none);-webkit-transform:translateY(var(--ezp-select-wrap-translateY, 0));transform:translateY(var(--ezp-select-wrap-translateY, 0));-webkit-transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:transform var(--ezp-select-duration) var(--ezp-easing-out-quart), border-radius var(--ezp-select-duration) var(--ezp-easing-out-quart), box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-transform var(--ezp-select-duration) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-select-duration) var(--ezp-easing-out-quart)}#toggle{background:var(--ezp-select-toggle-background, transparent);border-radius:var(--ezp-select-wrap-borderRadius, 12px);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:var(--ezp-select-toggle-cursor, pointer);display:grid;gap:2px var(--ezp-spacing-3);grid-template-areas:var(--ezp-select-toggle-gridTemplateAreas, none);grid-template-columns:var(--ezp-select-toggle-gridTemplateColumns, none);grid-template-rows:var(--ezp-select-toggle-gridTemplateRows, auto);height:var(--ezp-select-toggle-height, auto);padding:var(--ezp-spacing-2) var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart)}#toggle:hover{--ezp-select-toggle-background:var( --ezp-select-toggle-background-hover, var(--ezp-core-shade-primary) )}#icon{--ezp-icon-background:var(--ezp-select-badge-background, var(--ezp-theme-translucent));--ezp-icon-borderRadius:var(--ezp-select-badge-borderRadius, 50%);--ezp-icon-height:var(--ezp-select-badge-height, 40px);--ezp-icon-width:var(--ezp-select-badge-width, 40px);align-self:center;color:var(--ezp-select-badge-color, var(--ezp-theme-solid));grid-area:icon}#label{--ezp-label-fontSize:var(--ezp-select-label-fontSize, 14px);--ezp-label-letterSpacing:var(--ezp-select-label-letterSpacing, normal);align-self:var(--ezp-select-label-alignSelf, auto);color:var(--ezp-select-label-color, var(--ezp-core-foreground-primary));display:var(--ezp-select-label-display, block);grid-area:label;text-transform:var(--ezp-select-label-textTransform, none)}#value{--ezp-label-fontSize:var(--ezp-select-value-fontSize, 14px);--ezp-label-fontWeight:var(--ezp-select-value-fontWeight, 400);align-self:var(--ezp-select-value-alignSelf, auto);color:var(--ezp-select-value-color, var(--value-color, var(--ezp-core-foreground-secondary)));grid-area:value;text-align:var(--ezp-select-value-textAlign, right)}#accessory{align-self:center;color:var(--ezp-select-accessory-color, var(--ezp-core-foreground-tertiary));grid-area:accessory}#list{-webkit-box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 1px 0 0 var(--ezp-core-outline);height:var(--ezp-select-list-height, 0);overflow:auto;-webkit-transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart);transition:height var(--ezp-select-duration) var(--ezp-easing-out-quart)}.option{background:var(--ezp-select-option-background);-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:grid;gap:var(--ezp-spacing-3);grid-template:auto/auto 1fr;height:var(--ezp-select-option-height, auto);padding:0 0 0 var(--ezp-spacing-3)}.option:not(:last-child){--ezp-select-details-boxShadow:inset 0 -1px 0 0 var(--ezp-core-outline)}.option:hover{--ezp-select-option-background:var(--ezp-core-shade-primary)}.option:active{--ezp-select-option-background:var(--ezp-core-shade-secondary)}.option.is-selected{--ezp-select-indicator-opacity:1;--ezp-select-indicator-transform:translateX(0);--ezp-select-indicator-transition:opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s 0s;--ezp-select-indicator-visibility:visible}.indicator{-ms-flex-item-align:center;align-self:center;color:var(--ezp-theme-solid);margin:calc(var(--ezp-spacing-2) * -1) 0;opacity:var(--ezp-select-indicator-opacity, 0);-webkit-transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));transform:var(--ezp-select-indicator-transform, translateX(var(--ezp-spacing-3)));-webkit-transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));transition:var(--ezp-select-indicator-transition, opacity var(--ezp-select-duration) var(--ezp-easing-out-quart), transform var(--ezp-select-duration) var(--ezp-easing-out-quart), visibility 0s var(--ezp-select-duration));visibility:var(--ezp-select-indicator-visibility, hidden)}.details{-webkit-box-shadow:var(--ezp-select-details-boxShadow);box-shadow:var(--ezp-select-details-boxShadow);display:grid;gap:var(--ezp-spacing-2);grid-template-columns:var(--ezp-select-details-gridTemplateColumns, 1fr);grid-template-rows:var(--ezp-select-details-gridTemplateRows, auto);padding:var(--ezp-spacing-3) var(--ezp-spacing-3) var(--ezp-spacing-3) 0}.title{-ms-flex-item-align:start;align-self:start;color:var(--ezp-core-foreground-primary)}.meta{-ms-flex-item-align:end;align-self:end;color:var(--ezp-core-foreground-secondary)}`;
39355
39752
 
39356
39753
  /**
39357
39754
  * The "nothing selected" sentinel. Its empty `title` makes the toggle fall back
@@ -39566,7 +39963,7 @@ const EzpSelect = class {
39566
39963
  this.disabled ? 'disabled' : '',
39567
39964
  ];
39568
39965
  const labelLevel = this.toggleFlow === 'horizontal' ? 'secondary' : 'tertiary';
39569
- return (index.h(index.Host, { key: 'feebc96701d65827e984b1d75d9ef96974ae6df3', class: hostClasses.join(' ') }, index.h("div", { key: 'ef9d6ac76f626f74d0dfc0cff7e1747afae0df1b', id: "wrap" }, index.h("div", { key: '3a18e8c059d93be76f72b0244133b7dbddba5d0d', id: "toggle", role: "combobox", "aria-haspopup": "listbox", "aria-controls": "list", "aria-expanded": this.expanded ? 'true' : 'false', "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, ref: (el) => (this.toggleEl = el), onClick: () => !this.disabled && this.toggle(), onKeyDown: this.handleToggleKeydown }, this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: 'fda5f7c7f33343634df401890b1c580369273568', id: "label", noWrap: true, level: labelLevel, text: this.label }), index.h("ezp-label", { key: '2cad104bb14338efaf165c7edff5a7226b9f8a8c', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), index.h("ezp-icon", { key: 'e4e3a59e2ee36ee9d07232ca03e540b4e7dad6ba', id: "accessory", name: "expand" })), index.h("div", { key: '3f3c5bc0202985d4f64ba9df828c877df1240f6f', id: "list", role: "listbox", "aria-label": this.label, ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
39966
+ return (index.h(index.Host, { key: '7dd328df209e8906917c97b8002bdcd9e2fafa0b', class: hostClasses.join(' ') }, index.h("div", { key: '522bbbfea1ef111af7bd7317cc6054138eca020d', id: "wrap" }, index.h("div", { key: 'd1c2c06a33f629d589e2247342467ebbd7283d1b', id: "toggle", role: "combobox", "aria-haspopup": "listbox", "aria-controls": "list", "aria-expanded": this.expanded ? 'true' : 'false', "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, ref: (el) => (this.toggleEl = el), onClick: () => !this.disabled && this.toggle(), onKeyDown: this.handleToggleKeydown }, this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: 'c60d6dd802424b2502d1b9c9066732ef02909779', id: "label", noWrap: true, level: labelLevel, text: this.label }), index.h("ezp-label", { key: 'c92c91c848aec5b6ff386f32beb41bdaf4407613', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), index.h("ezp-icon", { key: '7c653c97c7da8471e7db51c1ba04718842a9991b', id: "accessory", name: "expand" })), index.h("div", { key: '5c1aeeb45f4cbf1c4e26653312d6cc0a7e7084ce', id: "list", role: "listbox", "aria-label": this.label, ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
39570
39967
  var _a, _b;
39571
39968
  if (option.title !== '') {
39572
39969
  return (index.h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, role: "option", "aria-selected": option.id === ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.id) ? 'true' : 'false', tabindex: this.expanded ? 0 : -1, onClick: () => this.select(option.id), onKeyDown: (event) => this.handleOptionKeydown(event, option.id) }, index.h("ezp-icon", { name: "checkmark", class: "indicator" }), index.h("div", { class: "details" }, index.h("ezp-label", { class: "title", ellipsis: true, text: option.title }), option.meta !== '' ? (index.h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
@@ -39636,9 +40033,9 @@ const EzpStatus = class {
39636
40033
  return (
39637
40034
  // Live region so screen readers announce status changes (loading,
39638
40035
  // processing, success, error) as they render.
39639
- index.h(index.Host, { key: '5956a42fc8d74042fe88418c5f98011d0bf728c8', role: "status", "aria-live": "polite" }, index.h("div", { key: 'b1aebc3725a621c0e4474481064988167ca80328', id: "box" }, this.processing ? (index.h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), index.h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (index.h("div", { id: "icon" }, index.h("div", { id: "icon-inner" }, index.h("ezp-icon", { name: this.icon })))) : null, index.h("ezp-label", { key: '34baad28a5ffc3fac42eef6a886ae52f772e3576', id: "description", weight: "heavy", text: this.description }), this.subtext && (index.h("ezp-label", { key: '321659cc9ae7a40f62c8fc6447556d1aa026a9dc', id: "subtext", level: "secondary", text: this.subtext })), (this.cancel || this.close || this.retry) && (index.h("div", { key: 'ce83d1db0aad512f282f1a2bbfbf112a3d2f7aed', id: "footer" }, this.cancel && (index.h("ezp-text-button", { key: '9eb72f9e158b1e2c6a4fd2d2755705c2041b67f5', class: "action secondary", level: "secondary", onClick: this.handleCancel, label: typeof this.cancel === 'string'
40036
+ index.h(index.Host, { key: 'db32e5667bf9438a6d3d80807519ad2c158549ff', role: "status", "aria-live": "polite" }, index.h("div", { key: '815ecfbd3b272f206764ca852b8d865d7bc3cb8d', id: "box" }, this.processing ? (index.h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), index.h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (index.h("div", { id: "icon" }, index.h("div", { id: "icon-inner" }, index.h("ezp-icon", { name: this.icon })))) : null, index.h("ezp-label", { key: '385d4fbbd7ed1b7a4aa2334d6d2145c2f5207508', id: "description", weight: "heavy", text: this.description }), this.subtext && (index.h("ezp-label", { key: 'c6a243dd4ddc428f3e34021430d6b935f0a9e1a6', id: "subtext", level: "secondary", text: this.subtext })), (this.cancel || this.close || this.retry) && (index.h("div", { key: '0dfc5f86b6366b3631ac74c15e9d467a884feb52', id: "footer" }, this.cancel && (index.h("ezp-text-button", { key: 'a89289163ac7d630d35e887deead462c6dc29af4', class: "action secondary", level: "secondary", onClick: this.handleCancel, label: typeof this.cancel === 'string'
39640
40037
  ? this.cancel
39641
- : instance.t('button_actions.cancel') })), this.close && (index.h("ezp-text-button", { key: '9a10f49011bf0f0cba24905e82574199837e122a', class: `action ${this.retry ? 'secondary' : 'primary'}`, level: this.retry ? 'secondary' : 'primary', onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : instance.t('button_actions.close') })), this.retry && (index.h("ezp-text-button", { key: '2522cfae37af2c9e8800af545f04b986affac356', class: "action primary", level: "primary", onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : instance.t('button_actions.retry') })))))));
40038
+ : instance.t('button_actions.cancel') })), this.close && (index.h("ezp-text-button", { key: 'd2e3814f2a81ce03f4e0f4bbcf7cc734ade37aa9', class: `action ${this.retry ? 'secondary' : 'primary'}`, level: this.retry ? 'secondary' : 'primary', onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : instance.t('button_actions.close') })), this.retry && (index.h("ezp-text-button", { key: '6e53e77afc6c3954435b08c6daaa65dd829ce9ad', class: "action primary", level: "primary", onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : instance.t('button_actions.retry') })))))));
39642
40039
  }
39643
40040
  };
39644
40041
  EzpStatus.style = ezpStatusCss();
@@ -39775,7 +40172,7 @@ const EzpStepper = class {
39775
40172
  *
39776
40173
  */
39777
40174
  render() {
39778
- return (index.h(index.Host, { key: 'ef15da0203857706cd220bd932fe25fb20f9a876', class: `${this.focused ? 'focused' : ''} ${this.icon ? 'has-icon' : ''}` }, index.h("div", { key: 'c36d83b93752da6678184e6e5d449e7422d0dd10', id: "toggle", onClick: this.setFocus }), this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '14e07c854636dfce079c349dd245fa8c7fc3025d', id: "label", noWrap: true, text: this.label }), index.h("div", { key: '11eef956e9f5dbb0feffa5fd2aed60dae7d80035', class: "buttons" }, index.h("button", { key: 'e328929f56a3aebeff825a711674a9e3d9e91ab0', class: "button", type: "button", "aria-label": `Decrease ${this.label}`, disabled: !this.canDecrease, onClick: this.handleDecrease }, index.h("ezp-icon", { key: 'd1af53b4ab9e22c28bd16325851f01e7c551de94', name: "minus" })), index.h("input", { key: '3591c3060576cf1abdc1187e20aa97b901589a92', id: "input", type: "number", ref: (input) => (this.input = input), min: this.min.toString(), max: this.max !== undefined ? this.max.toString() : undefined, value: this.value.toString(), "aria-label": this.label, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), index.h("button", { key: 'c081e7190bbea2f2d75cf81394c781ade876dce6', class: "button", type: "button", "aria-label": `Increase ${this.label}`, disabled: !this.canIncrease, onClick: this.handleIncrease }, index.h("ezp-icon", { key: 'd3a1ddde274537dec1f5a17c0cdf5afdd40fe24f', name: "plus" })))));
40175
+ return (index.h(index.Host, { key: 'cbf3ded61537359ed280a204bb71240d0a34473a', class: `${this.focused ? 'focused' : ''} ${this.icon ? 'has-icon' : ''}` }, index.h("div", { key: '1c7a265f60d06dbea4a80e19ecdaa4a10aed694c', id: "toggle", onClick: this.setFocus }), this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '9fd0e1128480dd9b288cb266542fd4e6b83ceebd', id: "label", noWrap: true, text: this.label }), index.h("div", { key: '975fc0539e76750d7457c71d40f228cb5ebcaad8', class: "buttons" }, index.h("button", { key: 'db01d05fdcbc4eda2810751ace0194d9a1ec9eb7', class: "button", type: "button", "aria-label": `Decrease ${this.label}`, disabled: !this.canDecrease, onClick: this.handleDecrease }, index.h("ezp-icon", { key: '7d938efa8426caf292403e94e3565d20dc40d121', name: "minus" })), index.h("input", { key: 'dbff518a5d1f28b3b23d597947c250bef71fd68a', id: "input", type: "number", ref: (input) => (this.input = input), min: this.min.toString(), max: this.max !== undefined ? this.max.toString() : undefined, value: this.value.toString(), "aria-label": this.label, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), index.h("button", { key: 'b3001bb27f94f65fce51d3a69d7713e5da9ccdcc', class: "button", type: "button", "aria-label": `Increase ${this.label}`, disabled: !this.canIncrease, onClick: this.handleIncrease }, index.h("ezp-icon", { key: '534bb499fa2ced2591ccbc137186e59d22aa2f5f', name: "plus" })))));
39779
40176
  }
39780
40177
  static get watchers() { return {
39781
40178
  "value": [{
@@ -39797,7 +40194,7 @@ EzpStepper.ALLOWED_KEYS = [
39797
40194
  EzpStepper.CTRL_CMD_KEYS = ['a', 'c', 'v', 'x'];
39798
40195
  EzpStepper.style = ezpStepperCss();
39799
40196
 
39800
- const ezpTextButtonCss = () => `:host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:var(--ezp-textButton-borderRadius, 3px);-webkit-box-shadow:var(--ezp-textButton-boxShadow, none);box-shadow:var(--ezp-textButton-boxShadow, none);color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-textButton-padding, var(--ezp-spacing-3));white-space:nowrap;width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var( --ezp-textButton-background-hover, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var( --ezp-textButton-background-active, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}`;
40197
+ const ezpTextButtonCss = () => `:host{display:-ms-flexbox;display:flex}:host(.primary){--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-init:var(--ezp-theme-solid);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-white-100);--ezp-textButton-opacity-active:0.74;--ezp-textButton-opacity-hover:0.84}:host(.secondary){--ezp-textButton-background-active:var(--ezp-core-shade-tertiary);--ezp-textButton-background-disabled:var(--ezp-core-shade-primary);--ezp-textButton-background-hover:var(--ezp-core-shade-secondary);--ezp-textButton-background-init:var(--ezp-core-shade-primary);--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}:host(.tertiary){--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-disabled:transparent;--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-color-disabled:var(--ezp-core-foreground-tertiary);--ezp-textButton-color-init:var(--ezp-theme-solid)}#button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-textButton-background, var(--ezp-textButton-background-init));border:0;border-radius:var(--ezp-textButton-borderRadius, 3px);-webkit-box-shadow:var(--ezp-textButton-boxShadow, none);box-shadow:var(--ezp-textButton-boxShadow, none);color:var(--ezp-textButton-color, var(--ezp-textButton-color-init));cursor:var(--ezp-textButton-cursor, pointer);display:-ms-flexbox;display:flex;font-family:inherit;-ms-flex-pack:center;justify-content:center;margin:0;opacity:var(--ezp-textButton-opacity, 1);outline:none;padding:var(--ezp-textButton-padding, var(--ezp-spacing-3));white-space:var(--ezp-textButton-whiteSpace, nowrap);width:100%}@media (hover: hover){#button:not(:disabled):hover{--ezp-textButton-background:var( --ezp-textButton-background-hover, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-hover, 1)}#button:not(:disabled):active{--ezp-textButton-background:var( --ezp-textButton-background-active, var(--ezp-textButton-background-init) );--ezp-textButton-opacity:var(--ezp-textButton-opacity-active, 1)}}#button:disabled{--ezp-textButton-background:var(--ezp-textButton-background-disabled);--ezp-textButton-boxShadow:none;--ezp-textButton-color:var(--ezp-textButton-color-disabled);--ezp-textButton-cursor:default}#label{pointer-events:none}`;
39801
40198
 
39802
40199
  const EzpTextButton = class {
39803
40200
  constructor(hostRef) {
@@ -39832,12 +40229,12 @@ const EzpTextButton = class {
39832
40229
  href: this.href,
39833
40230
  target: this.blank ? '_blank' : '_self',
39834
40231
  };
39835
- return (index.h(index.Host, { key: 'e4d814429f79e8c7043ac26f44ebab08ba119cb4', class: `${this.level}` }, index.h(TagType, Object.assign({ key: 'e3f66d16f69c8abc1f073558b6547644340dcb6b', id: "button", "aria-label": this.label }, attributes), index.h("ezp-label", { key: 'c091e210993059cdf044863fe600212ec04c44b7', id: "label", weight: "heavy", text: this.label, level: this.small ? 'tertiary' : 'secondary' }))));
40232
+ return (index.h(index.Host, { key: '31c3726d82b340fad817eec01f597b58702ff292', class: `${this.level}` }, index.h(TagType, Object.assign({ key: '5e26c8e81ab49575b1a29c309f7792a2286ee455', id: "button", "aria-label": this.label }, attributes), index.h("ezp-label", { key: 'b21b121c9da908b6cba286a528f8e6772c179a36', id: "label", weight: "heavy", text: this.label, level: this.small ? 'tertiary' : 'secondary' }))));
39836
40233
  }
39837
40234
  };
39838
40235
  EzpTextButton.style = ezpTextButtonCss();
39839
40236
 
39840
- const ezpUploadCss = () => `:host{--ezp-upload-gradient:linear-gradient( 135deg, color-mix(in srgb, var(--ezp-theme-solid), white 14%) 0%, color-mix(in srgb, var(--ezp-theme-solid), black 22%) 100% );-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;width:var(--ezp-upload-width, auto);height:var(--ezp-upload-height, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);height:100%;padding:var(--ezp-spacing-5)}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-background, transparent);border:1.5px dashed var(--ezp-upload-border-color, var(--ezp-core-foreground-tertiary));border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:0;padding:var(--ezp-spacing-6) var(--ezp-spacing-5);text-align:center;-webkit-transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-3) var(--ezp-easing-out-quart), border-color var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-background:var(--ezp-theme-translucent);--ezp-upload-border-color:var(--ezp-theme-solid)}#cloud{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-gradient);border-radius:20px;-webkit-box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);box-shadow:0 12px 24px -8px color-mix(in srgb, var(--ezp-theme-solid), transparent 45%);color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:84px;-ms-flex-pack:center;justify-content:center;width:84px}#cloud ezp-icon{--ezp-icon-size:40px;--ezp-icon-gridTemplate:40px}#dropzone-title{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#meta{-ms-flex-align:baseline;align-items:baseline;color:var(--ezp-core-foreground-secondary);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:4px;-ms-flex-pack:center;justify-content:center}#browse{color:var(--ezp-theme-solid);cursor:pointer;opacity:var(--ezp-upload-browse-opacity, 1)}@media (hover: hover){#browse:hover{--ezp-upload-browse-opacity:0.6}}#formats{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-2);-ms-flex-pack:center;justify-content:center}.format{background:transparent;border:1px solid var(--ezp-core-outline);border-radius:999px;color:var(--ezp-core-foreground-secondary);font-size:12px;font-weight:600;letter-spacing:0.02em;line-height:1;padding:7px 14px}#thumbs{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;max-height:40vh;overflow-y:auto;padding:var(--ezp-spacing-1);scrollbar-width:thin;width:100%}.thumb{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:6px;position:relative;width:88px}.thumb-icon{-ms-flex-align:center;align-items:center;background:var(--ezp-upload-gradient);border-radius:50%;color:var(--ezp-white-100);display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:center;justify-content:center;width:56px}.thumb-icon ezp-icon{--ezp-icon-size:26px;--ezp-icon-gridTemplate:26px}.thumb-name{--ezp-label-minWidth:0;max-width:100%}.thumb-meta{letter-spacing:0.02em}.thumb-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-core-surface-tertiary);border:1px solid var(--ezp-core-outline);border-radius:50%;color:var(--ezp-core-foreground-secondary);cursor:pointer;display:-ms-flexbox;display:flex;height:20px;-ms-flex-pack:center;justify-content:center;padding:0;position:absolute;right:8px;top:-4px;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:20px;z-index:1}.thumb-remove ezp-icon{--ezp-icon-size:12px;--ezp-icon-gridTemplate:12px}@media (hover: hover){.thumb-remove:hover{color:var(--ezp-core-foreground-primary)}}.thumb-add{cursor:pointer}.thumb-add .thumb-add-icon{-ms-flex-align:center;align-items:center;border:1.5px dashed var(--ezp-core-foreground-tertiary);border-radius:50%;color:var(--ezp-core-foreground-secondary);display:-ms-flexbox;display:flex;height:56px;-ms-flex-pack:center;justify-content:center;-webkit-transition:border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:border-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:56px}.thumb-add .thumb-add-icon ezp-icon{--ezp-icon-size:24px;--ezp-icon-gridTemplate:24px}@media (hover: hover){.thumb-add:hover .thumb-add-icon{border-color:var(--ezp-theme-solid);color:var(--ezp-theme-solid)}}#ready{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;text-align:center;text-transform:uppercase}#footer{display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr}.action{--ezp-textButton-borderRadius:999px;--ezp-textButton-padding:var(--ezp-spacing-4)}#continue{--ezp-textButton-background-init:var(--ezp-upload-gradient)}`;
40237
+ const ezpUploadCss = () => `@charset "UTF-8";:host{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;height:var(--ezp-upload-height, auto);width:var(--ezp-upload-width, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden}:host(.dragging) #modal *{pointer-events:none}#body-frame{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;position:relative}#body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;overflow-y:auto;padding:var(--ezp-spacing-4);scrollbar-width:thin}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-theme-translucent);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:var(--ezp-upload-dropzone-boxShadow, none);box-shadow:var(--ezp-upload-dropzone-boxShadow, none);display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:160px;padding:var(--ezp-spacing-6) var(--ezp-spacing-4);text-align:center;-webkit-transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-dropzone-boxShadow:0 0 0 4px var(--ezp-theme-translucent)}:host(:not(.dragging)) #dropzone-title,:host(.dragging) #dropzone-prompt{display:none}#drop-overlay{-ms-flex-align:center;align-items:center;background:-webkit-gradient(linear, left top, left bottom, from(var(--ezp-theme-translucent)), to(var(--ezp-theme-translucent))), var(--ezp-core-surface-tertiary);background:linear-gradient(var(--ezp-theme-translucent), var(--ezp-theme-translucent)), var(--ezp-core-surface-tertiary);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:0 0 0 4px var(--ezp-theme-translucent);box-shadow:0 0 0 4px var(--ezp-theme-translucent);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);inset:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;pointer-events:none;position:absolute;text-align:center;z-index:1}#dropzone-icon{--ezp-icon-size:32px;--ezp-icon-gridTemplate:32px;color:var(--ezp-theme-solid)}#dropzone-prompt{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3)}#choose{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-5)}#drag-hint{color:var(--ezp-core-foreground-primary)}#formats{color:var(--ezp-core-foreground-secondary)}#files{border:1px solid var(--ezp-core-outline);border-radius:12px}.file{-ms-flex-align:center;align-items:center;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:auto minmax(0, 1fr) auto;padding:var(--ezp-spacing-3) var(--ezp-spacing-4);position:relative}.file+.file{border-top:1px solid var(--ezp-core-outline)}.file-type{background:var(--ezp-theme-translucent);border-radius:6px;color:var(--ezp-theme-solid);font-size:11px;font-weight:600;letter-spacing:0.02em;line-height:1;overflow:hidden;padding:8px 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:56px}.file-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);min-width:0}.file-size{color:var(--ezp-core-foreground-secondary)}.file-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:6px;color:var(--ezp-core-foreground-tertiary);cursor:pointer;display:-ms-flexbox;display:flex;height:28px;-ms-flex-pack:center;justify-content:center;padding:0;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:28px}.file-remove ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.file-remove:hover{color:var(--ezp-core-foreground-primary)}}#add-more{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-upload-addMore-background, transparent);border:0;border-radius:0 0 11px 11px;border-top:1px solid var(--ezp-core-outline);color:var(--ezp-theme-solid);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:4px;-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#add-more ezp-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px}@media (hover: hover){#add-more:hover{--ezp-upload-addMore-background:var(--ezp-core-shade-primary)}}#footer{border-top:1px solid var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4)}.action{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-3);--ezp-textButton-whiteSpace:normal;text-align:center}#clear{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary)}`;
39841
40238
 
39842
40239
  /** File formats advertised to the user as supported for printing. */
39843
40240
  const SUPPORTED_FORMATS = ['PDF', 'DOCX', 'PNG', 'JPG', 'XLSX'];
@@ -39854,11 +40251,32 @@ const EzpUpload = class {
39854
40251
  */
39855
40252
  this.selectedFiles = [];
39856
40253
  this.dragging = false;
40254
+ /**
40255
+ *
40256
+ * Listeners
40257
+ *
40258
+ */
40259
+ // dragenter/dragleave bubble from every child the pointer crosses, and the
40260
+ // next child's enter fires before the previous one's leave, so count depth
40261
+ // instead of toggling. This only balances if every entered element stays
40262
+ // connected until its dragleave fires, so the render never removes anything
40263
+ // while `dragging` flips (see the drop overlay below).
40264
+ this.dragDepth = 0;
39857
40265
  /**
39858
40266
  *
39859
40267
  * Private methods
39860
40268
  *
39861
40269
  */
40270
+ // Stable per-File keys, so removing a row doesn't make Stencil reuse the
40271
+ // following rows' DOM. Keyed by identity: the same file picked twice still
40272
+ // gets two distinct rows.
40273
+ this.fileKeys = new WeakMap();
40274
+ this.nextFileKey = 0;
40275
+ /** Opens the native file picker from our own buttons. */
40276
+ this.openPicker = () => {
40277
+ var _a;
40278
+ (_a = this.input) === null || _a === void 0 ? void 0 : _a.click();
40279
+ };
39862
40280
  this.handleInput = () => {
39863
40281
  var _a, _b;
39864
40282
  const files = Array.from((_b = (_a = this.input) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []);
@@ -39901,12 +40319,11 @@ const EzpUpload = class {
39901
40319
  var _a;
39902
40320
  (_a = this.unsubscribeLanguage) === null || _a === void 0 ? void 0 : _a.call(this);
39903
40321
  }
39904
- /**
39905
- *
39906
- * Listeners
39907
- *
39908
- */
39909
- handleDragEnter() {
40322
+ handleDragEnter(event) {
40323
+ // Accept here as well as on dragover: when the element under the pointer
40324
+ // changes, the browser takes the drop effect from dragenter alone.
40325
+ event === null || event === void 0 ? void 0 : event.preventDefault();
40326
+ this.dragDepth++;
39910
40327
  this.dragging = true;
39911
40328
  }
39912
40329
  handleDragOver(event) {
@@ -39917,22 +40334,37 @@ const EzpUpload = class {
39917
40334
  }
39918
40335
  }
39919
40336
  handleDragLeave() {
39920
- this.dragging = false;
40337
+ this.dragDepth = Math.max(0, this.dragDepth - 1);
40338
+ this.dragging = this.dragDepth > 0;
39921
40339
  }
39922
40340
  handleDrop(event) {
39923
40341
  var _a, _b;
39924
40342
  event.stopPropagation();
39925
40343
  event.preventDefault();
40344
+ this.dragDepth = 0;
39926
40345
  this.dragging = false;
39927
40346
  const files = Array.from((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []);
39928
40347
  // Add new files to existing selection instead of replacing
39929
40348
  this.selectedFiles = [...this.selectedFiles, ...files];
39930
40349
  this.uploadFile.emit(this.selectedFiles);
39931
40350
  }
40351
+ // A drag that ends anywhere else (dropped elsewhere on the page, or
40352
+ // cancelled) must not leave the card stuck in its drop state.
40353
+ resetDrag() {
40354
+ this.dragDepth = 0;
40355
+ this.dragging = false;
40356
+ }
39932
40357
  listenPrintCancel() {
39933
40358
  var _a;
39934
40359
  (_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
39935
40360
  this.selectedFiles = [];
40361
+ this.resetDrag();
40362
+ }
40363
+ fileKey(file) {
40364
+ if (!this.fileKeys.has(file)) {
40365
+ this.fileKeys.set(file, this.nextFileKey++);
40366
+ }
40367
+ return this.fileKeys.get(file);
39936
40368
  }
39937
40369
  /** Extract a short, upper-cased file-type label from the file name. */
39938
40370
  fileType(name) {
@@ -39959,7 +40391,7 @@ const EzpUpload = class {
39959
40391
  */
39960
40392
  render() {
39961
40393
  const hasFiles = this.selectedFiles.length > 0;
39962
- return (index.h(index.Host, { key: '608dcbc11a2271bf80219b571b24b2f03c94911c', class: { dragging: this.dragging } }, index.h("form", { key: '17d3b566de3e7c1341c7e0eeb5c7646535ea8c30', id: "form", ref: (form) => (this.form = form) }, index.h("input", { key: '4679b7a7ca9410c3206908e60a42a75e926bf235', type: "file", name: "input", id: "input", multiple: true, "aria-label": instance.t('upload.description'), ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("div", { key: 'a6fd75ba5d84f5d661a788d14be192008cd19d0d', id: "modal" }, index.h("div", { key: 'cac145aec8a96b40120f22b34dec304ef3a4cf35', id: "dropzone" }, hasFiles && (index.h("div", { key: '93f2bbdd939ae74263f1df292ff36165f91fe588', id: "thumbs" }, this.selectedFiles.map((file, index$1) => (index.h("div", { key: index$1, class: "thumb" }, index.h("button", { type: "button", class: "thumb-remove", "aria-label": instance.t('button_actions.close'), onClick: (event) => this.removeFile(event, index$1) }, index.h("ezp-icon", { name: "close" })), index.h("div", { class: "thumb-icon" }, index.h("ezp-icon", { name: "file" })), index.h("ezp-label", { class: "thumb-name", ellipsis: true, text: file.name }), index.h("ezp-label", { class: "thumb-meta", level: "tertiary", weight: "strong", text: `${this.fileType(file.name)} · ${this.formatSize(file.size)}` })))), index.h("label", { key: '0e2315d9faf04be36e4f3dd4e69213d082d1e013', htmlFor: "input", class: "thumb thumb-add" }, index.h("div", { key: 'a65be2f4c3e8defcf51f21fa1c66149325c3f605', class: "thumb-add-icon" }, index.h("ezp-icon", { key: '59aead1e74833dba5bf835718687ea88088528d4', name: "plus" })), index.h("ezp-label", { key: '80b2a5dcc6d825b5bd63d658f97560ea07114c0e', class: "thumb-name", level: "tertiary", text: instance.t('upload.add_more') })))), !hasFiles && (index.h("div", { key: '4f8c72529f46d9b9a593bfa29d5ccbf5aa43be3a', id: "cloud" }, index.h("ezp-icon", { key: '22d131ee67be25bbc7ad4644aa04c805099418b2', name: "cloud-upload" }))), index.h("ezp-label", { key: 'c281c0b3d343a76c3f7ce09ed8d5583286105ce5', id: "dropzone-title", weight: "heavy", text: instance.t('upload.dropzone_title') }), index.h("div", { key: '9afffb9a48f2260f7018b63561013911b6d5fff1', id: "meta" }, index.h("ezp-label", { key: '321e0f8617d78b3955d3f01d8cdc5f06d2cca71a', level: "secondary", text: instance.t('upload.meta_leading') }), index.h("label", { key: '1200d155f93edfaa3bc096c21cd28e2b19809ae3', htmlFor: "input", id: "browse" }, index.h("ezp-label", { key: 'e5b3d0fad31bbdb19f1310399f2463c8a742b686', level: "secondary", weight: "strong", text: instance.t('upload.browse') })), index.h("ezp-label", { key: 'e7a185e8e3c762735bdfa94ff5a5b3dddaaad474', level: "secondary", text: instance.t('upload.meta_multiple') })), index.h("div", { key: '173740ccd7e5d68b4607acce266e11e49388d2d0', id: "formats" }, SUPPORTED_FORMATS.map((format) => (index.h("span", { class: "format", key: format }, format))))), hasFiles && (index.h("ezp-label", { key: 'a4417410915b4b22a1174c319814e3b65268b099', id: "ready", level: "secondary", weight: "strong", text: instance.t('upload.files_ready', { count: this.selectedFiles.length }) })), index.h("div", { key: '113f7fe49d5ca93ee35428fff0855e3cf70e4457', id: "footer" }, index.h("ezp-text-button", { key: '6c99266aeb6ce1776509feb6359f30fc78a2901b', id: "clear", type: "button", level: "secondary", disabled: !hasFiles, onClick: this.handleCancel, label: instance.t('upload.clear_files'), class: "action" }), index.h("ezp-text-button", { key: 'ad16674be9a1b1a3cf6db16bc6c4b3abff95dfbd', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: instance.t('upload.continue'), class: "action" }))))));
40394
+ return (index.h(index.Host, { key: 'f20f756ca7522ab7d27e5c9fff743db9ba26b101', class: { dragging: this.dragging } }, index.h("form", { key: 'abafb9a19d3dff7da26c8250ea94bbc7876cbc3a', id: "form", ref: (form) => (this.form = form) }, index.h("input", { key: '09397ebf4641190fdd1af13af537cde9f87257d2', type: "file", name: "input", id: "input", multiple: true, "aria-label": instance.t('upload.choose_files'), ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("div", { key: '0365f750bc55d98a95008bcf404f77b247480d81', id: "modal" }, index.h("div", { key: '82d8d8ff21977d36a3f18c704002d1a8cdad9016', id: "body-frame" }, index.h("div", { key: 'ef05d508f0341f92d5e987deb469b2759ee28f1b', id: "body" }, !hasFiles && (index.h("div", { key: '7885aad8082bedf42ef824ad06a388ed3a083987', id: "dropzone" }, index.h("ezp-icon", { key: '25707aa1f7018c7942ca5c82a35c4a74f73f5e70', id: "dropzone-icon", name: "cloud-upload" }), index.h("ezp-label", { key: '2dfb59ce766671396164fcd63d25ef9b04981d01', id: "dropzone-title", level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') }), index.h("div", { key: 'b831d79aab06973e47666e129e89ba23d3e8a3a4', id: "dropzone-prompt" }, index.h("ezp-text-button", { key: '2ade7d526019a71b493e00e6737ca13769cccd29', id: "choose", type: "button", onClick: this.openPicker, label: instance.t('upload.choose_files') }), index.h("ezp-label", { key: '79903c44e2a82b39c97606aa1ccbe9cb28a42c48', id: "drag-hint", level: "secondary", weight: "strong", text: instance.t('upload.drag_hint') }), index.h("ezp-label", { key: '895d43cada83fade39b8d67e70782b9b9fea747c', id: "formats", level: "tertiary", text: SUPPORTED_FORMATS.join(', ') })))), hasFiles && (index.h("div", { key: '6c825ac2791e82271669a7824ed720b127290242', id: "files" }, this.selectedFiles.map((file, index$1) => (index.h("div", { key: this.fileKey(file), class: "file" }, index.h("span", { class: "file-type", "aria-hidden": "true" }, this.fileType(file.name)), index.h("div", { class: "file-details" }, index.h("ezp-file-name", { class: "file-name", weight: "heavy", name: file.name, placement: index$1 === 0 ? 'bottom' : 'top' }), index.h("ezp-label", { class: "file-size", level: "tertiary", text: this.formatSize(file.size) })), index.h("button", { type: "button", class: "file-remove", "aria-label": instance.t('upload.remove_file'), onClick: (event) => this.removeFile(event, index$1) }, index.h("ezp-icon", { name: "close" }))))), index.h("button", { key: 'da8562e56c4006952efa239e8076f333ae27b1be', type: "button", id: "add-more", onClick: this.openPicker }, index.h("ezp-icon", { key: '6b2565bb3a9d4eca02079923ffdee36d5184d10f', name: "plus" }), index.h("ezp-label", { key: '59ecc6b13ca9fa66b8f04944c57ba680e3bab0f8', level: "secondary", weight: "heavy", text: instance.t('upload.add_more') }))))), hasFiles && this.dragging && (index.h("div", { key: '26e2552f69637448b3663f9342c421ec29abcca8', id: "drop-overlay", "aria-hidden": "true" }, index.h("ezp-icon", { key: '0f409daf2c6fc5f3f103f4d4450970aea7edb0c7', id: "dropzone-icon", name: "cloud-upload" }), index.h("ezp-label", { key: '1e19c3e44aac998ad35671435cfe96a27633b170', level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') })))), index.h("div", { key: '31d0106aea747008bf2c2760e4cd8ab0e637144b', id: "footer" }, index.h("ezp-text-button", { key: '24c6c9f25de785443402ac3aa08975c58779faea', id: "clear", type: "button", level: "secondary", disabled: !hasFiles, onClick: this.handleCancel, label: instance.t('upload.remove_files'), class: "action" }), index.h("ezp-text-button", { key: 'cd0fb877a2a7a756cfbe6aa2fdbacaedbe4c8efb', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: instance.t('upload.continue'), class: "action" }))))));
39963
40395
  }
39964
40396
  };
39965
40397
  EzpUpload.style = ezpUploadCss();
@@ -40049,7 +40481,7 @@ const EzpUserMenu = class {
40049
40481
  *
40050
40482
  */
40051
40483
  render() {
40052
- return (index.h(index.Host, { key: '8f5dde2735c47dc8102ddd5a625e26f853b7b587', class: this.open ? 'is-open' : '' }, index.h("div", { key: 'e188d9ad63ade716adaace39718bb988bc4159c9', id: "header" }, index.h("ezp-label", { key: '53907b171c8eeb9ed7a4a1c2cbf22e233110328c', ellipsis: true, id: "name", weight: "heavy", text: this.name }), index.h("ezp-icon-button", { key: '8370bfe1563693c31ee712e5a84662f39ea55ec0', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), index.h("div", { key: '1c34c655d43f7de3375caeeba156f9eb616c11e8', id: "links" }, this.links.map((link) => (index.h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, index.h("ezp-icon", { class: "link__icon", name: link.icon }), index.h("ezp-label", { text: link.title })))), index.h("a", { key: '18bde718f8a7a480dd6cac365a306951f80028f5', class: "link", onClick: this.logOut }, index.h("ezp-icon", { key: '3f7ce8f3974b10a0ae866abd1f1371b652abe0b1', class: "link__icon", name: "logout" }), index.h("ezp-label", { key: '424e025c00b4cfe7638efbecd1680b8402a791e0', text: instance.t('user_menu.logout') }))), index.h("div", { key: 'b163718862a0f086fd674134847d845fa229c91c', id: "theme" }, index.h("ezp-label", { key: '6bb91ea03c727485d53df484ea465d103b1d1af4', class: "caption", text: `${instance.t('user_menu.theme')}:`, weight: "heavy" }), index.h("div", { key: 'c834c2421138fea1f497dec486664b3fd6f86b69', id: "swatches" }, this.themes.map((theme) => (index.h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, index.h("span", { class: "dot" })))))), index.h("div", { key: 'c84c57f3662760967c876242a85719a89f087eb3', id: "appearance" }, index.h("ezp-label", { key: '9ea2300e84a4d6421f496d3a033a97689b6fc498', class: "caption", text: `${instance.t('user_menu.appearance')}:`, weight: "heavy" }), index.h("div", { key: '4718a7e9e71ebfeece0ccc2f9fe4ce94d703e08e', id: "tabs" }, this.appearances.map((appearance) => (index.h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, index.h("ezp-icon", { name: appearance.name }), index.h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
40484
+ return (index.h(index.Host, { key: 'cd2505f64646e8f23d534896c01fcd246d974c2f', class: this.open ? 'is-open' : '' }, index.h("div", { key: '65df837d1eee8b2275f8c0ef72b039c7ae6d08cd', id: "header" }, index.h("ezp-label", { key: '3ca9bc9d616de1e4efc686f77bcdaa39dab3f18d', ellipsis: true, id: "name", weight: "heavy", text: this.name }), index.h("ezp-icon-button", { key: '119abe7450937b7cf2e70ff3ed96d01f3f0aff9d', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), index.h("div", { key: '90f40d22672bc65cbf988cf2ab57cbc088218cfd', id: "links" }, this.links.map((link) => (index.h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, index.h("ezp-icon", { class: "link__icon", name: link.icon }), index.h("ezp-label", { text: link.title })))), index.h("a", { key: '94df9033da5697739c690a180ed2df318f803511', class: "link", onClick: this.logOut }, index.h("ezp-icon", { key: '609044f6d8255e4378aee226e16c29e9242c8259', class: "link__icon", name: "logout" }), index.h("ezp-label", { key: '20953a49845a8c4e75081c597d8e916c3b159b51', text: instance.t('user_menu.logout') }))), index.h("div", { key: '4b96f92ceb1047c4a88f0b33406a297323eded75', id: "theme" }, index.h("ezp-label", { key: '156893ed3703f63ee826e4887fa711469603b6c8', class: "caption", text: `${instance.t('user_menu.theme')}:`, weight: "heavy" }), index.h("div", { key: '2ee3ec8725a98d5dc7d7f792fed969c2dea357f4', id: "swatches" }, this.themes.map((theme) => (index.h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, index.h("span", { class: "dot" })))))), index.h("div", { key: 'd78d2b935d9cdb15df66d761dd9290a68db09e9c', id: "appearance" }, index.h("ezp-label", { key: 'f290affaf49bd01a06f576a4d52b3d1936dbdb23', class: "caption", text: `${instance.t('user_menu.appearance')}:`, weight: "heavy" }), index.h("div", { key: '8087488313dbd2898280d3abb6244485b97e4ee4', id: "tabs" }, this.appearances.map((appearance) => (index.h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, index.h("ezp-icon", { name: appearance.name }), index.h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
40053
40485
  }
40054
40486
  get component() { return index.getElement(this); }
40055
40487
  static get watchers() { return {
@@ -40063,6 +40495,7 @@ EzpUserMenu.style = ezpUserMenuCss();
40063
40495
  exports.ezp_auth = EzpAuth;
40064
40496
  exports.ezp_backdrop = EzpBackdrop;
40065
40497
  exports.ezp_dialog = EzpDialog;
40498
+ exports.ezp_file_name = EzpFileName;
40066
40499
  exports.ezp_icon = EzpIcon;
40067
40500
  exports.ezp_icon_button = EzpIconButton;
40068
40501
  exports.ezp_input = EzpInput;