@sankhyalabs/ezui 1.1.101 → 1.1.102

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.
@@ -572,6 +572,7 @@ exports.Action = void 0;
572
572
  Action["DATA_LOADED"] = "dataLoaded";
573
573
  Action["SAVING_DATA"] = "savingData";
574
574
  Action["DATA_SAVED"] = "dataSaved";
575
+ Action["REMOVING_RECORDS"] = "removingRecords";
575
576
  Action["RECORDS_REMOVED"] = "recordsRemoved";
576
577
  Action["RECORDS_ADDED"] = "recordsAdded";
577
578
  Action["RECORDS_COPIED"] = "recordsCopied";
@@ -736,7 +737,11 @@ class RemovedRecordsReducerImpl {
736
737
  reduce(_stateManager, currentState, action) {
737
738
  switch (action.type) {
738
739
  case exports.Action.RECORDS_REMOVED:
739
- return (currentState || []).concat(action.payload);
740
+ const { records, buffered } = action.payload;
741
+ if (buffered) {
742
+ return (currentState || []).concat(records);
743
+ }
744
+ return currentState;
740
745
  case exports.Action.EDITION_CANCELED:
741
746
  case exports.Action.DATA_SAVED:
742
747
  return undefined;
@@ -757,6 +762,12 @@ class RecordsReducerImpl {
757
762
  switch (action.type) {
758
763
  case exports.Action.DATA_LOADED:
759
764
  return action.payload;
765
+ case exports.Action.RECORDS_REMOVED:
766
+ const { records, buffered } = action.payload;
767
+ if (!buffered) {
768
+ return currentState.filter(r => !records.includes(r.__record__id__));
769
+ }
770
+ return currentState;
760
771
  case exports.Action.DATA_SAVED:
761
772
  const recordsMap = new Map();
762
773
  const currentRecords = getRecords(stateManager);
@@ -930,7 +941,7 @@ class SelectionReducerImpl {
930
941
  case exports.Action.DATA_SAVED:
931
942
  return updateSavedIds(stateManager, action.payload.records);
932
943
  case exports.Action.RECORDS_REMOVED:
933
- const removed = action.payload;
944
+ const removed = action.payload.records;
934
945
  if (currentState && removed) {
935
946
  return currentState.filter(recordId => !removed.includes(recordId));
936
947
  }
@@ -1120,6 +1131,36 @@ class DataUnit {
1120
1131
  return Promise.resolve();
1121
1132
  });
1122
1133
  }
1134
+ removeSelectedRecords(buffered = false) {
1135
+ return __awaiter(this, void 0, void 0, function* () {
1136
+ const selection = getSelection(this._stateManager);
1137
+ if (selection) {
1138
+ return this.removeRecords(selection, buffered);
1139
+ }
1140
+ return Promise.resolve(selection);
1141
+ });
1142
+ }
1143
+ removeRecords(records, buffered = false) {
1144
+ return __awaiter(this, void 0, void 0, function* () {
1145
+ if (records) {
1146
+ if (buffered || !this.removeLoader) {
1147
+ this.dispatchAction(exports.Action.RECORDS_REMOVED, { records, buffered: true });
1148
+ }
1149
+ else {
1150
+ this.dispatchAction(exports.Action.REMOVING_RECORDS);
1151
+ return new Promise((resolve, fail) => {
1152
+ if (this.removeLoader) {
1153
+ this.removeLoader(this, records).then(records => {
1154
+ this.dispatchAction(exports.Action.RECORDS_REMOVED, { records, buffered: false });
1155
+ resolve(records);
1156
+ }).catch(error => fail(error));
1157
+ }
1158
+ });
1159
+ }
1160
+ }
1161
+ return Promise.resolve(records);
1162
+ });
1163
+ }
1123
1164
  // API
1124
1165
  valueFromString(fieldName, value) {
1125
1166
  const descriptor = this.getField(fieldName);
@@ -1159,12 +1200,6 @@ class DataUnit {
1159
1200
  this.dispatchAction(exports.Action.RECORDS_COPIED, prepareAddedRecordId(this._stateManager, selectedRecords));
1160
1201
  }
1161
1202
  }
1162
- removeSelectedRecords() {
1163
- const selection = getSelection(this._stateManager);
1164
- if (selection) {
1165
- this.dispatchAction(exports.Action.RECORDS_REMOVED, selection);
1166
- }
1167
- }
1168
1203
  getFieldValue(fieldName) {
1169
1204
  return getFieldValue(this._stateManager, fieldName);
1170
1205
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-88286449.js');
6
- const UnitMetadata = require('./UnitMetadata-63c56042.js');
6
+ const UnitMetadata = require('./UnitMetadata-4b90ead3.js');
7
7
  const FloatingManager = require('./FloatingManager-6cfeb947.js');
8
8
  const AssetsUtils = require('./AssetsUtils-69356e76.js');
9
9
 
@@ -52,10 +52,10 @@ class DateUtils {
52
52
 
53
53
  class ApplicationContext {
54
54
  static getContextValue(key) {
55
- return ApplicationContext.getCtx()[key].deref();
55
+ return ApplicationContext.getCtx()[key];
56
56
  }
57
57
  static setContextValue(key, value) {
58
- ApplicationContext.getCtx()[key] = new WeakRef(value);
58
+ ApplicationContext.getCtx()[key] = value;
59
59
  }
60
60
  static getCtx() {
61
61
  let ctx = window.___snkcore___ctx___;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-88286449.js');
6
- const UnitMetadata = require('./UnitMetadata-63c56042.js');
6
+ const UnitMetadata = require('./UnitMetadata-4b90ead3.js');
7
7
 
8
8
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
9
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-88286449.js');
6
6
  const AssetsUtils = require('./AssetsUtils-69356e76.js');
7
- require('./UnitMetadata-63c56042.js');
7
+ require('./UnitMetadata-4b90ead3.js');
8
8
 
9
9
  const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
10
10
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-88286449.js');
6
- require('./UnitMetadata-63c56042.js');
6
+ require('./UnitMetadata-4b90ead3.js');
7
7
  const FloatingManager = require('./FloatingManager-6cfeb947.js');
8
8
 
9
9
  const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";
@@ -909,6 +909,7 @@ var Action;
909
909
  Action["DATA_LOADED"] = "dataLoaded";
910
910
  Action["SAVING_DATA"] = "savingData";
911
911
  Action["DATA_SAVED"] = "dataSaved";
912
+ Action["REMOVING_RECORDS"] = "removingRecords";
912
913
  Action["RECORDS_REMOVED"] = "recordsRemoved";
913
914
  Action["RECORDS_ADDED"] = "recordsAdded";
914
915
  Action["RECORDS_COPIED"] = "recordsCopied";
@@ -1073,7 +1074,11 @@ class RemovedRecordsReducerImpl {
1073
1074
  reduce(_stateManager, currentState, action) {
1074
1075
  switch (action.type) {
1075
1076
  case Action.RECORDS_REMOVED:
1076
- return (currentState || []).concat(action.payload);
1077
+ const { records, buffered } = action.payload;
1078
+ if (buffered) {
1079
+ return (currentState || []).concat(records);
1080
+ }
1081
+ return currentState;
1077
1082
  case Action.EDITION_CANCELED:
1078
1083
  case Action.DATA_SAVED:
1079
1084
  return undefined;
@@ -1094,6 +1099,12 @@ class RecordsReducerImpl {
1094
1099
  switch (action.type) {
1095
1100
  case Action.DATA_LOADED:
1096
1101
  return action.payload;
1102
+ case Action.RECORDS_REMOVED:
1103
+ const { records, buffered } = action.payload;
1104
+ if (!buffered) {
1105
+ return currentState.filter(r => !records.includes(r.__record__id__));
1106
+ }
1107
+ return currentState;
1097
1108
  case Action.DATA_SAVED:
1098
1109
  const recordsMap = new Map();
1099
1110
  const currentRecords = getRecords(stateManager);
@@ -1267,7 +1278,7 @@ class SelectionReducerImpl {
1267
1278
  case Action.DATA_SAVED:
1268
1279
  return updateSavedIds(stateManager, action.payload.records);
1269
1280
  case Action.RECORDS_REMOVED:
1270
- const removed = action.payload;
1281
+ const removed = action.payload.records;
1271
1282
  if (currentState && removed) {
1272
1283
  return currentState.filter(recordId => !removed.includes(recordId));
1273
1284
  }
@@ -1457,6 +1468,36 @@ class DataUnit {
1457
1468
  return Promise.resolve();
1458
1469
  });
1459
1470
  }
1471
+ removeSelectedRecords(buffered = false) {
1472
+ return __awaiter(this, void 0, void 0, function* () {
1473
+ const selection = getSelection(this._stateManager);
1474
+ if (selection) {
1475
+ return this.removeRecords(selection, buffered);
1476
+ }
1477
+ return Promise.resolve(selection);
1478
+ });
1479
+ }
1480
+ removeRecords(records, buffered = false) {
1481
+ return __awaiter(this, void 0, void 0, function* () {
1482
+ if (records) {
1483
+ if (buffered || !this.removeLoader) {
1484
+ this.dispatchAction(Action.RECORDS_REMOVED, { records, buffered: true });
1485
+ }
1486
+ else {
1487
+ this.dispatchAction(Action.REMOVING_RECORDS);
1488
+ return new Promise((resolve, fail) => {
1489
+ if (this.removeLoader) {
1490
+ this.removeLoader(this, records).then(records => {
1491
+ this.dispatchAction(Action.RECORDS_REMOVED, { records, buffered: false });
1492
+ resolve(records);
1493
+ }).catch(error => fail(error));
1494
+ }
1495
+ });
1496
+ }
1497
+ }
1498
+ return Promise.resolve(records);
1499
+ });
1500
+ }
1460
1501
  // API
1461
1502
  valueFromString(fieldName, value) {
1462
1503
  const descriptor = this.getField(fieldName);
@@ -1496,12 +1537,6 @@ class DataUnit {
1496
1537
  this.dispatchAction(Action.RECORDS_COPIED, prepareAddedRecordId(this._stateManager, selectedRecords));
1497
1538
  }
1498
1539
  }
1499
- removeSelectedRecords() {
1500
- const selection = getSelection(this._stateManager);
1501
- if (selection) {
1502
- this.dispatchAction(Action.RECORDS_REMOVED, selection);
1503
- }
1504
- }
1505
1540
  getFieldValue(fieldName) {
1506
1541
  return getFieldValue(this._stateManager, fieldName);
1507
1542
  }
@@ -1643,10 +1678,10 @@ var UserInterface;
1643
1678
 
1644
1679
  class ApplicationContext {
1645
1680
  static getContextValue(key) {
1646
- return ApplicationContext.getCtx()[key].deref();
1681
+ return ApplicationContext.getCtx()[key];
1647
1682
  }
1648
1683
  static setContextValue(key, value) {
1649
- ApplicationContext.getCtx()[key] = new WeakRef(value);
1684
+ ApplicationContext.getCtx()[key] = value;
1650
1685
  }
1651
1686
  static getCtx() {
1652
1687
  let ctx = window.___snkcore___ctx___;
@@ -570,6 +570,7 @@ var Action;
570
570
  Action["DATA_LOADED"] = "dataLoaded";
571
571
  Action["SAVING_DATA"] = "savingData";
572
572
  Action["DATA_SAVED"] = "dataSaved";
573
+ Action["REMOVING_RECORDS"] = "removingRecords";
573
574
  Action["RECORDS_REMOVED"] = "recordsRemoved";
574
575
  Action["RECORDS_ADDED"] = "recordsAdded";
575
576
  Action["RECORDS_COPIED"] = "recordsCopied";
@@ -734,7 +735,11 @@ class RemovedRecordsReducerImpl {
734
735
  reduce(_stateManager, currentState, action) {
735
736
  switch (action.type) {
736
737
  case Action.RECORDS_REMOVED:
737
- return (currentState || []).concat(action.payload);
738
+ const { records, buffered } = action.payload;
739
+ if (buffered) {
740
+ return (currentState || []).concat(records);
741
+ }
742
+ return currentState;
738
743
  case Action.EDITION_CANCELED:
739
744
  case Action.DATA_SAVED:
740
745
  return undefined;
@@ -755,6 +760,12 @@ class RecordsReducerImpl {
755
760
  switch (action.type) {
756
761
  case Action.DATA_LOADED:
757
762
  return action.payload;
763
+ case Action.RECORDS_REMOVED:
764
+ const { records, buffered } = action.payload;
765
+ if (!buffered) {
766
+ return currentState.filter(r => !records.includes(r.__record__id__));
767
+ }
768
+ return currentState;
758
769
  case Action.DATA_SAVED:
759
770
  const recordsMap = new Map();
760
771
  const currentRecords = getRecords(stateManager);
@@ -928,7 +939,7 @@ class SelectionReducerImpl {
928
939
  case Action.DATA_SAVED:
929
940
  return updateSavedIds(stateManager, action.payload.records);
930
941
  case Action.RECORDS_REMOVED:
931
- const removed = action.payload;
942
+ const removed = action.payload.records;
932
943
  if (currentState && removed) {
933
944
  return currentState.filter(recordId => !removed.includes(recordId));
934
945
  }
@@ -1118,6 +1129,36 @@ class DataUnit {
1118
1129
  return Promise.resolve();
1119
1130
  });
1120
1131
  }
1132
+ removeSelectedRecords(buffered = false) {
1133
+ return __awaiter(this, void 0, void 0, function* () {
1134
+ const selection = getSelection(this._stateManager);
1135
+ if (selection) {
1136
+ return this.removeRecords(selection, buffered);
1137
+ }
1138
+ return Promise.resolve(selection);
1139
+ });
1140
+ }
1141
+ removeRecords(records, buffered = false) {
1142
+ return __awaiter(this, void 0, void 0, function* () {
1143
+ if (records) {
1144
+ if (buffered || !this.removeLoader) {
1145
+ this.dispatchAction(Action.RECORDS_REMOVED, { records, buffered: true });
1146
+ }
1147
+ else {
1148
+ this.dispatchAction(Action.REMOVING_RECORDS);
1149
+ return new Promise((resolve, fail) => {
1150
+ if (this.removeLoader) {
1151
+ this.removeLoader(this, records).then(records => {
1152
+ this.dispatchAction(Action.RECORDS_REMOVED, { records, buffered: false });
1153
+ resolve(records);
1154
+ }).catch(error => fail(error));
1155
+ }
1156
+ });
1157
+ }
1158
+ }
1159
+ return Promise.resolve(records);
1160
+ });
1161
+ }
1121
1162
  // API
1122
1163
  valueFromString(fieldName, value) {
1123
1164
  const descriptor = this.getField(fieldName);
@@ -1157,12 +1198,6 @@ class DataUnit {
1157
1198
  this.dispatchAction(Action.RECORDS_COPIED, prepareAddedRecordId(this._stateManager, selectedRecords));
1158
1199
  }
1159
1200
  }
1160
- removeSelectedRecords() {
1161
- const selection = getSelection(this._stateManager);
1162
- if (selection) {
1163
- this.dispatchAction(Action.RECORDS_REMOVED, selection);
1164
- }
1165
- }
1166
1201
  getFieldValue(fieldName) {
1167
1202
  return getFieldValue(this._stateManager, fieldName);
1168
1203
  }
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement } from './index-6b8bfbeb.js';
2
- import { T as TimeFormatter, U as UserInterface, A as Action, D as DataUnitAction, a as DataUnit, N as NumberUtils, M as MaskFormatter, b as DataType } from './UnitMetadata-109880b0.js';
2
+ import { T as TimeFormatter, U as UserInterface, A as Action, D as DataUnitAction, a as DataUnit, N as NumberUtils, M as MaskFormatter, b as DataType } from './UnitMetadata-8951d803.js';
3
3
  import { F as FloatingManager } from './FloatingManager-bb90ef41.js';
4
4
  import { S as StringUtils, g as getSpritePath } from './AssetsUtils-0e207bec.js';
5
5
 
@@ -48,10 +48,10 @@ class DateUtils {
48
48
 
49
49
  class ApplicationContext {
50
50
  static getContextValue(key) {
51
- return ApplicationContext.getCtx()[key].deref();
51
+ return ApplicationContext.getCtx()[key];
52
52
  }
53
53
  static setContextValue(key, value) {
54
- ApplicationContext.getCtx()[key] = new WeakRef(value);
54
+ ApplicationContext.getCtx()[key] = value;
55
55
  }
56
56
  static getCtx() {
57
57
  let ctx = window.___snkcore___ctx___;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-6b8bfbeb.js';
2
- import { b as DataType, S as SortMode, A as Action } from './UnitMetadata-109880b0.js';
2
+ import { b as DataType, S as SortMode, A as Action } from './UnitMetadata-8951d803.js';
3
3
 
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-6b8bfbeb.js';
2
2
  import { S as StringUtils, g as getSpritePath } from './AssetsUtils-0e207bec.js';
3
- import './UnitMetadata-109880b0.js';
3
+ import './UnitMetadata-8951d803.js';
4
4
 
5
5
  const ezModalCss = ":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6b8bfbeb.js';
2
- import './UnitMetadata-109880b0.js';
2
+ import './UnitMetadata-8951d803.js';
3
3
  import { F as FloatingManager } from './FloatingManager-bb90ef41.js';
4
4
 
5
5
  const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";
@@ -1 +1 @@
1
- import{p as e,b as s}from"./p-89a57641.js";(()=>{const s=import.meta.url,o={};return""!==s&&(o.resourcesUrl=new URL(".",s).href),e(o)})().then((e=>s([["p-cae8b8a2",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],pageSize:[2,"page-size"],serverUrl:[1,"server-url"],dataUnit:[16],_navigationHasPrevious:[32],_navigationHasNext:[32],_navigationFirstRow:[32],_navigationLastRow:[32],_navigationTotalRows:[32],_popUpVisible:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64]}]]],["p-e06e47f1",[[1,"ez-dialog",{confirm:[1028],critical:[1028],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-b8678ee6",[[1,"ez-action-chip",{label:[513],enabled:[516]}]]],["p-95fc543c",[[0,"ez-application"]]],["p-542d3d29",[[1,"ez-label-chip",{label:[513],enabled:[516],removable:[516],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-afb820c1",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],updatePosition:[64],show:[64],hide:[64]}]]],["p-502d7e0d",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],ezTitle:[1,"ez-title"]}]]],["p-b217f40b",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],show:[64]}]]],["p-b9982bf0",[[0,"test-du"],[0,"ez-form",{dataUnit:[1040],config:[16],submit:[64],cancel:[64],validate:[64]}],[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],setFocus:[64],setBlur:[64]}],[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}],[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],setFocus:[64],setBlur:[64]}],[1,"ez-time-input",{label:[513],viewValue:[1537,"view-value"],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}],[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],setFocus:[64],setBlur:[64]}],[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],showHide:[64]}],[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],setFocus:[64],setBlur:[64]}],[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}],[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}],[1,"ez-check",{label:[513],value:[1540],enabled:[516],mode:[513],getMode:[64],setFocus:[64]}],[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1]}],[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],_preSelection:[32],_visibleOptions:[32],setFocus:[64],setBlur:[64]}],[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}],[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],setFocus:[64],setBlur:[64]}]]],["p-6b257393",[[1,"select-box",{selectedOption:[1,"selected-option"]}],[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],setSelection:[64],getSelection:[64],getList:[64]}],[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-a30309ce",[[2,"grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040]}],[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]]],e)));
1
+ import{p as e,b as s}from"./p-89a57641.js";(()=>{const s=import.meta.url,o={};return""!==s&&(o.resourcesUrl=new URL(".",s).href),e(o)})().then((e=>s([["p-da0f5393",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],pageSize:[2,"page-size"],serverUrl:[1,"server-url"],dataUnit:[16],_navigationHasPrevious:[32],_navigationHasNext:[32],_navigationFirstRow:[32],_navigationLastRow:[32],_navigationTotalRows:[32],_popUpVisible:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64]}]]],["p-e06e47f1",[[1,"ez-dialog",{confirm:[1028],critical:[1028],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-b8678ee6",[[1,"ez-action-chip",{label:[513],enabled:[516]}]]],["p-95fc543c",[[0,"ez-application"]]],["p-542d3d29",[[1,"ez-label-chip",{label:[513],enabled:[516],removable:[516],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-18c00d88",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],updatePosition:[64],show:[64],hide:[64]}]]],["p-502d7e0d",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],ezTitle:[1,"ez-title"]}]]],["p-b217f40b",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],show:[64]}]]],["p-e75fa2ce",[[0,"test-du"],[0,"ez-form",{dataUnit:[1040],config:[16],submit:[64],cancel:[64],validate:[64]}],[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],setFocus:[64],setBlur:[64]}],[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}],[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],setFocus:[64],setBlur:[64]}],[1,"ez-time-input",{label:[513],viewValue:[1537,"view-value"],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}],[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],setFocus:[64],setBlur:[64]}],[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],showHide:[64]}],[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],setFocus:[64],setBlur:[64]}],[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}],[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}],[1,"ez-check",{label:[513],value:[1540],enabled:[516],mode:[513],getMode:[64],setFocus:[64]}],[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1]}],[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],_preSelection:[32],_visibleOptions:[32],setFocus:[64],setBlur:[64]}],[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}],[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],setFocus:[64],setBlur:[64]}]]],["p-6b257393",[[1,"select-box",{selectedOption:[1,"selected-option"]}],[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],setSelection:[64],getSelection:[64],getList:[64]}],[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-7294c815",[[2,"grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040]}],[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]]],e)));
@@ -1 +1 @@
1
- import{r as t,c as i,h as o,H as s,g as e}from"./p-89a57641.js";import"./p-9fab5606.js";import{F as r}from"./p-ddd0ef12.js";let h=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content"}dispatchVisibilityChange(t,i){t!=i&&this.ezVisibilityChange.emit(t)}async updatePosition(t=this.top,i=this.left,o=this.bottom,s=this.right){r.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))})}async show(t=this.top,i=this.left,o=this.bottom,s=this.right){this._floatingID=r.float(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))}),this.opened=!0}async hide(){void 0!==this._floatingID&&(r.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"box "+("fit-content"===this.boxWidth?"box--fit-content":"box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["dispatchVisibilityChange"]}}};h.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";export{h as ez_popover}
1
+ import{r as t,c as i,h as o,H as s,g as e}from"./p-89a57641.js";import"./p-c6760545.js";import{F as r}from"./p-ddd0ef12.js";let h=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content"}dispatchVisibilityChange(t,i){t!=i&&this.ezVisibilityChange.emit(t)}async updatePosition(t=this.top,i=this.left,o=this.bottom,s=this.right){r.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))})}async show(t=this.top,i=this.left,o=this.bottom,s=this.right){this._floatingID=r.float(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:(t,i)=>!!t.contains(i)||!(!t.shadowRoot||!t.shadowRoot.contains(i))||((t=this._host).lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))}),this.opened=!0}async hide(){void 0!==this._floatingID&&(r.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"box "+("fit-content"===this.boxWidth?"box--fit-content":"box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["dispatchVisibilityChange"]}}};h.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";export{h as ez_popover}
@@ -1 +1 @@
1
- import{r as i,c as t,h as e,H as o}from"./p-89a57641.js";import{S as d,g as l}from"./p-ec7c1b86.js";import"./p-9fab5606.js";let a=class{constructor(e){i(this,e),this.ezCloseModal=t(this,"ezCloseModal",7),this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.handleKeyboardEvent=i=>{"Escape"===(null==i?void 0:i.key)&&this.closeEsc&&this.closeModal()}}handleopenedChange(){this.opened?document.addEventListener("keydown",this.handleKeyboardEvent):document.removeEventListener("keydown",this.handleKeyboardEvent)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.handleopenedChange()}onMouseDownHandler(i){this.closeOutsideClick&&i.target===this._overlay&&this.closeModal()}render(){const i="left"===this.align?"left":"right";return e(o,null,this.opened?e("div",{class:"modal",onMouseDown:i=>this.onMouseDownHandler(i)},e("div",{class:`modal__container modal__container--${i}`,ref:i=>this._overlay=i},e("div",{class:`modal__content modal__content--${i} ${this.modalSize}`},e("slot",null)))):void 0)}static get watchers(){return{opened:["handleopenedChange"]}}};a.style=":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";let s=class{constructor(e){i(this,e),this.configFinish=t(this,"configFinish",7),this.configCancel=t(this,"configCancel",7),this._columnListHistory=[],this._orderListItems=[],this._columListItems=[],this.selectedTab="Colunas",this._selectedIndex=-1}createOrderList(){var i;let t=[];(null===(i=this._columnListHistory)||void 0===i?void 0:i.length)>0?this._columnListHistory.find((i=>"Visíveis"===i.group)).items.forEach((i=>{t.push({label:i.label})})):this.columns.forEach((i=>{i.hidden||t.push({name:i.name,label:i.label})})),this._orderListItems=t}createColumnList(){let i={group:"Visíveis",items:[]},t={group:"Ocultas",items:[],sort:"ASC"};this.columns.forEach((e=>{let o={label:e.label};e.hidden?t.items.push(o):i.items.push(o)})),this._columnListHistory.length<=0&&(this._columListItems=[i,t])}buildColumnListSlot(i,t){return e("div",null,e("ez-check",{mode:"switch",id:"switch"+i+t,value:"Visíveis"===t.group,onEzChange:t=>{this.switchColumnGroup(t,i)}}))}buildOrderListSlot(i){let t=this.columns.find((t=>t.label===i.label));return e("div",null,e("select-box",{selectedOption:null==t?void 0:t.sort,key:"select-box"+i,onEzChange:t=>{t.stopPropagation(),this.updateOrder(t.detail,i)}}))}updateOrder(i,t){let e=[...this.columns],o=e.find((i=>i.label===t.label));o&&(o.sort=i.value),this.columns=e}switchColumnGroup(i,t){i.stopPropagation();let e=[...this._columListItems];if(!0===i.detail){let i=e.find((i=>"Ocultas"===i.group)),o=i.items.findIndex((i=>i.label===t.label));o>=0&&i.items.splice(o,1),e.find((i=>"Visíveis"===i.group)).items.push(t),this._columListItems=e,this.createOrderList()}else if(!1===i.detail){let i=e.find((i=>"Visíveis"===i.group)),o=i.items.findIndex((i=>i.label===t.label));o>=0&&i.items.splice(o,1),e.find((i=>"Ocultas"===i.group)).items.push(t),this._columListItems=e,this.createOrderList()}}finish(){let i=[];this._columListItems.forEach((t=>{t.items.forEach((e=>{const o=this.columns.find((i=>i.label===e.label));let d=Object.assign({},o);d.hidden="Ocultas"===t.group,i.push(d)}))})),this._columnListHistory=[],this.columns=i,this.configFinish.emit(this.columns)}async locateColumn(i,t){var e;const o="Enter"===i.key;t||(t=null===(e=i.currentTarget)||void 0===e?void 0:e.value);let d=-1;if("Ordenação das linhas"===this.selectedTab)if(t){const i=[];let e,l;if(await this._orderList.getList().then((o=>{e=o,e.forEach(((e,o)=>{this.compareWords(e,t)&&i.push(o)}))})),i.length>0){if(o)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){d=i[t];break}-1===d&&(d=i[0])}this._selectedIndex=d,l=e[d],l?this._orderList.setSelection({label:l.label},!0):this._orderList.setSelection(void 0)}else this._orderList.setSelection(void 0);else if(t){const i=[];if(this.columns.forEach(((e,o)=>{this.compareWords(e,t)&&i.push(o)})),i.length>0){if(o)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){d=i[t];break}-1===d&&(d=i[0])}this._selectedIndex=d;let e=this.columns[d];e?this._columnList.setSelection({label:e.label},!0):this._columnList.setSelection(void 0)}else this._columnList.setSelection(void 0)}compareWords(i,t){return d.replaceAccentuatedChars(i.label).indexOf(d.replaceAccentuatedChars(t))>-1}closeConfig(){this._columnListHistory=[],this.configCancel.emit()}handleTabChange(i){var t;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.selectedTab)&&("Ordenação das linhas"===i.target.selectedTab&&(this._columnListHistory=this._columnList.dataSource,this.createOrderList()),this.selectedTab=i.target.selectedTab)}handleColumnListChange(i){var t;if(i.detail){let e=null===(t=i.detail.find((i=>"Visíveis"===i.group)))||void 0===t?void 0:t.items;e&&(this._orderListItems=e)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&(this.createColumnList(),this.createOrderList())}componentDidRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.locateColumn(new KeyboardEvent("arrow-right",{key:"ArrowRight"}),this._searchElement.value)}render(){return e(o,null,e("div",{class:"grid-config__header"},e("div",{class:"title-container"},e("div",{class:""},e("label",{class:"title"},"Configuração da Grade"),e("label",{class:"subtitle"},"Defina visibilidade e ordem das colunas.")),e("div",{class:"button-close"},e("ez-button",{mode:"icon",image:l("close"),size:"medium",onClick:()=>this.closeConfig()}))),e("div",{class:"tabselector-container"},e("ez-tabselector",{selectedTab:this.selectedTab,selectedIndex:0,onEzChange:i=>{this.handleTabChange(i)},tabs:"Colunas, Ordenação das linhas"})),e("div",null,e("ez-text-input",{ref:i=>this._searchElement=i,label:"Localizar coluna",onKeyUp:i=>this.locateColumn(i)},e("ez-icon",{slot:"leftIcon",size:"medium",href:l("search")})))),e("div",{class:"grid-config__main"},e("ez-list",{ref:i=>this._columnList=i,class:"Colunas"===this.selectedTab?"":"hidden",dataSource:this._columListItems,onEzChange:i=>this.handleColumnListChange(i),ezDraggable:!0,ezSelectable:!0,itemSlotBuilder:(i,t)=>this.buildColumnListSlot(i,t),useGroups:!0}),e("div",{class:"Ordenação das linhas"===this.selectedTab?"group-name":"hidden"},"Sequência da ordenação"),e("ez-list",{ref:i=>this._orderList=i,class:"Ordenação das linhas"===this.selectedTab?"heigth-calc":"hidden",dataSource:this._orderListItems,ezSelectable:!0,ezDraggable:!0,itemSlotBuilder:i=>this.buildOrderListSlot(i)})),e("div",{class:"grid-config__footer"},e("ez-button",{class:"padding-right--medium",label:"Cancelar",onClick:()=>this.closeConfig()}),e("ez-button",{label:"Concluir",class:"button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}};s.style='.sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, "Sora");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}';export{a as ez_modal,s as grid_config}
1
+ import{r as i,c as t,h as e,H as o}from"./p-89a57641.js";import{S as d,g as l}from"./p-ec7c1b86.js";import"./p-c6760545.js";let a=class{constructor(e){i(this,e),this.ezCloseModal=t(this,"ezCloseModal",7),this.opened=!0,this.closeEsc=!1,this.closeOutsideClick=!1,this.handleKeyboardEvent=i=>{"Escape"===(null==i?void 0:i.key)&&this.closeEsc&&this.closeModal()}}handleopenedChange(){this.opened?document.addEventListener("keydown",this.handleKeyboardEvent):document.removeEventListener("keydown",this.handleKeyboardEvent)}closeModal(){this.opened=!1,this.ezCloseModal.emit(this.opened)}componentDidLoad(){this.handleopenedChange()}onMouseDownHandler(i){this.closeOutsideClick&&i.target===this._overlay&&this.closeModal()}render(){const i="left"===this.align?"left":"right";return e(o,null,this.opened?e("div",{class:"modal",onMouseDown:i=>this.onMouseDownHandler(i)},e("div",{class:`modal__container modal__container--${i}`,ref:i=>this._overlay=i},e("div",{class:`modal__content modal__content--${i} ${this.modalSize}`},e("slot",null)))):void 0)}static get watchers(){return{opened:["handleopenedChange"]}}};a.style=":host{--ez-modal-z-index:var(--most-visible, 3);--ez-modal-vertical-padding:var(--space--large, 24px);display:block}.modal{position:fixed;padding:var(--ez-modal-vertical-padding) 0;display:flex;top:0px;z-index:var(--ez-modal-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}@keyframes expand-modal--left{from{transform:translate(-100%)}}@keyframes expand-modal--right{from{transform:translate(100%)}}.modal__container{display:flex;flex-wrap:wrap;height:100%;box-sizing:border-box;width:100%;align-items:flex-start}.modal__container--right{animation:expand-modal--right .2s ease-in-out 1;justify-content:flex-end}.modal__container--left{animation:expand-modal--left .2s ease-in-out 1;justify-content:flex-start}.modal__content{display:flex;flex-wrap:wrap;max-height:calc(100% - 48px);height:100%;overflow-y:auto;background-color:rgb(255, 255, 255);padding:24px;border-radius:12px 0px 0px 12px;box-shadow:rgb(0 38 111 / 12%) 0px 0px 16px 0px}.modal__content--right{border-radius:12px 0px 0px 12px}.modal__content--left{border-radius:0px 12px 12px 0px}.modal__box__container{display:flex;flex-wrap:wrap;background-color:#fff;width:100%;border-radius:12px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";let s=class{constructor(e){i(this,e),this.configFinish=t(this,"configFinish",7),this.configCancel=t(this,"configCancel",7),this._columnListHistory=[],this._orderListItems=[],this._columListItems=[],this.selectedTab="Colunas",this._selectedIndex=-1}createOrderList(){var i;let t=[];(null===(i=this._columnListHistory)||void 0===i?void 0:i.length)>0?this._columnListHistory.find((i=>"Visíveis"===i.group)).items.forEach((i=>{t.push({label:i.label})})):this.columns.forEach((i=>{i.hidden||t.push({name:i.name,label:i.label})})),this._orderListItems=t}createColumnList(){let i={group:"Visíveis",items:[]},t={group:"Ocultas",items:[],sort:"ASC"};this.columns.forEach((e=>{let o={label:e.label};e.hidden?t.items.push(o):i.items.push(o)})),this._columnListHistory.length<=0&&(this._columListItems=[i,t])}buildColumnListSlot(i,t){return e("div",null,e("ez-check",{mode:"switch",id:"switch"+i+t,value:"Visíveis"===t.group,onEzChange:t=>{this.switchColumnGroup(t,i)}}))}buildOrderListSlot(i){let t=this.columns.find((t=>t.label===i.label));return e("div",null,e("select-box",{selectedOption:null==t?void 0:t.sort,key:"select-box"+i,onEzChange:t=>{t.stopPropagation(),this.updateOrder(t.detail,i)}}))}updateOrder(i,t){let e=[...this.columns],o=e.find((i=>i.label===t.label));o&&(o.sort=i.value),this.columns=e}switchColumnGroup(i,t){i.stopPropagation();let e=[...this._columListItems];if(!0===i.detail){let i=e.find((i=>"Ocultas"===i.group)),o=i.items.findIndex((i=>i.label===t.label));o>=0&&i.items.splice(o,1),e.find((i=>"Visíveis"===i.group)).items.push(t),this._columListItems=e,this.createOrderList()}else if(!1===i.detail){let i=e.find((i=>"Visíveis"===i.group)),o=i.items.findIndex((i=>i.label===t.label));o>=0&&i.items.splice(o,1),e.find((i=>"Ocultas"===i.group)).items.push(t),this._columListItems=e,this.createOrderList()}}finish(){let i=[];this._columListItems.forEach((t=>{t.items.forEach((e=>{const o=this.columns.find((i=>i.label===e.label));let d=Object.assign({},o);d.hidden="Ocultas"===t.group,i.push(d)}))})),this._columnListHistory=[],this.columns=i,this.configFinish.emit(this.columns)}async locateColumn(i,t){var e;const o="Enter"===i.key;t||(t=null===(e=i.currentTarget)||void 0===e?void 0:e.value);let d=-1;if("Ordenação das linhas"===this.selectedTab)if(t){const i=[];let e,l;if(await this._orderList.getList().then((o=>{e=o,e.forEach(((e,o)=>{this.compareWords(e,t)&&i.push(o)}))})),i.length>0){if(o)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){d=i[t];break}-1===d&&(d=i[0])}this._selectedIndex=d,l=e[d],l?this._orderList.setSelection({label:l.label},!0):this._orderList.setSelection(void 0)}else this._orderList.setSelection(void 0);else if(t){const i=[];if(this.columns.forEach(((e,o)=>{this.compareWords(e,t)&&i.push(o)})),i.length>0){if(o)for(let t=0;t<i.length;t++)if(i[t]>this._selectedIndex){d=i[t];break}-1===d&&(d=i[0])}this._selectedIndex=d;let e=this.columns[d];e?this._columnList.setSelection({label:e.label},!0):this._columnList.setSelection(void 0)}else this._columnList.setSelection(void 0)}compareWords(i,t){return d.replaceAccentuatedChars(i.label).indexOf(d.replaceAccentuatedChars(t))>-1}closeConfig(){this._columnListHistory=[],this.configCancel.emit()}handleTabChange(i){var t;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.selectedTab)&&("Ordenação das linhas"===i.target.selectedTab&&(this._columnListHistory=this._columnList.dataSource,this.createOrderList()),this.selectedTab=i.target.selectedTab)}handleColumnListChange(i){var t;if(i.detail){let e=null===(t=i.detail.find((i=>"Visíveis"===i.group)))||void 0===t?void 0:t.items;e&&(this._orderListItems=e)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&(this.createColumnList(),this.createOrderList())}componentDidRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.locateColumn(new KeyboardEvent("arrow-right",{key:"ArrowRight"}),this._searchElement.value)}render(){return e(o,null,e("div",{class:"grid-config__header"},e("div",{class:"title-container"},e("div",{class:""},e("label",{class:"title"},"Configuração da Grade"),e("label",{class:"subtitle"},"Defina visibilidade e ordem das colunas.")),e("div",{class:"button-close"},e("ez-button",{mode:"icon",image:l("close"),size:"medium",onClick:()=>this.closeConfig()}))),e("div",{class:"tabselector-container"},e("ez-tabselector",{selectedTab:this.selectedTab,selectedIndex:0,onEzChange:i=>{this.handleTabChange(i)},tabs:"Colunas, Ordenação das linhas"})),e("div",null,e("ez-text-input",{ref:i=>this._searchElement=i,label:"Localizar coluna",onKeyUp:i=>this.locateColumn(i)},e("ez-icon",{slot:"leftIcon",size:"medium",href:l("search")})))),e("div",{class:"grid-config__main"},e("ez-list",{ref:i=>this._columnList=i,class:"Colunas"===this.selectedTab?"":"hidden",dataSource:this._columListItems,onEzChange:i=>this.handleColumnListChange(i),ezDraggable:!0,ezSelectable:!0,itemSlotBuilder:(i,t)=>this.buildColumnListSlot(i,t),useGroups:!0}),e("div",{class:"Ordenação das linhas"===this.selectedTab?"group-name":"hidden"},"Sequência da ordenação"),e("ez-list",{ref:i=>this._orderList=i,class:"Ordenação das linhas"===this.selectedTab?"heigth-calc":"hidden",dataSource:this._orderListItems,ezSelectable:!0,ezDraggable:!0,itemSlotBuilder:i=>this.buildOrderListSlot(i)})),e("div",{class:"grid-config__footer"},e("ez-button",{class:"padding-right--medium",label:"Cancelar",onClick:()=>this.closeConfig()}),e("ez-button",{label:"Concluir",class:"button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}};s.style='.sc-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__main__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__main__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid__group--font-family:var(--font-pattern, "Sora");--ez-grid__group--font-size:var(--text--medium, 14px);--ez-grid__group--font-weight:var(--text-weight--large, 600);--ez-grid__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.padding-right--medium.sc-grid-config{padding-right:var(--space--medium)}ez-list.sc-grid-config{height:100%}.heigth-calc.sc-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-grid-config{padding-top:var(--ez-grid-config__footer--padding-top);display:flex;justify-content:flex-end;width:100%}.hidden.sc-grid-config{display:none}.grid-config__main.sc-grid-config{padding-right:var(--ez-grid-config__main--padding-right);overflow-y:auto}.tabselector-container.sc-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-grid-config{display:flex;justify-content:space-between;align-items:center;width:359px}.subtitle.sc-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-grid-config{display:flex;margin:0;font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight);line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary)}.grid-config__main.sc-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__main__scrollbar--background-color);border-radius:var(--ez-grid-config__main__scrollbar--border-radius)}.grid-config__main.sc-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-grid-config{font-family:var(--ez-grid__group--font-family);font-size:var(--ez-grid__group--font-size);font-weight:var(--ez-grid__group--font-weight);padding-bottom:var(--ez-grid__group--padding-bottom)}';export{a as ez_modal,s as grid_config}
@@ -0,0 +1 @@
1
+ const t=/^([+-])?(\d+).?(\d*)[eE]([-+]?\d+)$/;class e{}e.stringToNumber=e=>{if(""===e||null==e)return NaN;if(e){var s="-"===(e=e.toString()).charAt(0);if(""===(e=t.test(e)?e.replace(/^-/g,""):e.replace(/[^\d.,]/g,"")))return Number(NaN);var r=e.indexOf(","),i=e.indexOf(".");i>r?e=e.replace(",",""):i<r&&(e=e.replace(/\./g,"@").replace(",",".").replace(/@/g,"")),s&&(e="-"+e)}return Number(e)},e.format=(t,s,r=NaN)=>{if(""===t||void 0===t||"NaN"===t)return NaN.toString();let i=e.stringToNumber(t);if(NaN===i)return NaN.toString();if(s<0||Math.abs(Math.round(1*s)/1)!==s)return e.changeFormat(i.toString());let n,c=0;c=NaN===r||Math.abs(Math.round(1*r)/1)!==r?s:r,n=(Math.round(i*Math.pow(10,s))/Math.pow(10,s)).toLocaleString("pt-br",{minimumFractionDigits:s});const a=s-c;if(a>0)for(let t=0;t<a;t++)"0"==n.substring(n.length-1)&&s>0&&(n=n.substring(0,n.length-1));return"."!=n.substring(n.length-1)&&","!=n.substring(n.length-1)||(n=n.substring(0,n.length-1)),n},e.keepOnlyDecimalSeparator=(t,e="pt-BR")=>(e=e.toUpperCase(),t.replace("EN-US"===e?/\,/g:/\./g,"")),e.changeFormat=t=>t.replace(/\./g,"_").replace(/\,/g,".").replace(/\_/g,",");class s{constructor(t){this._mask="",this._maskChars=new Array,this.placeholder=" ",this.mask=t}set mask(t){this._mask=t,this.updateInternalMask()}get mask(){return this._mask}format(t){let e="";const s=[0];let r=0;const i=this._maskChars.length;for(;r<i;)e=this._maskChars[r].append(e,t,s),r++;return e}updateInternalMask(){if(this._maskChars.length=0,null!=this.mask){let t=0;const e=this.mask.length;for(;t<e;){let r=this.mask.charAt(t);switch(r){case s.DIGIT_KEY:this._maskChars.push(new s.DigitMaskCharacter(this,r));break;case s.LITERAL_KEY:++t<e&&(r=this.mask.charAt(t),this._maskChars.push(new s.LiteralCharacter(this,r)));break;case s.UPPERCASE_KEY:this._maskChars.push(new s.UpperCaseCharacter(this,r));break;case s.LOWERCASE_KEY:this._maskChars.push(new s.LowerCaseCharacter(this,r));break;case s.ALPHA_NUMERIC_KEY:this._maskChars.push(new s.AlphaNumericCharacter(this,r));break;case s.CHARACTER_KEY:this._maskChars.push(new s.CharCharacter(this,r));break;case s.ANYTHING_KEY:this._maskChars.push(new s.MaskCharacter(this,r));break;default:this._maskChars.push(new s.LiteralCharacter(this,r))}t++}}}}s.DIGIT_KEY="#",s.LITERAL_KEY="'",s.UPPERCASE_KEY="U",s.LOWERCASE_KEY="L",s.ALPHA_NUMERIC_KEY="A",s.CHARACTER_KEY="?",s.ANYTHING_KEY="*",s.MaskCharacter=class{constructor(t,e){this.maskFormatter=t,this.type=e}isLiteral(){return!1}isValidCharacter(t){return this.isLiteral()?this.getChar(t)==t:(t=this.getChar(t),!0)}getChar(t){return t}append(t,e,s){const r=s[0]<e.length?e.charAt(s[0]):"";if(this.isLiteral()){const e=this.getChar(r);t+=e,e===r&&(s[0]=s[0]+1)}else if(s[0]>=e.length)t+=this.maskFormatter.placeholder,s[0]=s[0]+1;else{if(!this.isValidCharacter(r))throw new Error(`Valor inválido: "${r}". Na posição ${s[0]+1} espera-se ${this.getFormatMessage()}.`);t+=this.getChar(r),s[0]=s[0]+1}return t}getFormatMessage(){let t;switch(this.type){case s.UPPERCASE_KEY:case s.LOWERCASE_KEY:case s.CHARACTER_KEY:t="uma letra";break;case s.DIGIT_KEY:t="um número";break;case s.ALPHA_NUMERIC_KEY:t="uma letra ou um número";break;default:t=""}return t}},s.LiteralCharacter=class extends s.MaskCharacter{constructor(t,e){super(t,e),this._fixedChar=e}isLiteral(){return!0}getChar(t){return this._fixedChar}},s.DigitMaskCharacter=class extends s.MaskCharacter{isValidCharacter(t){return this.isDigit(t)&&super.isValidCharacter(t)}isDigit(t){return t>="0"&&t<="9"}},s.UpperCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toUpperCase()}},s.LowerCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toLocaleLowerCase()}},s.AlphaNumericCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z0-9]/i.test(t)&&super.isValidCharacter(t)}},s.CharCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}};class r{static prepareValue(t,e){if(t&&t.length>0&&"NaN"!=t){let s=t.replace(/:/g,"");if(e){if(this._maskFormatter.mask="##:##:##",s.length<6)for(;s.length<6;)s="0".concat(s)}else if(this._maskFormatter.mask="##:##",s.length<4)for(;s.length<4;)s="0".concat(s);if(this._maskFormatter)try{return this._maskFormatter.format(s)}catch(t){throw new Error(t.message)}}return""}static validateTime(t,e){let s=!0;if(t){let r=t.replace(/:/g,"");e?(["1","2","0"].includes(r[0])||(s=!1),["0","1","2","3","4","5"].includes(r[2])||(s=!1),["0","1","2","3","4","5"].includes(r[4])||(s=!1),"2"!=r[0]||["0","1","2","3"].includes(r[1])||(s=!1)):(["1","2","0"].includes(r[0])||(s=!1),["0","1","2","3","4","5"].includes(r[2])||(s=!1),"2"!=r[0]||["0","1","2","3"].includes(r[1])||(s=!1))}else s=!1;return s}}var i,n;r._maskFormatter=new s("##:##"),function(t){t[t.GET=0]="GET",t[t.PUT=1]="PUT",t[t.POST=2]="POST",t[t.DELETE=3]="DELETE"}(i||(i={})),function(t){t.NUMBER="NUMBER",t.DATE="DATE",t.TEXT="TEXT",t.BOOLEAN="BOOLEAN",t.OBJECT="OBJECT"}(n||(n={}));const c=(t,e)=>{if(null==e)return e;switch(t){case n.NUMBER:return""===e||isNaN(e)?null:Number(e);case n.OBJECT:return"string"==typeof e?JSON.parse(e):e;case n.BOOLEAN:return Boolean(e);case n.DATE:return new Date(e.toString());default:return e}};class a{constructor(t,e){this._type=t,this._payload=e}get type(){return this._type}get payload(){return this._payload}}var h;!function(t){t.LOADING_METADATA="loadingMetadata",t.METADATA_LOADED="metadataLoaded",t.LOADING_DATA="loadingData",t.DATA_LOADED="dataLoaded",t.SAVING_DATA="savingData",t.DATA_SAVED="dataSaved",t.REMOVING_RECORDS="removingRecords",t.RECORDS_REMOVED="recordsRemoved",t.RECORDS_ADDED="recordsAdded",t.RECORDS_COPIED="recordsCopied",t.DATA_CHANGED="dataChanged",t.EDITION_CANCELED="editionCanceled",t.CHANGE_UNDONE="changeUndone",t.CHANGE_REDONE="changeRedone",t.SELECTION_CHANGED="selectionChanged",t.NEXT_SELECTED="nextSelected",t.PREVIOUS_SELECTED="previousSelected",t.STATE_CHANGED="stateChanged"}(h||(h={}));class o{constructor(t){this._past=[],this._future=[],this._present={},this._nonHist={},this._histClean=!1,this._reducers=t}process(t){const e=this._present;let s=!1;this._histClean=!1,this._reducers.forEach((e=>{const r=e.sliceName,i=this.isHistoric(r),n=this.getSlice(r,i),c=e.reduce(this,n,t);c!==n&&(this.updateSlice(r,c,i),s||(s=i))})),s&&!this._histClean&&(this._past.push(e),this._future=[],document.dispatchEvent(new CustomEvent("undoableAction",{detail:this})))}select(t,e){const s=this.isHistoric(t);return e(this.getSlice(t,s))}isHistoric(t){return t.startsWith("hist::")}updateSlice(t,e,s){s?(this._present=Object.assign(Object.assign({},this._present),{[t]:e}),void 0===e&&delete this._present[t]):(this._nonHist=Object.assign(Object.assign({},this._nonHist),{[t]:e}),void 0===e&&delete this._nonHist[t])}getSlice(t,e){return e?this._present[t]:this._nonHist[t]}canUndo(){return this._past.length>0}canRedo(){return this._future.length>0}undo(){this.canUndo()&&(this._future.push(this._present),this._present=this._past.pop())}redo(){this.canRedo()&&(this._past.push(this._present),this._present=this._future.pop())}clearUndo(){this._histClean=!0,this._past=[],this._future=[]}persist(){}}const u=new class{constructor(){this.sliceName=""}reduce(t,e,s){switch(s.type){case h.DATA_SAVED:case h.EDITION_CANCELED:t.clearUndo();break;case h.CHANGE_UNDONE:t.undo();break;case h.CHANGE_REDONE:t.redo()}}},d=new class{constructor(){this.sliceName="unitMetadata"}reduce(t,e,s){return s.type===h.METADATA_LOADED?s.payload:e}},l=t=>t.select(d.sliceName,(t=>t)),f=new class{constructor(){this.sliceName="hist::removedRecords"}reduce(t,e,s){switch(s.type){case h.RECORDS_REMOVED:const{records:t,buffered:r}=s.payload;return r?(e||[]).concat(t):e;case h.EDITION_CANCELED:case h.DATA_SAVED:return}return e}},v=t=>t.select(f.sliceName,(t=>t)),E=new class{constructor(){this.sliceName="records"}reduce(t,e,s){switch(s.type){case h.DATA_LOADED:return s.payload;case h.RECORDS_REMOVED:const{records:r,buffered:i}=s.payload;return i?e:e.filter((t=>!r.includes(t.__record__id__)));case h.DATA_SAVED:const n=new Map,c=g(t);if(c){const e=v(t)||[];c.forEach((t=>{e.includes(t.__record__id__)||n.set(t.__record__id__,t)}))}return s.payload.records.forEach((t=>{const e=t.__old__id__||t.__record__id__,s=Object.assign({},t);delete s.__old__id__,n.set(e,s)})),Array.from(n.values())}return e}},g=t=>t.select(E.sliceName,(t=>t)),w=new class{constructor(){this.sliceName="hist::addedRecords"}reduce(t,e,s){switch(s.type){case h.RECORDS_ADDED:case h.RECORDS_COPIED:return(e||[]).concat(s.payload);case h.DATA_SAVED:case h.EDITION_CANCELED:return}return e}},N=t=>t.select(w.sliceName,(t=>t)),p=(t,e)=>{let s=(N(t)||[]).length;return e.map((t=>Object.assign(Object.assign({},t),{__record__id__:"NEW_"+s++})))},b=new class{constructor(){this.sliceName="hist::changes"}reduce(t,e,s){switch(s.type){case h.DATA_CHANGED:const r=s.payload.records||R(t);if(r){const t=new Map(e);return r.forEach((e=>{const r=Object.assign(Object.assign({},t.get(e)),s.payload);delete r.records,t.set(e,r)})),t}return e;case h.DATA_SAVED:case h.EDITION_CANCELED:return}return e}},m=t=>t.select(b.sliceName,(t=>t)),T=new class{constructor(){this.sliceName="currentRecords"}reduce(t,e,s){let r=g(t);const i=N(t);if(!r&&!i)return;i&&(r=(r||[]).concat(i));const n=v(t);n&&(r=r.filter((t=>!n.includes(t.__record__id__))));const c=m(t);return new Map(r.map((t=>{const e=t.__record__id__;return[e,Object.assign(Object.assign({},t),null==c?void 0:c.get(e))]})))}},M=t=>t.select(T.sliceName,(t=>t)),S=new class{constructor(){this.sliceName="hist::selection"}reduce(t,e,s){switch(s.type){case h.RECORDS_ADDED:case h.RECORDS_COPIED:return s.payload.map((t=>t.__record__id__));case h.DATA_SAVED:return function(t,e){const s=R(t);if(s){const t=[];return s.forEach((s=>{const r=e.find((t=>t.__old__id__===s));t.push(r?r.__record__id__:s)})),t}return s}(t,s.payload.records);case h.RECORDS_REMOVED:const r=s.payload.records;return e&&r?e.filter((t=>!r.includes(t))):e;case h.NEXT_SELECTED:case h.PREVIOUS_SELECTED:const i=M(t);if(i&&i.size>0){let t;if(t=e&&0!==e.length?A(e[0],i)+(s.type===h.PREVIOUS_SELECTED?-1:1):s.type===h.PREVIOUS_SELECTED?0:Math.min(1,i.size),t<i.size&&t>=0)return[Array.from(i.values())[t].__record__id__]}return;case h.SELECTION_CHANGED:const{type:n,selection:c}=s.payload;if(c&&"index"===n){const e=M(t);if(e){const t=Array.from(e.values()),s=[];return c.forEach((r=>{r>0&&r<e.size&&s.push(t[r].__record__id__)})),s}}return c}return e}},R=t=>{let e=t.select(S.sliceName,(t=>t));const s=Array.from((M(t)||new Map).keys());return e&&(e=e.filter((t=>s.includes(t)))),(!e||0===e.length)&&s&&s.length>0?[s[0]]:e};function A(t,e){return Array.from(e.keys()).indexOf(t)}var C,O,D,y,I=function(t,e,s,r){return new(s||(s=Promise))((function(i,n){function c(t){try{h(r.next(t))}catch(t){n(t)}}function a(t){try{h(r.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(c,a)}h((r=r.apply(t,e||[])).next())}))};class P{constructor(t){this._name=t,this._stateManager=new o([u,d,E,f,w,S,b,T]),this._observers=[],this._filterProviders=[],this._sortingProvider=void 0,this._interceptors=[]}get name(){return this._name}validateAndTypeValue(t,e){const s=this.getField(t);return s?c(s.dataType,e):e}getFilters(){let t;return this._filterProviders.forEach((e=>{const s=e.getFilter(this.name);s&&(t=(t||[]).concat(s))})),t}getSort(){return this._sortingProvider?this._sortingProvider.getSort(this._name):void 0}loadMetadata(){return I(this,void 0,void 0,(function*(){return this.dispatchAction(h.LOADING_METADATA),new Promise(((t,e)=>{this.metadataLoader&&this.metadataLoader(this).then((e=>{this.metadata=e,t(this.metadata)})).catch((t=>e(t)))}))}))}loadData(){return I(this,void 0,void 0,(function*(){return this.dispatchAction(h.LOADING_DATA),new Promise(((t,e)=>{if(this.dataLoader){const s=this.getSort(),r=this.getFilters();this.dataLoader(this,s,r).then((e=>{this.records=e,t(this.records)})).catch((t=>e(t)))}}))}))}saveData(){return I(this,void 0,void 0,(function*(){const t=((t,e)=>{const s=[],r=m(e),i=g(e);null==i||i.forEach((e=>{if(r){const i=r.get(e.__record__id__);i&&s.push(new k(t,e,i,C.UPDATE))}}));const n=N(e);n&&n.forEach((e=>{s.push(new k(t,e,null==r?void 0:r.get(e.__record__id__),C.INSERT))}));const c=v(e),a={};return null==i||i.forEach((t=>a[t.__record__id__]=t)),c&&c.forEach((e=>{s.push(new k(t,a[e],void 0,C.DELETE))})),s})(this._name,this._stateManager);return t.length>0?(this.dispatchAction(h.SAVING_DATA),new Promise(((e,s)=>{this.saveLoader&&this.saveLoader(this,t).then((e=>this.dispatchAction(h.DATA_SAVED,{changes:t,records:e}))).catch((t=>s(t)))}))):Promise.resolve()}))}removeSelectedRecords(t=!1){return I(this,void 0,void 0,(function*(){const e=R(this._stateManager);return e?this.removeRecords(e,t):Promise.resolve(e)}))}removeRecords(t,e=!1){return I(this,void 0,void 0,(function*(){if(t){if(!e&&this.removeLoader)return this.dispatchAction(h.REMOVING_RECORDS),new Promise(((e,s)=>{this.removeLoader&&this.removeLoader(this,t).then((t=>{this.dispatchAction(h.RECORDS_REMOVED,{records:t,buffered:!1}),e(t)})).catch((t=>s(t)))}));this.dispatchAction(h.RECORDS_REMOVED,{records:t,buffered:!0})}return Promise.resolve(t)}))}valueFromString(t,e){const s=this.getField(t);return s?c(s.dataType,e):e}addInterceptor(t){this._interceptors.push(t)}addFilterProvider(t){this._filterProviders.push(t)}set sortingProvider(t){this._sortingProvider=t}set metadata(t){this.dispatchAction(h.METADATA_LOADED,t)}get metadata(){return l(this._stateManager)}set records(t){this.dispatchAction(h.DATA_LOADED,t)}get records(){const t=M(this._stateManager);return t?Array.from(t.values()):[]}getField(t){return((t,e)=>{const s=l(this._stateManager);return s?s.fields.find((t=>t.name===e)):void 0})(0,t)}addRecord(){this.dispatchAction(h.RECORDS_ADDED,p(this._stateManager,[{}]))}copySelected(){const t=this.getSelectedRecords();t&&this.dispatchAction(h.RECORDS_COPIED,p(this._stateManager,t))}getFieldValue(t){return((t,e)=>{const s=R(t);if(s&&s.length>0){const r=M(t);if(r){const t=r.get(s[0]);return t?t[e]:void 0}}})(this._stateManager,t)}setFieldValue(t,e,s){const r=this.validateAndTypeValue(t,e);this.getFieldValue(t)!==r&&this.dispatchAction(h.DATA_CHANGED,{[t]:r,records:s})}getSelection(){return R(this._stateManager)}setSelection(t){this.dispatchAction(h.SELECTION_CHANGED,{type:"id",selection:t})}setSelectionByIndex(t){this.dispatchAction(h.SELECTION_CHANGED,{type:"index",selection:t})}getSelectedRecords(){const t=this.getSelection();if(t){const e=this.records;return null==e?void 0:e.filter((e=>t.includes(e.__record__id__)))}}nextRecord(){this.dispatchAction(h.NEXT_SELECTED)}previousRecord(){this.dispatchAction(h.PREVIOUS_SELECTED)}cancelEdition(){this.dispatchAction(h.EDITION_CANCELED)}isDirty(){return void 0!==N(t=this._stateManager)||void 0!==v(t)||void 0!==m(t);var t}hasNext(){return(t=>{const e=M(t);if(e){const s=t.select(S.sliceName,(t=>t));return s&&0!==s.length?e.size>A(s[0],e)+1:e.size>0}return!1})(this._stateManager)}hasPrevious(){return(t=>{const e=M(t);if(e){const s=t.select(S.sliceName,(t=>t));return!(!s||0===s.length)&&A(s[0],e)>0}return!1})(this._stateManager)}canUndo(){return this._stateManager.canUndo()}canRedo(){return this._stateManager.canRedo()}undo(){this.dispatchAction(h.CHANGE_UNDONE)}redo(){this.dispatchAction(h.CHANGE_REDONE)}toString(){return this.name}dispatchAction(t,e){var s;let r=new a(t,e);null===(s=this._interceptors)||void 0===s||s.forEach((t=>{r&&(r=t.interceptAction(r))})),r&&(this._stateManager.process(r),this._observers.forEach((t=>t(r))))}subscribe(t){this._observers.push(t)}unsubscribe(t){this._observers=this._observers.filter((e=>e!==t))}}!function(t){t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"}(C||(C={}));class k{constructor(t,e,s,r){this.dataUnit=t,this.record=e,this.updatingFields=s,this._operation=r}get operation(){return this._operation.toString()}isInsert(){return this._operation===C.INSERT}isDelete(){return this._operation===C.DELETE}isUpdate(){return this._operation===C.UPDATE}}!function(t){t.ASC="ASC",t.DESC="DESC"}(O||(O={})),function(t){t.SEARCHING="SEARCHING",t.REQUIREMENT="REQUIREMENT",t.VISIBILITY="REQUIREMENT"}(D||(D={})),function(t){t.FILE="FILE",t.IMAGE="IMAGE",t.DATE="DATE",t.DATETIME="DATETIME",t.TIME="TIME",t.ELAPSEDTIME="ELAPSEDTIME",t.CHECKBOX="CHECKBOX",t.SWITCH="SWITCH",t.OPTIONSELECTOR="OPTIONSELECTOR",t.DECIMALNUMBER="DECIMALNUMBER",t.INTEGERNUMBER="INTEGERNUMBER",t.SEARCH="SEARCH",t.SHORTTEXT="SHORTTEXT",t.PASSWORD="PASSWORD",t.MASKEDTEXT="MASKEDTEXT",t.LONGTEXT="LONGTEXT",t.HTML="HTML"}(y||(y={}));export{h as A,a as D,s as M,e as N,O as S,r as T,y as U,P as a,n as b}
@@ -1,4 +1,4 @@
1
- import{r as t,c as n,h as i,H as e}from"./p-89a57641.js";import{b as r,S as o,A as s}from"./p-9fab5606.js";var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,n,i){return t(i={path:n,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var h=c((function(t,n){
1
+ import{r as t,c as n,h as i,H as e}from"./p-89a57641.js";import{b as r,S as o,A as s}from"./p-c6760545.js";var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t,n,i){return t(i={path:n,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var h=c((function(t,n){
2
2
  /**
3
3
  * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
4
4
  * @version v26.2.1
@@ -0,0 +1 @@
1
+ import{r as e,c as t,f as i,h as o,H as a,g as r}from"./p-89a57641.js";import{T as s,U as n,A as l,D as c,a as d,N as h,M as p,b}from"./p-c6760545.js";import{F as u}from"./p-ddd0ef12.js";import{S as x,g as m}from"./p-ec7c1b86.js";class g{static clearTime(e,t=!0){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);return t?g.adjustDLST(i):i}static strToDate(e,t=!0,i=!1){let o;if(o=i?/^(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(e):/^(3[01]|[1-2]\d|0[1-9]|[1-9])[^\d]?(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(e),!o)return;var a=i?1:Number(o[1]),r=Number(o[i?1:2]),s=Number(o[i?2:3]),n=Number(o[i?3:4]||0),l=Number(o[i?4:5]||0),c=Number(o[i?5:6]||0);s<100&&(s+=s<30?2e3:1900);let d=new Date(s,r-1,a,n,l,c,0);return!0!==t||i||0!=n||(d=g.adjustDLST(d)),d}static adjustDLST(e){return 23==e.getHours()?new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,1,0,0,0):e}}class v{static getContextValue(e){return v.getCtx()[e]}static setContextValue(e,t){v.getCtx()[e]=t}static getCtx(){let e=window.___snkcore___ctx___;return e||(e={},window.___snkcore___ctx___=e),e}}let f=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this._firstRender=!0,this._todayLabel="Hoje",this._weekDayLabels=["D","S","T","Q","Q","S","S"],this._monthLabels=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(e,t,i,o){this.floating&&(this._floatingID=u.float(this._box,this._container,{autoClose:!0,top:e,left:t,bottom:i,right:o}),window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll())}async fitVertical(e,t){const i=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>i?this.show(e+"px",void 0,"unset"):this.show("unset",void 0,t+"px")}async hide(){void 0!==this._floatingID&&(u.close(this._floatingID),this._floatingID=void 0)}valueChanged(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}getMonthLabel(){return this._monthLabels[this._currentPosition.getMonth()]+" "+this._currentPosition.getFullYear()}isSelectedDate(e){return!!this.value&&this.value.getDate()==e.getDate()&&this.value.getMonth()==e.getMonth()&&this.value.getFullYear()==e.getFullYear()}changeMonth(e){this._currentPosition.setMonth(this._currentPosition.getMonth()+e),i(this)}selectDate(e){let t=e;this.value&&(this.time||this.showSeconds)&&(t.setHours(this.value.getHours()),t.setMinutes(this.value.getMinutes()),t.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=t,this.ezChange.emit()}selectHours(e){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),e,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit()}selectMinutes(e){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),e,this.value.getSeconds()),this.ezChange.emit()}selectSeconds(e){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),e),this.ezChange.emit()}updateScroll(e){if(e){const{scrollHeight:t,clientHeight:i,scrollTop:o}=e;t-i-Math.ceil(o)>0?e.classList.add("endHidden"):e.classList.remove("endHidden")}}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const e=new Date;return e.setTime(this._currentPosition.getTime()),e.setDate(1-e.getDay()),o("section",{ref:e=>this._container=e},o("div",{ref:e=>this._box=e,class:"calendar__container"},o("div",{class:"calendar"},o("div",{class:"calendar__header"},o("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),o("label",{class:"calendar__lbl-month"},this.getMonthLabel()),o("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),o("div",{class:"calendar__body"},o("div",{class:"calendar__line"},this._weekDayLabels.map((e=>o("div",{class:"calendar__cell calendar__cell--unselectable"},e)))),[0,7,14,21,28,35].map((t=>o("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((i=>{const a=new Date;a.setTime(e.getTime()),a.setDate(a.getDate()+t+i);let r="calendar__cell";return this._currentPosition.getMonth()!=a.getMonth()?r+=" calendar__cell--secondary":this.isSelectedDate(a)&&(r+=" calendar__cell--selected"),o("div",{class:r,onClick:()=>this.selectDate(a)},a.getDate())})))))),o("div",{class:"calendar__footer"},o("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this._todayLabel))),(this.time||this.showSeconds)&&o("div",{class:"calendar-time"},o("div",{class:"calendar-time__header"},o("div",null,"H"),o("div",{class:"separatorTime"},":"),o("div",null,"M"),this.showSeconds&&o("div",{class:"separatorTime"},":"),this.showSeconds&&o("div",null,"S")),o("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},o("div",{class:"calendar__column",ref:e=>this._hoursScroll=e,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((e,t)=>t===this.value.getHours()?o("div",{style:{display:"flex"},ref:e=>this._hoursSelect=e},o("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(t)},e),o("div",{class:"separatorTime"},":")):o("div",{style:{display:"flex"}},o("div",{class:"calendar__cell",onClick:()=>this.selectHours(t)},e),o("div",{class:"separatorTime"},":"))))),o("div",{class:"calendar__column",ref:e=>this._minutesScroll=e,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((e,t)=>t===this.value.getMinutes()?o("div",{style:{display:"flex"},ref:e=>this._minutesSelect=e},o("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(t)},e),this.showSeconds&&o("div",{class:"separatorTime"},":")):o("div",{style:{display:"flex"}},o("div",{class:"calendar__cell",onClick:()=>this.selectMinutes(t)},e),this.showSeconds&&o("div",{class:"separatorTime"},":"))))),this.showSeconds&&o("div",{class:"calendar__column",ref:e=>this._secondsScroll=e,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((e,t)=>t===this.value.getSeconds()?o("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(t),ref:e=>this._secondsSelect=e},e):o("div",{class:"calendar__cell",onClick:()=>this.selectSeconds(t)},e))))))))}static get watchers(){return{value:["valueChanged"]}}};f.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--ez-calendar__nav-btn--next-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}';let _=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.mode="regular"}adjustMode(){"switch"===this.mode?(this._inputElem.classList.remove("regularMode"),this._inputElem.classList.add("switchMode")):(this._inputElem.classList.remove("switchMode"),this._inputElem.classList.add("regularMode"))}async getMode(){return this.mode}async setFocus(){this._inputElem.focus()}componentDidLoad(){this.adjustMode()}changeValue(){this.value=!this.value,this.ezChange.emit(this.value)}getLabelClasses(){let e="label";return this.enabled||(e+=" label--disabled"),e}render(){return o(a,null,o("input",{type:"checkbox",class:"regularMode",checked:!0===this.value,onChange:()=>{this.changeValue()},disabled:!this.enabled,ref:e=>this._inputElem=e}),this.label?o("label",{class:this.getLabelClasses(),onClick:()=>{this.changeValue()},title:this.label},this.label):void 0)}static get watchers(){return{mode:["adjustMode"]}}};_.style=':host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url(\'data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>\');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:20px;--ez-switch--pin--height:20px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--checked--background-color:var(--color--primary-300);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-secondary);--ez-switch--pin--checked--background-color:var(--color--primary);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:"";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--text--secondary, #a2abb9);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-switch--disabled--background-color)}input.switchMode::after{content:"";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(-2px) translateY(-3px);border-radius:50%;width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}';let w=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.value=!1,this.headerSize="small",this.iconPlacement="left"}observeValue(){this.ezChange.emit()}async showHide(){this.value=!this.value}render(){return o(a,null,"right"==this.iconPlacement?o("div",{class:"collapsible-box__title"},o("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label),o("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()})):o("div",{class:"collapsible-box__title"},o("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()}),o("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label)),this.value?null:o("slot",null))}static get watchers(){return{value:["observeValue"]}}};w.style=':host{--ez-collapsible-box--height:42px;--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__btn--image--xsmall:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="12px" width="7.5px"><path d="M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z"/></svg>\');--ez-collapsible-box__btn--image--small:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="14px" width="8.68px"><path d="M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z"/></svg>\');--ez-collapsible-box__btn--image--medium:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-collapsible-box__btn--image--large:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="18px" width="11.25px"><path d="M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z"/></svg>\');--ez-collapsible-box__btn--image--xlarge:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="20px" width="12.5px"><path d="M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z"/></svg>\');--ez-collapsible-box__btn--fill:var(--ez-collapsible-box--color);--ez-collapsible-box__btn--width:10px;--ez-collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:\'\';display:flex;background-color:var(--ez-collapsible-box__btn--fill);width:var(--ez-collapsible-box__btn--width);height:var(--ez-collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xsmall);mask-image:var(--ez-collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--small);mask-image:var(--ez-collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--medium);mask-image:var(--ez-collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--large);mask-image:var(--ez-collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xlarge);mask-image:var(--ez-collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}';class z{static applyVarsTextInput(e,t){t&&(z.applyIfExists(e,t,"--ez-text-input__input--background-color"),z.applyIfExists(e,t,"--ez-text-input__input--border-color"),z.applyIfExists(e,t,"--ez-text-input--height"))}static applyIfExists(e,t,i){const o=getComputedStyle(e).getPropertyValue(i);o&&t.style.setProperty(i,o)}}let k=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressEmptyOption=!1,this.canShowError=!0}internalUpdate(){this._inputElement&&(this._inputElement.value=this.getText()),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async setFocus(){this._inputElement.setFocus()}async setBlur(){this._inputElement.setBlur()}getText(){let e="";const t=this.getSelectedOption();return t&&(e=this.showSelectedValue?`${t.value} - ${t.label}`:t.label),e}getSelectedOption(){return"string"==typeof this.value||this.value instanceof String?this._visibleOptions.find((e=>e.value===this.value)):this.value}updateVisibleOptions(){let e=this._source||[];if(!this.searchMode&&this._criteria){const t=this._criteria.toUpperCase();e=e.filter((e=>e.label.toLocaleUpperCase().indexOf(t)>-1))}this._visibleOptions=this.suppressEmptyOption?e:[{value:void 0,label:""}].concat(e)}buildItem(e,t){return o("li",{class:t===this._preSelection?"item preselected":"item",id:`item_${e.value}`,onMouseDown:()=>this.selectOption(e),onMouseOver:()=>this._preSelection=void 0},o("span",{class:"item--label",title:e.label},e.label),this.showOptionValue?o("span",{class:"item--value",title:e.value},e.value):void 0)}showOptions(){this.enabled&&(this._floatingID=u.float(this._optionsList,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError?"0px":"-17px"}),window.requestAnimationFrame((()=>{this._optionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&u.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&u.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(e,t){window.requestAnimationFrame((()=>{const i=this._optionsList.querySelector(`li#item_${e.value}`);if(i){const e=i.parentElement,o=e.getBoundingClientRect(),a=i.getBoundingClientRect();t&&a.bottom>o.bottom?e.scrollTop=a.top:!t&&a.top<o.top&&(e.scrollTop=0)}}))}selectCurrentOption(){void 0!==this._preSelection&&(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0)}selectOption(e){if(this.getSelectedOption()!==e){const t=(null==e?void 0:e.value)?e:void 0;this.value=t,this.errorMessage="",this.ezChange.emit(t)}else this.internalUpdate()}updateSource(e){e instanceof Promise?(e.then((e=>this.updateSource(e))),this.updateVisibleOptions()):(this._source=e,this.updateVisibleOptions())}loadOptions(e,t=""){this._criteria=t,this.updateSource(this.optionLoader?this.optionLoader({mode:e,argument:t}):this.options)}cancelPreselection(){!this._inputElement.value&&this.value?this.selectOption(void 0):this.internalUpdate()}componentWillLoad(){if(void 0===this.options){this.options=[];const e=this.el.querySelectorAll("option");e&&e.forEach((e=>{let t=e.innerText,i=e.getAttribute("value");i||(i=t),this.options.push({label:t,value:i}),e.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions("PRELOAD")}componentDidRender(){void 0===this._floatingID&&this._optionsList.remove()}componentDidLoad(){z.applyVarsTextInput(this.el,this._inputElement)}onTextInputChangeHandler(e){this._criteria||(this._inputElement.value=e.data);const t=e.target.value;this._criteria=t,this._criteria&&(this.searchMode?(this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions("PREDICTIVE",t)}),200)):this.updateVisibleOptions(),this.showOptions())}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(e){switch(e.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection()}e.stopPropagation()}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){return o(a,null,o("ez-text-input",{ref:e=>this._inputElement=e,enabled:this.enabled,onInput:e=>this.onTextInputChangeHandler(e),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onEzChange:e=>e.stopPropagation(),onKeyDown:e=>this.keyDownHandler(e),label:this.label,value:this.getText(),canShowError:this.canShowError,errorMessage:this.errorMessage},o("button",this.searchMode?{disabled:!this.enabled,tabindex:-1,class:"btn-open-search",onClick:()=>{this.loadOptions("ADVANCED")},slot:"leftIcon"}:{disabled:!this.enabled,tabindex:-1,class:"btn-open-options",slot:"rightIcon",onClick:()=>this.showOptions()})),o("section",{class:"list-container",ref:e=>this._listContainer=e},o("div",{class:"options-list",ref:e=>this._optionsList=e},this._visibleOptions.map(((e,t)=>this.buildItem(e,t))))))}get el(){return r(this)}static get watchers(){return{value:["internalUpdate"]}}};k.style=':host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box__drop-down-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="16px"><path d="M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z"/></svg>\');--ez-combo-box__search-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="22px" width="22px"><path d="m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z"/></svg>\');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:\'\';display:flex;background-color:var(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:\'\';display:flex;background-color:var(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}';let y=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}changeValue(e){e=null==e?null:g.clearTime(e),this._textInput.errorMessage="",e!==this.value&&(this.value=e,this.ezChange.emit())}showCalendar(){this.parseDate(),this._calendar.value=this.value,this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}parseDate(){const e=this._textInput.value,t=g.strToDate(e);t||!e?this.changeValue(this.value===t?this.value:t):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(e){return e?new Intl.DateTimeFormat("pt-BR").format(e):null}componentDidLoad(){z.applyVarsTextInput(this._elem,this._textInput)}render(){return o(a,null,o("ez-text-input",{ref:e=>this._textInput=e,onBlur:()=>this.parseDate(),onKeyDown:e=>{"H"!==e.key&&"h"!==e.key||this.changeValue(new Date)},label:this.label,onEzChange:e=>e.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage},o("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),o("ez-calendar",{onEzChange:e=>{this.hideCalendar(),e.stopPropagation()},floating:!0,ref:e=>this._calendar=e}))}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};y.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';let C=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.showSeconds=!1}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}onChangeKeyDown(e){const t=this._textInput.shadowRoot.querySelector("input");if("H"===e.key||"h"===e.key)this.changeValue(new Date);else if(e.shiftKey&&"Tab"===e.key){if(t.selectionStart>0){let i=t.value.lastIndexOf(" ",t.selectionStart);-1!==i&&(t.setSelectionRange(0,i),e.preventDefault())}}else if("Tab"===e.key&&t.value.length!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionEnd);i=-1===i?t.selectionEnd:i+1,t.setSelectionRange(i,t.value.length),e.preventDefault()}}onFocused(){const e=this._textInput.shadowRoot.querySelector("input");if(e.selectionStart!==e.selectionEnd){let t=e.value.indexOf(" ",e.selectionStart);t=-1===t?e.value.length:t,e.setSelectionRange(0,t)}}onClicked(){const e=this._textInput.shadowRoot.querySelector("input");let t=e.value.lastIndexOf(" ",e.selectionEnd);t=-1===t?0:t+1,t=t>e.selectionEnd?0:t;let i=0===t?e.value.indexOf(" "):e.value.length;e.setSelectionRange(t,i)}changeValue(e){this._textInput.errorMessage="",e!==this.value&&(this.value=e,this.ezChange.emit())}showCalendar(){this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight),this._calendar.style.visibility="inherit"}parseDate(){const e=this._textInput.value,t=e&&e.length>0?e.split(" "):[],i=t.length>0?t[0]:e,o=s.prepareValue(t[1]?t[1]:"",this.showSeconds),a=g.strToDate(i+(o&&" "+o));a||!e?this.changeValue(this.value===a?this.value:a):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(e){return e?new Intl.DateTimeFormat("pt-BR",this.showSeconds?{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}).format(e):null}componentDidLoad(){z.applyVarsTextInput(this._elem,this._textInput)}render(){return o(a,null,o("ez-text-input",{ref:e=>this._textInput=e,onBlur:()=>this.parseDate(),onKeyDown:e=>{this.onChangeKeyDown(e)},label:this.label,onEzChange:e=>e.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,onFocus:()=>this.onFocused(),onClick:()=>this.onClicked()},o("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),o("ez-calendar",{onEzChange:e=>{this.changeValue(this._calendar.value),e.stopPropagation()},floating:!0,ref:e=>this._calendar=e,time:!0,showSeconds:this.showSeconds}))}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};C.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';const F=({name:e,label:t})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-text-input",{label:t,"data-field-name":e,key:e}));function M(e,t,i,a=!1){return o("div",{class:"col col--sd-12 col--tb-3 padding--small align--middle padding-bottom--large"},o("ez-check",{enabled:!i,label:t,mode:a?"switch":"regular","data-field-name":e,key:e}))}function E(e,t,i,a,r){return o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-number-input",{enabled:!i,label:t,precision:a,prettyPrecision:r,"data-field-name":e,key:e}))}const D=new Map;D.set(n.LONGTEXT,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 padding--small",key:e},o("ez-text-area",{enabled:!i,label:t,"data-field-name":e})))),D.set(n.CHECKBOX,(e=>M(e.name,e.label,e.readOnly,!1))),D.set(n.SWITCH,(e=>M(e.name,e.label,e.readOnly,!0))),D.set(n.OPTIONSELECTOR,(({name:e,label:t,readOnly:i},a)=>{const r=null==a?void 0:a.options;let s;if("string"==typeof r){const e=JSON.parse(r);s=Object.keys(e).map((t=>({value:t,label:e[t]})))}else s=r;return o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-combo-box",{enabled:!i,label:t,"data-field-name":e,key:e,options:s}))})),D.set(n.SEARCH,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-search",{enabled:!i,label:t,"data-field-name":e,key:e})))),D.set(n.FILE,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 padding--small"},o("ez-upload",{enabled:!i,label:t,urlUpload:"",requestHeaders:"",maxFiles:10,"data-field-name":e,key:e})))),D.set(n.DATE,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-date-input",{enabled:!i,label:t,"data-field-name":e,key:e})))),D.set(n.TIME,(({name:e,label:t})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-time-input",{label:t,"data-field-name":e,key:e})))),D.set(n.DATETIME,(({name:e,label:t})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-date-time-input",{label:t,"data-field-name":e,key:e})))),D.set(n.DECIMALNUMBER,(({name:e,label:t,readOnly:i},o)=>{const a=Number((null==o?void 0:o.precision)||2);return E(e,t,i,a,Number((null==o?void 0:o.prettyPrecision)||a))})),D.set(n.INTEGERNUMBER,(({name:e,label:t,readOnly:i})=>E(e,t,i,0,0)));const A=e=>{const t=e.descriptor,i=Object.assign({},e.config);let o,a;return t&&(i.label||(i.label=t.label),i.name||(i.name=t.name),void 0===i.required&&(i.required=t.required),void 0===i.readOnly&&(i.readOnly=t.readOnly),a=t.properties,o=D.get(t.userInterface)),i.required&&(i.label=`* ${i.label} (obrigatório)`),o||(o=F),o(i,a)},O=({source:e})=>"items"in e?o("ez-collapsible-box",{label:e.label},e.items.map((e=>A(e)))):A(e),V=({store:e,source:t})=>o("div",{class:"box__container"},t.items.map((t=>o(O,{store:e,source:t}))));class S{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[]}getSheet(e){return this._sheets.get(e)}getAllSheets(){return this._sheets}addSheet(e){this._sheets.set(e.name,e),this._requiredFields=this._requiredFields.concat(e.requiredFields),this._cleanOnCopyFields=this._cleanOnCopyFields.concat(e.cleanOnCopyFields)}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}}function T(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var I="function"==typeof Symbol&&Symbol.observable||"@@observable",L=function(){return Math.random().toString(36).substring(7).split("").join(".")},B={INIT:"@@redux/INIT"+L(),REPLACE:"@@redux/REPLACE"+L(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+L()}};function N(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function R(e,t,i){var o;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(T(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(T(1));return i(R)(e,t)}if("function"!=typeof e)throw new Error(T(2));var a=e,r=t,s=[],n=s,l=!1;function c(){n===s&&(n=s.slice())}function d(){if(l)throw new Error(T(3));return r}function h(e){if("function"!=typeof e)throw new Error(T(4));if(l)throw new Error(T(5));var t=!0;return c(),n.push(e),function(){if(t){if(l)throw new Error(T(6));t=!1,c();var i=n.indexOf(e);n.splice(i,1),s=null}}}function p(e){if(!N(e))throw new Error(T(7));if(void 0===e.type)throw new Error(T(8));if(l)throw new Error(T(9));try{l=!0,r=a(r,e)}finally{l=!1}for(var t=s=n,i=0;i<t.length;i++)(0,t[i])();return e}function b(e){if("function"!=typeof e)throw new Error(T(10));a=e,p({type:B.REPLACE})}function u(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(T(11));function i(){e.next&&e.next(d())}return i(),{unsubscribe:t(i)}}})[I]=function(){return this},e}return p({type:B.INIT}),(o={dispatch:p,subscribe:h,getState:d,replaceReducer:b})[I]=u,o}const j={};function H(e=j,t){switch(t.type){case Z.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload});case Z.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function P(e){return e.formMetadata}var Z;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(Z||(Z={}));class q{constructor(e){this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe((()=>{var e;null===(e=this._fields)||void 0===e||e.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}))}bind(e){e.forEach((e=>{const t=e.dataset.fieldName;this.updateBind(t,e),this.updateValue(t,e)}))}updateValue(e,t){t.value=this._dataUnit.getFieldValue(e)}updateBind(e,t){const i=this._fields.get(e);i&&i.destroy(),this._fields.set(e,$.create(e,t,((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t)}setFieldValue(e,t){0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.setFieldValue(e,t)}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&void 0===t.optionLoader){const i=v.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");i&&(t.optionLoader=t=>i(t,e,this._dataUnit))}}}class ${destroy(){this.field.removeEventListener(this.eventName,this.eventListener)}static create(e,t,i){const o=new $;return o.fieldName=e,o.field=t,o.eventListener=t=>{i(e,t.detail)},o.eventName="ezChange",o.field.addEventListener(o.eventName,o.eventListener),o}}class K{static async showDialog(e,t,i=null,o,a=!1){return new Promise((r=>{let s=document.querySelector("ez-dialog");s||(s=document.createElement("ez-dialog"),window.document.body.appendChild(s)),s.show(e,t,a,o,i).then((e=>r(e)))}))}static async alert(e,t,i=null){return K.showDialog(e,t,i,!1,!1)}static async error(e,t,i=null){return K.showDialog(e,t,i,!1,!0)}static async confirm(e,t,i=null,o=!1){return K.showDialog(e,t,i,!0,o)}static async info(e){let t=document.querySelector("ez-toast");t||(t=document.createElement("ez-toast"),window.document.body.appendChild(t)),t.message=e,t.fadeTime=4e3,t.show()}}let U=class{constructor(t){e(this,t)}submit(){return Promise.resolve()}cancel(){return Promise.resolve()}validate(){return new Promise(((e,t)=>{const i=P(this._store.getState()),o=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(i.getRequiredFields()),a=this.dataUnit.records;for(let e=0;e<a.length;e++)if(!this.validateRequired(o,a[e])){t();break}e()}))}validateRequired(e,t){const i=[];e.forEach((e=>{const o=t[e],a=this._element.querySelector(`[data-field-name=${e}]`);null==o||""===o?(i.push(e),a.errorMessage="Essa informação é obrigatória"):a.errorMessage=""}));const o=0===i.length;return o||K.info("Há pelo menos um campo obrigatório não preenchido."),o}getDynamicContent(){var e;const t=P(this._store.getState());if(!t)return null;const i=(a=null===(e=this._store)||void 0===e?void 0:e.getState()).currentSheet?a.formMetadata.getSheet(a.currentSheet):Array.from(a.formMetadata.getAllSheets().values())[0];var a;if(!i)return null;const r=Array.from(t.getAllSheets().values()),s=[];return r.length>1&&s.push(o("ez-tabselector",{onEzChange:e=>this._store.dispatch(function(e){return{type:Z.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:i.name},r.map((e=>o("ez-tab",{tabKey:e.name,label:e.label}))))),s.push(o(V,{store:this._store,source:i})),s}processMetadata(){if(!this.isStatic()){const e=this.config&&this.config.length>0?((e,t)=>{const i=new Map,o=[],a=[];e.forEach((e=>{var r;if(!1!==e.visible){const s=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"Geral",i),n=t.getField(e.name);if(n&&s.visible){i.has(s)||i.set(s,new Map);const t=i.get(s);(void 0===e.required?n.required:e.required)&&o.push(e.name),(void 0===e.cleanOnCopy?null===(r=n.properties)||void 0===r?void 0:r.cleanOnCopy:e.cleanOnCopy)&&a.push(e.name);const l={config:e,descriptor:n},c=e.group;if(c){const e=`group::${c}`;t.has(e)?t.get(e).items.push(l):t.set(e,{label:c,items:[l]})}else t.set(e.name,l)}}}));const r=new S;return Array.from(i.entries()).sort(((e,t)=>(e[0].order||1e4)-(t[0].order||1e4))).forEach((([e,t])=>{r.addSheet({label:e.label,name:e.label,items:Array.from(t.values()),requiredFields:o,cleanOnCopyFields:a})})),r})(this.config,this.dataUnit):(()=>{var e;const t=this.dataUnit.metadata,i=new S;if(t){const o=null===(e=t.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible));i.addSheet({label:t.label,name:t.name,items:o.map((e=>({descriptor:e}))),requiredFields:o.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:o.filter((e=>{var t;return null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy})).map((e=>e.name))})}return i})();this._store.dispatch({type:Z.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}interceptAction(e){if(e.type===l.RECORDS_COPIED){const t=P(this._store.getState()).getCleanOnCopyFields();if(t)return new c(l.RECORDS_COPIED,e.payload.map((e=>{const i=Object.assign({},e);return t.forEach((e=>delete i[e])),i})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new d("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe((e=>{e.type===l.METADATA_LOADED&&this.processMetadata()})),this._dataBinder=new q(this.dataUnit),this._store=R(H),this._store.subscribe((()=>i(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata()}componentDidRender(){this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")))}render(){return o(a,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}};U.style="ez-form{display:flex;flex-direction:column;width:100%}";let W=class{constructor(t){e(this,t),this.size="medium"}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):x.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}render(){return o(a,null,this.getIconContent())}};W.style=':host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-account-outline:before{content:"\\ea01"}.ez-icon-account:before{content:"\\ea02"}.ez-icon-alert-circle-inverted:before{content:"\\ea03"}.ez-icon-alert-circle:before{content:"\\ea04"}.ez-icon-alert-mail:before{content:"\\ea05"}.ez-icon-alert-outline:before{content:"\\ea06"}.ez-icon-alert-popup:before{content:"\\ea07"}.ez-icon-apps:before{content:"\\ea08"}.ez-icon-arrow_back:before{content:"\\ea09"}.ez-icon-bell-inverted:before{content:"\\ea0a"}.ez-icon-bell:before{content:"\\ea0b"}.ez-icon-business-center:before{content:"\\ea0c"}.ez-icon-calendar-text:before{content:"\\ea0d"}.ez-icon-calendar:before{content:"\\ea0e"}.ez-icon-check-circle-inverted:before{content:"\\ea0f"}.ez-icon-check-circle:before{content:"\\ea10"}.ez-icon-check:before{content:"\\ea11"}.ez-icon-chevron-down:before{content:"\\ea12"}.ez-icon-chevron-left:before{content:"\\ea13"}.ez-icon-chevron-right:before{content:"\\ea14"}.ez-icon-chevron-up:before{content:"\\ea15"}.ez-icon-circle--medium:before{content:"\\ea16"}.ez-icon-circle:before{content:"\\ea17"}.ez-icon-clipboard:before{content:"\\ea18"}.ez-icon-close-circle-inverted:before{content:"\\ea19"}.ez-icon-close-circle:before{content:"\\ea1a"}.ez-icon-close:before{content:"\\ea1b"}.ez-icon-comment-inverted:before{content:"\\ea1c"}.ez-icon-comment:before{content:"\\ea1d"}.ez-icon-configuration:before{content:"\\ea1e"}.ez-icon-copy:before{content:"\\ea1f"}.ez-icon-crop:before{content:"\\ea20"}.ez-icon-delete:before{content:"\\ea21"}.ez-icon-description:before{content:"\\ea22"}.ez-icon-dot-notification:before{content:"\\ea23"}.ez-icon-dots-horizontal:before{content:"\\ea24"}.ez-icon-dots-vertical:before{content:"\\ea25"}.ez-icon-drag-indicator:before{content:"\\ea26"}.ez-icon-edit-file:before{content:"\\ea27"}.ez-icon-edit-table:before{content:"\\ea28"}.ez-icon-edit-time:before{content:"\\ea29"}.ez-icon-edit:before{content:"\\ea2a"}.ez-icon-email-inverted:before{content:"\\ea2b"}.ez-icon-email:before{content:"\\ea2c"}.ez-icon-error-octagon:before{content:"\\ea2d"}.ez-icon-expand:before{content:"\\ea2e"}.ez-icon-eye-off:before{content:"\\ea2f"}.ez-icon-eye:before{content:"\\ea30"}.ez-icon-favorite:before{content:"\\ea31"}.ez-icon-file-download:before{content:"\\ea32"}.ez-icon-file-upload:before{content:"\\ea33"}.ez-icon-filter:before{content:"\\ea34"}.ez-icon-find-file:before{content:"\\ea35"}.ez-icon-find-page:before{content:"\\ea36"}.ez-icon-format-color-fill:before{content:"\\ea37"}.ez-icon-help-circle-outline:before{content:"\\ea38"}.ez-icon-help-inverted:before{content:"\\ea39"}.ez-icon-help:before{content:"\\ea3a"}.ez-icon-home:before{content:"\\ea3b"}.ez-icon-language:before{content:"\\ea3c"}.ez-icon-launch:before{content:"\\ea3d"}.ez-icon-lightbulb:before{content:"\\ea3e"}.ez-icon-list:before{content:"\\ea3f"}.ez-icon-loading:before{content:"\\ea40"}.ez-icon-lock-outline:before{content:"\\ea41"}.ez-icon-lock:before{content:"\\ea42"}.ez-icon-menu:before{content:"\\ea43"}.ez-icon-minus-circle-inverted:before{content:"\\ea44"}.ez-icon-minus:before{content:"\\ea45"}.ez-icon-money-off:before{content:"\\ea46"}.ez-icon-money:before{content:"\\ea47"}.ez-icon-north-west:before{content:"\\ea48"}.ez-icon-pause:before{content:"\\ea49"}.ez-icon-payments:before{content:"\\ea4a"}.ez-icon-play:before{content:"\\ea4b"}.ez-icon-plus-circle-inverted:before{content:"\\ea4c"}.ez-icon-plus-circle:before{content:"\\ea4d"}.ez-icon-plus:before{content:"\\ea4e"}.ez-icon-power:before{content:"\\ea4f"}.ez-icon-push-pin:before{content:"\\ea50"}.ez-icon-restore:before{content:"\\ea51"}.ez-icon-return:before{content:"\\ea52"}.ez-icon-rotate:before{content:"\\ea53"}.ez-icon-save:before{content:"\\ea54"}.ez-icon-search:before{content:"\\ea55"}.ez-icon-settings-inverted:before{content:"\\ea56"}.ez-icon-settings:before{content:"\\ea57"}.ez-icon-share:before{content:"\\ea58"}.ez-icon-shield:before{content:"\\ea59"}.ez-icon-south-east:before{content:"\\ea5a"}.ez-icon-success-circle:before{content:"\\ea5b"}.ez-icon-sync:before{content:"\\ea5c"}.ez-icon-table:before{content:"\\ea5d"}.ez-icon-timer-outline:before{content:"\\ea5e"}.ez-icon-user-circle:before{content:"\\ea5f"}.ez-icon-warning-minus:before{content:"\\ea60"}.ez-icon-warning-triangle:before{content:"\\ea61"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';let J=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}changeValue(e){this.errorMessage="",e&&e!==this.value&&(this.value=e,this.ezChange.emit(this.value))}parseNumber(){const e=this._textInput.value?h.stringToNumber(this._textInput.value):null;if(null!=e&&isNaN(e))this.errorMessage="O valor digitado não é um número válido";else try{this.changeValue(e)}catch(e){return void(this.errorMessage=e.message)}}getTextValue(e){return e?this.precision>0?h.format(e.toString(),Number(this.precision),Number(this.prettyPrecision)):e.toString():null}componentDidLoad(){z.applyVarsTextInput(this._elem,this._textInput)}render(){return o("ez-text-input",{ref:e=>this._textInput=e,onBlur:()=>this.parseNumber(),label:this.label,onEzChange:e=>e.stopPropagation(),value:this.getTextValue(this.value),restrict:this.precision>0?"0123456789-,.":"0123456789-",enabled:this.enabled,errorMessage:this.errorMessage})}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};J.style=":host{display:block;width:100%}";let X=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.showPopup=t(this,"showPopup",7),this.enabled=!0,this.showSelectedValue=!0,this.showOptionValue=!0}updateValue(){this._comboElement&&(this._comboElement.value=this.value)}async setFocus(){this._comboElement.setFocus()}async setBlur(){this._comboElement.setBlur()}onComboChange(e){e.stopPropagation(),this.value=e.detail,this.ezChange.emit(e.detail)}componentDidLoad(){z.applyVarsTextInput(this._elem,this._comboElement)}render(){return o("ez-combo-box",{ref:e=>this._comboElement=e,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,optionLoader:this.optionLoader,searchMode:!0,onEzChange:e=>this.onComboChange(e),showSelectedValue:this.showSelectedValue,showOptionValue:this.showOptionValue})}get _elem(){return r(this)}static get watchers(){return{value:["updateValue"]}}};X.style=":host{width:100%}";let G=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.setFocusedParam=e=>{if("Enter"===e.key){const t=this._processedTabs[this._focusedIndex];this.handleTabClick(t),e.preventDefault(),this.setFocusedTab(t.index)}else if("ArrowLeft"===e.key||"ArrowRight"===e.key){let t;if("ArrowLeft"===e.key)t=!1;else{if("ArrowRight"!==e.key)return;t=!0}this._focusedIndex=void 0===this._focusedIndex?!1===t?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===t?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===e.key||"Escape"===e.key){const t=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(t),e.preventDefault(),this.setFocusedTab(this.selectedIndex)}}}handleTabClick(e){this.selectedIndex=e.index,this._focusedIndex=void 0,this.selectedTab=e.tabKey,this.ezChange.emit(e),this.setFocusedBtn(!1,e.index)}componentWillRender(){this._processedTabs||(this._processedTabs=[],this.tabs&&this.tabs.split(",").forEach((e=>{e=e.trim(),this._processedTabs.push({label:e,tabKey:e,index:this._processedTabs.length})})),this._hostElem.querySelectorAll("ez-tab").forEach((e=>{const t=e.getAttribute("tabKey"),i={label:e.getAttribute("label"),tabKey:t,index:this._processedTabs.length},o=e.firstChild;o&&(o.setAttribute("slot","tab"+i.index),this._hostElem.appendChild(o)),this._processedTabs.push(i)})))}handleSlotChange(e){const t=e.target.assignedElements()[0];t&&(t.style.marginLeft="6px")}scrollBackward(){const e=this._scrollContainer;e&&(e.scrollLeft-=e.clientWidth)}scrollFoward(){const e=this._scrollContainer;if(e){let t=null;e.querySelectorAll(".tab").forEach((i=>{i.getBoundingClientRect().right<e.clientWidth&&(t=i)})),e.scrollLeft=t.offsetLeft+t.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const e=this._scrollContainer;if(e){const{scrollWidth:t,clientWidth:i,scrollLeft:o}=e,a=t-i-Math.ceil(o);this._startHidden=e.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const r=["","startHidden","endHidden","midle"],s=r[Number(this._startHidden)|Number(this._endHidden)<<1];r.forEach((t=>{t!==s&&e.classList.contains(t)&&e.classList.remove(t)})),s&&!e.classList.contains(s)&&e.classList.add(s)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(e){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${e}`).scrollIntoView()}),200)}getTextWidth(e){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const t=this._textMesurement.getContext("2d");return t.font="14px Sora, Algerian",Math.min(220,24+t.measureText(e).width)+"px"}setFocusedBtn(e,t){this._scrollContainer.querySelectorAll(".tab").forEach((i=>{i.classList.remove("is-focused"),i.id==="tab"+t&&e&&i.classList.add("is-focused")}))}render(){return o(a,null,o("button",{class:"backward-button",ref:e=>this._backwardButton=e,onClick:()=>this.scrollBackward()}),o("div",{class:"scroll",ref:e=>this._scrollContainer=e,onScroll:()=>this.domScrollHandler(),onKeyDown:e=>this.setFocusedParam(e)},this._processedTabs.map(((e,t)=>{const i={"min-width":this.getTextWidth(e.label)},a="tab"+t,r=t===this.selectedIndex||this.selectedTab&&e.tabKey===this.selectedTab;return r&&(this.selectedTab=e.tabKey,this.selectedIndex=t),o("button",{id:a,class:"tab"+(r?" is-active":""),onClick:()=>this.handleTabClick(e),style:i},o("span",{class:"tab-label",title:e.label},e.label),o("slot",{name:a,onSlotchange:e=>{this.handleSlotChange(e)}}))}))),o("button",{class:"forward-button",ref:e=>this._forwardButton=e,onClick:()=>this.scrollFoward()}))}get _hostElem(){return r(this)}};G.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--tabselector--forward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.midle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Sora, Algerian");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}';let Q=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.rows=4}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._container.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._container.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}updateInputValue(){this._inputElem.value=this.value,this.handleChange(),this.adjustFloatingLabel(),this.ezChange.emit(this.value)}adjustFloatingLabel(){if(this.label){const e=this.value&&this.value.toString().length>0,t=this._labelElem.classList.contains("textarea__label--floated");e||this.isFocused()?t||this._labelElem.classList.add("textarea__label--floated"):t&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.errorMessage="",this.value=this._inputElem.value}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}componentDidLoad(){this.showError(),this.adjustFloatingLabel()}render(){return o(a,null,o("div",{class:"textarea",ref:e=>this._container=e},this.label?o("label",{ref:e=>this._labelElem=e,class:this.enabled?"textarea__label":"textarea__label textarea__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,o("textarea",{onFocus:()=>this.handleFocus(),ref:e=>this._inputElem=e,value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},onKeyDown:e=>e.stopPropagation(),rows:this.rows})),o("span",{class:"message-box",ref:e=>this._messageBoxElem=e,title:this.errorMessage},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["showError"],value:["updateInputValue"]}}};Q.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";let Y=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.canShowError=!0}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._inputElem.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}prepareMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new p(this.mask):this._maskFormatter.mask=this.mask)}updateInputValue(){this._inputElem&&(this._inputElem.value=this.value),this.handleChange(),this.errorMessage="",this.ezChange.emit(this.value),this.adjustFloatingLabel()}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const e=this.value&&this.value.toString().length>0,t=this._labelElem.classList.contains("input__label--floated");e||this.isFocused()?t||this._labelElem.classList.add("input__label--floated"):t&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){const e=this._inputElem.value;if(e&&this._maskFormatter)try{this._inputElem.value=this._maskFormatter.format(e)}catch(e){this.errorMessage=e.message}this.value=this._inputElem.value,this.adjustFloatingLabel()}isValidValue(e){return!this.restrict||Array.from(e).reduce(((e,t)=>e&&this.restrict.indexOf(t)>-1),!0)}handleChange(){if(!this._inputElem)return;const e=this._inputElem.value;this.isValidValue(e)?this._lastValidValue=e:this._inputElem.value=void 0===this._lastValidValue?"":this._lastValidValue,this.value=this._inputElem.value}handleSlotChange(e){const t=e.target,i=t.assignedElements()[0];i&&(i.style.position="absolute",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.overflow="hidden",i.style.top="0px",i.style.width="var(--ez-text-input__icon--width)",i.style.height="var(--ez-text-input--height)","leftIcon"==t.name?(i.style.left="0px",i.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left")):"rightIcon"==t.name&&(i.style.right="0px",i.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"))),this.showError()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated")}componentDidLoad(){this.showError(),this.prepareMask(),this.adjustFloatingLabel()}componentWillLoad(){if(this.prepareMask(),this.value){if(this._maskFormatter)try{this.value=this._maskFormatter.format(this.value)}catch(e){this.errorMessage=e.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}render(){return o(a,null,o("slot",{name:"leftIcon",onSlotchange:e=>{this.handleSlotChange(e)}}),this.label?o("label",{ref:e=>this._labelElem=e,class:this.enabled?"input__label":"input__label input__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,o("input",{onFocus:()=>this.doFocus(),ref:e=>this._inputElem=e,type:"text",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),o("slot",{name:"rightIcon",onSlotchange:e=>{this.handleSlotChange(e)}}),this.canShowError&&o("span",{class:"message-box",ref:e=>this._messageBoxElem=e,title:this.errorMessage},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["showError"],mask:["prepareMask"],value:["updateInputValue"]}}};Y.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";let ee=class{constructor(t){e(this,t),this.enabled=!0,this.showSeconds=!1}prepareMask(){this.showSeconds?null==this._maskFormatter?this._maskFormatter=new p("##:##:##"):this._maskFormatter.mask="##:##:##":null==this._maskFormatter?this._maskFormatter=new p("##:##"):this._maskFormatter.mask="##:##"}onValueChanged(){NaN===this.value&&(this.value=void 0,this.handleFocusout())}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.errorMessage="",this.prepareValue(this.viewValue),s.validateTime(this.viewValue,this.showSeconds)||(this.clearField(),this.errorMessage="Favor inserir um horário válido.")}prepareValue(e){try{this.viewValue=s.prepareValue(e,this.showSeconds)}catch(e){this.clearField(),this.errorMessage=e.message}}clearField(){this.viewValue=this.value=void 0}handleChange(){this.viewValue=this._inputElem.value,this.value=h.stringToNumber(this.viewValue.replace(/\D/g,""))}componentDidLoad(){this.onValueChanged(),z.applyVarsTextInput(this._elem,this._inputElem)}componentWillLoad(){this.prepareMask(),this.value?this.prepareValue(this.value.toString()):this.viewValue&&this.prepareValue(this.viewValue)}render(){return o(a,null,o("ez-text-input",{ref:e=>this._inputElem=e,value:this.viewValue,enabled:this.enabled,label:this.label,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},errorMessage:this.errorMessage},o("ez-icon",{slot:"leftIcon",href:m("timer-outline")})))}static get assetsDirs(){return["../assets"]}get _elem(){return r(this)}static get watchers(){return{showSeconds:["prepareMask"],value:["onValueChanged"]}}};ee.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";class te{constructor(e){this.file=e,this.size=e.size,this.name=e.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(e,t,i){return new Promise(((o,a)=>{const r=new XMLHttpRequest;this._uploadingXhr=r,this._aborted=!1,this.progress=0,r.upload.onprogress=e=>{const t=e.loaded,o=e.total;this.progress=~~(t/o*100),i(this,t,o)},r.onreadystatechange=()=>{if(4==r.readyState){this._uploadingXhr=void 0;const e=r.status;this._aborted||(0===e?a("Servidor indisponível"):e>=500?a("Erro inesperado no servidor"):e>=400&&a("Operação não permitida"));const t=r.response;t&&o(JSON.parse(t))}},r.ontimeout=()=>{a("Tempo limite de transferência atingido.")};const s=new FormData;s.append("ARQUIVO",this.file,this.file.name),r.open("POST",e,!0),t&&t.forEach(((e,t)=>r.setRequestHeader(t,e))),r.send(s)}))}async delete(e,t,i){return new Promise(((o,a)=>{const r=new XMLHttpRequest;r.onreadystatechange=()=>{4==r.readyState&&(0===r.status?a("Servidor indisponível"):r.status>=500?a("Erro inesperado no servidor"):r.status>=400&&a("Operação não permitida"),o(!0))},r.ontimeout=()=>{a("Tempo limite de remoção atingido.")},r.open("DELETE",t,!0),i&&i.forEach(((e,t)=>r.setRequestHeader(t,e))),r.send(JSON.stringify(e))}))}}let ie=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this._filePointers=new Map,this.enabled=!0}changeValue(e){e!==this._updatingValue&&(this._filePointers.forEach((e=>{this.isRemoteFile(e)&&e.abortUpload()})),this._filePointers=new Map,this.updateFilePointers()),this._updatingValue=void 0}updateFilePointers(){this.value&&this.value.forEach((e=>this._filePointers.set(e.name,e)))}normalizeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestHeaders)try{this.requestHeaders=JSON.parse(this.requestHeaders)}catch(e){this.requestHeaders=void 0}for(var e in this.requestHeaders)this._requestHeaders.set(e,this.requestHeaders[e])}async addFiles(e){if(this.maxFiles>0){let t=this._filePointers.size;if(e.forEach((e=>{this._filePointers.has(e.name)||t++})),t>this.maxFiles)return void this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`)}Array.prototype.forEach.call(e,this.addFile.bind(this))}async setFocus(){this._fileInput.focus()}async setBlur(){this._fileInput.blur()}async addFile(e){const t=this._filePointers.get(e.name);t?K.confirm("Substituir arquivo",`Já existe um arquivo chamado "${e.name}". Deseja substituí-lo?`).then((i=>{i&&(this.isRemoteFile(t)&&t.abortUpload(),this.doAddFile(e))})):this.doAddFile(e)}async doAddFile(e){if(this.validateFile(e)){const t=new te(e);this._filePointers.set(e.name,t),t.upload(this.urlUpload,this._requestHeaders,(e=>this.updateFeedback(e))).then((e=>e.forEach((e=>this.finishUpload(e))))).catch((e=>this.showError(e))),i(this)}}finishUpload(e){this._filePointers.set(e.name,e),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((e=>{this.isRemoteFile(e)||this._updatingValue.push(e)})),this.value=this._updatingValue,this.ezChange.emit(this.value)}buildProgressId(e){return`PROGRESS_${e.name.replace(/[^a-z0-9_]/gi,"_")}_${e.file.lastModified}`}updateFeedback(e){window.requestAnimationFrame((()=>{if(this._host){const t=this._host.shadowRoot.querySelector("#"+this.buildProgressId(e));t&&(t.value=e.progress)}}))}validateFile(e){return!this._filePointers.has(e.name)&&this.maxFiles>0&&this._filePointers.size>=this.maxFiles?(this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`),!1):0===e.size?(this.showError(`Erro de permissão: O arquivo "${e.name}" não pode ser enviado.`),!1):this.urlUpload?!(this.maxFileSize>=0&&e.size>this.maxFileSize&&(this.showError("O tamanho máximo dos arquivos é de "+this.formatBytes(this.maxFileSize)),1)):(this.showError("Endereço de upload não informado"),!1)}showError(e){K.alert("Enviando arquivo",e)}formatBytes(e,t=1){if(0===e)return"0 Bytes";const i=t<0?0:t,o=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,o)).toFixed(i))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][o]}onFileInputChange(e){this.addFiles(Array.from(e.target.files)),this._fileInput.value=""}isRemoteFile(e){return"file"in e}removeFromList(e){this._filePointers.delete(e),this.updateValue()}removeFile(e){const t=this._filePointers.get(e);if(this.isRemoteFile(t))t.abortUpload(),this.removeFromList(e);else if(this.urlDelete){const i=new te(null);this._filePointers.set(t.name,i),i.delete(t,this.urlDelete,null).then((()=>this.removeFromList(e))).catch((e=>this.showError(e)))}else this.removeFromList(e)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(e=>{e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(e=>{e.stopPropagation(),e.preventDefault(),this.addFiles(Array.from(e.dataTransfer.files)),this._dropZone.style.background=""})),this._dropZone.addEventListener("dragleave",(()=>{this._dropZone.style.background=""})))}componentWillRender(){this.value&&this._filePointers.size<this.value.length&&this.updateFilePointers()}render(){return o("div",{ref:e=>this._dropZone=e,class:this.evalDisabledClass("iu","background--disabled")},o("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},o("div",{class:"iu_header"},this.label?o("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,o("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},o("button",{class:"iu__file-icon",disabled:!this.enabled}),o("div",{class:this.evalDisabledClass("text text--center text--medium text--primary","text--disabled")},this.enabled?"Arraste e solte ou clique para adicionar arquivos":"Somente leitura"))),this.buildFooter()),o("input",{ref:e=>this._fileInput=e,onChange:e=>this.onFileInputChange(e),type:"file",multiple:!0,class:"appearanceNone"}))}buildFooter(){if(0===this._filePointers.size)return null;const e=[];return this._filePointers.forEach((t=>e.push(this.buildFileItem(t)))),o("div",{class:"iu__footer"},e)}buildFileItem(e){const t=e.name,i=Number(e.progress),a=e.downloadURL,r=`${t} (${this.formatBytes(e.size)})`;return o("div",{class:"iu__item",key:t,onClick:e=>e.stopPropagation()},o("div",{class:"iu__item-label modificador"},o("div",{title:r,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},a?o("a",{href:a,download:!0},r):r)),isNaN(i)?null:o("div",{class:"col col--sd-4 col--stretch align--middle"},o("progress",{id:this.buildProgressId(e),value:i,max:"100"})),this.enabled?o("div",{class:"col col--stretch align--middle"},o("button",{class:"btn-cancel ",onClick:()=>this.removeFile(t)})):null)}evalDisabledClass(e,t){return this.enabled?e:`${e} ${t}`}get _host(){return r(this)}static get watchers(){return{value:["changeValue"],requestHeaders:["normalizeRequestHeaders"]}}};ie.style=':host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8x" width="8px"><path d="M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z"/></svg>\');--ez-upload__file-icon-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="11x" width="9px"><path d="M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z"/></svg>\');display:flex;flex-wrap:wrap;position:relative;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:"Sora", "Algerian";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:\'\';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--ez-upload--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.appearanceNone{width:0px;height:0px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';let oe=class{constructor(t){e(this,t)}componentWillLoad(){this.dataUnit=new d("testes_com_formulario"),this.dataUnit.metadata={name:"dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",label:"Parceiro",fields:[{name:"CODPARC",label:"Parceiro",dataType:b.NUMBER,userInterface:n.SEARCH,required:!0,properties:{}},{name:"RECDESP",label:"Receita/Despesa",dataType:b.TEXT,userInterface:n.OPTIONSELECTOR,required:!0,properties:{options:'{"-1": "Despesa", "1": "Receita"}'}},{name:"P",label:"pera",dataType:b.TEXT,userInterface:n.OPTIONSELECTOR,properties:{options:'{"M": "Madura", "V": "Verde", "P": "Passada"}'}},{name:"ME",label:"ME",dataType:b.NUMBER,userInterface:n.DECIMALNUMBER,properties:{precision:4,prettyPrecision:1}}]},this.dataUnit.dataLoader=()=>new Promise((e=>e([{__record__id__:"1321321321321321",CODPARC:10,NOMEPARC:"Parceiro 10",P:"M",L:"Bagaço",LI:"Azedo"}])))}render(){return o("ez-form",{dataUnit:this.dataUnit})}};oe.style=":host{display:block}";export{f as ez_calendar,_ as ez_check,w as ez_collapsible_box,k as ez_combo_box,y as ez_date_input,C as ez_date_time_input,U as ez_form,W as ez_icon,J as ez_number_input,X as ez_search,G as ez_tabselector,Q as ez_text_area,Y as ez_text_input,ee as ez_time_input,ie as ez_upload,oe as test_du}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "1.1.101",
3
+ "version": "1.1.102",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- const t=/^([+-])?(\d+).?(\d*)[eE]([-+]?\d+)$/;class e{}e.stringToNumber=e=>{if(""===e||null==e)return NaN;if(e){var s="-"===(e=e.toString()).charAt(0);if(""===(e=t.test(e)?e.replace(/^-/g,""):e.replace(/[^\d.,]/g,"")))return Number(NaN);var r=e.indexOf(","),i=e.indexOf(".");i>r?e=e.replace(",",""):i<r&&(e=e.replace(/\./g,"@").replace(",",".").replace(/@/g,"")),s&&(e="-"+e)}return Number(e)},e.format=(t,s,r=NaN)=>{if(""===t||void 0===t||"NaN"===t)return NaN.toString();let i=e.stringToNumber(t);if(NaN===i)return NaN.toString();if(s<0||Math.abs(Math.round(1*s)/1)!==s)return e.changeFormat(i.toString());let n,c=0;c=NaN===r||Math.abs(Math.round(1*r)/1)!==r?s:r,n=(Math.round(i*Math.pow(10,s))/Math.pow(10,s)).toLocaleString("pt-br",{minimumFractionDigits:s});const a=s-c;if(a>0)for(let t=0;t<a;t++)"0"==n.substring(n.length-1)&&s>0&&(n=n.substring(0,n.length-1));return"."!=n.substring(n.length-1)&&","!=n.substring(n.length-1)||(n=n.substring(0,n.length-1)),n},e.keepOnlyDecimalSeparator=(t,e="pt-BR")=>(e=e.toUpperCase(),t.replace("EN-US"===e?/\,/g:/\./g,"")),e.changeFormat=t=>t.replace(/\./g,"_").replace(/\,/g,".").replace(/\_/g,",");class s{constructor(t){this._mask="",this._maskChars=new Array,this.placeholder=" ",this.mask=t}set mask(t){this._mask=t,this.updateInternalMask()}get mask(){return this._mask}format(t){let e="";const s=[0];let r=0;const i=this._maskChars.length;for(;r<i;)e=this._maskChars[r].append(e,t,s),r++;return e}updateInternalMask(){if(this._maskChars.length=0,null!=this.mask){let t=0;const e=this.mask.length;for(;t<e;){let r=this.mask.charAt(t);switch(r){case s.DIGIT_KEY:this._maskChars.push(new s.DigitMaskCharacter(this,r));break;case s.LITERAL_KEY:++t<e&&(r=this.mask.charAt(t),this._maskChars.push(new s.LiteralCharacter(this,r)));break;case s.UPPERCASE_KEY:this._maskChars.push(new s.UpperCaseCharacter(this,r));break;case s.LOWERCASE_KEY:this._maskChars.push(new s.LowerCaseCharacter(this,r));break;case s.ALPHA_NUMERIC_KEY:this._maskChars.push(new s.AlphaNumericCharacter(this,r));break;case s.CHARACTER_KEY:this._maskChars.push(new s.CharCharacter(this,r));break;case s.ANYTHING_KEY:this._maskChars.push(new s.MaskCharacter(this,r));break;default:this._maskChars.push(new s.LiteralCharacter(this,r))}t++}}}}s.DIGIT_KEY="#",s.LITERAL_KEY="'",s.UPPERCASE_KEY="U",s.LOWERCASE_KEY="L",s.ALPHA_NUMERIC_KEY="A",s.CHARACTER_KEY="?",s.ANYTHING_KEY="*",s.MaskCharacter=class{constructor(t,e){this.maskFormatter=t,this.type=e}isLiteral(){return!1}isValidCharacter(t){return this.isLiteral()?this.getChar(t)==t:(t=this.getChar(t),!0)}getChar(t){return t}append(t,e,s){const r=s[0]<e.length?e.charAt(s[0]):"";if(this.isLiteral()){const e=this.getChar(r);t+=e,e===r&&(s[0]=s[0]+1)}else if(s[0]>=e.length)t+=this.maskFormatter.placeholder,s[0]=s[0]+1;else{if(!this.isValidCharacter(r))throw new Error(`Valor inválido: "${r}". Na posição ${s[0]+1} espera-se ${this.getFormatMessage()}.`);t+=this.getChar(r),s[0]=s[0]+1}return t}getFormatMessage(){let t;switch(this.type){case s.UPPERCASE_KEY:case s.LOWERCASE_KEY:case s.CHARACTER_KEY:t="uma letra";break;case s.DIGIT_KEY:t="um número";break;case s.ALPHA_NUMERIC_KEY:t="uma letra ou um número";break;default:t=""}return t}},s.LiteralCharacter=class extends s.MaskCharacter{constructor(t,e){super(t,e),this._fixedChar=e}isLiteral(){return!0}getChar(t){return this._fixedChar}},s.DigitMaskCharacter=class extends s.MaskCharacter{isValidCharacter(t){return this.isDigit(t)&&super.isValidCharacter(t)}isDigit(t){return t>="0"&&t<="9"}},s.UpperCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toUpperCase()}},s.LowerCaseCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}getChar(t){return t.toLocaleLowerCase()}},s.AlphaNumericCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z0-9]/i.test(t)&&super.isValidCharacter(t)}},s.CharCharacter=class extends s.MaskCharacter{isValidCharacter(t){return/[a-z]/i.test(t)&&super.isValidCharacter(t)}};class r{static prepareValue(t,e){if(t&&t.length>0&&"NaN"!=t){let s=t.replace(/:/g,"");if(e){if(this._maskFormatter.mask="##:##:##",s.length<6)for(;s.length<6;)s="0".concat(s)}else if(this._maskFormatter.mask="##:##",s.length<4)for(;s.length<4;)s="0".concat(s);if(this._maskFormatter)try{return this._maskFormatter.format(s)}catch(t){throw new Error(t.message)}}return""}static validateTime(t,e){let s=!0;if(t){let r=t.replace(/:/g,"");e?(["1","2","0"].includes(r[0])||(s=!1),["0","1","2","3","4","5"].includes(r[2])||(s=!1),["0","1","2","3","4","5"].includes(r[4])||(s=!1),"2"!=r[0]||["0","1","2","3"].includes(r[1])||(s=!1)):(["1","2","0"].includes(r[0])||(s=!1),["0","1","2","3","4","5"].includes(r[2])||(s=!1),"2"!=r[0]||["0","1","2","3"].includes(r[1])||(s=!1))}else s=!1;return s}}var i,n;r._maskFormatter=new s("##:##"),function(t){t[t.GET=0]="GET",t[t.PUT=1]="PUT",t[t.POST=2]="POST",t[t.DELETE=3]="DELETE"}(i||(i={})),function(t){t.NUMBER="NUMBER",t.DATE="DATE",t.TEXT="TEXT",t.BOOLEAN="BOOLEAN",t.OBJECT="OBJECT"}(n||(n={}));const c=(t,e)=>{if(null==e)return e;switch(t){case n.NUMBER:return""===e||isNaN(e)?null:Number(e);case n.OBJECT:return"string"==typeof e?JSON.parse(e):e;case n.BOOLEAN:return Boolean(e);case n.DATE:return new Date(e.toString());default:return e}};class a{constructor(t,e){this._type=t,this._payload=e}get type(){return this._type}get payload(){return this._payload}}var h;!function(t){t.LOADING_METADATA="loadingMetadata",t.METADATA_LOADED="metadataLoaded",t.LOADING_DATA="loadingData",t.DATA_LOADED="dataLoaded",t.SAVING_DATA="savingData",t.DATA_SAVED="dataSaved",t.RECORDS_REMOVED="recordsRemoved",t.RECORDS_ADDED="recordsAdded",t.RECORDS_COPIED="recordsCopied",t.DATA_CHANGED="dataChanged",t.EDITION_CANCELED="editionCanceled",t.CHANGE_UNDONE="changeUndone",t.CHANGE_REDONE="changeRedone",t.SELECTION_CHANGED="selectionChanged",t.NEXT_SELECTED="nextSelected",t.PREVIOUS_SELECTED="previousSelected",t.STATE_CHANGED="stateChanged"}(h||(h={}));class o{constructor(t){this._past=[],this._future=[],this._present={},this._nonHist={},this._histClean=!1,this._reducers=t}process(t){const e=this._present;let s=!1;this._histClean=!1,this._reducers.forEach((e=>{const r=e.sliceName,i=this.isHistoric(r),n=this.getSlice(r,i),c=e.reduce(this,n,t);c!==n&&(this.updateSlice(r,c,i),s||(s=i))})),s&&!this._histClean&&(this._past.push(e),this._future=[],document.dispatchEvent(new CustomEvent("undoableAction",{detail:this})))}select(t,e){const s=this.isHistoric(t);return e(this.getSlice(t,s))}isHistoric(t){return t.startsWith("hist::")}updateSlice(t,e,s){s?(this._present=Object.assign(Object.assign({},this._present),{[t]:e}),void 0===e&&delete this._present[t]):(this._nonHist=Object.assign(Object.assign({},this._nonHist),{[t]:e}),void 0===e&&delete this._nonHist[t])}getSlice(t,e){return e?this._present[t]:this._nonHist[t]}canUndo(){return this._past.length>0}canRedo(){return this._future.length>0}undo(){this.canUndo()&&(this._future.push(this._present),this._present=this._past.pop())}redo(){this.canRedo()&&(this._past.push(this._present),this._present=this._future.pop())}clearUndo(){this._histClean=!0,this._past=[],this._future=[]}persist(){}}const u=new class{constructor(){this.sliceName=""}reduce(t,e,s){switch(s.type){case h.DATA_SAVED:case h.EDITION_CANCELED:t.clearUndo();break;case h.CHANGE_UNDONE:t.undo();break;case h.CHANGE_REDONE:t.redo()}}},d=new class{constructor(){this.sliceName="unitMetadata"}reduce(t,e,s){return s.type===h.METADATA_LOADED?s.payload:e}},l=t=>t.select(d.sliceName,(t=>t)),f=new class{constructor(){this.sliceName="hist::removedRecords"}reduce(t,e,s){switch(s.type){case h.RECORDS_REMOVED:return(e||[]).concat(s.payload);case h.EDITION_CANCELED:case h.DATA_SAVED:return}return e}},E=t=>t.select(f.sliceName,(t=>t)),g=new class{constructor(){this.sliceName="records"}reduce(t,e,s){switch(s.type){case h.DATA_LOADED:return s.payload;case h.DATA_SAVED:const e=new Map,r=w(t);if(r){const s=E(t)||[];r.forEach((t=>{s.includes(t.__record__id__)||e.set(t.__record__id__,t)}))}return s.payload.records.forEach((t=>{const s=t.__old__id__||t.__record__id__,r=Object.assign({},t);delete r.__old__id__,e.set(s,r)})),Array.from(e.values())}return e}},w=t=>t.select(g.sliceName,(t=>t)),v=new class{constructor(){this.sliceName="hist::addedRecords"}reduce(t,e,s){switch(s.type){case h.RECORDS_ADDED:case h.RECORDS_COPIED:return(e||[]).concat(s.payload);case h.DATA_SAVED:case h.EDITION_CANCELED:return}return e}},N=t=>t.select(v.sliceName,(t=>t)),p=(t,e)=>{let s=(N(t)||[]).length;return e.map((t=>Object.assign(Object.assign({},t),{__record__id__:"NEW_"+s++})))},b=new class{constructor(){this.sliceName="hist::changes"}reduce(t,e,s){switch(s.type){case h.DATA_CHANGED:const r=s.payload.records||R(t);if(r){const t=new Map(e);return r.forEach((e=>{const r=Object.assign(Object.assign({},t.get(e)),s.payload);delete r.records,t.set(e,r)})),t}return e;case h.DATA_SAVED:case h.EDITION_CANCELED:return}return e}},T=t=>t.select(b.sliceName,(t=>t)),m=new class{constructor(){this.sliceName="currentRecords"}reduce(t,e,s){let r=w(t);const i=N(t);if(!r&&!i)return;i&&(r=(r||[]).concat(i));const n=E(t);n&&(r=r.filter((t=>!n.includes(t.__record__id__))));const c=T(t);return new Map(r.map((t=>{const e=t.__record__id__;return[e,Object.assign(Object.assign({},t),null==c?void 0:c.get(e))]})))}},M=t=>t.select(m.sliceName,(t=>t)),S=new class{constructor(){this.sliceName="hist::selection"}reduce(t,e,s){switch(s.type){case h.RECORDS_ADDED:case h.RECORDS_COPIED:return s.payload.map((t=>t.__record__id__));case h.DATA_SAVED:return function(t,e){const s=R(t);if(s){const t=[];return s.forEach((s=>{const r=e.find((t=>t.__old__id__===s));t.push(r?r.__record__id__:s)})),t}return s}(t,s.payload.records);case h.RECORDS_REMOVED:const r=s.payload;return e&&r?e.filter((t=>!r.includes(t))):e;case h.NEXT_SELECTED:case h.PREVIOUS_SELECTED:const i=M(t);if(i&&i.size>0){let t;if(t=e&&0!==e.length?A(e[0],i)+(s.type===h.PREVIOUS_SELECTED?-1:1):s.type===h.PREVIOUS_SELECTED?0:Math.min(1,i.size),t<i.size&&t>=0)return[Array.from(i.values())[t].__record__id__]}return;case h.SELECTION_CHANGED:const{type:n,selection:c}=s.payload;if(c&&"index"===n){const e=M(t);if(e){const t=Array.from(e.values()),s=[];return c.forEach((r=>{r>0&&r<e.size&&s.push(t[r].__record__id__)})),s}}return c}return e}},R=t=>{let e=t.select(S.sliceName,(t=>t));const s=Array.from((M(t)||new Map).keys());return e&&(e=e.filter((t=>s.includes(t)))),(!e||0===e.length)&&s&&s.length>0?[s[0]]:e};function A(t,e){return Array.from(e.keys()).indexOf(t)}var C,O,D,y,I=function(t,e,s,r){return new(s||(s=Promise))((function(i,n){function c(t){try{h(r.next(t))}catch(t){n(t)}}function a(t){try{h(r.throw(t))}catch(t){n(t)}}function h(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(c,a)}h((r=r.apply(t,e||[])).next())}))};class k{constructor(t){this._name=t,this._stateManager=new o([u,d,g,f,v,S,b,m]),this._observers=[],this._filterProviders=[],this._sortingProvider=void 0,this._interceptors=[]}get name(){return this._name}validateAndTypeValue(t,e){const s=this.getField(t);return s?c(s.dataType,e):e}getFilters(){let t;return this._filterProviders.forEach((e=>{const s=e.getFilter(this.name);s&&(t=(t||[]).concat(s))})),t}getSort(){return this._sortingProvider?this._sortingProvider.getSort(this._name):void 0}loadMetadata(){return I(this,void 0,void 0,(function*(){return this.dispatchAction(h.LOADING_METADATA),new Promise(((t,e)=>{this.metadataLoader&&this.metadataLoader(this).then((e=>{this.metadata=e,t(this.metadata)})).catch((t=>e(t)))}))}))}loadData(){return I(this,void 0,void 0,(function*(){return this.dispatchAction(h.LOADING_DATA),new Promise(((t,e)=>{if(this.dataLoader){const s=this.getSort(),r=this.getFilters();this.dataLoader(this,s,r).then((e=>{this.records=e,t(this.records)})).catch((t=>e(t)))}}))}))}saveData(){return I(this,void 0,void 0,(function*(){const t=((t,e)=>{const s=[],r=T(e),i=w(e);null==i||i.forEach((e=>{if(r){const i=r.get(e.__record__id__);i&&s.push(new U(t,e,i,C.UPDATE))}}));const n=N(e);n&&n.forEach((e=>{s.push(new U(t,e,null==r?void 0:r.get(e.__record__id__),C.INSERT))}));const c=E(e),a={};return null==i||i.forEach((t=>a[t.__record__id__]=t)),c&&c.forEach((e=>{s.push(new U(t,a[e],void 0,C.DELETE))})),s})(this._name,this._stateManager);return t.length>0?(this.dispatchAction(h.SAVING_DATA),new Promise(((e,s)=>{this.saveLoader&&this.saveLoader(this,t).then((e=>this.dispatchAction(h.DATA_SAVED,{changes:t,records:e}))).catch((t=>s(t)))}))):Promise.resolve()}))}valueFromString(t,e){const s=this.getField(t);return s?c(s.dataType,e):e}addInterceptor(t){this._interceptors.push(t)}addFilterProvider(t){this._filterProviders.push(t)}set sortingProvider(t){this._sortingProvider=t}set metadata(t){this.dispatchAction(h.METADATA_LOADED,t)}get metadata(){return l(this._stateManager)}set records(t){this.dispatchAction(h.DATA_LOADED,t)}get records(){const t=M(this._stateManager);return t?Array.from(t.values()):[]}getField(t){return((t,e)=>{const s=l(this._stateManager);return s?s.fields.find((t=>t.name===e)):void 0})(0,t)}addRecord(){this.dispatchAction(h.RECORDS_ADDED,p(this._stateManager,[{}]))}copySelected(){const t=this.getSelectedRecords();t&&this.dispatchAction(h.RECORDS_COPIED,p(this._stateManager,t))}removeSelectedRecords(){const t=R(this._stateManager);t&&this.dispatchAction(h.RECORDS_REMOVED,t)}getFieldValue(t){return((t,e)=>{const s=R(t);if(s&&s.length>0){const r=M(t);if(r){const t=r.get(s[0]);return t?t[e]:void 0}}})(this._stateManager,t)}setFieldValue(t,e,s){const r=this.validateAndTypeValue(t,e);this.getFieldValue(t)!==r&&this.dispatchAction(h.DATA_CHANGED,{[t]:r,records:s})}getSelection(){return R(this._stateManager)}setSelection(t){this.dispatchAction(h.SELECTION_CHANGED,{type:"id",selection:t})}setSelectionByIndex(t){this.dispatchAction(h.SELECTION_CHANGED,{type:"index",selection:t})}getSelectedRecords(){const t=this.getSelection();if(t){const e=this.records;return null==e?void 0:e.filter((e=>t.includes(e.__record__id__)))}}nextRecord(){this.dispatchAction(h.NEXT_SELECTED)}previousRecord(){this.dispatchAction(h.PREVIOUS_SELECTED)}cancelEdition(){this.dispatchAction(h.EDITION_CANCELED)}isDirty(){return void 0!==N(t=this._stateManager)||void 0!==E(t)||void 0!==T(t);var t}hasNext(){return(t=>{const e=M(t);if(e){const s=t.select(S.sliceName,(t=>t));return s&&0!==s.length?e.size>A(s[0],e)+1:e.size>0}return!1})(this._stateManager)}hasPrevious(){return(t=>{const e=M(t);if(e){const s=t.select(S.sliceName,(t=>t));return!(!s||0===s.length)&&A(s[0],e)>0}return!1})(this._stateManager)}canUndo(){return this._stateManager.canUndo()}canRedo(){return this._stateManager.canRedo()}undo(){this.dispatchAction(h.CHANGE_UNDONE)}redo(){this.dispatchAction(h.CHANGE_REDONE)}toString(){return this.name}dispatchAction(t,e){var s;let r=new a(t,e);null===(s=this._interceptors)||void 0===s||s.forEach((t=>{r&&(r=t.interceptAction(r))})),r&&(this._stateManager.process(r),this._observers.forEach((t=>t(r))))}subscribe(t){this._observers.push(t)}unsubscribe(t){this._observers=this._observers.filter((e=>e!==t))}}!function(t){t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"}(C||(C={}));class U{constructor(t,e,s,r){this.dataUnit=t,this.record=e,this.updatingFields=s,this._operation=r}get operation(){return this._operation.toString()}isInsert(){return this._operation===C.INSERT}isDelete(){return this._operation===C.DELETE}isUpdate(){return this._operation===C.UPDATE}}!function(t){t.ASC="ASC",t.DESC="DESC"}(O||(O={})),function(t){t.SEARCHING="SEARCHING",t.REQUIREMENT="REQUIREMENT",t.VISIBILITY="REQUIREMENT"}(D||(D={})),function(t){t.FILE="FILE",t.IMAGE="IMAGE",t.DATE="DATE",t.DATETIME="DATETIME",t.TIME="TIME",t.ELAPSEDTIME="ELAPSEDTIME",t.CHECKBOX="CHECKBOX",t.SWITCH="SWITCH",t.OPTIONSELECTOR="OPTIONSELECTOR",t.DECIMALNUMBER="DECIMALNUMBER",t.INTEGERNUMBER="INTEGERNUMBER",t.SEARCH="SEARCH",t.SHORTTEXT="SHORTTEXT",t.PASSWORD="PASSWORD",t.MASKEDTEXT="MASKEDTEXT",t.LONGTEXT="LONGTEXT",t.HTML="HTML"}(y||(y={}));export{h as A,a as D,s as M,e as N,O as S,r as T,y as U,k as a,n as b}
@@ -1 +0,0 @@
1
- import{r as e,c as t,f as i,h as o,H as a,g as r}from"./p-89a57641.js";import{T as s,U as n,A as l,D as c,a as d,N as h,M as p,b}from"./p-9fab5606.js";import{F as u}from"./p-ddd0ef12.js";import{S as x,g as m}from"./p-ec7c1b86.js";class g{static clearTime(e,t=!0){const i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0);return t?g.adjustDLST(i):i}static strToDate(e,t=!0,i=!1){let o;if(o=i?/^(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(e):/^(3[01]|[1-2]\d|0[1-9]|[1-9])[^\d]?(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(e),!o)return;var a=i?1:Number(o[1]),r=Number(o[i?1:2]),s=Number(o[i?2:3]),n=Number(o[i?3:4]||0),l=Number(o[i?4:5]||0),c=Number(o[i?5:6]||0);s<100&&(s+=s<30?2e3:1900);let d=new Date(s,r-1,a,n,l,c,0);return!0!==t||i||0!=n||(d=g.adjustDLST(d)),d}static adjustDLST(e){return 23==e.getHours()?new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,1,0,0,0):e}}class v{static getContextValue(e){return v.getCtx()[e].deref()}static setContextValue(e,t){v.getCtx()[e]=new WeakRef(t)}static getCtx(){let e=window.___snkcore___ctx___;return e||(e={},window.___snkcore___ctx___=e),e}}let f=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this._firstRender=!0,this._todayLabel="Hoje",this._weekDayLabels=["D","S","T","Q","Q","S","S"],this._monthLabels=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(e,t,i,o){this.floating&&(this._floatingID=u.float(this._box,this._container,{autoClose:!0,top:e,left:t,bottom:i,right:o}),window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll())}async fitVertical(e,t){const i=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>i?this.show(e+"px",void 0,"unset"):this.show("unset",void 0,t+"px")}async hide(){void 0!==this._floatingID&&(u.close(this._floatingID),this._floatingID=void 0)}valueChanged(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}getMonthLabel(){return this._monthLabels[this._currentPosition.getMonth()]+" "+this._currentPosition.getFullYear()}isSelectedDate(e){return!!this.value&&this.value.getDate()==e.getDate()&&this.value.getMonth()==e.getMonth()&&this.value.getFullYear()==e.getFullYear()}changeMonth(e){this._currentPosition.setMonth(this._currentPosition.getMonth()+e),i(this)}selectDate(e){let t=e;this.value&&(this.time||this.showSeconds)&&(t.setHours(this.value.getHours()),t.setMinutes(this.value.getMinutes()),t.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=t,this.ezChange.emit()}selectHours(e){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),e,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit()}selectMinutes(e){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),e,this.value.getSeconds()),this.ezChange.emit()}selectSeconds(e){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),e),this.ezChange.emit()}updateScroll(e){if(e){const{scrollHeight:t,clientHeight:i,scrollTop:o}=e;t-i-Math.ceil(o)>0?e.classList.add("endHidden"):e.classList.remove("endHidden")}}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const e=new Date;return e.setTime(this._currentPosition.getTime()),e.setDate(1-e.getDay()),o("section",{ref:e=>this._container=e},o("div",{ref:e=>this._box=e,class:"calendar__container"},o("div",{class:"calendar"},o("div",{class:"calendar__header"},o("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),o("label",{class:"calendar__lbl-month"},this.getMonthLabel()),o("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),o("div",{class:"calendar__body"},o("div",{class:"calendar__line"},this._weekDayLabels.map((e=>o("div",{class:"calendar__cell calendar__cell--unselectable"},e)))),[0,7,14,21,28,35].map((t=>o("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((i=>{const a=new Date;a.setTime(e.getTime()),a.setDate(a.getDate()+t+i);let r="calendar__cell";return this._currentPosition.getMonth()!=a.getMonth()?r+=" calendar__cell--secondary":this.isSelectedDate(a)&&(r+=" calendar__cell--selected"),o("div",{class:r,onClick:()=>this.selectDate(a)},a.getDate())})))))),o("div",{class:"calendar__footer"},o("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this._todayLabel))),(this.time||this.showSeconds)&&o("div",{class:"calendar-time"},o("div",{class:"calendar-time__header"},o("div",null,"H"),o("div",{class:"separatorTime"},":"),o("div",null,"M"),this.showSeconds&&o("div",{class:"separatorTime"},":"),this.showSeconds&&o("div",null,"S")),o("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},o("div",{class:"calendar__column",ref:e=>this._hoursScroll=e,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((e,t)=>t===this.value.getHours()?o("div",{style:{display:"flex"},ref:e=>this._hoursSelect=e},o("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(t)},e),o("div",{class:"separatorTime"},":")):o("div",{style:{display:"flex"}},o("div",{class:"calendar__cell",onClick:()=>this.selectHours(t)},e),o("div",{class:"separatorTime"},":"))))),o("div",{class:"calendar__column",ref:e=>this._minutesScroll=e,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((e,t)=>t===this.value.getMinutes()?o("div",{style:{display:"flex"},ref:e=>this._minutesSelect=e},o("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(t)},e),this.showSeconds&&o("div",{class:"separatorTime"},":")):o("div",{style:{display:"flex"}},o("div",{class:"calendar__cell",onClick:()=>this.selectMinutes(t)},e),this.showSeconds&&o("div",{class:"separatorTime"},":"))))),this.showSeconds&&o("div",{class:"calendar__column",ref:e=>this._secondsScroll=e,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((e,t)=>t===this.value.getSeconds()?o("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(t),ref:e=>this._secondsSelect=e},e):o("div",{class:"calendar__cell",onClick:()=>this.selectSeconds(t)},e))))))))}static get watchers(){return{value:["valueChanged"]}}};f.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--ez-calendar__nav-btn--next-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}';let _=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.mode="regular"}adjustMode(){"switch"===this.mode?(this._inputElem.classList.remove("regularMode"),this._inputElem.classList.add("switchMode")):(this._inputElem.classList.remove("switchMode"),this._inputElem.classList.add("regularMode"))}async getMode(){return this.mode}async setFocus(){this._inputElem.focus()}componentDidLoad(){this.adjustMode()}changeValue(){this.value=!this.value,this.ezChange.emit(this.value)}getLabelClasses(){let e="label";return this.enabled||(e+=" label--disabled"),e}render(){return o(a,null,o("input",{type:"checkbox",class:"regularMode",checked:!0===this.value,onChange:()=>{this.changeValue()},disabled:!this.enabled,ref:e=>this._inputElem=e}),this.label?o("label",{class:this.getLabelClasses(),onClick:()=>{this.changeValue()},title:this.label},this.label):void 0)}static get watchers(){return{mode:["adjustMode"]}}};_.style=':host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url(\'data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>\');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:20px;--ez-switch--pin--height:20px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--checked--background-color:var(--color--primary-300);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-secondary);--ez-switch--pin--checked--background-color:var(--color--primary);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regularMode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regularMode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regularMode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regularMode:disabled{cursor:auto;background:none}input.regularMode::before{box-sizing:border-box;content:"";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regularMode:disabled::before{border:var(--ez-check--disabled--border)}input.regularMode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regularMode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regularMode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regularMode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regularMode:checked::after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regularMode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switchMode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--text--secondary, #a2abb9);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switchMode:disabled{background-color:var(--ez-switch--disabled--background-color)}input.switchMode::after{content:"";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(-2px) translateY(-3px);border-radius:50%;width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switchMode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color)}input.switchMode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switchMode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width))/2);background-color:var(--ez-switch--pin--focus--background-color)}input.switchMode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switchMode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width)))}input.switchMode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-3px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color)}input.switchMode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);text-shadow:var(--text-shadow);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}';let w=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.value=!1,this.headerSize="small",this.iconPlacement="left"}observeValue(){this.ezChange.emit()}async showHide(){this.value=!this.value}render(){return o(a,null,"right"==this.iconPlacement?o("div",{class:"collapsible-box__title"},o("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label),o("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()})):o("div",{class:"collapsible-box__title"},o("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()}),o("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label)),this.value?null:o("slot",null))}static get watchers(){return{value:["observeValue"]}}};w.style=':host{--ez-collapsible-box--height:42px;--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__btn--image--xsmall:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="12px" width="7.5px"><path d="M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z"/></svg>\');--ez-collapsible-box__btn--image--small:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="14px" width="8.68px"><path d="M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z"/></svg>\');--ez-collapsible-box__btn--image--medium:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--ez-collapsible-box__btn--image--large:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="18px" width="11.25px"><path d="M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z"/></svg>\');--ez-collapsible-box__btn--image--xlarge:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="20px" width="12.5px"><path d="M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z"/></svg>\');--ez-collapsible-box__btn--fill:var(--ez-collapsible-box--color);--ez-collapsible-box__btn--width:10px;--ez-collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:\'\';display:flex;background-color:var(--ez-collapsible-box__btn--fill);width:var(--ez-collapsible-box__btn--width);height:var(--ez-collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xsmall);mask-image:var(--ez-collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--small);mask-image:var(--ez-collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--medium);mask-image:var(--ez-collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--large);mask-image:var(--ez-collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xlarge);mask-image:var(--ez-collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}';class z{static applyVarsTextInput(e,t){t&&(z.applyIfExists(e,t,"--ez-text-input__input--background-color"),z.applyIfExists(e,t,"--ez-text-input__input--border-color"),z.applyIfExists(e,t,"--ez-text-input--height"))}static applyIfExists(e,t,i){const o=getComputedStyle(e).getPropertyValue(i);o&&t.style.setProperty(i,o)}}let k=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressEmptyOption=!1,this.canShowError=!0}internalUpdate(){this._inputElement&&(this._inputElement.value=this.getText()),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async setFocus(){this._inputElement.setFocus()}async setBlur(){this._inputElement.setBlur()}getText(){let e="";const t=this.getSelectedOption();return t&&(e=this.showSelectedValue?`${t.value} - ${t.label}`:t.label),e}getSelectedOption(){return"string"==typeof this.value||this.value instanceof String?this._visibleOptions.find((e=>e.value===this.value)):this.value}updateVisibleOptions(){let e=this._source||[];if(!this.searchMode&&this._criteria){const t=this._criteria.toUpperCase();e=e.filter((e=>e.label.toLocaleUpperCase().indexOf(t)>-1))}this._visibleOptions=this.suppressEmptyOption?e:[{value:void 0,label:""}].concat(e)}buildItem(e,t){return o("li",{class:t===this._preSelection?"item preselected":"item",id:`item_${e.value}`,onMouseDown:()=>this.selectOption(e),onMouseOver:()=>this._preSelection=void 0},o("span",{class:"item--label",title:e.label},e.label),this.showOptionValue?o("span",{class:"item--value",title:e.value},e.value):void 0)}showOptions(){this.enabled&&(this._floatingID=u.float(this._optionsList,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError?"0px":"-17px"}),window.requestAnimationFrame((()=>{this._optionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&u.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&u.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(e,t){window.requestAnimationFrame((()=>{const i=this._optionsList.querySelector(`li#item_${e.value}`);if(i){const e=i.parentElement,o=e.getBoundingClientRect(),a=i.getBoundingClientRect();t&&a.bottom>o.bottom?e.scrollTop=a.top:!t&&a.top<o.top&&(e.scrollTop=0)}}))}selectCurrentOption(){void 0!==this._preSelection&&(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0)}selectOption(e){if(this.getSelectedOption()!==e){const t=(null==e?void 0:e.value)?e:void 0;this.value=t,this.errorMessage="",this.ezChange.emit(t)}else this.internalUpdate()}updateSource(e){e instanceof Promise?(e.then((e=>this.updateSource(e))),this.updateVisibleOptions()):(this._source=e,this.updateVisibleOptions())}loadOptions(e,t=""){this._criteria=t,this.updateSource(this.optionLoader?this.optionLoader({mode:e,argument:t}):this.options)}cancelPreselection(){!this._inputElement.value&&this.value?this.selectOption(void 0):this.internalUpdate()}componentWillLoad(){if(void 0===this.options){this.options=[];const e=this.el.querySelectorAll("option");e&&e.forEach((e=>{let t=e.innerText,i=e.getAttribute("value");i||(i=t),this.options.push({label:t,value:i}),e.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions("PRELOAD")}componentDidRender(){void 0===this._floatingID&&this._optionsList.remove()}componentDidLoad(){z.applyVarsTextInput(this.el,this._inputElement)}onTextInputChangeHandler(e){this._criteria||(this._inputElement.value=e.data);const t=e.target.value;this._criteria=t,this._criteria&&(this.searchMode?(this._changeDeboucingTimeout&&window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions("PREDICTIVE",t)}),200)):this.updateVisibleOptions(),this.showOptions())}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(e){switch(e.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection()}e.stopPropagation()}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){return o(a,null,o("ez-text-input",{ref:e=>this._inputElement=e,enabled:this.enabled,onInput:e=>this.onTextInputChangeHandler(e),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onEzChange:e=>e.stopPropagation(),onKeyDown:e=>this.keyDownHandler(e),label:this.label,value:this.getText(),canShowError:this.canShowError,errorMessage:this.errorMessage},o("button",this.searchMode?{disabled:!this.enabled,tabindex:-1,class:"btn-open-search",onClick:()=>{this.loadOptions("ADVANCED")},slot:"leftIcon"}:{disabled:!this.enabled,tabindex:-1,class:"btn-open-options",slot:"rightIcon",onClick:()=>this.showOptions()})),o("section",{class:"list-container",ref:e=>this._listContainer=e},o("div",{class:"options-list",ref:e=>this._optionsList=e},this._visibleOptions.map(((e,t)=>this.buildItem(e,t))))))}get el(){return r(this)}static get watchers(){return{value:["internalUpdate"]}}};k.style=':host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn-search--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-search-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-search-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__btn-options--background-color:var(--text--primary, #626e82);--ez-combo-box__btn-options-disabled--background-color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-options-hover--background-color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #919191);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box__drop-down-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="16px"><path d="M 1.8585859,3.0707069 7.9999998,9.2121212 14.141414,3.0707069 16,5.0101006 7.9999998,12.929293 0,4.9292932 Z"/></svg>\');--ez-combo-box__search-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="22px" width="22px"><path d="m 9.4,2.3 c 4.1,0 7.4,3.2 7.4,7.2 0,1.8 -0.7,3.4 -1.8,4.7 l 0.3,0.3 h 0.9 l 5.7,5.6 -1.7,1.7 -5.7,-5.6 V 15.3 L 14.3,15 C 13,16.1 11.3,16.7 9.5,16.7 5.3,16.7 2,13.5 2,9.5 2,5.5 5.3,2.3 9.4,2.3 m 0,2.2 c -2.9,0 -5.1,2.2 -5.1,5 0,2.8 2.3,5 5.1,5 2.8,0 5.1,-2.2 5.1,-5 0,-2.8 -2.2,-5 -5.1,-5 z"/></svg>\');--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}.list-container{position:relative;width:100%}.options-list{box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-combo-box--background-color--xlight);padding:var(--ez-combo-box--space--small);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);scroll-behavior:smooth;max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));overflow:auto}.item{text-align:left;display:flex;justify-content:space-between;align-items:center;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);list-style-type:none;min-height:var(--ez-combo-box__list-height)}.item--label{text-align:left;flex-basis:85%;flex-grow:1;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item--value{text-align:right;flex-basis:15%;flex-grow:0;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn-open-options{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-options:disabled{cursor:unset}.btn-open-options::after{content:\'\';display:flex;background-color:var(--ez-combo-box__btn-options--background-color);width:16px;height:16px;-webkit-mask-image:var(--ez-combo-box__drop-down-image);mask-image:var(--ez-combo-box__drop-down-image)}.btn-open-options:disabled:after{background-color:var(--ez-combo-box__btn-options-disabled--background-color)}.btn-open-options:enabled:hover::after{background-color:var(--ez-combo-box__btn-options-hover--background-color)}.btn-open-search{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-search:disabled{cursor:unset}.btn-open-search::after{content:\'\';display:flex;background-color:var(--ez-combo-box__btn-search--background-color);width:22px;height:22px;-webkit-mask-image:var(--ez-combo-box__search-image);mask-image:var(--ez-combo-box__search-image)}.btn-open-search:disabled:after{background-color:var(--ez-combo-box__btn-search-disabled--background-color)}.btn-open-search:enabled:hover::after{background-color:var(--ez-combo-box__btn-search-hover--background-color)}';let y=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}changeValue(e){e=null==e?null:g.clearTime(e),this._textInput.errorMessage="",e!==this.value&&(this.value=e,this.ezChange.emit())}showCalendar(){this.parseDate(),this._calendar.value=this.value,this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}parseDate(){const e=this._textInput.value,t=g.strToDate(e);t||!e?this.changeValue(this.value===t?this.value:t):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(e){return e?new Intl.DateTimeFormat("pt-BR").format(e):null}componentDidLoad(){z.applyVarsTextInput(this._elem,this._textInput)}render(){return o(a,null,o("ez-text-input",{ref:e=>this._textInput=e,onBlur:()=>this.parseDate(),onKeyDown:e=>{"H"!==e.key&&"h"!==e.key||this.changeValue(new Date)},label:this.label,onEzChange:e=>e.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage},o("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),o("ez-calendar",{onEzChange:e=>{this.hideCalendar(),e.stopPropagation()},floating:!0,ref:e=>this._calendar=e}))}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};y.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';let C=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.showSeconds=!1}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}onChangeKeyDown(e){const t=this._textInput.shadowRoot.querySelector("input");if("H"===e.key||"h"===e.key)this.changeValue(new Date);else if(e.shiftKey&&"Tab"===e.key){if(t.selectionStart>0){let i=t.value.lastIndexOf(" ",t.selectionStart);-1!==i&&(t.setSelectionRange(0,i),e.preventDefault())}}else if("Tab"===e.key&&t.value.length!==t.selectionEnd){let i=t.value.indexOf(" ",t.selectionEnd);i=-1===i?t.selectionEnd:i+1,t.setSelectionRange(i,t.value.length),e.preventDefault()}}onFocused(){const e=this._textInput.shadowRoot.querySelector("input");if(e.selectionStart!==e.selectionEnd){let t=e.value.indexOf(" ",e.selectionStart);t=-1===t?e.value.length:t,e.setSelectionRange(0,t)}}onClicked(){const e=this._textInput.shadowRoot.querySelector("input");let t=e.value.lastIndexOf(" ",e.selectionEnd);t=-1===t?0:t+1,t=t>e.selectionEnd?0:t;let i=0===t?e.value.indexOf(" "):e.value.length;e.setSelectionRange(t,i)}changeValue(e){this._textInput.errorMessage="",e!==this.value&&(this.value=e,this.ezChange.emit())}showCalendar(){this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight),this._calendar.style.visibility="inherit"}parseDate(){const e=this._textInput.value,t=e&&e.length>0?e.split(" "):[],i=t.length>0?t[0]:e,o=s.prepareValue(t[1]?t[1]:"",this.showSeconds),a=g.strToDate(i+(o&&" "+o));a||!e?this.changeValue(this.value===a?this.value:a):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(e){return e?new Intl.DateTimeFormat("pt-BR",this.showSeconds?{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}).format(e):null}componentDidLoad(){z.applyVarsTextInput(this._elem,this._textInput)}render(){return o(a,null,o("ez-text-input",{ref:e=>this._textInput=e,onBlur:()=>this.parseDate(),onKeyDown:e=>{this.onChangeKeyDown(e)},label:this.label,onEzChange:e=>e.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,onFocus:()=>this.onFocused(),onClick:()=>this.onClicked()},o("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),o("ez-calendar",{onEzChange:e=>{this.changeValue(this._calendar.value),e.stopPropagation()},floating:!0,ref:e=>this._calendar=e,time:!0,showSeconds:this.showSeconds}))}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};C.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';const F=({name:e,label:t})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-text-input",{label:t,"data-field-name":e,key:e}));function M(e,t,i,a=!1){return o("div",{class:"col col--sd-12 col--tb-3 padding--small align--middle padding-bottom--large"},o("ez-check",{enabled:!i,label:t,mode:a?"switch":"regular","data-field-name":e,key:e}))}function E(e,t,i,a,r){return o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-number-input",{enabled:!i,label:t,precision:a,prettyPrecision:r,"data-field-name":e,key:e}))}const D=new Map;D.set(n.LONGTEXT,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 padding--small",key:e},o("ez-text-area",{enabled:!i,label:t,"data-field-name":e})))),D.set(n.CHECKBOX,(e=>M(e.name,e.label,e.readOnly,!1))),D.set(n.SWITCH,(e=>M(e.name,e.label,e.readOnly,!0))),D.set(n.OPTIONSELECTOR,(({name:e,label:t,readOnly:i},a)=>{const r=null==a?void 0:a.options;let s;if("string"==typeof r){const e=JSON.parse(r);s=Object.keys(e).map((t=>({value:t,label:e[t]})))}else s=r;return o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-combo-box",{enabled:!i,label:t,"data-field-name":e,key:e,options:s}))})),D.set(n.SEARCH,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-search",{enabled:!i,label:t,"data-field-name":e,key:e})))),D.set(n.FILE,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 padding--small"},o("ez-upload",{enabled:!i,label:t,urlUpload:"",requestHeaders:"",maxFiles:10,"data-field-name":e,key:e})))),D.set(n.DATE,(({name:e,label:t,readOnly:i})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-date-input",{enabled:!i,label:t,"data-field-name":e,key:e})))),D.set(n.TIME,(({name:e,label:t})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-time-input",{label:t,"data-field-name":e,key:e})))),D.set(n.DATETIME,(({name:e,label:t})=>o("div",{class:"col col--sd-12 col--tb-3 padding--small"},o("ez-date-time-input",{label:t,"data-field-name":e,key:e})))),D.set(n.DECIMALNUMBER,(({name:e,label:t,readOnly:i},o)=>{const a=Number((null==o?void 0:o.precision)||2);return E(e,t,i,a,Number((null==o?void 0:o.prettyPrecision)||a))})),D.set(n.INTEGERNUMBER,(({name:e,label:t,readOnly:i})=>E(e,t,i,0,0)));const A=e=>{const t=e.descriptor,i=Object.assign({},e.config);let o,a;return t&&(i.label||(i.label=t.label),i.name||(i.name=t.name),void 0===i.required&&(i.required=t.required),void 0===i.readOnly&&(i.readOnly=t.readOnly),a=t.properties,o=D.get(t.userInterface)),i.required&&(i.label=`* ${i.label} (obrigatório)`),o||(o=F),o(i,a)},O=({source:e})=>"items"in e?o("ez-collapsible-box",{label:e.label},e.items.map((e=>A(e)))):A(e),V=({store:e,source:t})=>o("div",{class:"box__container"},t.items.map((t=>o(O,{store:e,source:t}))));class S{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[]}getSheet(e){return this._sheets.get(e)}getAllSheets(){return this._sheets}addSheet(e){this._sheets.set(e.name,e),this._requiredFields=this._requiredFields.concat(e.requiredFields),this._cleanOnCopyFields=this._cleanOnCopyFields.concat(e.cleanOnCopyFields)}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}}function T(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var I="function"==typeof Symbol&&Symbol.observable||"@@observable",L=function(){return Math.random().toString(36).substring(7).split("").join(".")},B={INIT:"@@redux/INIT"+L(),REPLACE:"@@redux/REPLACE"+L(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+L()}};function N(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function R(e,t,i){var o;if("function"==typeof t&&"function"==typeof i||"function"==typeof i&&"function"==typeof arguments[3])throw new Error(T(0));if("function"==typeof t&&void 0===i&&(i=t,t=void 0),void 0!==i){if("function"!=typeof i)throw new Error(T(1));return i(R)(e,t)}if("function"!=typeof e)throw new Error(T(2));var a=e,r=t,s=[],n=s,l=!1;function c(){n===s&&(n=s.slice())}function d(){if(l)throw new Error(T(3));return r}function h(e){if("function"!=typeof e)throw new Error(T(4));if(l)throw new Error(T(5));var t=!0;return c(),n.push(e),function(){if(t){if(l)throw new Error(T(6));t=!1,c();var i=n.indexOf(e);n.splice(i,1),s=null}}}function p(e){if(!N(e))throw new Error(T(7));if(void 0===e.type)throw new Error(T(8));if(l)throw new Error(T(9));try{l=!0,r=a(r,e)}finally{l=!1}for(var t=s=n,i=0;i<t.length;i++)(0,t[i])();return e}function b(e){if("function"!=typeof e)throw new Error(T(10));a=e,p({type:B.REPLACE})}function u(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(T(11));function i(){e.next&&e.next(d())}return i(),{unsubscribe:t(i)}}})[I]=function(){return this},e}return p({type:B.INIT}),(o={dispatch:p,subscribe:h,getState:d,replaceReducer:b})[I]=u,o}const j={};function H(e=j,t){switch(t.type){case Z.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload});case Z.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function P(e){return e.formMetadata}var Z;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(Z||(Z={}));class q{constructor(e){this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe((()=>{var e;null===(e=this._fields)||void 0===e||e.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}))}bind(e){e.forEach((e=>{const t=e.dataset.fieldName;this.updateBind(t,e),this.updateValue(t,e)}))}updateValue(e,t){t.value=this._dataUnit.getFieldValue(e)}updateBind(e,t){const i=this._fields.get(e);i&&i.destroy(),this._fields.set(e,$.create(e,t,((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t)}setFieldValue(e,t){0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.setFieldValue(e,t)}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&void 0===t.optionLoader){const i=v.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");i&&(t.optionLoader=t=>i(t,e,this._dataUnit))}}}class ${destroy(){this.field.removeEventListener(this.eventName,this.eventListener)}static create(e,t,i){const o=new $;return o.fieldName=e,o.field=t,o.eventListener=t=>{i(e,t.detail)},o.eventName="ezChange",o.field.addEventListener(o.eventName,o.eventListener),o}}class K{static async showDialog(e,t,i=null,o,a=!1){return new Promise((r=>{let s=document.querySelector("ez-dialog");s||(s=document.createElement("ez-dialog"),window.document.body.appendChild(s)),s.show(e,t,a,o,i).then((e=>r(e)))}))}static async alert(e,t,i=null){return K.showDialog(e,t,i,!1,!1)}static async error(e,t,i=null){return K.showDialog(e,t,i,!1,!0)}static async confirm(e,t,i=null,o=!1){return K.showDialog(e,t,i,!0,o)}static async info(e){let t=document.querySelector("ez-toast");t||(t=document.createElement("ez-toast"),window.document.body.appendChild(t)),t.message=e,t.fadeTime=4e3,t.show()}}let U=class{constructor(t){e(this,t)}submit(){return Promise.resolve()}cancel(){return Promise.resolve()}validate(){return new Promise(((e,t)=>{const i=P(this._store.getState()),o=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(i.getRequiredFields()),a=this.dataUnit.records;for(let e=0;e<a.length;e++)if(!this.validateRequired(o,a[e])){t();break}e()}))}validateRequired(e,t){const i=[];e.forEach((e=>{const o=t[e],a=this._element.querySelector(`[data-field-name=${e}]`);null==o||""===o?(i.push(e),a.errorMessage="Essa informação é obrigatória"):a.errorMessage=""}));const o=0===i.length;return o||K.info("Há pelo menos um campo obrigatório não preenchido."),o}getDynamicContent(){var e;const t=P(this._store.getState());if(!t)return null;const i=(a=null===(e=this._store)||void 0===e?void 0:e.getState()).currentSheet?a.formMetadata.getSheet(a.currentSheet):Array.from(a.formMetadata.getAllSheets().values())[0];var a;if(!i)return null;const r=Array.from(t.getAllSheets().values()),s=[];return r.length>1&&s.push(o("ez-tabselector",{onEzChange:e=>this._store.dispatch(function(e){return{type:Z.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:i.name},r.map((e=>o("ez-tab",{tabKey:e.name,label:e.label}))))),s.push(o(V,{store:this._store,source:i})),s}processMetadata(){if(!this.isStatic()){const e=this.config&&this.config.length>0?((e,t)=>{const i=new Map,o=[],a=[];e.forEach((e=>{var r;if(!1!==e.visible){const s=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"Geral",i),n=t.getField(e.name);if(n&&s.visible){i.has(s)||i.set(s,new Map);const t=i.get(s);(void 0===e.required?n.required:e.required)&&o.push(e.name),(void 0===e.cleanOnCopy?null===(r=n.properties)||void 0===r?void 0:r.cleanOnCopy:e.cleanOnCopy)&&a.push(e.name);const l={config:e,descriptor:n},c=e.group;if(c){const e=`group::${c}`;t.has(e)?t.get(e).items.push(l):t.set(e,{label:c,items:[l]})}else t.set(e.name,l)}}}));const r=new S;return Array.from(i.entries()).sort(((e,t)=>(e[0].order||1e4)-(t[0].order||1e4))).forEach((([e,t])=>{r.addSheet({label:e.label,name:e.label,items:Array.from(t.values()),requiredFields:o,cleanOnCopyFields:a})})),r})(this.config,this.dataUnit):(()=>{var e;const t=this.dataUnit.metadata,i=new S;if(t){const o=null===(e=t.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible));i.addSheet({label:t.label,name:t.name,items:o.map((e=>({descriptor:e}))),requiredFields:o.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:o.filter((e=>{var t;return null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy})).map((e=>e.name))})}return i})();this._store.dispatch({type:Z.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}interceptAction(e){if(e.type===l.RECORDS_COPIED){const t=P(this._store.getState()).getCleanOnCopyFields();if(t)return new c(l.RECORDS_COPIED,e.payload.map((e=>{const i=Object.assign({},e);return t.forEach((e=>delete i[e])),i})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new d("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe((e=>{e.type===l.METADATA_LOADED&&this.processMetadata()})),this._dataBinder=new q(this.dataUnit),this._store=R(H),this._store.subscribe((()=>i(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata()}componentDidRender(){this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")))}render(){return o(a,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}};U.style="ez-form{display:flex;flex-direction:column;width:100%}";let W=class{constructor(t){e(this,t),this.size="medium"}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):x.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}render(){return o(a,null,this.getIconContent())}};W.style=':host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-account-outline:before{content:"\\ea01"}.ez-icon-account:before{content:"\\ea02"}.ez-icon-alert-circle-inverted:before{content:"\\ea03"}.ez-icon-alert-circle:before{content:"\\ea04"}.ez-icon-alert-mail:before{content:"\\ea05"}.ez-icon-alert-outline:before{content:"\\ea06"}.ez-icon-alert-popup:before{content:"\\ea07"}.ez-icon-apps:before{content:"\\ea08"}.ez-icon-arrow_back:before{content:"\\ea09"}.ez-icon-bell-inverted:before{content:"\\ea0a"}.ez-icon-bell:before{content:"\\ea0b"}.ez-icon-business-center:before{content:"\\ea0c"}.ez-icon-calendar-text:before{content:"\\ea0d"}.ez-icon-calendar:before{content:"\\ea0e"}.ez-icon-check-circle-inverted:before{content:"\\ea0f"}.ez-icon-check-circle:before{content:"\\ea10"}.ez-icon-check:before{content:"\\ea11"}.ez-icon-chevron-down:before{content:"\\ea12"}.ez-icon-chevron-left:before{content:"\\ea13"}.ez-icon-chevron-right:before{content:"\\ea14"}.ez-icon-chevron-up:before{content:"\\ea15"}.ez-icon-circle--medium:before{content:"\\ea16"}.ez-icon-circle:before{content:"\\ea17"}.ez-icon-clipboard:before{content:"\\ea18"}.ez-icon-close-circle-inverted:before{content:"\\ea19"}.ez-icon-close-circle:before{content:"\\ea1a"}.ez-icon-close:before{content:"\\ea1b"}.ez-icon-comment-inverted:before{content:"\\ea1c"}.ez-icon-comment:before{content:"\\ea1d"}.ez-icon-configuration:before{content:"\\ea1e"}.ez-icon-copy:before{content:"\\ea1f"}.ez-icon-crop:before{content:"\\ea20"}.ez-icon-delete:before{content:"\\ea21"}.ez-icon-description:before{content:"\\ea22"}.ez-icon-dot-notification:before{content:"\\ea23"}.ez-icon-dots-horizontal:before{content:"\\ea24"}.ez-icon-dots-vertical:before{content:"\\ea25"}.ez-icon-drag-indicator:before{content:"\\ea26"}.ez-icon-edit-file:before{content:"\\ea27"}.ez-icon-edit-table:before{content:"\\ea28"}.ez-icon-edit-time:before{content:"\\ea29"}.ez-icon-edit:before{content:"\\ea2a"}.ez-icon-email-inverted:before{content:"\\ea2b"}.ez-icon-email:before{content:"\\ea2c"}.ez-icon-error-octagon:before{content:"\\ea2d"}.ez-icon-expand:before{content:"\\ea2e"}.ez-icon-eye-off:before{content:"\\ea2f"}.ez-icon-eye:before{content:"\\ea30"}.ez-icon-favorite:before{content:"\\ea31"}.ez-icon-file-download:before{content:"\\ea32"}.ez-icon-file-upload:before{content:"\\ea33"}.ez-icon-filter:before{content:"\\ea34"}.ez-icon-find-file:before{content:"\\ea35"}.ez-icon-find-page:before{content:"\\ea36"}.ez-icon-format-color-fill:before{content:"\\ea37"}.ez-icon-help-circle-outline:before{content:"\\ea38"}.ez-icon-help-inverted:before{content:"\\ea39"}.ez-icon-help:before{content:"\\ea3a"}.ez-icon-home:before{content:"\\ea3b"}.ez-icon-language:before{content:"\\ea3c"}.ez-icon-launch:before{content:"\\ea3d"}.ez-icon-lightbulb:before{content:"\\ea3e"}.ez-icon-list:before{content:"\\ea3f"}.ez-icon-loading:before{content:"\\ea40"}.ez-icon-lock-outline:before{content:"\\ea41"}.ez-icon-lock:before{content:"\\ea42"}.ez-icon-menu:before{content:"\\ea43"}.ez-icon-minus-circle-inverted:before{content:"\\ea44"}.ez-icon-minus:before{content:"\\ea45"}.ez-icon-money-off:before{content:"\\ea46"}.ez-icon-money:before{content:"\\ea47"}.ez-icon-north-west:before{content:"\\ea48"}.ez-icon-pause:before{content:"\\ea49"}.ez-icon-payments:before{content:"\\ea4a"}.ez-icon-play:before{content:"\\ea4b"}.ez-icon-plus-circle-inverted:before{content:"\\ea4c"}.ez-icon-plus-circle:before{content:"\\ea4d"}.ez-icon-plus:before{content:"\\ea4e"}.ez-icon-power:before{content:"\\ea4f"}.ez-icon-push-pin:before{content:"\\ea50"}.ez-icon-restore:before{content:"\\ea51"}.ez-icon-return:before{content:"\\ea52"}.ez-icon-rotate:before{content:"\\ea53"}.ez-icon-save:before{content:"\\ea54"}.ez-icon-search:before{content:"\\ea55"}.ez-icon-settings-inverted:before{content:"\\ea56"}.ez-icon-settings:before{content:"\\ea57"}.ez-icon-share:before{content:"\\ea58"}.ez-icon-shield:before{content:"\\ea59"}.ez-icon-south-east:before{content:"\\ea5a"}.ez-icon-success-circle:before{content:"\\ea5b"}.ez-icon-sync:before{content:"\\ea5c"}.ez-icon-table:before{content:"\\ea5d"}.ez-icon-timer-outline:before{content:"\\ea5e"}.ez-icon-user-circle:before{content:"\\ea5f"}.ez-icon-warning-minus:before{content:"\\ea60"}.ez-icon-warning-triangle:before{content:"\\ea61"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';let J=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}changeValue(e){this.errorMessage="",e&&e!==this.value&&(this.value=e,this.ezChange.emit(this.value))}parseNumber(){const e=this._textInput.value?h.stringToNumber(this._textInput.value):null;if(null!=e&&isNaN(e))this.errorMessage="O valor digitado não é um número válido";else try{this.changeValue(e)}catch(e){return void(this.errorMessage=e.message)}}getTextValue(e){return e?this.precision>0?h.format(e.toString(),Number(this.precision),Number(this.prettyPrecision)):e.toString():null}componentDidLoad(){z.applyVarsTextInput(this._elem,this._textInput)}render(){return o("ez-text-input",{ref:e=>this._textInput=e,onBlur:()=>this.parseNumber(),label:this.label,onEzChange:e=>e.stopPropagation(),value:this.getTextValue(this.value),restrict:this.precision>0?"0123456789-,.":"0123456789-",enabled:this.enabled,errorMessage:this.errorMessage})}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};J.style=":host{display:block;width:100%}";let X=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.showPopup=t(this,"showPopup",7),this.enabled=!0,this.showSelectedValue=!0,this.showOptionValue=!0}updateValue(){this._comboElement&&(this._comboElement.value=this.value)}async setFocus(){this._comboElement.setFocus()}async setBlur(){this._comboElement.setBlur()}onComboChange(e){e.stopPropagation(),this.value=e.detail,this.ezChange.emit(e.detail)}componentDidLoad(){z.applyVarsTextInput(this._elem,this._comboElement)}render(){return o("ez-combo-box",{ref:e=>this._comboElement=e,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,optionLoader:this.optionLoader,searchMode:!0,onEzChange:e=>this.onComboChange(e),showSelectedValue:this.showSelectedValue,showOptionValue:this.showOptionValue})}get _elem(){return r(this)}static get watchers(){return{value:["updateValue"]}}};X.style=":host{width:100%}";let G=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.setFocusedParam=e=>{if("Enter"===e.key){const t=this._processedTabs[this._focusedIndex];this.handleTabClick(t),e.preventDefault(),this.setFocusedTab(t.index)}else if("ArrowLeft"===e.key||"ArrowRight"===e.key){let t;if("ArrowLeft"===e.key)t=!1;else{if("ArrowRight"!==e.key)return;t=!0}this._focusedIndex=void 0===this._focusedIndex?!1===t?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===t?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}else if("Tab"===e.key||"Escape"===e.key){const t=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(t),e.preventDefault(),this.setFocusedTab(this.selectedIndex)}}}handleTabClick(e){this.selectedIndex=e.index,this._focusedIndex=void 0,this.selectedTab=e.tabKey,this.ezChange.emit(e),this.setFocusedBtn(!1,e.index)}componentWillRender(){this._processedTabs||(this._processedTabs=[],this.tabs&&this.tabs.split(",").forEach((e=>{e=e.trim(),this._processedTabs.push({label:e,tabKey:e,index:this._processedTabs.length})})),this._hostElem.querySelectorAll("ez-tab").forEach((e=>{const t=e.getAttribute("tabKey"),i={label:e.getAttribute("label"),tabKey:t,index:this._processedTabs.length},o=e.firstChild;o&&(o.setAttribute("slot","tab"+i.index),this._hostElem.appendChild(o)),this._processedTabs.push(i)})))}handleSlotChange(e){const t=e.target.assignedElements()[0];t&&(t.style.marginLeft="6px")}scrollBackward(){const e=this._scrollContainer;e&&(e.scrollLeft-=e.clientWidth)}scrollFoward(){const e=this._scrollContainer;if(e){let t=null;e.querySelectorAll(".tab").forEach((i=>{i.getBoundingClientRect().right<e.clientWidth&&(t=i)})),e.scrollLeft=t.offsetLeft+t.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const e=this._scrollContainer;if(e){const{scrollWidth:t,clientWidth:i,scrollLeft:o}=e,a=t-i-Math.ceil(o);this._startHidden=e.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const r=["","startHidden","endHidden","midle"],s=r[Number(this._startHidden)|Number(this._endHidden)<<1];r.forEach((t=>{t!==s&&e.classList.contains(t)&&e.classList.remove(t)})),s&&!e.classList.contains(s)&&e.classList.add(s)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(e){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${e}`).scrollIntoView()}),200)}getTextWidth(e){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const t=this._textMesurement.getContext("2d");return t.font="14px Sora, Algerian",Math.min(220,24+t.measureText(e).width)+"px"}setFocusedBtn(e,t){this._scrollContainer.querySelectorAll(".tab").forEach((i=>{i.classList.remove("is-focused"),i.id==="tab"+t&&e&&i.classList.add("is-focused")}))}render(){return o(a,null,o("button",{class:"backward-button",ref:e=>this._backwardButton=e,onClick:()=>this.scrollBackward()}),o("div",{class:"scroll",ref:e=>this._scrollContainer=e,onScroll:()=>this.domScrollHandler(),onKeyDown:e=>this.setFocusedParam(e)},this._processedTabs.map(((e,t)=>{const i={"min-width":this.getTextWidth(e.label)},a="tab"+t,r=t===this.selectedIndex||this.selectedTab&&e.tabKey===this.selectedTab;return r&&(this.selectedTab=e.tabKey,this.selectedIndex=t),o("button",{id:a,class:"tab"+(r?" is-active":""),onClick:()=>this.handleTabClick(e),style:i},o("span",{class:"tab-label",title:e.label},e.label),o("slot",{name:a,onSlotchange:e=>{this.handleSlotChange(e)}}))}))),o("button",{class:"forward-button",ref:e=>this._forwardButton=e,onClick:()=>this.scrollFoward()}))}get _hostElem(){return r(this)}};G.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--tabselector--forward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.midle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Sora, Algerian");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}';let Q=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.rows=4}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._container.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._container.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}updateInputValue(){this._inputElem.value=this.value,this.handleChange(),this.adjustFloatingLabel(),this.ezChange.emit(this.value)}adjustFloatingLabel(){if(this.label){const e=this.value&&this.value.toString().length>0,t=this._labelElem.classList.contains("textarea__label--floated");e||this.isFocused()?t||this._labelElem.classList.add("textarea__label--floated"):t&&this._labelElem.classList.remove("textarea__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.adjustFloatingLabel(),this._container&&this._container.classList.contains("textarea--focus")&&this._container.classList.remove("textarea--focus")}handleChange(){this.errorMessage="",this.value=this._inputElem.value}handleFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("textarea__label--floated")&&this._labelElem.classList.add("textarea__label--floated"),this._container&&!this._container.classList.contains("textarea--focus")&&this._container.classList.add("textarea--focus")}componentDidLoad(){this.showError(),this.adjustFloatingLabel()}render(){return o(a,null,o("div",{class:"textarea",ref:e=>this._container=e},this.label?o("label",{ref:e=>this._labelElem=e,class:this.enabled?"textarea__label":"textarea__label textarea__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,o("textarea",{onFocus:()=>this.handleFocus(),ref:e=>this._inputElem=e,value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},onKeyDown:e=>e.stopPropagation(),rows:this.rows})),o("span",{class:"message-box",ref:e=>this._messageBoxElem=e,title:this.errorMessage},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["showError"],value:["updateInputValue"]}}};Q.style=":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--large, 500);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;margin-top:calc(var(--space--medium, 12px) + 4px);width:100%;font-weight:var(--text-weight--large, 600);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);padding:0;background:none}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}";let Y=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.enabled=!0,this.canShowError=!0}showError(){"string"==typeof this.errorMessage&&""!==this.errorMessage?(this._inputElem.classList.add("hasError"),this._messageBoxElem.classList.add("hasError")):(this._inputElem.classList.remove("hasError"),this._messageBoxElem.classList.remove("hasError"))}prepareMask(){this.mask&&(null==this._maskFormatter?this._maskFormatter=new p(this.mask):this._maskFormatter.mask=this.mask)}updateInputValue(){this._inputElem&&(this._inputElem.value=this.value),this.handleChange(),this.errorMessage="",this.ezChange.emit(this.value),this.adjustFloatingLabel()}adjustFloatingLabel(){if(this.label&&this._labelElem){this._inputElem&&!this._inputElem.classList.contains("input--with--label")&&this._inputElem.classList.add("input--with--label");const e=this.value&&this.value.toString().length>0,t=this._labelElem.classList.contains("input__label--floated");e||this.isFocused()?t||this._labelElem.classList.add("input__label--floated"):t&&this._labelElem.classList.remove("input__label--floated")}}isFocused(){return null!==this._hostElement.shadowRoot.activeElement}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){const e=this._inputElem.value;if(e&&this._maskFormatter)try{this._inputElem.value=this._maskFormatter.format(e)}catch(e){this.errorMessage=e.message}this.value=this._inputElem.value,this.adjustFloatingLabel()}isValidValue(e){return!this.restrict||Array.from(e).reduce(((e,t)=>e&&this.restrict.indexOf(t)>-1),!0)}handleChange(){if(!this._inputElem)return;const e=this._inputElem.value;this.isValidValue(e)?this._lastValidValue=e:this._inputElem.value=void 0===this._lastValidValue?"":this._lastValidValue,this.value=this._inputElem.value}handleSlotChange(e){const t=e.target,i=t.assignedElements()[0];i&&(i.style.position="absolute",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.overflow="hidden",i.style.top="0px",i.style.width="var(--ez-text-input__icon--width)",i.style.height="var(--ez-text-input--height)","leftIcon"==t.name?(i.style.left="0px",i.style.borderRadius="var(--ez-text-input--border-radius) 0 0 var(--ez-text-input--border-radius)",this._inputElem.classList.add("icon--left"),this._labelElem&&this._labelElem.classList.add("input__label--left")):"rightIcon"==t.name&&(i.style.right="0px",i.style.borderRadius="0 var(--ez-text-input--border-radius) var(--ez-text-input--border-radius) 0",this._inputElem.classList.add("icon--right"),this._labelElem&&this._labelElem.classList.add("input__label--right"))),this.showError()}doFocus(){this.label&&this._labelElem&&!this._labelElem.classList.contains("input__label--floated")&&this._labelElem.classList.add("input__label--floated")}componentDidLoad(){this.showError(),this.prepareMask(),this.adjustFloatingLabel()}componentWillLoad(){if(this.prepareMask(),this.value){if(this._maskFormatter)try{this.value=this._maskFormatter.format(this.value)}catch(e){this.errorMessage=e.message}this.isValidValue(this.value)||(this._lastValidValue="",this.value="")}}render(){return o(a,null,o("slot",{name:"leftIcon",onSlotchange:e=>{this.handleSlotChange(e)}}),this.label?o("label",{ref:e=>this._labelElem=e,class:this.enabled?"input__label":"input__label input__label--disabled",onClick:()=>this._inputElem.focus(),title:this.label},this.label):null,o("input",{onFocus:()=>this.doFocus(),ref:e=>this._inputElem=e,type:"text",value:this.value,disabled:!this.enabled,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()}}),o("slot",{name:"rightIcon",onSlotchange:e=>{this.handleSlotChange(e)}}),this.canShowError&&o("span",{class:"message-box",ref:e=>this._messageBoxElem=e,title:this.errorMessage},this.errorMessage))}get _hostElement(){return r(this)}static get watchers(){return{errorMessage:["showError"],mask:["prepareMask"],value:["updateInputValue"]}}};Y.style=":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";let ee=class{constructor(t){e(this,t),this.enabled=!0,this.showSeconds=!1}prepareMask(){this.showSeconds?null==this._maskFormatter?this._maskFormatter=new p("##:##:##"):this._maskFormatter.mask="##:##:##":null==this._maskFormatter?this._maskFormatter=new p("##:##"):this._maskFormatter.mask="##:##"}onValueChanged(){NaN===this.value&&(this.value=void 0,this.handleFocusout())}async setFocus(){this._inputElem.focus()}async setBlur(){this._inputElem.blur()}handleFocusout(){this.errorMessage="",this.prepareValue(this.viewValue),s.validateTime(this.viewValue,this.showSeconds)||(this.clearField(),this.errorMessage="Favor inserir um horário válido.")}prepareValue(e){try{this.viewValue=s.prepareValue(e,this.showSeconds)}catch(e){this.clearField(),this.errorMessage=e.message}}clearField(){this.viewValue=this.value=void 0}handleChange(){this.viewValue=this._inputElem.value,this.value=h.stringToNumber(this.viewValue.replace(/\D/g,""))}componentDidLoad(){this.onValueChanged(),z.applyVarsTextInput(this._elem,this._inputElem)}componentWillLoad(){this.prepareMask(),this.value?this.prepareValue(this.value.toString()):this.viewValue&&this.prepareValue(this.viewValue)}render(){return o(a,null,o("ez-text-input",{ref:e=>this._inputElem=e,value:this.viewValue,enabled:this.enabled,label:this.label,onInput:()=>{this.handleChange()},onFocusout:()=>{this.handleFocusout()},errorMessage:this.errorMessage},o("ez-icon",{slot:"leftIcon",href:m("timer-outline")})))}static get assetsDirs(){return["../assets"]}get _elem(){return r(this)}static get watchers(){return{showSeconds:["prepareMask"],value:["onValueChanged"]}}};ee.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";class te{constructor(e){this.file=e,this.size=e.size,this.name=e.name}abortUpload(){this._uploadingXhr&&(this._aborted=!0,this._uploadingXhr.abort(),this._uploadingXhr=void 0)}isUploading(){return void 0!==this._uploadingXhr}async upload(e,t,i){return new Promise(((o,a)=>{const r=new XMLHttpRequest;this._uploadingXhr=r,this._aborted=!1,this.progress=0,r.upload.onprogress=e=>{const t=e.loaded,o=e.total;this.progress=~~(t/o*100),i(this,t,o)},r.onreadystatechange=()=>{if(4==r.readyState){this._uploadingXhr=void 0;const e=r.status;this._aborted||(0===e?a("Servidor indisponível"):e>=500?a("Erro inesperado no servidor"):e>=400&&a("Operação não permitida"));const t=r.response;t&&o(JSON.parse(t))}},r.ontimeout=()=>{a("Tempo limite de transferência atingido.")};const s=new FormData;s.append("ARQUIVO",this.file,this.file.name),r.open("POST",e,!0),t&&t.forEach(((e,t)=>r.setRequestHeader(t,e))),r.send(s)}))}async delete(e,t,i){return new Promise(((o,a)=>{const r=new XMLHttpRequest;r.onreadystatechange=()=>{4==r.readyState&&(0===r.status?a("Servidor indisponível"):r.status>=500?a("Erro inesperado no servidor"):r.status>=400&&a("Operação não permitida"),o(!0))},r.ontimeout=()=>{a("Tempo limite de remoção atingido.")},r.open("DELETE",t,!0),i&&i.forEach(((e,t)=>r.setRequestHeader(t,e))),r.send(JSON.stringify(e))}))}}let ie=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this._filePointers=new Map,this.enabled=!0}changeValue(e){e!==this._updatingValue&&(this._filePointers.forEach((e=>{this.isRemoteFile(e)&&e.abortUpload()})),this._filePointers=new Map,this.updateFilePointers()),this._updatingValue=void 0}updateFilePointers(){this.value&&this.value.forEach((e=>this._filePointers.set(e.name,e)))}normalizeRequestHeaders(){if(this._requestHeaders=new Map,"string"==typeof this.requestHeaders)try{this.requestHeaders=JSON.parse(this.requestHeaders)}catch(e){this.requestHeaders=void 0}for(var e in this.requestHeaders)this._requestHeaders.set(e,this.requestHeaders[e])}async addFiles(e){if(this.maxFiles>0){let t=this._filePointers.size;if(e.forEach((e=>{this._filePointers.has(e.name)||t++})),t>this.maxFiles)return void this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`)}Array.prototype.forEach.call(e,this.addFile.bind(this))}async setFocus(){this._fileInput.focus()}async setBlur(){this._fileInput.blur()}async addFile(e){const t=this._filePointers.get(e.name);t?K.confirm("Substituir arquivo",`Já existe um arquivo chamado "${e.name}". Deseja substituí-lo?`).then((i=>{i&&(this.isRemoteFile(t)&&t.abortUpload(),this.doAddFile(e))})):this.doAddFile(e)}async doAddFile(e){if(this.validateFile(e)){const t=new te(e);this._filePointers.set(e.name,t),t.upload(this.urlUpload,this._requestHeaders,(e=>this.updateFeedback(e))).then((e=>e.forEach((e=>this.finishUpload(e))))).catch((e=>this.showError(e))),i(this)}}finishUpload(e){this._filePointers.set(e.name,e),this.updateValue()}updateValue(){this._updatingValue=[],this._filePointers.forEach((e=>{this.isRemoteFile(e)||this._updatingValue.push(e)})),this.value=this._updatingValue,this.ezChange.emit(this.value)}buildProgressId(e){return`PROGRESS_${e.name.replace(/[^a-z0-9_]/gi,"_")}_${e.file.lastModified}`}updateFeedback(e){window.requestAnimationFrame((()=>{if(this._host){const t=this._host.shadowRoot.querySelector("#"+this.buildProgressId(e));t&&(t.value=e.progress)}}))}validateFile(e){return!this._filePointers.has(e.name)&&this.maxFiles>0&&this._filePointers.size>=this.maxFiles?(this.showError(`A quantidade máxima de arquivos é ${this.maxFiles}.`),!1):0===e.size?(this.showError(`Erro de permissão: O arquivo "${e.name}" não pode ser enviado.`),!1):this.urlUpload?!(this.maxFileSize>=0&&e.size>this.maxFileSize&&(this.showError("O tamanho máximo dos arquivos é de "+this.formatBytes(this.maxFileSize)),1)):(this.showError("Endereço de upload não informado"),!1)}showError(e){K.alert("Enviando arquivo",e)}formatBytes(e,t=1){if(0===e)return"0 Bytes";const i=t<0?0:t,o=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,o)).toFixed(i))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][o]}onFileInputChange(e){this.addFiles(Array.from(e.target.files)),this._fileInput.value=""}isRemoteFile(e){return"file"in e}removeFromList(e){this._filePointers.delete(e),this.updateValue()}removeFile(e){const t=this._filePointers.get(e);if(this.isRemoteFile(t))t.abortUpload(),this.removeFromList(e);else if(this.urlDelete){const i=new te(null);this._filePointers.set(t.name,i),i.delete(t,this.urlDelete,null).then((()=>this.removeFromList(e))).catch((e=>this.showError(e)))}else this.removeFromList(e)}openFilesDialog(){this.enabled&&this._fileInput.click()}componentDidLoad(){this.enabled&&this._dropZone&&window.FileList&&window.File&&(this._dropZone.addEventListener("dragover",(e=>{e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",this._dropZone.style.background="#c2dbff"})),this._dropZone.addEventListener("drop",(e=>{e.stopPropagation(),e.preventDefault(),this.addFiles(Array.from(e.dataTransfer.files)),this._dropZone.style.background=""})),this._dropZone.addEventListener("dragleave",(()=>{this._dropZone.style.background=""})))}componentWillRender(){this.value&&this._filePointers.size<this.value.length&&this.updateFilePointers()}render(){return o("div",{ref:e=>this._dropZone=e,class:this.evalDisabledClass("iu","background--disabled")},o("div",{class:"iu__container",onClick:()=>this.openFilesDialog()},o("div",{class:"iu_header"},this.label?o("label",{class:this.evalDisabledClass("iu__label","text--disabled"),title:this.label},this.label):null,o("div",{class:this.evalDisabledClass("iu__icon-label","mouse-pointer--disabled")},o("button",{class:"iu__file-icon",disabled:!this.enabled}),o("div",{class:this.evalDisabledClass("text text--center text--medium text--primary","text--disabled")},this.enabled?"Arraste e solte ou clique para adicionar arquivos":"Somente leitura"))),this.buildFooter()),o("input",{ref:e=>this._fileInput=e,onChange:e=>this.onFileInputChange(e),type:"file",multiple:!0,class:"appearanceNone"}))}buildFooter(){if(0===this._filePointers.size)return null;const e=[];return this._filePointers.forEach((t=>e.push(this.buildFileItem(t)))),o("div",{class:"iu__footer"},e)}buildFileItem(e){const t=e.name,i=Number(e.progress),a=e.downloadURL,r=`${t} (${this.formatBytes(e.size)})`;return o("div",{class:"iu__item",key:t,onClick:e=>e.stopPropagation()},o("div",{class:"iu__item-label modificador"},o("div",{title:r,class:"col--stretch align--middle file__name text text--primary text--small text--ellipsis align--middle"},a?o("a",{href:a,download:!0},r):r)),isNaN(i)?null:o("div",{class:"col col--sd-4 col--stretch align--middle"},o("progress",{id:this.buildProgressId(e),value:i,max:"100"})),this.enabled?o("div",{class:"col col--stretch align--middle"},o("button",{class:"btn-cancel ",onClick:()=>this.removeFile(t)})):null)}evalDisabledClass(e,t){return this.enabled?e:`${e} ${t}`}get _host(){return r(this)}static get watchers(){return{value:["changeValue"],requestHeaders:["normalizeRequestHeaders"]}}};ie.style=':host{--ez-upload--height:42px;--ez-upload--width:100%;--ez-upload__icon--width:48px;--ez-upload__container--background-color:var(--background--medium, #d2dce9);--ez-upload__color--primary:var(--color--primary, #008561);--ez-upload--padding--extra-small:var(--space--extra-small, 3px);--ez-upload--padding--small:var(--space--small, 6px);--ez-upload--padding--medium:var(--space--medium, 12px);--ez-upload--padding--large:var(--space--large, 24px);--ez-upload__border--color:var(--color-strokes, #DCE0E8);--ez-upload--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-upload--text--primary:var(--text-primary, #626e82);--ez-upload--font-size:var(--text--medium, 14px);--ez-upload--font-family:var(--font-pattern, Arial);--ez-upload--font-weight:var(--text-weight--large, 500);--ez-upload__btn__cancel-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="8x" width="8px"><path d="M 8,0.8 7.2,0 4,3.2 0.8,0 0,0.8 3.2,4 0,7.2 0.8,8 4,4.8 7.2,8 8,7.2 4.8,4 Z"/></svg>\');--ez-upload__file-icon-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="11x" width="9px"><path d="M 1.2272719,8.4999999 V 2.75 c 0,-1.1045695 1.4652499,-2 3.2727273,-2 1.8074777,0 3.2727281,0.8954305 3.2727281,2 V 8.9999999 C 7.7727273,9.690356 6.8569456,10.25 5.7272719,10.25 4.5975985,10.25 3.6818174,9.690356 3.6818174,8.9999999 V 3.75 c 0,-0.2761425 0.3663125,-0.5 0.8181818,-0.5 0.4518694,0 0.8181818,0.2238575 0.8181818,0.5 V 8.4999999 H 6.5454537 V 3.75 C 6.5454537,3.059644 5.6296725,2.5 4.4999992,2.5 3.3703258,2.5 2.4545446,3.059644 2.4545446,3.75 V 8.9999999 C 2.4545446,10.10457 3.9197945,11 5.7272719,11 7.5347496,11 9,10.10457 9,8.9999999 V 2.75 C 9,1.231217 6.9852809,0 4.4999992,0 2.0147181,5e-7 0,1.231217 0,2.75 v 5.7499999 z"/></svg>\');display:flex;flex-wrap:wrap;position:relative;font-family:var(--ez-upload--font-family);font-size:var(--ez-upload--font-size);width:var(--ez-upload--width);font-weight:var(--ez-upload--font-weight)}.iu{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:var(--ez-upload--padding--small);width:100%;border-radius:12px;box-sizing:border-box}.iu__container{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;border:2px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.iu__footer{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%;padding:0 var(--ez-upload--padding--medium) var(--ez-upload--padding--medium) var(--ez-upload--padding--medium);box-sizing:border-box}.iu__item{display:flex;width:100%;justify-content:flex-start;align-items:center;align-self:center;padding-bottom:var(--ez-upload--padding--extra-small);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.iu__item-label{display:flex;max-width:80%;align-self:stretch;align-items:center}.file__name{font-weight:200}.box__content{width:100%;justify-content:center;align-items:center;height:100%;border:1px dashed var(--ez-upload__border--color);border-radius:6px;box-sizing:border-box}.box__container{display:flex;flex-wrap:wrap;background-color:var(--ez-upload__container--background-color);padding:6px;width:100%;border-radius:12px}a:-webkit-any-link{color:#008561;fill:#008561;cursor:pointer;text-decoration:none}progress[value]{display:flex;width:100%;appearance:none;border:1px solid var(--ez-upload__border--color);height:12px;justify-content:flex-start;align-items:center;border-radius:3px;position:relative}progress[value]::-webkit-progress-bar{display:flex;-webkit-appearance:none;width:100%;background-color:rgb(255, 255, 255);border-radius:2px;padding:2px}progress[value]::-webkit-progress-value{display:flex;width:100%;background-color:var(--ez-upload__color--primary)}.text--center{text-align:center}.align--middle{align-self:center;align-items:center}.text{font-family:"Sora", "Algerian";text-shadow:0 0 0 #353535, 0 0 1px transparent}.text--primary{color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text--medium{font-size:14px}.text--small{font-size:12px}.btn-cancel{outline:none;border:none;background-color:unset;cursor:pointer}.btn-cancel::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:8px;height:8px;-webkit-mask-image:var(--ez-upload__btn__cancel-image);mask-image:var(--ez-upload__btn__cancel-image)}.iu_header{display:flex;flex-direction:column;width:100%}.iu__label{padding:var(--space--small);box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-upload--font-family);font-size:var(--text--extra-small);font-weight:var(--ez-upload--font-weight);color:var(--ez-upload--text--primary);text-shadow:var(--ez-upload--text-shadow)}.iu__file-icon{outline:none;border:none;background-color:unset;cursor:pointer}.iu__file-icon:disabled{cursor:unset}.iu__file-icon::after{content:\'\';display:flex;background-color:var(--text--primary, #626e82);width:9px;height:11px;-webkit-mask-image:var(--ez-upload__file-icon-image);mask-image:var(--ez-upload__file-icon-image)}.iu__file-icon:disabled::after{background-color:var(--text--disable, #AFB6C0)}.iu__icon-label{justify-content:center;display:flex;cursor:pointer;padding:var(--ez-upload--padding--large) 0px;box-sizing:border-box}.background--disabled{background-color:var(--color--disable-secondary, #F2F5F8)}.text--disabled{color:var(--text--disable, #AFB6C0)}.mouse-pointer--disabled{cursor:unset}.appearanceNone{width:0px;height:0px}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';let oe=class{constructor(t){e(this,t)}componentWillLoad(){this.dataUnit=new d("testes_com_formulario"),this.dataUnit.metadata={name:"dd://br.com.sankhya.fin.cad.movimentacaoFinanceira/Financeiro",label:"Parceiro",fields:[{name:"CODPARC",label:"Parceiro",dataType:b.NUMBER,userInterface:n.SEARCH,required:!0,properties:{}},{name:"RECDESP",label:"Receita/Despesa",dataType:b.TEXT,userInterface:n.OPTIONSELECTOR,required:!0,properties:{options:'{"-1": "Despesa", "1": "Receita"}'}},{name:"P",label:"pera",dataType:b.TEXT,userInterface:n.OPTIONSELECTOR,properties:{options:'{"M": "Madura", "V": "Verde", "P": "Passada"}'}},{name:"ME",label:"ME",dataType:b.NUMBER,userInterface:n.DECIMALNUMBER,properties:{precision:4,prettyPrecision:1}}]},this.dataUnit.dataLoader=()=>new Promise((e=>e([{__record__id__:"1321321321321321",CODPARC:10,NOMEPARC:"Parceiro 10",P:"M",L:"Bagaço",LI:"Azedo"}])))}render(){return o("ez-form",{dataUnit:this.dataUnit})}};oe.style=":host{display:block}";export{f as ez_calendar,_ as ez_check,w as ez_collapsible_box,k as ez_combo_box,y as ez_date_input,C as ez_date_time_input,U as ez_form,W as ez_icon,J as ez_number_input,X as ez_search,G as ez_tabselector,Q as ez_text_area,Y as ez_text_input,ee as ez_time_input,ie as ez_upload,oe as test_du}