@ldmjs/ui 1.0.36 → 1.0.38
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.
- package/dist/css/index.css +1 -1
- package/dist/index.js +745 -713
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8622,31 +8622,31 @@ function ld_page_toolbar_reg(vue, options) {
|
|
|
8622
8622
|
}
|
|
8623
8623
|
/* harmony default export */ const src_ld_page_toolbar = (ld_page_toolbar_reg);
|
|
8624
8624
|
|
|
8625
|
-
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=
|
|
8625
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=2977fc13&scoped=true&ts=true
|
|
8626
8626
|
|
|
8627
|
-
const
|
|
8628
|
-
const
|
|
8627
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-2977fc13"), n = n(), _popScopeId(), n);
|
|
8628
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_1 = {
|
|
8629
8629
|
key: 0,
|
|
8630
8630
|
class: "w-full overflow-hidden",
|
|
8631
8631
|
style: { "border-radius": "var(--border-radius)" }
|
|
8632
8632
|
};
|
|
8633
|
-
const
|
|
8634
|
-
const
|
|
8635
|
-
const
|
|
8633
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_2 = { class: "w-full d-flex position-relative" };
|
|
8634
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
|
|
8635
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_4 = {
|
|
8636
8636
|
key: 0,
|
|
8637
8637
|
class: "d-flex align-center"
|
|
8638
8638
|
};
|
|
8639
|
-
const
|
|
8640
|
-
const
|
|
8639
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_5 = { class: "d-flex flex-column justify-center" };
|
|
8640
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_6 = {
|
|
8641
8641
|
key: 0,
|
|
8642
8642
|
class: "grey--text",
|
|
8643
8643
|
style: { "font-size": "var(--font-size--1)" }
|
|
8644
8644
|
};
|
|
8645
|
-
const
|
|
8645
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_7 = {
|
|
8646
8646
|
key: 1,
|
|
8647
8647
|
class: "select-list-box-loading"
|
|
8648
8648
|
};
|
|
8649
|
-
const
|
|
8649
|
+
const ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_8 = {
|
|
8650
8650
|
key: 1,
|
|
8651
8651
|
class: "w-full",
|
|
8652
8652
|
style: { "min-height": "var(--input-height)" }
|
|
@@ -8655,7 +8655,7 @@ const _hoisted_9 = {
|
|
|
8655
8655
|
key: 2,
|
|
8656
8656
|
class: "select-list-box-validate"
|
|
8657
8657
|
};
|
|
8658
|
-
function
|
|
8658
|
+
function ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8659
8659
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
8660
8660
|
const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
|
|
8661
8661
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
@@ -8682,8 +8682,8 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8682
8682
|
}, {
|
|
8683
8683
|
default: (0,external_vue_.withCtx)(() => [
|
|
8684
8684
|
(_ctx.multiselect || _ctx.selectedToArray.length === 0)
|
|
8685
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
8686
|
-
(0,external_vue_.createElementVNode)("div",
|
|
8685
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_1, [
|
|
8686
|
+
(0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_2, [
|
|
8687
8687
|
(0,external_vue_.createVNode)(_component_multiselect, {
|
|
8688
8688
|
ref: "multiselect",
|
|
8689
8689
|
modelValue: _ctx.selected,
|
|
@@ -8692,13 +8692,13 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8692
8692
|
_ctx.onInput
|
|
8693
8693
|
],
|
|
8694
8694
|
"track-by": "id",
|
|
8695
|
-
class:
|
|
8695
|
+
class: (0,external_vue_.normalizeClass)({ 'multiselect--with-right-button': !_ctx.isDialogDisabled }),
|
|
8696
8696
|
multiple: _ctx.multiselect,
|
|
8697
8697
|
placeholder: _ctx.placeholder,
|
|
8698
8698
|
"select-label": '',
|
|
8699
8699
|
options: _ctx.optionsList,
|
|
8700
8700
|
searchable: true,
|
|
8701
|
-
"internal-search": _ctx.
|
|
8701
|
+
"internal-search": _ctx.isInternalSearch,
|
|
8702
8702
|
"clear-on-select": true,
|
|
8703
8703
|
"close-on-select": !_ctx.multiselect,
|
|
8704
8704
|
"options-limit": 300,
|
|
@@ -8707,7 +8707,7 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8707
8707
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
8708
8708
|
limit: _ctx.limit,
|
|
8709
8709
|
tabindex: _ctx.tabIndex,
|
|
8710
|
-
|
|
8710
|
+
"allow-empty": _ctx.allowEmpty,
|
|
8711
8711
|
onClose: _ctx.dropdownClose,
|
|
8712
8712
|
onSearchChange: _ctx.getItems
|
|
8713
8713
|
}, {
|
|
@@ -8724,7 +8724,7 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8724
8724
|
"onClick:close": ($event) => (_ctx.onRemoveItem(option))
|
|
8725
8725
|
}, {
|
|
8726
8726
|
default: (0,external_vue_.withCtx)(() => [
|
|
8727
|
-
(0,external_vue_.createElementVNode)("span",
|
|
8727
|
+
(0,external_vue_.createElementVNode)("span", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
|
|
8728
8728
|
]),
|
|
8729
8729
|
_: 2
|
|
8730
8730
|
}, 1032, ["color", "closable", "onClick:close"]))
|
|
@@ -8752,7 +8752,7 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8752
8752
|
(0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center" }, {
|
|
8753
8753
|
default: (0,external_vue_.withCtx)(() => [
|
|
8754
8754
|
(_ctx.multiselect)
|
|
8755
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
8755
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_4, [
|
|
8756
8756
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
|
|
8757
8757
|
key: JSON.stringify(option),
|
|
8758
8758
|
"model-value": _ctx.checkedItems,
|
|
@@ -8767,13 +8767,13 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8767
8767
|
}, [
|
|
8768
8768
|
(0,external_vue_.renderSlot)(_ctx.$slots, "option-icon", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), undefined, true),
|
|
8769
8769
|
(0,external_vue_.createTextVNode)(),
|
|
8770
|
-
(0,external_vue_.createElementVNode)("div",
|
|
8770
|
+
(0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_5, [
|
|
8771
8771
|
(0,external_vue_.renderSlot)(_ctx.$slots, "option", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), () => [
|
|
8772
8772
|
(0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
|
|
8773
8773
|
], true),
|
|
8774
8774
|
(0,external_vue_.createTextVNode)(),
|
|
8775
8775
|
(_ctx.optionHint)
|
|
8776
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
8776
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_6, [
|
|
8777
8777
|
(0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), () => [
|
|
8778
8778
|
(0,external_vue_.createTextVNode)("\r\n no slot \"option-hint\" found\r\n ")
|
|
8779
8779
|
], true)
|
|
@@ -8792,9 +8792,9 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8792
8792
|
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
|
|
8793
8793
|
]),
|
|
8794
8794
|
_: 3
|
|
8795
|
-
}, 8, ["modelValue", "multiple", "placeholder", "options", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "
|
|
8795
|
+
}, 8, ["modelValue", "class", "multiple", "placeholder", "options", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allow-empty", "onClose", "onSearchChange", "onUpdate:modelValue"]),
|
|
8796
8796
|
(0,external_vue_.createTextVNode)(),
|
|
8797
|
-
(!_ctx.
|
|
8797
|
+
(!_ctx.isDialogDisabled)
|
|
8798
8798
|
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
8799
8799
|
key: 0,
|
|
8800
8800
|
variant: "outlined",
|
|
@@ -8819,14 +8819,14 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8819
8819
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
8820
8820
|
(0,external_vue_.createTextVNode)(),
|
|
8821
8821
|
(_ctx.loading)
|
|
8822
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
8822
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_7))
|
|
8823
8823
|
: (0,external_vue_.createCommentVNode)("", true)
|
|
8824
8824
|
])
|
|
8825
8825
|
]))
|
|
8826
8826
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
8827
8827
|
(0,external_vue_.createTextVNode)(),
|
|
8828
8828
|
(!_ctx.multiselect && _ctx.$utils.isDefined(_ctx.singleItem))
|
|
8829
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
8829
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_hoisted_8, [
|
|
8830
8830
|
(0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: _ctx.singleItem, onRemove: _ctx.onRemoveItem })), () => [
|
|
8831
8831
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
8832
8832
|
key: JSON.stringify(_ctx.selected),
|
|
@@ -8867,7 +8867,7 @@ function ld_select_list_boxvue_type_template_id_0b117ea1_scoped_true_ts_true_ren
|
|
|
8867
8867
|
}));
|
|
8868
8868
|
}
|
|
8869
8869
|
|
|
8870
|
-
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=
|
|
8870
|
+
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=2977fc13&scoped=true&ts=true
|
|
8871
8871
|
|
|
8872
8872
|
// EXTERNAL MODULE: external "./lib/multiselect.js"
|
|
8873
8873
|
var multiselect_js_ = __webpack_require__(5733);
|
|
@@ -11209,7 +11209,7 @@ var ld_select_list_boxvue_type_script_lang_ts_external_decorate = (undefined &&
|
|
|
11209
11209
|
var ld_select_list_boxvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
11210
11210
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
11211
11211
|
};
|
|
11212
|
-
var ld_select_list_boxvue_type_script_lang_ts_external_a;
|
|
11212
|
+
var ld_select_list_boxvue_type_script_lang_ts_external_a, ld_select_list_boxvue_type_script_lang_ts_external_b, ld_select_list_boxvue_type_script_lang_ts_external_c;
|
|
11213
11213
|
|
|
11214
11214
|
|
|
11215
11215
|
|
|
@@ -11298,7 +11298,7 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11298
11298
|
try {
|
|
11299
11299
|
this.loading = true;
|
|
11300
11300
|
if (this.handlers.fetchItem instanceof Function) {
|
|
11301
|
-
const selected = await this.
|
|
11301
|
+
const selected = await this.fetchItem(val);
|
|
11302
11302
|
this.selected = [...this.toArray(this.selected), ...selected];
|
|
11303
11303
|
this.onInput();
|
|
11304
11304
|
this.validate();
|
|
@@ -11308,6 +11308,11 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11308
11308
|
this.loading = false;
|
|
11309
11309
|
}
|
|
11310
11310
|
}
|
|
11311
|
+
async onRestrictedChanged(value) {
|
|
11312
|
+
if (this.isRestricted) {
|
|
11313
|
+
this.optionsList = await this.fetchItem(this.restricted);
|
|
11314
|
+
}
|
|
11315
|
+
}
|
|
11311
11316
|
created() {
|
|
11312
11317
|
this.messagesBucket = {
|
|
11313
11318
|
...this.messagesBucket,
|
|
@@ -11359,7 +11364,9 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11359
11364
|
dropdownClose() {
|
|
11360
11365
|
this.validate();
|
|
11361
11366
|
this.emitBlur(this.selectedToArray);
|
|
11362
|
-
this.
|
|
11367
|
+
if (!this.isRestricted) {
|
|
11368
|
+
this.optionsList = [];
|
|
11369
|
+
}
|
|
11363
11370
|
}
|
|
11364
11371
|
async onSelect() {
|
|
11365
11372
|
if (this.handlers.select instanceof Function) {
|
|
@@ -11431,6 +11438,11 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11431
11438
|
this.readedItems = await this.handlers.fetchData();
|
|
11432
11439
|
}
|
|
11433
11440
|
}
|
|
11441
|
+
async fetchItem(ids) {
|
|
11442
|
+
if (this.handlers.fetchItem instanceof Function && ids?.length > 0) {
|
|
11443
|
+
return this.handlers.fetchItem(ids);
|
|
11444
|
+
}
|
|
11445
|
+
}
|
|
11434
11446
|
get hasItems() {
|
|
11435
11447
|
return this.readedItems.length > 0;
|
|
11436
11448
|
}
|
|
@@ -11474,6 +11486,15 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11474
11486
|
}
|
|
11475
11487
|
return result;
|
|
11476
11488
|
}
|
|
11489
|
+
get isRestricted() {
|
|
11490
|
+
return this.restricted?.length > 0;
|
|
11491
|
+
}
|
|
11492
|
+
get isDialogDisabled() {
|
|
11493
|
+
return this.disableDialog || this.isRestricted;
|
|
11494
|
+
}
|
|
11495
|
+
get isInternalSearch() {
|
|
11496
|
+
return this.internalSearch || this.isRestricted;
|
|
11497
|
+
}
|
|
11477
11498
|
emitUpdate() {
|
|
11478
11499
|
this.emitUpdateValue();
|
|
11479
11500
|
this.emitUpdateItems();
|
|
@@ -11576,6 +11597,10 @@ ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
|
11576
11597
|
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: true }),
|
|
11577
11598
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Boolean)
|
|
11578
11599
|
], SelectListBoxComponent.prototype, "allowEmpty", void 0);
|
|
11600
|
+
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
11601
|
+
(0,external_vue_property_decorator_.Prop)({ type: Array, default: () => [] }),
|
|
11602
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", typeof (ld_select_list_boxvue_type_script_lang_ts_external_b = typeof Array !== "undefined" && Array) === "function" ? ld_select_list_boxvue_type_script_lang_ts_external_b : Object)
|
|
11603
|
+
], SelectListBoxComponent.prototype, "restricted", void 0);
|
|
11579
11604
|
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
11580
11605
|
(0,external_vue_property_decorator_.Prop)({ default: () => ({}) }),
|
|
11581
11606
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Object)
|
|
@@ -11620,6 +11645,12 @@ ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
|
11620
11645
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:paramtypes", [Object]),
|
|
11621
11646
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:returntype", Promise)
|
|
11622
11647
|
], SelectListBoxComponent.prototype, "onValueChanged", null);
|
|
11648
|
+
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
11649
|
+
(0,external_vue_property_decorator_.Watch)('restricted', { immediate: true }),
|
|
11650
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
11651
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:paramtypes", [typeof (ld_select_list_boxvue_type_script_lang_ts_external_c = typeof Array !== "undefined" && Array) === "function" ? ld_select_list_boxvue_type_script_lang_ts_external_c : Object]),
|
|
11652
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:returntype", Promise)
|
|
11653
|
+
], SelectListBoxComponent.prototype, "onRestrictedChanged", null);
|
|
11623
11654
|
SelectListBoxComponent = ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
11624
11655
|
(0,external_vue_property_decorator_.Options)({
|
|
11625
11656
|
components: {
|
|
@@ -11640,7 +11671,7 @@ SelectListBoxComponent = ld_select_list_boxvue_type_script_lang_ts_external_deco
|
|
|
11640
11671
|
;
|
|
11641
11672
|
|
|
11642
11673
|
|
|
11643
|
-
const ld_select_list_box_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_select_list_boxvue_type_script_lang_ts_external, [['render',
|
|
11674
|
+
const ld_select_list_box_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_select_list_boxvue_type_script_lang_ts_external, [['render',ld_select_list_boxvue_type_template_id_2977fc13_scoped_true_ts_true_render],['__scopeId',"data-v-2977fc13"]])
|
|
11644
11675
|
|
|
11645
11676
|
/* harmony default export */ const ld_select_list_box = (ld_select_list_box_exports_);
|
|
11646
11677
|
;// CONCATENATED MODULE: ./src/ld-select-list-box/index.ts
|
|
@@ -14188,346 +14219,459 @@ function ld_text_viewervue_type_template_id_26123e5c_scoped_true_render(_ctx, _c
|
|
|
14188
14219
|
}
|
|
14189
14220
|
;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.vue?vue&type=template&id=26123e5c&scoped=true
|
|
14190
14221
|
|
|
14191
|
-
;// CONCATENATED MODULE: ./
|
|
14192
|
-
|
|
14193
|
-
|
|
14194
|
-
|
|
14195
|
-
|
|
14196
|
-
|
|
14197
|
-
|
|
14198
|
-
|
|
14199
|
-
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
|
-
|
|
14205
|
-
|
|
14206
|
-
/**
|
|
14207
|
-
* @displayName ld-text-viewer
|
|
14208
|
-
*/
|
|
14209
|
-
let CardTextViewer = class CardTextViewer extends (0,external_vue_class_component_.mixins)(GridMixin) {
|
|
14210
|
-
hasSlotContent(slot, slotProps = {}) {
|
|
14211
|
-
if (!slot) {
|
|
14212
|
-
return false;
|
|
14222
|
+
;// CONCATENATED MODULE: ./src/utils/awaiting.ts
|
|
14223
|
+
async function awaiting(callback) {
|
|
14224
|
+
let resolveFunc = null;
|
|
14225
|
+
const counter = 0;
|
|
14226
|
+
let timer = null;
|
|
14227
|
+
const promise = new Promise(resolve => {
|
|
14228
|
+
resolveFunc = resolve;
|
|
14229
|
+
});
|
|
14230
|
+
timer = setInterval(() => {
|
|
14231
|
+
const a = callback();
|
|
14232
|
+
if (counter > 100 || Boolean(a)) {
|
|
14233
|
+
clearInterval(timer);
|
|
14234
|
+
resolveFunc(a ?? true);
|
|
14213
14235
|
}
|
|
14214
|
-
|
|
14215
|
-
|
|
14216
|
-
|
|
14236
|
+
}, 100);
|
|
14237
|
+
await promise;
|
|
14238
|
+
}
|
|
14239
|
+
|
|
14240
|
+
;// CONCATENATED MODULE: ./src/utils/base64.ts
|
|
14241
|
+
/* eslint-disable no-bitwise */
|
|
14242
|
+
class Base64Util {
|
|
14243
|
+
constructor() {
|
|
14244
|
+
this._keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
14245
|
+
}
|
|
14246
|
+
encode(input) {
|
|
14247
|
+
let output = '';
|
|
14248
|
+
let chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
|
14249
|
+
let i = 0;
|
|
14250
|
+
input = Base64Util._utf8_encode(input);
|
|
14251
|
+
while (i < input.length) {
|
|
14252
|
+
chr1 = input.charCodeAt(i++);
|
|
14253
|
+
chr2 = input.charCodeAt(i++);
|
|
14254
|
+
chr3 = input.charCodeAt(i++);
|
|
14255
|
+
enc1 = chr1 >> 2;
|
|
14256
|
+
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
|
14257
|
+
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
|
14258
|
+
enc4 = chr3 & 63;
|
|
14259
|
+
if (isNaN(chr2)) {
|
|
14260
|
+
enc3 = enc4 = 64;
|
|
14217
14261
|
}
|
|
14218
|
-
if (
|
|
14219
|
-
|
|
14262
|
+
else if (isNaN(chr3)) {
|
|
14263
|
+
enc4 = 64;
|
|
14220
14264
|
}
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
|
|
14265
|
+
output =
|
|
14266
|
+
output +
|
|
14267
|
+
this._keyStr.charAt(enc1) +
|
|
14268
|
+
this._keyStr.charAt(enc2) +
|
|
14269
|
+
this._keyStr.charAt(enc3) +
|
|
14270
|
+
this._keyStr.charAt(enc4);
|
|
14271
|
+
}
|
|
14272
|
+
return output;
|
|
14226
14273
|
}
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14274
|
+
decode(input) {
|
|
14275
|
+
let output = '';
|
|
14276
|
+
let chr1, chr2, chr3;
|
|
14277
|
+
let enc1, enc2, enc3, enc4;
|
|
14278
|
+
let i = 0;
|
|
14279
|
+
input = input.replace(/[^\d+/=A-Za-z]/g, '');
|
|
14280
|
+
while (i < input.length) {
|
|
14281
|
+
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
|
14282
|
+
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
|
14283
|
+
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
|
14284
|
+
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
|
14285
|
+
chr1 = (enc1 << 2) | (enc2 >> 4);
|
|
14286
|
+
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
|
14287
|
+
chr3 = ((enc3 & 3) << 6) | enc4;
|
|
14288
|
+
output = output + String.fromCharCode(chr1);
|
|
14289
|
+
if (enc3 !== 64) {
|
|
14290
|
+
output = output + String.fromCharCode(chr2);
|
|
14291
|
+
}
|
|
14292
|
+
if (enc4 !== 64) {
|
|
14293
|
+
output = output + String.fromCharCode(chr3);
|
|
14294
|
+
}
|
|
14230
14295
|
}
|
|
14231
|
-
|
|
14296
|
+
output = Base64Util._utf8_decode(output);
|
|
14297
|
+
return output;
|
|
14232
14298
|
}
|
|
14233
|
-
|
|
14234
|
-
|
|
14235
|
-
|
|
14299
|
+
static _utf8_encode(str) {
|
|
14300
|
+
str = str.replace(/\r\n/g, '\n');
|
|
14301
|
+
let utftext = '';
|
|
14302
|
+
for (let n = 0; n < str.length; n++) {
|
|
14303
|
+
const c = str.charCodeAt(n);
|
|
14304
|
+
if (c < 128) {
|
|
14305
|
+
utftext += String.fromCharCode(c);
|
|
14306
|
+
}
|
|
14307
|
+
else if (c > 127 && c < 2048) {
|
|
14308
|
+
utftext += String.fromCharCode((c >> 6) | 192);
|
|
14309
|
+
utftext += String.fromCharCode((c & 63) | 128);
|
|
14310
|
+
}
|
|
14311
|
+
else {
|
|
14312
|
+
utftext += String.fromCharCode((c >> 12) | 224);
|
|
14313
|
+
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
|
14314
|
+
utftext += String.fromCharCode((c & 63) | 128);
|
|
14315
|
+
}
|
|
14236
14316
|
}
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14317
|
+
return utftext;
|
|
14318
|
+
}
|
|
14319
|
+
static _utf8_decode(utftext) {
|
|
14320
|
+
let string = '';
|
|
14321
|
+
let i = 0;
|
|
14322
|
+
let c = 0;
|
|
14323
|
+
let c2 = 0;
|
|
14324
|
+
let c3 = 0;
|
|
14325
|
+
while (i < utftext.length) {
|
|
14326
|
+
c = utftext.charCodeAt(i);
|
|
14327
|
+
if (c < 128) {
|
|
14328
|
+
string += String.fromCharCode(c);
|
|
14329
|
+
i++;
|
|
14330
|
+
}
|
|
14331
|
+
else if (c > 191 && c < 224) {
|
|
14332
|
+
c2 = utftext.charCodeAt(i + 1);
|
|
14333
|
+
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
|
14334
|
+
i += 2;
|
|
14335
|
+
}
|
|
14336
|
+
else {
|
|
14337
|
+
c2 = utftext.charCodeAt(i + 1);
|
|
14338
|
+
c3 = utftext.charCodeAt(i + 2);
|
|
14339
|
+
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
|
14340
|
+
i += 3;
|
|
14242
14341
|
}
|
|
14243
|
-
return result;
|
|
14244
14342
|
}
|
|
14245
|
-
return
|
|
14343
|
+
return string;
|
|
14246
14344
|
}
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14345
|
+
isValid(value) {
|
|
14346
|
+
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
14347
|
+
const base64Regex = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/gim;
|
|
14348
|
+
return base64Regex.test(value);
|
|
14349
|
+
}
|
|
14350
|
+
}
|
|
14351
|
+
const base64 = new Base64Util();
|
|
14352
|
+
|
|
14353
|
+
|
|
14354
|
+
;// CONCATENATED MODULE: ./src/utils/cookie.ts
|
|
14355
|
+
class Cookie {
|
|
14356
|
+
get(key) {
|
|
14357
|
+
const _key = key.replace(/([$()*+./?[\\\]^{|}])/g, '\\$1');
|
|
14358
|
+
const matches = document.cookie.match(new RegExp('(?:^|; )' + _key + '=([^;]*)'));
|
|
14359
|
+
if (matches && matches[1] && matches[1].length) {
|
|
14360
|
+
return matches[1];
|
|
14250
14361
|
}
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14362
|
+
return null;
|
|
14363
|
+
}
|
|
14364
|
+
set(key, value, expires) {
|
|
14365
|
+
let time = 0;
|
|
14366
|
+
switch (expires) {
|
|
14367
|
+
case 'day':
|
|
14368
|
+
time = 1000 * 60 * 60 * 24;
|
|
14369
|
+
break;
|
|
14370
|
+
case 'month':
|
|
14371
|
+
time = 1000 * 60 * 60 * 24 * 30;
|
|
14372
|
+
break;
|
|
14254
14373
|
}
|
|
14255
|
-
|
|
14374
|
+
let exp = '';
|
|
14375
|
+
if (time) {
|
|
14376
|
+
time = Date.now() + time;
|
|
14377
|
+
exp = new Date(time).toUTCString();
|
|
14378
|
+
}
|
|
14379
|
+
document.cookie = key + '=' + value + '; path=/; expires=' + exp;
|
|
14256
14380
|
}
|
|
14257
|
-
|
|
14258
|
-
|
|
14381
|
+
delete(key) {
|
|
14382
|
+
document.cookie = key + '=; path=/; expires=-1';
|
|
14259
14383
|
}
|
|
14260
|
-
};
|
|
14261
|
-
ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14262
|
-
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
14263
|
-
ld_text_viewervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
14264
|
-
], CardTextViewer.prototype, "activeLinks", void 0);
|
|
14265
|
-
ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14266
|
-
(0,external_vue_property_decorator_.Prop)(),
|
|
14267
|
-
ld_text_viewervue_type_script_lang_js_external_metadata("design:type", String)
|
|
14268
|
-
], CardTextViewer.prototype, "text", void 0);
|
|
14269
|
-
ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14270
|
-
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
14271
|
-
ld_text_viewervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
14272
|
-
], CardTextViewer.prototype, "alignLabelToRight", void 0);
|
|
14273
|
-
CardTextViewer = ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14274
|
-
(0,external_vue_class_component_.Options)({
|
|
14275
|
-
components: {
|
|
14276
|
-
'ld-label': ld_label
|
|
14277
|
-
},
|
|
14278
|
-
})
|
|
14279
|
-
], CardTextViewer);
|
|
14280
|
-
/* harmony default export */ const ld_text_viewervue_type_script_lang_js_external = (CardTextViewer);
|
|
14281
|
-
|
|
14282
|
-
;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.ts?vue&type=script&lang=js&external
|
|
14283
|
-
|
|
14284
|
-
;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.vue
|
|
14285
|
-
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
|
-
|
|
14289
|
-
;
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
const ld_text_viewer_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_text_viewervue_type_script_lang_js_external, [['render',ld_text_viewervue_type_template_id_26123e5c_scoped_true_render],['__scopeId',"data-v-26123e5c"]])
|
|
14293
|
-
|
|
14294
|
-
/* harmony default export */ const ld_text_viewer = (ld_text_viewer_exports_);
|
|
14295
|
-
;// CONCATENATED MODULE: ./src/ld-text-viewer/index.ts
|
|
14296
|
-
|
|
14297
|
-
function ld_text_viewer_reg(vue, options) {
|
|
14298
|
-
vue.component(options.aliases['ld-text-viewer'], ld_text_viewer);
|
|
14299
14384
|
}
|
|
14300
|
-
|
|
14385
|
+
const cookie = new Cookie();
|
|
14386
|
+
|
|
14301
14387
|
|
|
14302
|
-
;// CONCATENATED MODULE: ./
|
|
14303
|
-
|
|
14304
|
-
|
|
14305
|
-
const
|
|
14306
|
-
|
|
14307
|
-
|
|
14308
|
-
|
|
14309
|
-
|
|
14310
|
-
}
|
|
14311
|
-
|
|
14312
|
-
function
|
|
14313
|
-
|
|
14314
|
-
|
|
14315
|
-
|
|
14316
|
-
|
|
14317
|
-
|
|
14318
|
-
|
|
14319
|
-
|
|
14320
|
-
|
|
14321
|
-
|
|
14322
|
-
|
|
14323
|
-
|
|
14324
|
-
|
|
14325
|
-
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14329
|
-
}, null, 8, ["class", "label", "required", "align-label-to-right"]))
|
|
14330
|
-
: (0,external_vue_.createCommentVNode)("", true),
|
|
14331
|
-
(0,external_vue_.createTextVNode)(),
|
|
14332
|
-
(0,external_vue_.createVNode)(_component_v_col, {
|
|
14333
|
-
class: (0,external_vue_.normalizeClass)(["d-flex flex-column", _ctx.inputSizeClasses])
|
|
14334
|
-
}, {
|
|
14335
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
14336
|
-
(0,external_vue_.createVNode)(_component_imask_input, {
|
|
14337
|
-
ref: "imask",
|
|
14338
|
-
radix: ",",
|
|
14339
|
-
value: _ctx.internalValue,
|
|
14340
|
-
"onUpdate:value": _cache[1] || (_cache[1] = $event => ((_ctx.internalValue) = $event)),
|
|
14341
|
-
mask: _ctx.mask,
|
|
14342
|
-
scale: _ctx.scale,
|
|
14343
|
-
"thousands-separator": _ctx.thousandsSeparator,
|
|
14344
|
-
signed: _ctx.signed,
|
|
14345
|
-
mapToRadix: _ctx.mapToRadix,
|
|
14346
|
-
placeholder: _ctx.placeholder,
|
|
14347
|
-
"onAccept:masked": _ctx.onInput,
|
|
14348
|
-
onBlur: _ctx.onBlur,
|
|
14349
|
-
onClick: _ctx.onClick
|
|
14350
|
-
}, {
|
|
14351
|
-
"append-inner": (0,external_vue_.withCtx)(() => [
|
|
14352
|
-
(_ctx.clearIcon && _ctx.text)
|
|
14353
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_ld_icon, {
|
|
14354
|
-
key: 0,
|
|
14355
|
-
color: "error",
|
|
14356
|
-
onClick: _cache[0] || (_cache[0] = $event => (_ctx.emitUpdateModelValue('')))
|
|
14357
|
-
}, {
|
|
14358
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
14359
|
-
(0,external_vue_.createTextVNode)("close")
|
|
14360
|
-
]),
|
|
14361
|
-
_: 1
|
|
14362
|
-
}))
|
|
14363
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
14364
|
-
]),
|
|
14365
|
-
_: 1
|
|
14366
|
-
}, 8, ["value", "mask", "scale", "thousands-separator", "signed", "mapToRadix", "placeholder", "onAccept:masked", "onBlur", "onClick"]),
|
|
14367
|
-
(0,external_vue_.createTextVNode)(),
|
|
14368
|
-
(!_ctx.hideDetails)
|
|
14369
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_hoisted_2, [
|
|
14370
|
-
(0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
|
|
14371
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
14372
|
-
(0,external_vue_.createElementVNode)("span", {
|
|
14373
|
-
style: {"line-height":"12px","font-size":"var(--font-size--1)"},
|
|
14374
|
-
class: (0,external_vue_.normalizeClass)({ 'error--text': _ctx.warningHint })
|
|
14375
|
-
}, (0,external_vue_.toDisplayString)(_ctx.validationMessage || _ctx.inputHint), 3)
|
|
14376
|
-
]),
|
|
14377
|
-
_: 1
|
|
14378
|
-
})
|
|
14379
|
-
]))
|
|
14380
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
14381
|
-
]),
|
|
14382
|
-
_: 1
|
|
14383
|
-
}, 8, ["class"])
|
|
14384
|
-
]),
|
|
14385
|
-
_: 1
|
|
14386
|
-
})
|
|
14387
|
-
]))
|
|
14388
|
-
}
|
|
14389
|
-
;// CONCATENATED MODULE: ./src/ld-edit-masked-text/ld-edit-masked-text.vue?vue&type=template&id=33aa4ec6&scoped=true
|
|
14390
|
-
|
|
14391
|
-
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-edit-masked-text/ld-edit-masked-text.ts?vue&type=script&lang=js&external
|
|
14392
|
-
var ld_edit_masked_textvue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14393
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14394
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14395
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14396
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14397
|
-
};
|
|
14398
|
-
var ld_edit_masked_textvue_type_script_lang_js_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
14399
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14400
|
-
};
|
|
14401
|
-
var ld_edit_masked_textvue_type_script_lang_js_external_a;
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
|
|
14407
|
-
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
let EditMaskedTextComponent = class EditMaskedTextComponent extends (0,external_vue_class_component_.mixins)(ValidatableMixin, GridMixin, InputMixin) {
|
|
14411
|
-
constructor() {
|
|
14412
|
-
super(...arguments);
|
|
14413
|
-
this.internalValue = '';
|
|
14414
|
-
}
|
|
14415
|
-
emitUpdateModelValue(value) {
|
|
14416
|
-
return value;
|
|
14388
|
+
;// CONCATENATED MODULE: ./src/utils/converting.ts
|
|
14389
|
+
function fileToArrayBuffer(src) {
|
|
14390
|
+
return new Promise(resolve => {
|
|
14391
|
+
const reader = new FileReader();
|
|
14392
|
+
reader.onloadend = function () {
|
|
14393
|
+
resolve(reader.result);
|
|
14394
|
+
};
|
|
14395
|
+
reader.readAsArrayBuffer(src);
|
|
14396
|
+
});
|
|
14397
|
+
}
|
|
14398
|
+
function fileToBase64(file) {
|
|
14399
|
+
return new Promise((resolve, reject) => {
|
|
14400
|
+
const reader = new FileReader();
|
|
14401
|
+
reader.readAsDataURL(file);
|
|
14402
|
+
reader.onload = () => {
|
|
14403
|
+
let fileStr = reader.result.toString();
|
|
14404
|
+
if (fileStr.includes(',')) {
|
|
14405
|
+
fileStr = fileStr.split(',')[1];
|
|
14406
|
+
}
|
|
14407
|
+
resolve(fileStr);
|
|
14408
|
+
};
|
|
14409
|
+
reader.onerror = error => reject(error);
|
|
14410
|
+
});
|
|
14411
|
+
}
|
|
14412
|
+
function base64ToUint8Array(base64) {
|
|
14413
|
+
if (!base64.trim()) {
|
|
14414
|
+
return null;
|
|
14417
14415
|
}
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
|
|
14416
|
+
const decrypted = window.atob(base64);
|
|
14417
|
+
let n = decrypted.length;
|
|
14418
|
+
const arr = new Uint8Array(n);
|
|
14419
|
+
while (n--) {
|
|
14420
|
+
arr[n] = decrypted.charCodeAt(n);
|
|
14421
14421
|
}
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
|
|
14422
|
+
return arr;
|
|
14423
|
+
}
|
|
14424
|
+
function Uint8ArrayToHex(bytes) {
|
|
14425
|
+
const hex = [];
|
|
14426
|
+
/* eslint-disable-next-line @typescript-eslint/prefer-for-of */
|
|
14427
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
14428
|
+
const current = bytes[i] < 0 ? bytes[i] + 256 : bytes[i];
|
|
14429
|
+
/* eslint-disable-next-line no-bitwise */
|
|
14430
|
+
hex.push((current >>> 4).toString(16));
|
|
14431
|
+
/* eslint-disable-next-line no-bitwise */
|
|
14432
|
+
hex.push((current & 0xf).toString(16));
|
|
14427
14433
|
}
|
|
14428
|
-
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14434
|
+
return hex.join('');
|
|
14435
|
+
}
|
|
14436
|
+
function hexToArrayBuffer(hex) {
|
|
14437
|
+
hex = hex.replace(/^0x/, '');
|
|
14438
|
+
if (hex.length % 2 != 0) {
|
|
14439
|
+
// console.log('WARNING: expecting an even number of characters in the hexString');
|
|
14432
14440
|
}
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
}
|
|
14441
|
+
const bad = hex.match(/[\sg-z]/i);
|
|
14442
|
+
if (bad) {
|
|
14443
|
+
// console.log('WARNING: found non-hex characters', bad);
|
|
14437
14444
|
}
|
|
14438
|
-
|
|
14439
|
-
|
|
14445
|
+
const pairs = hex.match(/[\da-f]{2}/gi);
|
|
14446
|
+
const result = [];
|
|
14447
|
+
for (const s of pairs) {
|
|
14448
|
+
result.push(parseInt(s, 16));
|
|
14440
14449
|
}
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14450
|
+
return result;
|
|
14451
|
+
}
|
|
14452
|
+
function uint8ArrayToBase64(value) {
|
|
14453
|
+
const bin = value.reduce((acc, i) => (acc += String.fromCharCode.apply(null, [i])), '');
|
|
14454
|
+
return window.btoa(bin);
|
|
14455
|
+
}
|
|
14456
|
+
function arrayBufferToUint8Array(value) {
|
|
14457
|
+
return new Uint8Array(value);
|
|
14458
|
+
}
|
|
14459
|
+
|
|
14460
|
+
|
|
14461
|
+
;// CONCATENATED MODULE: ./src/utils/deepValueGetter.ts
|
|
14462
|
+
/**
|
|
14463
|
+
* Returns a deep object given a string. zoo['animal.type']
|
|
14464
|
+
* @param {object} obj
|
|
14465
|
+
* @param {string} path
|
|
14466
|
+
*/
|
|
14467
|
+
function deepValueGetter(obj, path) {
|
|
14468
|
+
if (obj === null) {
|
|
14469
|
+
return '';
|
|
14444
14470
|
}
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
this.validationMessage = '';
|
|
14448
|
-
if (typeof this.mask === 'string' &&
|
|
14449
|
-
/[ ()-]/.test(this.internalValue) &&
|
|
14450
|
-
this.internalValue.length > 0 &&
|
|
14451
|
-
this.mask.replace(/[ ()-]/g, '').length > this.internalValue.length) {
|
|
14452
|
-
this.validationMessage = 'Недостаточное количество символов';
|
|
14453
|
-
return !this.validationMessage;
|
|
14454
|
-
}
|
|
14455
|
-
this.validRules.forEach(func => {
|
|
14456
|
-
funcResult = func(this.modelValue);
|
|
14457
|
-
if (funcResult !== true) {
|
|
14458
|
-
this.validationMessage = funcResult;
|
|
14459
|
-
}
|
|
14460
|
-
});
|
|
14461
|
-
return !this.validationMessage;
|
|
14471
|
+
if (!obj || !path) {
|
|
14472
|
+
return obj;
|
|
14462
14473
|
}
|
|
14463
|
-
|
|
14464
|
-
|
|
14474
|
+
const value = obj[path];
|
|
14475
|
+
// eslint-disable-next-line no-undefined
|
|
14476
|
+
if (value !== undefined) {
|
|
14477
|
+
return value;
|
|
14465
14478
|
}
|
|
14466
|
-
|
|
14467
|
-
|
|
14479
|
+
let current = obj;
|
|
14480
|
+
const split = path.split('.');
|
|
14481
|
+
if (split.length) {
|
|
14482
|
+
for (const key of split) {
|
|
14483
|
+
current = current[key];
|
|
14484
|
+
// if found undefined, return empty string
|
|
14485
|
+
// eslint-disable-next-line no-undefined
|
|
14486
|
+
if (current === undefined || current === null) {
|
|
14487
|
+
return '';
|
|
14488
|
+
}
|
|
14489
|
+
}
|
|
14468
14490
|
}
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
(
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
(
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
(
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14491
|
+
return current;
|
|
14492
|
+
}
|
|
14493
|
+
|
|
14494
|
+
;// CONCATENATED MODULE: ./src/utils/delay.ts
|
|
14495
|
+
async function delay(timeout) {
|
|
14496
|
+
return new Promise(resolve => setTimeout(() => resolve(), timeout));
|
|
14497
|
+
}
|
|
14498
|
+
|
|
14499
|
+
;// CONCATENATED MODULE: ./src/utils/isObjectEmpty.ts
|
|
14500
|
+
function isObjectEmpty(obj) {
|
|
14501
|
+
for (const _i in obj) {
|
|
14502
|
+
return false;
|
|
14503
|
+
}
|
|
14504
|
+
return true;
|
|
14505
|
+
}
|
|
14506
|
+
|
|
14507
|
+
;// CONCATENATED MODULE: ./src/utils/pluralizeNoun.ts
|
|
14508
|
+
function pluralizeNoun(num, one, two, five, printNum = true) {
|
|
14509
|
+
if (!num) {
|
|
14510
|
+
return '';
|
|
14511
|
+
}
|
|
14512
|
+
let n;
|
|
14513
|
+
if (typeof num === 'string') {
|
|
14514
|
+
n = Number(num.match(/\d+\.?\d*/g));
|
|
14515
|
+
}
|
|
14516
|
+
else {
|
|
14517
|
+
n = Math.abs(num);
|
|
14518
|
+
}
|
|
14519
|
+
n %= 100;
|
|
14520
|
+
if (n >= 5 && n <= 20) {
|
|
14521
|
+
return printNum ? `${num} ${five}` : `${five}`;
|
|
14522
|
+
}
|
|
14523
|
+
n %= 10;
|
|
14524
|
+
if (n === 1) {
|
|
14525
|
+
return printNum ? `${num} ${one}` : `${one}`;
|
|
14526
|
+
}
|
|
14527
|
+
if (n >= 2 && n <= 4) {
|
|
14528
|
+
return printNum ? `${num} ${two}` : `${two}`;
|
|
14529
|
+
}
|
|
14530
|
+
return printNum ? `${num} ${five}` : `${five}`;
|
|
14531
|
+
}
|
|
14532
|
+
|
|
14533
|
+
;// CONCATENATED MODULE: ./src/utils/strings.ts
|
|
14534
|
+
class Strings {
|
|
14535
|
+
camelCase(str) {
|
|
14536
|
+
// Replace special characters with a space
|
|
14537
|
+
str = str.replace(/[^\d A-Za-z]/g, ' ');
|
|
14538
|
+
// put a space before an uppercase letter
|
|
14539
|
+
str = str.replace(/([a-z](?=[A-Z]))/g, '$1 ');
|
|
14540
|
+
// Lower case first character and some other stuff
|
|
14541
|
+
str = str
|
|
14542
|
+
.replace(/([^\d A-Za-z])|^\d+/g, '')
|
|
14543
|
+
.trim()
|
|
14544
|
+
.toLowerCase();
|
|
14545
|
+
// uppercase characters preceded by a space or number
|
|
14546
|
+
str = str.replace(/([\d ]+)([A-Za-z])/g, (a, b, c) => b.trim() + c.toUpperCase());
|
|
14547
|
+
return str;
|
|
14548
|
+
}
|
|
14549
|
+
capitalize(str) {
|
|
14550
|
+
if (!str) {
|
|
14551
|
+
return str;
|
|
14552
|
+
}
|
|
14553
|
+
const first = str[0];
|
|
14554
|
+
const other = str.substring(1);
|
|
14555
|
+
return `${first.toUpperCase()}${other}`;
|
|
14556
|
+
}
|
|
14557
|
+
}
|
|
14558
|
+
const strings = new Strings();
|
|
14559
|
+
|
|
14560
|
+
|
|
14561
|
+
;// CONCATENATED MODULE: ./src/utils/urlRegexp.ts
|
|
14562
|
+
const urlRegexp =
|
|
14563
|
+
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
14564
|
+
/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
14565
|
+
|
|
14566
|
+
;// CONCATENATED MODULE: ./src/utils/index.ts
|
|
14567
|
+
|
|
14568
|
+
|
|
14569
|
+
|
|
14570
|
+
|
|
14571
|
+
|
|
14572
|
+
|
|
14573
|
+
|
|
14574
|
+
|
|
14575
|
+
|
|
14576
|
+
|
|
14577
|
+
|
|
14578
|
+
|
|
14579
|
+
|
|
14580
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-text-viewer/ld-text-viewer.ts?vue&type=script&lang=js&external
|
|
14581
|
+
var ld_text_viewervue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14582
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14583
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14584
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14585
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14586
|
+
};
|
|
14587
|
+
var ld_text_viewervue_type_script_lang_js_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
14588
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14589
|
+
};
|
|
14590
|
+
|
|
14591
|
+
|
|
14592
|
+
|
|
14593
|
+
|
|
14594
|
+
|
|
14595
|
+
|
|
14596
|
+
/**
|
|
14597
|
+
* @displayName ld-text-viewer
|
|
14598
|
+
*/
|
|
14599
|
+
let CardTextViewer = class CardTextViewer extends (0,external_vue_class_component_.mixins)(GridMixin) {
|
|
14600
|
+
hasSlotContent(slot, slotProps = {}) {
|
|
14601
|
+
if (!slot) {
|
|
14602
|
+
return false;
|
|
14603
|
+
}
|
|
14604
|
+
return slot(slotProps).some((vnode) => {
|
|
14605
|
+
if (vnode.type === external_vue_.Comment) {
|
|
14606
|
+
return false;
|
|
14607
|
+
}
|
|
14608
|
+
if (Array.isArray(vnode.children) && !vnode.children.length) {
|
|
14609
|
+
return false;
|
|
14610
|
+
}
|
|
14611
|
+
return vnode.type !== external_vue_.Text || (typeof vnode.children === 'string' && vnode.children.trim() !== '');
|
|
14612
|
+
});
|
|
14613
|
+
}
|
|
14614
|
+
get hasSlot() {
|
|
14615
|
+
return this.hasSlotContent(this.$slots.default);
|
|
14616
|
+
}
|
|
14617
|
+
get isTextSlotOnly() {
|
|
14618
|
+
if (this.hasSlot) {
|
|
14619
|
+
return this.$slots.default().every((vnode) => typeof vnode.children === 'string');
|
|
14620
|
+
}
|
|
14621
|
+
return false;
|
|
14622
|
+
}
|
|
14623
|
+
get src() {
|
|
14624
|
+
if (this.text) {
|
|
14625
|
+
return String(this.text).replace(/\n/g, '<br>');
|
|
14626
|
+
}
|
|
14627
|
+
if (this.hasSlot && this.isTextSlotOnly) {
|
|
14628
|
+
const slots = this.$slots.default();
|
|
14629
|
+
let result = '';
|
|
14630
|
+
for (const s of slots) {
|
|
14631
|
+
result += s.children.trim();
|
|
14632
|
+
}
|
|
14633
|
+
return result;
|
|
14634
|
+
}
|
|
14635
|
+
return '';
|
|
14636
|
+
}
|
|
14637
|
+
get textWithHyperlinks() {
|
|
14638
|
+
if (!this.src) {
|
|
14639
|
+
return;
|
|
14640
|
+
}
|
|
14641
|
+
if (this.activeLinks) {
|
|
14642
|
+
const globalUrlRegExp = new RegExp(urlRegexp, 'ig');
|
|
14643
|
+
return this.src.replace(globalUrlRegExp, '<a href="$1" target="_blank">$1</a>');
|
|
14644
|
+
}
|
|
14645
|
+
return this.src;
|
|
14646
|
+
}
|
|
14647
|
+
get showPlaceholder() {
|
|
14648
|
+
return !this.src && !this.hasSlot;
|
|
14649
|
+
}
|
|
14650
|
+
};
|
|
14651
|
+
ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14652
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
14653
|
+
ld_text_viewervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
14654
|
+
], CardTextViewer.prototype, "activeLinks", void 0);
|
|
14655
|
+
ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14499
14656
|
(0,external_vue_property_decorator_.Prop)(),
|
|
14500
|
-
|
|
14501
|
-
],
|
|
14502
|
-
|
|
14503
|
-
(0,external_vue_property_decorator_.
|
|
14504
|
-
|
|
14505
|
-
],
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
14509
|
-
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:paramtypes", [String]),
|
|
14510
|
-
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
14511
|
-
], EditMaskedTextComponent.prototype, "emitUpdateModelValue", null);
|
|
14512
|
-
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14513
|
-
(0,external_vue_property_decorator_.Watch)('modelValue'),
|
|
14514
|
-
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
14515
|
-
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
14516
|
-
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
14517
|
-
], EditMaskedTextComponent.prototype, "onTextChanged", null);
|
|
14518
|
-
EditMaskedTextComponent = ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14519
|
-
(0,external_vue_property_decorator_.Options)({
|
|
14657
|
+
ld_text_viewervue_type_script_lang_js_external_metadata("design:type", Object)
|
|
14658
|
+
], CardTextViewer.prototype, "text", void 0);
|
|
14659
|
+
ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14660
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
14661
|
+
ld_text_viewervue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
14662
|
+
], CardTextViewer.prototype, "alignLabelToRight", void 0);
|
|
14663
|
+
CardTextViewer = ld_text_viewervue_type_script_lang_js_external_decorate([
|
|
14664
|
+
(0,external_vue_class_component_.Options)({
|
|
14520
14665
|
components: {
|
|
14521
|
-
'ld-label': ld_label
|
|
14522
|
-
'imask-input': imask_js_.IMaskComponent,
|
|
14666
|
+
'ld-label': ld_label
|
|
14523
14667
|
},
|
|
14524
14668
|
})
|
|
14525
|
-
],
|
|
14526
|
-
/* harmony default export */ const
|
|
14669
|
+
], CardTextViewer);
|
|
14670
|
+
/* harmony default export */ const ld_text_viewervue_type_script_lang_js_external = (CardTextViewer);
|
|
14527
14671
|
|
|
14528
|
-
;// CONCATENATED MODULE: ./src/ld-
|
|
14672
|
+
;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.ts?vue&type=script&lang=js&external
|
|
14529
14673
|
|
|
14530
|
-
;// CONCATENATED MODULE: ./src/ld-
|
|
14674
|
+
;// CONCATENATED MODULE: ./src/ld-text-viewer/ld-text-viewer.vue
|
|
14531
14675
|
|
|
14532
14676
|
|
|
14533
14677
|
|
|
@@ -14535,33 +14679,279 @@ EditMaskedTextComponent = ld_edit_masked_textvue_type_script_lang_js_external_de
|
|
|
14535
14679
|
;
|
|
14536
14680
|
|
|
14537
14681
|
|
|
14538
|
-
const
|
|
14682
|
+
const ld_text_viewer_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_text_viewervue_type_script_lang_js_external, [['render',ld_text_viewervue_type_template_id_26123e5c_scoped_true_render],['__scopeId',"data-v-26123e5c"]])
|
|
14539
14683
|
|
|
14540
|
-
/* harmony default export */ const
|
|
14541
|
-
;// CONCATENATED MODULE: ./src/ld-
|
|
14684
|
+
/* harmony default export */ const ld_text_viewer = (ld_text_viewer_exports_);
|
|
14685
|
+
;// CONCATENATED MODULE: ./src/ld-text-viewer/index.ts
|
|
14542
14686
|
|
|
14543
|
-
function
|
|
14544
|
-
vue.component(options.aliases['ld-
|
|
14687
|
+
function ld_text_viewer_reg(vue, options) {
|
|
14688
|
+
vue.component(options.aliases['ld-text-viewer'], ld_text_viewer);
|
|
14545
14689
|
}
|
|
14546
|
-
/* harmony default export */ const
|
|
14690
|
+
/* harmony default export */ const src_ld_text_viewer = (ld_text_viewer_reg);
|
|
14547
14691
|
|
|
14548
|
-
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-text
|
|
14692
|
+
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-edit-masked-text/ld-edit-masked-text.vue?vue&type=template&id=33aa4ec6&scoped=true
|
|
14549
14693
|
|
|
14550
14694
|
|
|
14551
|
-
const
|
|
14552
|
-
const
|
|
14553
|
-
const
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
class: "content editorbox",
|
|
14557
|
-
style: {"visibility":"hidden"},
|
|
14558
|
-
id: "editorbox"
|
|
14695
|
+
const ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_withScopeId = n => (_pushScopeId("data-v-33aa4ec6"),n=n(),_popScopeId(),n)
|
|
14696
|
+
const ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_hoisted_1 = { class: "ld-edit-masked-text" }
|
|
14697
|
+
const ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_hoisted_2 = {
|
|
14698
|
+
key: 0,
|
|
14699
|
+
class: "ld-edit-masked-text-validate"
|
|
14559
14700
|
}
|
|
14560
14701
|
|
|
14561
|
-
function
|
|
14702
|
+
function ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14562
14703
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label")
|
|
14563
|
-
const
|
|
14564
|
-
const
|
|
14704
|
+
const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon")
|
|
14705
|
+
const _component_imask_input = (0,external_vue_.resolveComponent)("imask-input")
|
|
14706
|
+
const _component_v_col = (0,external_vue_.resolveComponent)("v-col")
|
|
14707
|
+
const _component_v_row = (0,external_vue_.resolveComponent)("v-row")
|
|
14708
|
+
|
|
14709
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_hoisted_1, [
|
|
14710
|
+
(0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
|
|
14711
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14712
|
+
(_ctx.label)
|
|
14713
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_ld_label, {
|
|
14714
|
+
key: 0,
|
|
14715
|
+
class: (0,external_vue_.normalizeClass)([_ctx.labelSizeClasses]),
|
|
14716
|
+
label: _ctx.label,
|
|
14717
|
+
required: _ctx.required,
|
|
14718
|
+
"align-label-to-right": _ctx.alignLabelToRight
|
|
14719
|
+
}, null, 8, ["class", "label", "required", "align-label-to-right"]))
|
|
14720
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
14721
|
+
(0,external_vue_.createTextVNode)(),
|
|
14722
|
+
(0,external_vue_.createVNode)(_component_v_col, {
|
|
14723
|
+
class: (0,external_vue_.normalizeClass)(["d-flex flex-column", _ctx.inputSizeClasses])
|
|
14724
|
+
}, {
|
|
14725
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14726
|
+
(0,external_vue_.createVNode)(_component_imask_input, {
|
|
14727
|
+
ref: "imask",
|
|
14728
|
+
radix: ",",
|
|
14729
|
+
value: _ctx.internalValue,
|
|
14730
|
+
"onUpdate:value": _cache[1] || (_cache[1] = $event => ((_ctx.internalValue) = $event)),
|
|
14731
|
+
mask: _ctx.mask,
|
|
14732
|
+
scale: _ctx.scale,
|
|
14733
|
+
"thousands-separator": _ctx.thousandsSeparator,
|
|
14734
|
+
signed: _ctx.signed,
|
|
14735
|
+
mapToRadix: _ctx.mapToRadix,
|
|
14736
|
+
placeholder: _ctx.placeholder,
|
|
14737
|
+
"onAccept:masked": _ctx.onInput,
|
|
14738
|
+
onBlur: _ctx.onBlur,
|
|
14739
|
+
onClick: _ctx.onClick
|
|
14740
|
+
}, {
|
|
14741
|
+
"append-inner": (0,external_vue_.withCtx)(() => [
|
|
14742
|
+
(_ctx.clearIcon && _ctx.text)
|
|
14743
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_ld_icon, {
|
|
14744
|
+
key: 0,
|
|
14745
|
+
color: "error",
|
|
14746
|
+
onClick: _cache[0] || (_cache[0] = $event => (_ctx.emitUpdateModelValue('')))
|
|
14747
|
+
}, {
|
|
14748
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14749
|
+
(0,external_vue_.createTextVNode)("close")
|
|
14750
|
+
]),
|
|
14751
|
+
_: 1
|
|
14752
|
+
}))
|
|
14753
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
14754
|
+
]),
|
|
14755
|
+
_: 1
|
|
14756
|
+
}, 8, ["value", "mask", "scale", "thousands-separator", "signed", "mapToRadix", "placeholder", "onAccept:masked", "onBlur", "onClick"]),
|
|
14757
|
+
(0,external_vue_.createTextVNode)(),
|
|
14758
|
+
(!_ctx.hideDetails)
|
|
14759
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_hoisted_2, [
|
|
14760
|
+
(0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
|
|
14761
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14762
|
+
(0,external_vue_.createElementVNode)("span", {
|
|
14763
|
+
style: {"line-height":"12px","font-size":"var(--font-size--1)"},
|
|
14764
|
+
class: (0,external_vue_.normalizeClass)({ 'error--text': _ctx.warningHint })
|
|
14765
|
+
}, (0,external_vue_.toDisplayString)(_ctx.validationMessage || _ctx.inputHint), 3)
|
|
14766
|
+
]),
|
|
14767
|
+
_: 1
|
|
14768
|
+
})
|
|
14769
|
+
]))
|
|
14770
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
14771
|
+
]),
|
|
14772
|
+
_: 1
|
|
14773
|
+
}, 8, ["class"])
|
|
14774
|
+
]),
|
|
14775
|
+
_: 1
|
|
14776
|
+
})
|
|
14777
|
+
]))
|
|
14778
|
+
}
|
|
14779
|
+
;// CONCATENATED MODULE: ./src/ld-edit-masked-text/ld-edit-masked-text.vue?vue&type=template&id=33aa4ec6&scoped=true
|
|
14780
|
+
|
|
14781
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-edit-masked-text/ld-edit-masked-text.ts?vue&type=script&lang=js&external
|
|
14782
|
+
var ld_edit_masked_textvue_type_script_lang_js_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14783
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
14784
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
14785
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
14786
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
14787
|
+
};
|
|
14788
|
+
var ld_edit_masked_textvue_type_script_lang_js_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
14789
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
14790
|
+
};
|
|
14791
|
+
var ld_edit_masked_textvue_type_script_lang_js_external_a;
|
|
14792
|
+
|
|
14793
|
+
|
|
14794
|
+
|
|
14795
|
+
|
|
14796
|
+
|
|
14797
|
+
|
|
14798
|
+
|
|
14799
|
+
|
|
14800
|
+
let EditMaskedTextComponent = class EditMaskedTextComponent extends (0,external_vue_class_component_.mixins)(ValidatableMixin, GridMixin, InputMixin) {
|
|
14801
|
+
constructor() {
|
|
14802
|
+
super(...arguments);
|
|
14803
|
+
this.internalValue = '';
|
|
14804
|
+
}
|
|
14805
|
+
emitUpdateModelValue(value) {
|
|
14806
|
+
return value;
|
|
14807
|
+
}
|
|
14808
|
+
onTextChanged() {
|
|
14809
|
+
this.internalValue = this.modelValue ? String(this.modelValue) : '';
|
|
14810
|
+
this.validate();
|
|
14811
|
+
}
|
|
14812
|
+
created() {
|
|
14813
|
+
this.internalValue = this.modelValue ? String(this.modelValue) : '';
|
|
14814
|
+
if (this.form) {
|
|
14815
|
+
this.form.register(this, null);
|
|
14816
|
+
}
|
|
14817
|
+
}
|
|
14818
|
+
unmounted() {
|
|
14819
|
+
if (this.form) {
|
|
14820
|
+
this.form.unregister(this, null);
|
|
14821
|
+
}
|
|
14822
|
+
}
|
|
14823
|
+
onBlur() {
|
|
14824
|
+
if (this.validateOnBlur) {
|
|
14825
|
+
this.validate();
|
|
14826
|
+
}
|
|
14827
|
+
}
|
|
14828
|
+
onClick() {
|
|
14829
|
+
this.validationMessage = '';
|
|
14830
|
+
}
|
|
14831
|
+
onInput(e) {
|
|
14832
|
+
const emitData = e?.length ? e?.replace(/\s|(-)/g, '') : null;
|
|
14833
|
+
this.emitUpdateModelValue(emitData);
|
|
14834
|
+
}
|
|
14835
|
+
validate() {
|
|
14836
|
+
let funcResult = null;
|
|
14837
|
+
this.validationMessage = '';
|
|
14838
|
+
if (typeof this.mask === 'string' &&
|
|
14839
|
+
/[ ()-]/.test(this.internalValue) &&
|
|
14840
|
+
this.internalValue.length > 0 &&
|
|
14841
|
+
this.mask.replace(/[ ()-]/g, '').length > this.internalValue.length) {
|
|
14842
|
+
this.validationMessage = 'Недостаточное количество символов';
|
|
14843
|
+
return !this.validationMessage;
|
|
14844
|
+
}
|
|
14845
|
+
this.validRules.forEach(func => {
|
|
14846
|
+
funcResult = func(this.modelValue);
|
|
14847
|
+
if (funcResult !== true) {
|
|
14848
|
+
this.validationMessage = funcResult;
|
|
14849
|
+
}
|
|
14850
|
+
});
|
|
14851
|
+
return !this.validationMessage;
|
|
14852
|
+
}
|
|
14853
|
+
get showError() {
|
|
14854
|
+
return Boolean(this.validationMessage);
|
|
14855
|
+
}
|
|
14856
|
+
get warningHint() {
|
|
14857
|
+
return Boolean(this.validationMessage);
|
|
14858
|
+
}
|
|
14859
|
+
};
|
|
14860
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14861
|
+
(0,external_vue_property_decorator_.Prop)({ default: '' }),
|
|
14862
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Object)
|
|
14863
|
+
], EditMaskedTextComponent.prototype, "modelValue", void 0);
|
|
14864
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14865
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
14866
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Object)
|
|
14867
|
+
], EditMaskedTextComponent.prototype, "mask", void 0);
|
|
14868
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14869
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
14870
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Number)
|
|
14871
|
+
], EditMaskedTextComponent.prototype, "scale", void 0);
|
|
14872
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14873
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
14874
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", String)
|
|
14875
|
+
], EditMaskedTextComponent.prototype, "thousandsSeparator", void 0);
|
|
14876
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14877
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
14878
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
14879
|
+
], EditMaskedTextComponent.prototype, "signed", void 0);
|
|
14880
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14881
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
14882
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", typeof (ld_edit_masked_textvue_type_script_lang_js_external_a = typeof Array !== "undefined" && Array) === "function" ? ld_edit_masked_textvue_type_script_lang_js_external_a : Object)
|
|
14883
|
+
], EditMaskedTextComponent.prototype, "mapToRadix", void 0);
|
|
14884
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14885
|
+
(0,external_vue_property_decorator_.Prop)({ default: false, type: Boolean }),
|
|
14886
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Boolean)
|
|
14887
|
+
], EditMaskedTextComponent.prototype, "clearIcon", void 0);
|
|
14888
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14889
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
14890
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", String)
|
|
14891
|
+
], EditMaskedTextComponent.prototype, "inputHint", void 0);
|
|
14892
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14893
|
+
(0,external_vue_property_decorator_.Inject)({ from: 'form', default: null }),
|
|
14894
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Object)
|
|
14895
|
+
], EditMaskedTextComponent.prototype, "form", void 0);
|
|
14896
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14897
|
+
Emit('update:model-value'),
|
|
14898
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
14899
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:paramtypes", [String]),
|
|
14900
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
14901
|
+
], EditMaskedTextComponent.prototype, "emitUpdateModelValue", null);
|
|
14902
|
+
ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14903
|
+
(0,external_vue_property_decorator_.Watch)('modelValue'),
|
|
14904
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:type", Function),
|
|
14905
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:paramtypes", []),
|
|
14906
|
+
ld_edit_masked_textvue_type_script_lang_js_external_metadata("design:returntype", void 0)
|
|
14907
|
+
], EditMaskedTextComponent.prototype, "onTextChanged", null);
|
|
14908
|
+
EditMaskedTextComponent = ld_edit_masked_textvue_type_script_lang_js_external_decorate([
|
|
14909
|
+
(0,external_vue_property_decorator_.Options)({
|
|
14910
|
+
components: {
|
|
14911
|
+
'ld-label': ld_label,
|
|
14912
|
+
'imask-input': imask_js_.IMaskComponent,
|
|
14913
|
+
},
|
|
14914
|
+
})
|
|
14915
|
+
], EditMaskedTextComponent);
|
|
14916
|
+
/* harmony default export */ const ld_edit_masked_textvue_type_script_lang_js_external = (EditMaskedTextComponent);
|
|
14917
|
+
|
|
14918
|
+
;// CONCATENATED MODULE: ./src/ld-edit-masked-text/ld-edit-masked-text.ts?vue&type=script&lang=js&external
|
|
14919
|
+
|
|
14920
|
+
;// CONCATENATED MODULE: ./src/ld-edit-masked-text/ld-edit-masked-text.vue
|
|
14921
|
+
|
|
14922
|
+
|
|
14923
|
+
|
|
14924
|
+
|
|
14925
|
+
;
|
|
14926
|
+
|
|
14927
|
+
|
|
14928
|
+
const ld_edit_masked_text_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_edit_masked_textvue_type_script_lang_js_external, [['render',ld_edit_masked_textvue_type_template_id_33aa4ec6_scoped_true_render],['__scopeId',"data-v-33aa4ec6"]])
|
|
14929
|
+
|
|
14930
|
+
/* harmony default export */ const ld_edit_masked_text = (ld_edit_masked_text_exports_);
|
|
14931
|
+
;// CONCATENATED MODULE: ./src/ld-edit-masked-text/index.ts
|
|
14932
|
+
|
|
14933
|
+
function ld_edit_masked_text_reg(vue, options) {
|
|
14934
|
+
vue.component(options.aliases['ld-edit-masked-text'], ld_edit_masked_text);
|
|
14935
|
+
}
|
|
14936
|
+
/* harmony default export */ const src_ld_edit_masked_text = (ld_edit_masked_text_reg);
|
|
14937
|
+
|
|
14938
|
+
;// CONCATENATED MODULE: ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-text-markup/ld-text-markup.vue?vue&type=template&id=12e81c9c&scoped=true
|
|
14939
|
+
|
|
14940
|
+
|
|
14941
|
+
const ld_text_markupvue_type_template_id_12e81c9c_scoped_true_withScopeId = n => (_pushScopeId("data-v-12e81c9c"),n=n(),_popScopeId(),n)
|
|
14942
|
+
const ld_text_markupvue_type_template_id_12e81c9c_scoped_true_hoisted_1 = { class: "ld-text-markup" }
|
|
14943
|
+
const ld_text_markupvue_type_template_id_12e81c9c_scoped_true_hoisted_2 = { class: "tabs-wrapper" }
|
|
14944
|
+
const ld_text_markupvue_type_template_id_12e81c9c_scoped_true_hoisted_3 = {
|
|
14945
|
+
key: "editor",
|
|
14946
|
+
class: "content editorbox",
|
|
14947
|
+
style: {"visibility":"hidden"},
|
|
14948
|
+
id: "editorbox"
|
|
14949
|
+
}
|
|
14950
|
+
|
|
14951
|
+
function ld_text_markupvue_type_template_id_12e81c9c_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14952
|
+
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label")
|
|
14953
|
+
const _component_v_btn = (0,external_vue_.resolveComponent)("v-btn")
|
|
14954
|
+
const _component_v_runtime_template = (0,external_vue_.resolveComponent)("v-runtime-template")
|
|
14565
14955
|
const _component_md_editor = (0,external_vue_.resolveComponent)("md-editor")
|
|
14566
14956
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col")
|
|
14567
14957
|
const _component_v_row = (0,external_vue_.resolveComponent)("v-row")
|
|
@@ -15349,364 +15739,6 @@ function ld_dialogvue_type_template_id_184339ee_ts_true_render(_ctx, _cache, $pr
|
|
|
15349
15739
|
|
|
15350
15740
|
// EXTERNAL MODULE: ./node_modules/@ldmjs/core/dist/index.js
|
|
15351
15741
|
var dist = __webpack_require__(634);
|
|
15352
|
-
;// CONCATENATED MODULE: ./src/utils/awaiting.ts
|
|
15353
|
-
async function awaiting(callback) {
|
|
15354
|
-
let resolveFunc = null;
|
|
15355
|
-
const counter = 0;
|
|
15356
|
-
let timer = null;
|
|
15357
|
-
const promise = new Promise(resolve => {
|
|
15358
|
-
resolveFunc = resolve;
|
|
15359
|
-
});
|
|
15360
|
-
timer = setInterval(() => {
|
|
15361
|
-
const a = callback();
|
|
15362
|
-
if (counter > 100 || Boolean(a)) {
|
|
15363
|
-
clearInterval(timer);
|
|
15364
|
-
resolveFunc(a ?? true);
|
|
15365
|
-
}
|
|
15366
|
-
}, 100);
|
|
15367
|
-
await promise;
|
|
15368
|
-
}
|
|
15369
|
-
|
|
15370
|
-
;// CONCATENATED MODULE: ./src/utils/base64.ts
|
|
15371
|
-
/* eslint-disable no-bitwise */
|
|
15372
|
-
class Base64Util {
|
|
15373
|
-
constructor() {
|
|
15374
|
-
this._keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
15375
|
-
}
|
|
15376
|
-
encode(input) {
|
|
15377
|
-
let output = '';
|
|
15378
|
-
let chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
|
15379
|
-
let i = 0;
|
|
15380
|
-
input = Base64Util._utf8_encode(input);
|
|
15381
|
-
while (i < input.length) {
|
|
15382
|
-
chr1 = input.charCodeAt(i++);
|
|
15383
|
-
chr2 = input.charCodeAt(i++);
|
|
15384
|
-
chr3 = input.charCodeAt(i++);
|
|
15385
|
-
enc1 = chr1 >> 2;
|
|
15386
|
-
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
|
15387
|
-
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
|
15388
|
-
enc4 = chr3 & 63;
|
|
15389
|
-
if (isNaN(chr2)) {
|
|
15390
|
-
enc3 = enc4 = 64;
|
|
15391
|
-
}
|
|
15392
|
-
else if (isNaN(chr3)) {
|
|
15393
|
-
enc4 = 64;
|
|
15394
|
-
}
|
|
15395
|
-
output =
|
|
15396
|
-
output +
|
|
15397
|
-
this._keyStr.charAt(enc1) +
|
|
15398
|
-
this._keyStr.charAt(enc2) +
|
|
15399
|
-
this._keyStr.charAt(enc3) +
|
|
15400
|
-
this._keyStr.charAt(enc4);
|
|
15401
|
-
}
|
|
15402
|
-
return output;
|
|
15403
|
-
}
|
|
15404
|
-
decode(input) {
|
|
15405
|
-
let output = '';
|
|
15406
|
-
let chr1, chr2, chr3;
|
|
15407
|
-
let enc1, enc2, enc3, enc4;
|
|
15408
|
-
let i = 0;
|
|
15409
|
-
input = input.replace(/[^\d+/=A-Za-z]/g, '');
|
|
15410
|
-
while (i < input.length) {
|
|
15411
|
-
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
|
15412
|
-
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
|
15413
|
-
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
|
15414
|
-
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
|
15415
|
-
chr1 = (enc1 << 2) | (enc2 >> 4);
|
|
15416
|
-
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
|
15417
|
-
chr3 = ((enc3 & 3) << 6) | enc4;
|
|
15418
|
-
output = output + String.fromCharCode(chr1);
|
|
15419
|
-
if (enc3 !== 64) {
|
|
15420
|
-
output = output + String.fromCharCode(chr2);
|
|
15421
|
-
}
|
|
15422
|
-
if (enc4 !== 64) {
|
|
15423
|
-
output = output + String.fromCharCode(chr3);
|
|
15424
|
-
}
|
|
15425
|
-
}
|
|
15426
|
-
output = Base64Util._utf8_decode(output);
|
|
15427
|
-
return output;
|
|
15428
|
-
}
|
|
15429
|
-
static _utf8_encode(str) {
|
|
15430
|
-
str = str.replace(/\r\n/g, '\n');
|
|
15431
|
-
let utftext = '';
|
|
15432
|
-
for (let n = 0; n < str.length; n++) {
|
|
15433
|
-
const c = str.charCodeAt(n);
|
|
15434
|
-
if (c < 128) {
|
|
15435
|
-
utftext += String.fromCharCode(c);
|
|
15436
|
-
}
|
|
15437
|
-
else if (c > 127 && c < 2048) {
|
|
15438
|
-
utftext += String.fromCharCode((c >> 6) | 192);
|
|
15439
|
-
utftext += String.fromCharCode((c & 63) | 128);
|
|
15440
|
-
}
|
|
15441
|
-
else {
|
|
15442
|
-
utftext += String.fromCharCode((c >> 12) | 224);
|
|
15443
|
-
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
|
15444
|
-
utftext += String.fromCharCode((c & 63) | 128);
|
|
15445
|
-
}
|
|
15446
|
-
}
|
|
15447
|
-
return utftext;
|
|
15448
|
-
}
|
|
15449
|
-
static _utf8_decode(utftext) {
|
|
15450
|
-
let string = '';
|
|
15451
|
-
let i = 0;
|
|
15452
|
-
let c = 0;
|
|
15453
|
-
let c2 = 0;
|
|
15454
|
-
let c3 = 0;
|
|
15455
|
-
while (i < utftext.length) {
|
|
15456
|
-
c = utftext.charCodeAt(i);
|
|
15457
|
-
if (c < 128) {
|
|
15458
|
-
string += String.fromCharCode(c);
|
|
15459
|
-
i++;
|
|
15460
|
-
}
|
|
15461
|
-
else if (c > 191 && c < 224) {
|
|
15462
|
-
c2 = utftext.charCodeAt(i + 1);
|
|
15463
|
-
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
|
15464
|
-
i += 2;
|
|
15465
|
-
}
|
|
15466
|
-
else {
|
|
15467
|
-
c2 = utftext.charCodeAt(i + 1);
|
|
15468
|
-
c3 = utftext.charCodeAt(i + 2);
|
|
15469
|
-
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
|
15470
|
-
i += 3;
|
|
15471
|
-
}
|
|
15472
|
-
}
|
|
15473
|
-
return string;
|
|
15474
|
-
}
|
|
15475
|
-
isValid(value) {
|
|
15476
|
-
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
15477
|
-
const base64Regex = /^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$/gim;
|
|
15478
|
-
return base64Regex.test(value);
|
|
15479
|
-
}
|
|
15480
|
-
}
|
|
15481
|
-
const base64 = new Base64Util();
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
;// CONCATENATED MODULE: ./src/utils/cookie.ts
|
|
15485
|
-
class Cookie {
|
|
15486
|
-
get(key) {
|
|
15487
|
-
const _key = key.replace(/([$()*+./?[\\\]^{|}])/g, '\\$1');
|
|
15488
|
-
const matches = document.cookie.match(new RegExp('(?:^|; )' + _key + '=([^;]*)'));
|
|
15489
|
-
if (matches && matches[1] && matches[1].length) {
|
|
15490
|
-
return matches[1];
|
|
15491
|
-
}
|
|
15492
|
-
return null;
|
|
15493
|
-
}
|
|
15494
|
-
set(key, value, expires) {
|
|
15495
|
-
let time = 0;
|
|
15496
|
-
switch (expires) {
|
|
15497
|
-
case 'day':
|
|
15498
|
-
time = 1000 * 60 * 60 * 24;
|
|
15499
|
-
break;
|
|
15500
|
-
case 'month':
|
|
15501
|
-
time = 1000 * 60 * 60 * 24 * 30;
|
|
15502
|
-
break;
|
|
15503
|
-
}
|
|
15504
|
-
let exp = '';
|
|
15505
|
-
if (time) {
|
|
15506
|
-
time = Date.now() + time;
|
|
15507
|
-
exp = new Date(time).toUTCString();
|
|
15508
|
-
}
|
|
15509
|
-
document.cookie = key + '=' + value + '; path=/; expires=' + exp;
|
|
15510
|
-
}
|
|
15511
|
-
delete(key) {
|
|
15512
|
-
document.cookie = key + '=; path=/; expires=-1';
|
|
15513
|
-
}
|
|
15514
|
-
}
|
|
15515
|
-
const cookie = new Cookie();
|
|
15516
|
-
|
|
15517
|
-
|
|
15518
|
-
;// CONCATENATED MODULE: ./src/utils/converting.ts
|
|
15519
|
-
function fileToArrayBuffer(src) {
|
|
15520
|
-
return new Promise(resolve => {
|
|
15521
|
-
const reader = new FileReader();
|
|
15522
|
-
reader.onloadend = function () {
|
|
15523
|
-
resolve(reader.result);
|
|
15524
|
-
};
|
|
15525
|
-
reader.readAsArrayBuffer(src);
|
|
15526
|
-
});
|
|
15527
|
-
}
|
|
15528
|
-
function fileToBase64(file) {
|
|
15529
|
-
return new Promise((resolve, reject) => {
|
|
15530
|
-
const reader = new FileReader();
|
|
15531
|
-
reader.readAsDataURL(file);
|
|
15532
|
-
reader.onload = () => {
|
|
15533
|
-
let fileStr = reader.result.toString();
|
|
15534
|
-
if (fileStr.includes(',')) {
|
|
15535
|
-
fileStr = fileStr.split(',')[1];
|
|
15536
|
-
}
|
|
15537
|
-
resolve(fileStr);
|
|
15538
|
-
};
|
|
15539
|
-
reader.onerror = error => reject(error);
|
|
15540
|
-
});
|
|
15541
|
-
}
|
|
15542
|
-
function base64ToUint8Array(base64) {
|
|
15543
|
-
if (!base64.trim()) {
|
|
15544
|
-
return null;
|
|
15545
|
-
}
|
|
15546
|
-
const decrypted = window.atob(base64);
|
|
15547
|
-
let n = decrypted.length;
|
|
15548
|
-
const arr = new Uint8Array(n);
|
|
15549
|
-
while (n--) {
|
|
15550
|
-
arr[n] = decrypted.charCodeAt(n);
|
|
15551
|
-
}
|
|
15552
|
-
return arr;
|
|
15553
|
-
}
|
|
15554
|
-
function Uint8ArrayToHex(bytes) {
|
|
15555
|
-
const hex = [];
|
|
15556
|
-
/* eslint-disable-next-line @typescript-eslint/prefer-for-of */
|
|
15557
|
-
for (let i = 0; i < bytes.length; i++) {
|
|
15558
|
-
const current = bytes[i] < 0 ? bytes[i] + 256 : bytes[i];
|
|
15559
|
-
/* eslint-disable-next-line no-bitwise */
|
|
15560
|
-
hex.push((current >>> 4).toString(16));
|
|
15561
|
-
/* eslint-disable-next-line no-bitwise */
|
|
15562
|
-
hex.push((current & 0xf).toString(16));
|
|
15563
|
-
}
|
|
15564
|
-
return hex.join('');
|
|
15565
|
-
}
|
|
15566
|
-
function hexToArrayBuffer(hex) {
|
|
15567
|
-
hex = hex.replace(/^0x/, '');
|
|
15568
|
-
if (hex.length % 2 != 0) {
|
|
15569
|
-
// console.log('WARNING: expecting an even number of characters in the hexString');
|
|
15570
|
-
}
|
|
15571
|
-
const bad = hex.match(/[\sg-z]/i);
|
|
15572
|
-
if (bad) {
|
|
15573
|
-
// console.log('WARNING: found non-hex characters', bad);
|
|
15574
|
-
}
|
|
15575
|
-
const pairs = hex.match(/[\da-f]{2}/gi);
|
|
15576
|
-
const result = [];
|
|
15577
|
-
for (const s of pairs) {
|
|
15578
|
-
result.push(parseInt(s, 16));
|
|
15579
|
-
}
|
|
15580
|
-
return result;
|
|
15581
|
-
}
|
|
15582
|
-
function uint8ArrayToBase64(value) {
|
|
15583
|
-
const bin = value.reduce((acc, i) => (acc += String.fromCharCode.apply(null, [i])), '');
|
|
15584
|
-
return window.btoa(bin);
|
|
15585
|
-
}
|
|
15586
|
-
function arrayBufferToUint8Array(value) {
|
|
15587
|
-
return new Uint8Array(value);
|
|
15588
|
-
}
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
;// CONCATENATED MODULE: ./src/utils/deepValueGetter.ts
|
|
15592
|
-
/**
|
|
15593
|
-
* Returns a deep object given a string. zoo['animal.type']
|
|
15594
|
-
* @param {object} obj
|
|
15595
|
-
* @param {string} path
|
|
15596
|
-
*/
|
|
15597
|
-
function deepValueGetter(obj, path) {
|
|
15598
|
-
if (obj === null) {
|
|
15599
|
-
return '';
|
|
15600
|
-
}
|
|
15601
|
-
if (!obj || !path) {
|
|
15602
|
-
return obj;
|
|
15603
|
-
}
|
|
15604
|
-
const value = obj[path];
|
|
15605
|
-
// eslint-disable-next-line no-undefined
|
|
15606
|
-
if (value !== undefined) {
|
|
15607
|
-
return value;
|
|
15608
|
-
}
|
|
15609
|
-
let current = obj;
|
|
15610
|
-
const split = path.split('.');
|
|
15611
|
-
if (split.length) {
|
|
15612
|
-
for (const key of split) {
|
|
15613
|
-
current = current[key];
|
|
15614
|
-
// if found undefined, return empty string
|
|
15615
|
-
// eslint-disable-next-line no-undefined
|
|
15616
|
-
if (current === undefined || current === null) {
|
|
15617
|
-
return '';
|
|
15618
|
-
}
|
|
15619
|
-
}
|
|
15620
|
-
}
|
|
15621
|
-
return current;
|
|
15622
|
-
}
|
|
15623
|
-
|
|
15624
|
-
;// CONCATENATED MODULE: ./src/utils/delay.ts
|
|
15625
|
-
async function delay(timeout) {
|
|
15626
|
-
return new Promise(resolve => setTimeout(() => resolve(), timeout));
|
|
15627
|
-
}
|
|
15628
|
-
|
|
15629
|
-
;// CONCATENATED MODULE: ./src/utils/isObjectEmpty.ts
|
|
15630
|
-
function isObjectEmpty(obj) {
|
|
15631
|
-
for (const _i in obj) {
|
|
15632
|
-
return false;
|
|
15633
|
-
}
|
|
15634
|
-
return true;
|
|
15635
|
-
}
|
|
15636
|
-
|
|
15637
|
-
;// CONCATENATED MODULE: ./src/utils/pluralizeNoun.ts
|
|
15638
|
-
function pluralizeNoun(num, one, two, five, printNum = true) {
|
|
15639
|
-
if (!num) {
|
|
15640
|
-
return '';
|
|
15641
|
-
}
|
|
15642
|
-
let n;
|
|
15643
|
-
if (typeof num === 'string') {
|
|
15644
|
-
n = Number(num.match(/\d+\.?\d*/g));
|
|
15645
|
-
}
|
|
15646
|
-
else {
|
|
15647
|
-
n = Math.abs(num);
|
|
15648
|
-
}
|
|
15649
|
-
n %= 100;
|
|
15650
|
-
if (n >= 5 && n <= 20) {
|
|
15651
|
-
return printNum ? `${num} ${five}` : `${five}`;
|
|
15652
|
-
}
|
|
15653
|
-
n %= 10;
|
|
15654
|
-
if (n === 1) {
|
|
15655
|
-
return printNum ? `${num} ${one}` : `${one}`;
|
|
15656
|
-
}
|
|
15657
|
-
if (n >= 2 && n <= 4) {
|
|
15658
|
-
return printNum ? `${num} ${two}` : `${two}`;
|
|
15659
|
-
}
|
|
15660
|
-
return printNum ? `${num} ${five}` : `${five}`;
|
|
15661
|
-
}
|
|
15662
|
-
|
|
15663
|
-
;// CONCATENATED MODULE: ./src/utils/strings.ts
|
|
15664
|
-
class Strings {
|
|
15665
|
-
camelCase(str) {
|
|
15666
|
-
// Replace special characters with a space
|
|
15667
|
-
str = str.replace(/[^\d A-Za-z]/g, ' ');
|
|
15668
|
-
// put a space before an uppercase letter
|
|
15669
|
-
str = str.replace(/([a-z](?=[A-Z]))/g, '$1 ');
|
|
15670
|
-
// Lower case first character and some other stuff
|
|
15671
|
-
str = str
|
|
15672
|
-
.replace(/([^\d A-Za-z])|^\d+/g, '')
|
|
15673
|
-
.trim()
|
|
15674
|
-
.toLowerCase();
|
|
15675
|
-
// uppercase characters preceded by a space or number
|
|
15676
|
-
str = str.replace(/([\d ]+)([A-Za-z])/g, (a, b, c) => b.trim() + c.toUpperCase());
|
|
15677
|
-
return str;
|
|
15678
|
-
}
|
|
15679
|
-
capitalize(str) {
|
|
15680
|
-
if (!str) {
|
|
15681
|
-
return str;
|
|
15682
|
-
}
|
|
15683
|
-
const first = str[0];
|
|
15684
|
-
const other = str.substring(1);
|
|
15685
|
-
return `${first.toUpperCase()}${other}`;
|
|
15686
|
-
}
|
|
15687
|
-
}
|
|
15688
|
-
const strings = new Strings();
|
|
15689
|
-
|
|
15690
|
-
|
|
15691
|
-
;// CONCATENATED MODULE: ./src/utils/urlRegexp.ts
|
|
15692
|
-
const urlRegexp =
|
|
15693
|
-
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
15694
|
-
/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
15695
|
-
|
|
15696
|
-
;// CONCATENATED MODULE: ./src/utils/index.ts
|
|
15697
|
-
|
|
15698
|
-
|
|
15699
|
-
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
15742
|
;// CONCATENATED MODULE: ./src/ld-dialog/dialog.manager.ts
|
|
15711
15743
|
|
|
15712
15744
|
|