eservices-core 1.3.310 → 1.3.312
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/eservices-core.cjs.js +6 -6
- package/dist/eservices-core.es.js +400 -400
- package/dist/eservices-core.umd.js +7 -7
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.justify-content-center{justify-content:center}.user-select-none{-webkit-user-select:none;user-select:none}.flex{display:flex}.flex_column,.flex-column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow,.flex-grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_bold,.text-bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color-light{color:var(--color-light)}.color-primary{color:var(--color-primary)}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.transition-fast{transition:.1s}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.gap-25{gap:25px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number,.widget-table-cell_money{text-align:end}.widget-list-cell-history{cursor:pointer}.widget-list-cell-history>span{color:var(--color-primary);font-size:16px;padding:0 10px}.widget-table-cell_multi-select>.container-input-wrap{align-items:center}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.padding-5{padding:5px}.padding-0{padding:0}.padding-15{padding:15px}.padding-20{padding:20px}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.flex,.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-flex-align-center{align-items:center}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.gap-10{gap:10px}.gap-15{gap:15px}.gap-5{gap:5px}.gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.padding-bottom-10{padding-bottom:10px}.padding-10{padding:10px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.widget-table__head-cell[data-v-aa18d6fa]{padding:18px;text-align:start}.widget-table__head-label[data-v-aa18d6fa]{font-weight:600;font-size:14px;line-height:19px}.widget-filter-text[data-v-f6da3bed]{padding:20px 10px}.widget-filter-enum[data-v-4c82f6e7]{padding:3px 0;max-height:400px;max-width:340px;min-width:180px;overflow:hidden auto}.widget-filter-enum-item[data-v-4c82f6e7]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-4c82f6e7]:hover{background-color:#f1f1f1}.widget-filter-number[data-v-f9cd559e]{padding:4px 6px}[dir=rtl] .icon[data-v-8a72b45f]{transform:scaleX(-1)}.widget-spinner[data-v-0ef9ae88],.widget-spinner[data-v-0ef9ae88]:after{border-radius:50%;width:14px;height:14px}.widget-spinner[data-v-0ef9ae88]{font-size:2px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;transform:translateZ(0);animation:spinnerAnimation-0ef9ae88 1.1s infinite linear}@keyframes spinnerAnimation-0ef9ae88{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-button[data-v-450dc564]{position:relative}.widget-button-spinner[data-v-450dc564]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.widget-multi-button-wrap[data-v-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{grid-template-columns:1fr var(--button-size);background-color:var(--primary);grid-template-rows:var(--button-size);transition:var(--fast)}.widget-multi-button_active[data-v-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]:hover{background-color:#223296}tr[data-v-344a8cc1]{border:1px solid #F3F4FC;height:30px}th[data-v-344a8cc1],td[data-v-344a8cc1]{position:relative;padding:0 11px}th[data-v-344a8cc1]{text-align:left}p[data-v-344a8cc1]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-ccffc6bd]{position:sticky;top:-1px;z-index:1}.test-block[data-v-ccffc6bd]{position:absolute;z-index:2;display:none;height:calc(100% + 1px);place-content:center;inset-block-start:-1px;padding-inline:10px;background-color:#e7f2ff;-webkit-user-select:none;user-select:none;white-space:nowrap}.widget-list-head th[data-v-ccffc6bd]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}.widget-head-cell[data-v-d131e64e]{display:flex;gap:4px}.widget-head-cell-order[data-v-d131e64e]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-d131e64e]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-d131e64e]{padding:7px}.widget-head-cell-order-icon[data-v-d131e64e]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-d131e64e]{transform:rotate(180deg)}.widget-filter-item-container[data-v-43ed0322]{position:relative}.widget-filter-item-arrow[data-v-43ed0322]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-43ed0322]{font-weight:700}.widget-filter-item[data-v-43ed0322]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item[data-v-43ed0322]:not(.widget-filter-item_active){opacity:.6}.widget-filter-item-label[data-v-43ed0322]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-43ed0322]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0;box-shadow:0 2px 2px #00000040;background-color:#fff}.widget-filter-item-arrow[data-v-43ed0322]{transition:.2s}.widget-table-search[data-v-dbdf1e05]{gap:5px}.widget-table-search-input[data-v-dbdf1e05]{outline:none;background-color:transparent;border:0;padding:4px 5px}.widget-table-panel-filter[data-v-3a1abbf9]{justify-content:space-between;background-color:var(--color-primary)}.version-item[data-v-efd61247]{display:grid;gap:2px 10px;grid-template-rows:max-content;grid-template-columns:min-content minmax(100px,200px) 1fr 1fr}.version-item-date[data-v-efd61247]{white-space:nowrap}.line-clamp_5[data-v-efd61247]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.history-header[data-v-321c2f32]{align-items:center;position:sticky;top:0;background-color:#fff;grid-template-rows:max-content;grid-template-columns:20px 210px 1fr 1fr}.container-history[data-v-321c2f32]{display:flex;flex-direction:column-reverse;overflow:auto}.wrap-modal-version-history[data-v-321c2f32]{min-height:380px}@media screen and (min-width: 756px){.wrap-modal-version-history[data-v-321c2f32]{min-width:800px;max-width:1000px}}.wrap-history[data-v-321c2f32]{height:100%;overflow:auto}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('*{--extra-fast:.1s;--fast:.2s;--medium:.3s;box-sizing:border-box;--primary: #3949ab }html,body,#app{height:100%}body{margin:0}ul{text-align:left}.justify-content-center{justify-content:center}.user-select-none{-webkit-user-select:none;user-select:none}.flex{display:flex}.flex_column,.flex-column{display:flex;flex-direction:column}.flex_center{display:flex;align-items:center;justify-content:center}.flex_full,.flex_grow,.flex-grow{flex-grow:1}.flex-align_center{align-items:center}.grid{display:grid}.grid-center{display:grid;place-content:center}.link{text-decoration:var(--link-decoration);color:var(--link-color)}.link_hover-underline:hover,.link_hover_underline:hover{text-decoration:underline}.link_full{position:absolute;height:100%;width:100%;left:0;top:0}.text_sm{font-weight:400;font-size:12px;line-height:16px}.text_md{font-size:14px;line-height:20px}.text_lg{font-size:16px;line-height:24px}.text_size_xxl{font-size:18px;line-height:25px}.text_bold,.text-bold{font-weight:600}.text_nowrap{white-space:nowrap}.text_right{text-align:right}.text_center{text-align:center}.text_size_sm{font-size:12px;line-height:130%}.text_size_md{font-size:14px;line-height:140%}.text_error{color:red}.text_overflow{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.title_sm{font-weight:600;font-size:16px;line-height:24px}.title_md{font-weight:600;font-size:24px;line-height:32px}.title_lg{font-weight:700;font-size:32px;line-height:48px}.title_xxl,.title_xl{font-weight:700;font-size:48px;line-height:64px}.cursor_pointer{cursor:pointer}.cursor_default{cursor:default}button{outline:none;-webkit-user-select:none;user-select:none;transition:background-color .2s}.button{display:flex;align-items:center;justify-content:center;outline:none}.button_main{background-color:var(--button-background);color:var(--button-color)}.button_main:focus{background-color:var(--button-background-active)}.button_main:active{background-color:var(--button-background-active)}.button_white{background-color:var(--white);color:var(--main)}.button_sm{height:30px;width:130px}.button_shadow{box-shadow:0 2px 4px #00000040}.button_lg{font-weight:600;font-size:16px;line-height:24px;padding:12px 0;height:50px;width:200px}.button_disabled{background-color:var(--gray-1)}.button_resolve{background-color:var(--main);color:var(--white);border-radius:2px}.button_reject{border:1px solid var(--color-dark);border-radius:2px}.button_md{height:30px;padding:0 10px;min-width:80px}.button_disabled{background-color:var(--button-disabled-background-color);cursor:pointer!important}.color-light{color:var(--color-light)}.color-primary{color:var(--color-primary)}.color_main,.color__text_main{color:var(--main)}.color__text_black{color:var(--black-1)}.color__text_gray{color:var(--text-gray)}.color__text_red,.color_red{color:var(--red)}.color__text_white{color:var(--white)}.background_orange{background-color:var(--orange)}.background_red{background-color:var(--red)}.color_dark{color:var(--dark)}.color_light{color:var(--light)}.move-vertical-enter-active,.move-vertical-leave-active{transition:transform .5s ease}.move-vertical-enter-from,.move-vertical-leave-to{transform:translateY(-10px)}.move-horizontal-enter-active,.move-horizontal-leave-active{transition:transform .5s}.move-horizontal-enter-from,.move-horizontal-leave-to{transform:translate(-40px)}.modal-vertical-enter-active,.modal-vertical-leave-active,.modal-default{transition:transform var(--medium)}.modal-vertical-enter-active .modal-default,.modal-vertical-leave-active .modal-default{transform:translateY(-100px)}.move-vertical-fast-enter-active,.move-vertical-fast-leave-active{transition:transform var(--fast) ease}.move-vertical-fast-enter-from,.move-vertical-fast-leave-to{transform:translateY(-20px)}.slide-up-enter-active,.slide-up-leave-active{transition:transform var(--fast) ease,opacity var(--fast)}.slide-up-enter-from,.slide-up-leave-to{transform:translateY(20px);opacity:0}.opacity-enter-active,.opacity-leave-active{transition:opacity var(--fast) ease}.opacity-enter-from,.opacity-leave-to{opacity:0}.list-move,.list-enter-active,.list-leave-active{transition:all .5s ease}.list-enter-from,.list-leave-to{opacity:0;transform:translate(30px)}.list-leave-active{position:absolute}.transition-fast{transition:.1s}.modal-default{background-color:var(--white);position:relative;z-index:1;width:auto;background:var(--white);border-radius:var(--border-radius)}.modal-default__head{background-color:var(--black-1);text-align:center;padding:5px 0;border-radius:6px 6px 0 0}.modal-default__body{gap:20px;padding:0 15px}.modal-default__foot{padding:30px 0;display:flex;justify-content:center}.hint-tooltip{display:block;z-index:222;margin:auto;pointer-events:none;box-shadow:0 0 0 9999px #00000080}.tooltip-help-circle-in,.tooltip-help-circle-out{border-radius:50%}.tooltip-help-undefined{border-radius:50px}.tooltip-card{position:fixed;z-index:315;display:flex;flex-direction:column;width:480px;height:fit-content;margin:auto;border-radius:10px;background-color:var(--hint-background);cursor:default}.tooltip-card__foot{display:flex;justify-content:space-between;align-items:center;background-color:var(--hint-background-navigation);border-radius:10px;padding:20px}.tooltip-card__foot-current{font-weight:600;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body{position:relative;display:flex;flex-direction:column;gap:8px;padding:20px 20px 10px}.tooltip-card__body-title{font-weight:700;font-size:20px;line-height:24px;color:var(--white)}.tooltip-card__body-text{font-size:16px;line-height:24px;color:var(--white)}.tooltip-card__foot-button_back{background-color:var(--main-1)}.tooltip-card__foot-button_next{background-color:var(--hint)}.tooltip-card__body-close{position:absolute;right:22px;top:12px;width:20px;height:16px;opacity:.3;cursor:pointer}.tooltip-card__body-close:hover{opacity:1}.tooltip-card__body-close:before,.tooltip-card__body-close:after{position:absolute;left:15px;content:" ";height:21px;width:2px;background-color:#fff}.tooltip-card__body-close:before{transform:rotate(45deg)}.tooltip-card__body-close:after{transform:rotate(-45deg)}.tooltip-card-container-wrap{pointer-events:none;position:absolute;left:0;top:0;z-index:123132;height:100%;width:100%}.tooltip-card-container-wrap>div{height:100%;width:100%;display:flex;justify-content:center;align-items:center}.tester-box-tooltip{pointer-events:all}.position_relative{position:relative}.position_absolute{position:absolute}.gap_5{gap:5px}.gap_10{gap:10px}.gap_15{gap:15px}.gap_20{gap:20px}.gap-25{gap:25px}.margin-0,.margin_0{margin:0}.widget-input{background-color:var(--input-background);border:var(--input-border);border-radius:var(--input-border-radius);color:var(--input-color)}.widget-input:disabled{background-color:var(--input-background-disabled);border:var(--input-border-disabled)}.widget-input[error=true]{border:var(--input-border-error)}.widget-input::placeholder{color:var(--input-placeholder-color)}.widget-input:disabled::placeholder{color:var(--input-placeholder-color-disabled)}.input_error{border:1px solid red!important}.input_size_md{height:var(--input-height)}.input-title{font-size:12px;line-height:16px;color:#667085;margin:4px 0}.widget-table{border-collapse:collapse}.widget-table_mini p{margin:0}.list-cell-link>a{position:absolute;left:0;top:0;z-index:1;height:100%;width:100%;cursor:pointer}.list-cell-link>p{font-weight:500}.widget-table__cell{padding:0 20px;font-weight:400;font-size:14px;line-height:19px}.widget-table-cell_use{cursor:pointer}.widget-table-cell_select{width:min-content}.table-cell-toggle{--border-color: black;position:relative;display:grid;place-content:center;border:1px solid var(--border-color);height:15px;aspect-ratio:1 / 1;border-radius:50%}.table-cell-toggle_active:after{content:"";border-radius:50%;background-color:var(--border-color);height:9px;aspect-ratio:1/1}.widget-table-cell_number,.widget-table-cell_money{text-align:end}.widget-list-cell-history{cursor:pointer}.widget-list-cell-history>span{color:var(--color-primary);font-size:16px;padding:0 10px}.widget-table-cell_multi-select>.container-input-wrap{align-items:center}.overflow_auto{overflow:auto}.overflow_hidden{overflow:hidden}.padding_5{padding:5px}.padding_10{padding:10px}.padding_0{padding:0}.padding_15{padding:15px}.padding_20{padding:20px}.padding-5{padding:5px}.padding-0{padding:0}.padding-15{padding:15px}.padding-20{padding:20px}.radius_5{border-radius:5px}.radius_10{border-radius:10px}.radius_15{border-radius:15px}.radius_20{border-radius:20px}.es-card-list{box-shadow:#959da533 0 8px 24px;border:1px solid #f1f1f1;border-radius:4px;background-color:#fff}.color-gray{color:#ccc}.es-container-full{height:100%;width:100%}.es-cursor-pointer{cursor:pointer}.es-cursor-default{cursor:default}.flex,.es-flex{display:flex}.es-flex-column{display:flex;flex-direction:column}.es-flex-center{display:flex;align-items:center;justify-content:center}.es-flex-grow{flex-grow:1}.es-flex-justify-center{justify-content:center}.es-flex-justify-between{justify-content:space-between}.es-flex-align-center{align-items:center}.es-gap-1{gap:1px}.es-gap-2{gap:2px}.es-gap-3{gap:3px}.es-gap-4{gap:4px}.es-gap-5{gap:5px}.es-gap-6{gap:6px}.es-gap-7{gap:7px}.es-gap-8{gap:8px}.es-gap-9{gap:9px}.es-gap-10{gap:10px}.es-gap-15{gap:15px}.es-gap-20{gap:20px}.gap-10{gap:10px}.gap-15{gap:15px}.gap-5{gap:5px}.gap-20{gap:20px}.es-list-container,.es-overflow-auto{overflow:auto}.es-overflow-hidden{overflow:hidden}.es-padding-2{padding:2px}.es-padding-3{padding:3px}.es-padding-4{padding:4px}.es-padding-5{padding:5px}.es-padding-10{padding:10px}.es-padding-0{padding:0}.es-padding-7{padding:7px}.es-padding-15{padding:15px}.es-padding-20{padding:20px}.es-padding-v-5{padding:5px 0}.es-padding-h-5{padding:0 5px}.es-padding-is-5{padding-inline-start:5px}.es-padding-ie-5{padding-inline-end:5px}.padding-bottom-10{padding-bottom:10px}.padding-10{padding:10px}.es-position-relative{position:relative}.es-position-absolute{position:absolute}.es-position-absolute-full{position:absolute;left:0;top:0;width:100%;height:100%}.es-position-absolute-center{position:absolute;left:0;right:0;top:0;bottom:0;margin:auto}.es-radius-2{border-radius:2px}.es-radius-3{border-radius:3px}.es-radius-4{border-radius:4px}.es-radius-5{border-radius:5px}.es-radius-6{border-radius:6px}.es-radius-7{border-radius:7px}.es-radius-8{border-radius:8px}.es-radius-9{border-radius:9px}.es-radius-10{border-radius:10px}.es-radius-15{border-radius:15px}.es-radius-20{border-radius:20px}.es-text-xs{font-weight:400;font-size:10px;line-height:13px}.es-text-sm{font-weight:400;font-size:12px;line-height:16px}.es-text-md{font-size:14px;line-height:20px}.es-text-lg{font-size:16px;line-height:24px}.es-text-xl{font-size:18px;line-height:25px}.es-text-center{text-align:center}.es-text-bold{font-weight:700}.es-text-no-wrap{text-wrap:nowrap}.es-weight-600{font-weight:600}.es-zindex-0{z-index:0}.es-zindex-1{z-index:1}.es-zindex-2{z-index:2}.es-zindex-3{z-index:3}.es-zindex-4{z-index:4}.es-zindex-5{z-index:5}.es-grid{display:grid}.es-grid-center{display:grid;place-content:center}.es-margin-0{margin:0}.widget-table__head-cell[data-v-aa18d6fa]{padding:18px;text-align:start}.widget-table__head-label[data-v-aa18d6fa]{font-weight:600;font-size:14px;line-height:19px}.widget-filter-text[data-v-f6da3bed]{padding:20px 10px}.widget-filter-enum[data-v-4c82f6e7]{padding:3px 0;max-height:400px;max-width:340px;min-width:180px;overflow:hidden auto}.widget-filter-enum-item[data-v-4c82f6e7]{padding:6px 11px;transition:.1s;cursor:pointer}.widget-filter-enum-item[data-v-4c82f6e7]:hover{background-color:#f1f1f1}.widget-filter-number[data-v-f9cd559e]{padding:4px 6px}[dir=rtl] .icon[data-v-8a72b45f]{transform:scaleX(-1)}.widget-spinner[data-v-0ef9ae88],.widget-spinner[data-v-0ef9ae88]:after{border-radius:50%;width:14px;height:14px}.widget-spinner[data-v-0ef9ae88]{font-size:2px;position:relative;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;transform:translateZ(0);animation:spinnerAnimation-0ef9ae88 1.1s infinite linear}@keyframes spinnerAnimation-0ef9ae88{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.widget-button[data-v-450dc564]{position:relative}.widget-button-spinner[data-v-450dc564]{position:absolute;top:0;bottom:0;left:5px;margin:auto}.widget-multi-button-wrap[data-v-d43a76ce]{--button-size: 40px;max-height:var(--button-size);z-index:1;width:fit-content}.widget-multi-button[data-v-d43a76ce]{grid-template-columns:1fr var(--button-size);background-color:var(--primary);grid-template-rows:var(--button-size);transition:var(--fast)}.widget-multi-button_active[data-v-d43a76ce]{grid-template-rows:calc(var(--button-size) * var(--04895bf1))}.widget-multi-button-body[data-v-d43a76ce]{min-width:80px}.widget-multi-button-body-label[data-v-d43a76ce]{padding:10px 10px 10px 20px;color:#fff;transition:background-color var(--fast)}.widget-multi-button-body-label[data-v-d43a76ce]:hover{background-color:#223296}.widget-multi-button-side[data-v-d43a76ce]{height:var(--button-size);transition:transform var(--fast),background-color var(--fast);color:#fff}.widget-multi-button-side_active[data-v-d43a76ce]{transform:rotate(180deg)}.widget-multi-button-side[data-v-d43a76ce]:hover{background-color:#223296}tr[data-v-344a8cc1]{border:1px solid #F3F4FC;height:30px}th[data-v-344a8cc1],td[data-v-344a8cc1]{position:relative;padding:0 11px}th[data-v-344a8cc1]{text-align:left}p[data-v-344a8cc1]{margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.widget-list-head-cell[data-v-bf495d6a]{padding:0 0 0 10px;display:flex}.widget-list-head-cell[data-v-bf495d6a]:hover{box-shadow:0 -1px #e7f2ff}.list-head-cell-label[data-v-bf495d6a]{padding:5px 0;white-space:nowrap;cursor:pointer}.head-cell-order[data-v-bf495d6a]{position:absolute;inset-inline-end:22px;inset-block:0 0;margin:auto;font-size:14px;height:14px}.head-cell-order_down[data-v-bf495d6a]{transform:rotate(180deg)}.head-cell-resize[data-v-bf495d6a]{padding:3px 10px;cursor:col-resize;transition:background-color .1s}.head-cell-resize[data-v-bf495d6a]:hover{background-color:#f5f5f5}.head-cell-resize[data-v-bf495d6a]:after{content:"";margin:auto;width:1px;height:100%;display:block;background-color:#d2d2d2}.widget-list-head[data-v-ccffc6bd]{position:sticky;top:-1px;z-index:1}.test-block[data-v-ccffc6bd]{position:absolute;z-index:2;display:none;height:calc(100% + 1px);place-content:center;inset-block-start:-1px;padding-inline:10px;background-color:#e7f2ff;-webkit-user-select:none;user-select:none;white-space:nowrap}.widget-list-head th[data-v-ccffc6bd]{position:sticky;top:0;z-index:2;-webkit-user-select:none;user-select:none}.widget-head-cell[data-v-d131e64e]{display:flex;gap:4px}.widget-head-cell-order[data-v-d131e64e]{display:flex;flex-direction:column;justify-content:center;gap:2px}.widget-head-cell-label[data-v-d131e64e]{cursor:pointer}.widget-fast-table-head-cell-td[data-v-d131e64e]{padding:7px}.widget-head-cell-order-icon[data-v-d131e64e]{transition:.1s;height:18px;width:18px}.widget-head-cell-order-icon_desc[data-v-d131e64e]{transform:rotate(180deg)}.widget-filter-item-container[data-v-43ed0322]{position:relative}.widget-filter-item-arrow[data-v-43ed0322]{transform:rotate(180deg)}.widget-filter-item-label_active[data-v-43ed0322]{font-weight:700}.widget-filter-item[data-v-43ed0322]{display:grid;grid-template-columns:max-content max-content;align-items:center;cursor:pointer;padding:0 10px;color:#fff}.widget-filter-item[data-v-43ed0322]:not(.widget-filter-item_active){opacity:.6}.widget-filter-item-label[data-v-43ed0322]{-webkit-user-select:none;user-select:none;padding:4px 2px 4px 8px}.widget-filter-item-popup[data-v-43ed0322]{position:absolute;z-index:2;inset-block-start:100%;inset-inline-end:0;box-shadow:0 2px 2px #00000040;background-color:#fff}.widget-filter-item-arrow[data-v-43ed0322]{transition:.2s}.widget-table-search[data-v-99052614]{gap:5px;padding:0 10px 0 12px}.widget-table-search-icon[data-v-99052614]{align-self:center}.widget-table-search-input[data-v-99052614]{outline:none;background-color:transparent;border:0;padding:6px 5px;font-size:16px}.widget-table-panel-filter[data-v-8f09ec8d]{justify-content:space-between;background-color:var(--color-primary)}.version-item[data-v-efd61247]{display:grid;gap:2px 10px;grid-template-rows:max-content;grid-template-columns:min-content minmax(100px,200px) 1fr 1fr}.version-item-date[data-v-efd61247]{white-space:nowrap}.line-clamp_5[data-v-efd61247]{text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.history-header[data-v-321c2f32]{align-items:center;position:sticky;top:0;background-color:#fff;grid-template-rows:max-content;grid-template-columns:20px 210px 1fr 1fr}.container-history[data-v-321c2f32]{display:flex;flex-direction:column-reverse;overflow:auto}.wrap-modal-version-history[data-v-321c2f32]{min-height:380px}@media screen and (min-width: 756px){.wrap-modal-version-history[data-v-321c2f32]{min-width:800px;max-width:1000px}}.wrap-history[data-v-321c2f32]{height:100%;overflow:auto}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
"use strict";var ht=e=>{throw TypeError(e)};var yt=(e,t,n)=>t.has(e)||ht("Cannot "+n);var Ae=(e,t,n)=>(yt(e,t,"read from private field"),n?n.call(e):t.get(e)),Ne=(e,t,n)=>t.has(e)?ht("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),de=(e,t,n,o)=>(yt(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n);/*!
|
|
3
|
-
* eservices-core v1.3.
|
|
3
|
+
* eservices-core v1.3.312
|
|
4
4
|
* (c) 2025 ESERVICES
|
|
5
5
|
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),R=require("jenesius-vue-form"),le=require("vue-router"),Cn=require("date-and-time"),$e=require("debug"),H=require("jenesius-vue-modal"),L=class L extends Error{constructor(t,n=null){super(),this.message=t,this.details=n,this.id=L.ID++}static ParentFormNotFound(){return new L("Can't found parent form.")}static UndefinedNameOfCompositeFormController(t){return new L("Composite object name is undefined",t)}static EntityWithoutName(t){return new L("'Entity doesn't have a name",t)}static NotResolvedNameEventEmitter(t){return new L(`'${t}' is not a valid Event emitter name`)}static FormIsNotValidated(t){return new L("Form is not validated",t)}static ListWorkerIsRunningOrEnd(t){return new L("List data request is running or already done",t)}static ObjectIdNotNumber(t){return new L(`${t} (id) is not a number`)}static UndefinedErrorId(t,n){return L.ApiNotAvailable()}static ApiError(t){return new L("Request error",t)}static ApiNotAvailable(){return new L(`Sorry, we experience difficulties here.
|
|
6
|
-
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?L.ApiNotAvailable():new L(t||"Authorization Error",n)}static ApiResponseParseFailed(){return L.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new L("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new L(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new L("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new L("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new L(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new L(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,o){return new L(`Array already includes the element with value ${t}`,{array:n,table:o})}static MetadataEntityIsNotAvailable(t){return new L(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new L("The request took too long to complete. Try again later.")}};L.ID=0;let oe=L;const Tn="Please try again later or submit a feedback if problem doesn't go.";function Sn(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return Tn}})}function pe(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw oe.ApiNotAvailable()}).then(n=>Sn(n).then(o=>{if(!n.ok)throw o;return o}))}class An{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,o)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),t[n]=o,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}new An;class Nn{static invite(t,n,o){return pe("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:o})})}static accept(t,n){return pe("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return pe("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class In{static getRequiredDocuments(t,n,o){const i=new URLSearchParams({entity:t,primaryKey:n,statusCode:o});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(a=>a.json())}}class fe{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${fe.url()}/calculator/${t}`)}static calculate(t,n){return pe(`/${fe.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):oe.ApiNotAvailable()})}static parseMetadataField(t){function n(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return pe(`/${fe.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return pe(`/${fe.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}const Rn={class:"widget-table__head-cell"},Ln={key:1,class:"widget-table__head-label margin_0 text_overflow"},Lt=r.defineComponent({__name:"widget-table-head-cell",props:{label:{},type:{}},emits:["select"],setup(e,{emit:t}){const n=t;function o(){n("select")}return(i,a)=>(r.openBlock(),r.createElementBlock("th",Rn,[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,onClick:o})):(r.openBlock(),r.createElementBlock("span",Ln,r.toDisplayString(i.label),1))]))}}),On={class:"widget-table__head"},Fn=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>Lt),(t,n)=>(r.openBlock(),r.createElementBlock("tr",On,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.config,o=>r.renderSlot(t.$slots,"default",r.mergeProps({ref_for:!0},o),void 0,!0)),256))]))}}),U=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Bn=U(Fn,[["__scopeId","data-v-aa18d6fa"]]);function Je(e){return Array.isArray(e)?Je(e[0]):typeof e!="string"?null:e}function re(e){return Je(e.name)}function xn(e){const t=new RegExp(/\$\{([a-zA-Z0-9_.]+)}/,"g"),n=[];let o;for(;(o=t.exec(e))!==null;)n.push(o[1]);return n}function Vn(e,t){return xn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),R.utils.getPropFromObject(t,o))}),e}function qe(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function ke(e,t){const n=re(e);if(typeof e.value=="string")return Vn(e.value,t);let o=n?R.utils.getPropFromObject(t,n):null;if(o===void 0&&(o=null),typeof e.value=="function")return e.value(o,t);if(e.value===null)return null;switch(e.unitValue&&(o=qe(e.unitValue)(o)),e.unit&&(o=qe(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Be(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=nt(typeof o=="string"?o:null);break}case"money":{o=Ht(o);break}case"DateTime":{o=Be(typeof o=="string"?o:null,e.format||S.dateTimeFormat);break}}return e.formatter&&(o=ye(e.formatter).exec(o,t)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const $n=1,Dn=5e3,Pn="static-folder",Ot="request-error",Ft="EntityTypeName",Mn="REFERENCE_CHANGES",T={LIST_ACTIVE_NEW:-1,DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",PROVIDE_ENTITY_NAME:"provide-entity-name",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",MODAL_SIMPLE_TOOL_PARAMETERS:"SimpleToolParameters",MODAL_BATCH_VALUES:"batch-values",MODAL_ENTITY:"form-entity",MODAL_HISTORY:"entity-history",TIME_TO_LIVE_SOCKET_REQUEST:45e3,CORE_DEBUG_LABEL:"eservices-core",VISIBLE_ITEM_PROVIDE_NAME:"visible-item-provider",EVENT_FORM_UPDATE:"form-update",EVENT_AFFECTED_ENTITY:"affected-entity",DEFAULT_ORDER_DIR:"asc",TABLE_MOCK_FIELD:"_A_MOCK_ID_FIELD",OBJECT_TYPE_NAME_FIELD:Ft,FIELD_NAME_REFERENCE_CHANGES:Mn,PATH_RESOLVER_ENTITY:"resolver",TOOL_PRINT_NAME:"Print"};function De(e){return[T.CORE_DEBUG_LABEL,e].join(":")}const jn={class:"widget-filter-text flex-column gap_10"},Un={class:"flex gap_20"},Wn=r.defineComponent({__name:"widget-filter-text",props:{values:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,i=new R.Form({parent:!1}),a={begin:"Begin with",end:"End with",include:"Contains"};function l(u="",f="include"){return{text:u,option:f}}r.onMounted(()=>{const u=n.values?typeof n.values=="string"?l(n.values):n.values:l();i.setValues(u)});function c(){o("update:values",i.values)}function s(){o("clear")}return r.watch(()=>n.values,u=>i.setValues(u||l()),{immediate:!0}),(u,f)=>{const d=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",jn,[r.createElementVNode("div",Un,[r.createVNode(r.unref(R.FormField),{name:"text",type:"text",label:"Search"})]),r.createVNode(r.unref(R.FormField),{name:"option",type:"radio",options:a}),r.createElementVNode("div",null,[r.createVNode(d,{onClick:c,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(te)("Apply")),1)]),_:1}),r.createVNode(d,{onClick:s},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(te)("Clear")),1)]),_:1})])])}}}),qn=U(Wn,[["__scopeId","data-v-f6da3bed"]]),Hn={class:"widget-filter-enum"},Gn={class:"flex gap-10 padding-10"},zn=r.defineComponent({__name:"widget-filter-entity",props:{baseEntity:{},filters:{},values:{},filterMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=r.ref([]),i=Te(n.filterMetadata.entity),a=f=>(n.values||[]).includes(f),l=t;function c(f){const d=n.values||[];return d.includes(f)?l("update:values",d.filter(b=>b!==f)):l("update:values",[...d,f])}const s=ie(async()=>{o.value=await ce(n.baseEntity,{fields:n.filterMetadata.name.join(" "),order:[n.filterMetadata.name[1],"asc"],distinct:!0,filter:I(n.filters)}).then(f=>f.map(d=>({label:d[n.filterMetadata.name[1]],value:d[n.filterMetadata.name[0]]})))});function u(){l("update:values",[])}return r.watch(()=>s.loading,f=>{l("readProcess",f?"start":"end")},{immediate:!0}),r.watch(()=>i.value,()=>{s.loading||s.call()},{immediate:!0}),(f,d)=>{const b=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Hn,[r.createElementVNode("div",Gn,[r.createVNode(b,{label:"Reload filter",loading:r.unref(s).loading||!1,icon:"reload",onClick:d[0]||(d[0]=()=>r.unref(s).call())},null,8,["loading"]),r.createVNode(b,{label:"Clear",onClick:u})]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,h=>(r.openBlock(),r.createBlock(r.unref(R.FormField),{class:"widget-filter-enum-item",key:h.value,onClick:()=>c(h.value),type:"single-checkbox","model-value":a(h.value),label:h.label},null,8,["onClick","model-value","label"]))),128))])}}}),Kn=U(zn,[["__scopeId","data-v-4c82f6e7"]]),be=r.reactive({});function Yn(){vt(),setInterval(vt,50)}function Bt(){return be}function vt(){const e={};Object.entries(localStorage).forEach(([t,n])=>{e[t]=!0,be[t]!==n&&(be[t]=n)}),Object.keys(be).forEach(t=>{e[t]||delete be[t]})}const Xn={class:"widget-filter-number flex-column es-gap-10"},Jn={class:"flex es-gap-10"},Qn={class:"flex gap-10"},Zn=r.defineComponent({__name:"widget-filter-number",props:{baseEntity:{},values:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=t,i=new R.Form({parent:!1}),a=Gt(()=>{const c=i.getValueByName("min"),s=i.getValueByName("max");return o("update:values",{min:c,max:s})},800);i.onvalue(a),r.watch(()=>n.values,()=>{n.values&&i.setValues(n.values)},{immediate:!0});function l(){i.cleanValues()}return(c,s)=>{const u=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Xn,[r.createElementVNode("div",Jn,[r.createVNode(r.unref(R.FormField),{name:"min",label:"More than",type:"number"}),r.createVNode(r.unref(R.FormField),{name:"max",label:"Less than",type:"number"})]),r.createElementVNode("div",Qn,[r.createVNode(u,{label:"Clear",onClick:l})])])}}}),wt=U(Zn,[["__scopeId","data-v-f9cd559e"]]),S={getEntityLink(e,t){return`/forms/${e}/${t}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:qn,Entity:Kn,Decimal:wt,Integer:wt},arrayListCellHandlers:[],arrayListRowHandlers:[],arrayFieldParamsHandlers:[]};function er(e){Yn();for(let t in e)S[t]=e[t]}const tr={props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>r.h(S.iconTag,{class:S.iconHandler?S.iconHandler(n):`icon icon-${n}`},S.iconHandlerText(n))}},he=U(tr,[["__scopeId","data-v-8a72b45f"]]),nr=$e(De("setup-list-row"));function rr(e,t){const n=e.config.map(o=>or(o,e,t));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function or(e,t,n){const o=t.values;let i=ke(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(f){a.onClick.push(()=>f(o,e,n))}function c(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const s=[],u=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(r.h(R.FormField,{type:"single-checkbox",modelValue:t.selected})),l(bt.bind(null,n,!0));break}case"select":{u.push(r.h(R.FormField,{type:"single-radio",modelValue:t.selected})),l(bt.bind(null,n,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const f=e.link(o);if(f){const d=r.h(le.RouterLink,{to:f});u.push(d),c("widget-table-cell_link")}}catch(f){nr("Can't add router link",f)}if(e.href&&(u.push(r.h("a",{href:e.href(o),target:"_blank"})),c("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&u.push(r.h(he,{name:e.icon})),typeof e.icon=="function")){const f=e.icon(o);f!==null&&u.push(r.h(he,{name:f}))}return e.class&&(typeof e.class=="function"?c(e.class(o)):c(e.class)),S.listCellHandler&&(console.log("listCellHandler is deprecated. Please use coreUtils.addListCellHandler instead."),S.listCellHandler(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),S.arrayListCellHandlers&&S.arrayListCellHandlers.forEach(f=>f(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),s.push(r.h("td",a,u)),s}function bt(e,t){e.emit("select",t)}function Qe(e,t){return()=>{try{return rr(e,t)}catch(n){return console.warn(n),null}}}const ir={props:{values:Object,config:Object,selected:Boolean},setup:Qe},ar=["colspan"],Et=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=t,o=r.ref();return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,a)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:i.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.component),r.mergeProps(i.$attrs,{values:i.values,new:i.isNew,onClose:a[0]||(a[0]=l=>n("close")),onSave:a[1]||(a[1]=l=>n("save",l))}),null,16,["values","new"]))],8,ar)],512))}}),Ue="update:selectedRows",sr="update:activeRow",xt=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},rowOptionsHandler:{type:Function,default:()=>({})}},emits:["save","order"],setup(e,{emit:t}){const n=e,o=r.ref(),i=t,a=r.useSlots(),l=r.computed(()=>{var h;return(h=a==null?void 0:a.default)==null?void 0:h.call(a)[0]});function c(){const g=n.selectedRows.length!==0?[]:[...n.array];i(Ue,g)}function s(h,g=!0){if(!n.selectedRows)return;if(!g)return i(Ue,n.selectedRows.includes(h)?[]:[h]);const m=[...n.selectedRows],w=m.indexOf(h);return w===-1?m.push(h):m.splice(w,1),i(Ue,m)}function u(h){i(sr,h)}function f(h){i("save",h),i("update:activeRow",null)}const d=r.computed(()=>n.shortcut?n.config.filter(h=>h.name?!!n.array.find(g=>![null,""].includes(ke(h,g))):!0):n.config);r.watch(()=>n.activeRow,(h,g)=>{h===null&&typeof g=="number"&&setTimeout(()=>{if(!o.value)return;const m=o.value.querySelector(`tbody>tr:nth-child(${g+1})`)||o.value;m&&m.scrollIntoView({block:"center",behavior:"smooth"})},100)});function b(h){var m;const g={};return(m=S.arrayListRowHandlers)==null||m.forEach(w=>{try{Object.assign(g,w(h,n.rowOptionsHandler()))}catch{console.warn("Problem with arrayListRowHandler.")}}),g}return(h,g)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",{class:"widget-table",ref_key:"refTable",ref:o},[r.createElementVNode("thead",null,[r.createVNode(Bn,{config:d.value,onOrder:g[0]||(g[0]=m=>h.$emit("order",m))},{default:r.withCtx(m=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.$slots["head-cell"]||Lt),r.mergeProps(m,{onSelect:c}),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.array,(m,w)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:w},[r.createVNode(ir,r.mergeProps({config:d.value,values:m,selected:h.selectedRows.includes(m),onSelect:p=>s(m,p),onActivate:p=>u(w),class:h.classCallback?h.classCallback(m):"",ref_for:!0},b(m)),null,16,["config","values","selected","onSelect","onActivate","class"]),l.value&&h.activeRow===w?(r.openBlock(),r.createBlock(Et,{key:0,component:l.value,"row-length":h.config.length,values:m,onClose:g[1]||(g[1]=p=>i("update:activeRow",null)),onSave:f,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),h.activeRow===r.unref(T).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(Et,{key:0,component:l.value,"row-length":d.value.length,onClose:g[2]||(g[2]=m=>i("update:activeRow",null)),onSave:f,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],512)]))}}),lr=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),Ce=U(lr,[["__scopeId","data-v-0ef9ae88"]]),cr={class:"widget-button"},ur=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("button",cr,[t.wait?(r.openBlock(),r.createBlock(Ce,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),dr=U(ur,[["__scopeId","data-v-450dc564"]]),fr={class:"widget-multi-button-wrap position_relative cursor_pointer"},pr={class:"widget-multi-button-body grid"},mr=["onClick"],gr={class:"widget-multi-button-side-wrap"},hr=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(l=>({"04895bf1":o.value}));const t=e,n=r.reactive({active:!1,wait:!1}),o=r.computed(()=>t.array.length+(t.label?1:0));function i(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function a(l=!n.active){n.active=l}return(l,c)=>(r.openBlock(),r.createElementBlock("div",fr,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[r.createElementVNode("div",pr,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>a())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,u)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:f=>{i(s.callback),a(!1)}},r.toDisplayString(s.label),9,mr))),128))]),r.createElementVNode("div",gr,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>a())},[n.wait?(r.openBlock(),r.createBlock(r.unref(Ce),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(he),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),yr=U(hr,[["__scopeId","data-v-d43a76ce"]]),vr={class:"widget-loader flex flex-align_center gap_10 padding_15"},wr={class:"text_md"},Pe=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",vr,[r.createVNode(Ce,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",wr,r.toDisplayString(t.label),1)]))}}),br=["alt","src"],Er=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=r.ref();return r.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(o,i)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:n,src:o.src||o.$props.default},null,8,br))}}),_r={props:{config:Array,values:Object,selected:Boolean},setup:Qe},kr=U(_r,[["__scopeId","data-v-344a8cc1"]]),Cr=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),Tr={class:"widget-list-head-cell"},Sr=Cr(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Ar=r.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e,o=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(i,a)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",Tr,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":i.minWidth,"max-width":i.maxWidth,width:i.width})},[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=r.withModifiers(l=>o("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:a[1]||(a[1]=l=>o("order"))},r.toDisplayString(i.title||i.label),1))],4),i.name&&i.order.length&&i.order[0]===i.name?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":i.order.length>1&&i.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),Sr])]))}}),Nr=U(Ar,[["__scopeId","data-v-bf495d6a"]]),Ir=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(),a=r.ref();r.onMounted(()=>{function u(g,m){let w=-1;do w++,m-=g[w];while(m>0&&w<g.length);return w}function f(g,m){let w=0;for(;m>0&&m>g[w]&&w<g.length;)m-=g[w],w++;return console.log(m,w),w>0?w:0}function d(g){try{a.value.style.insetInlineStart=g+"px"}catch(m){console.log(m)}}function b(g){try{a.value.style.width=g+"px",a.value.style.minWidth=g+"px",a.value.style.maxWidth=g+"px"}catch(m){console.log(m)}}function h(g){return g===null?!1:g.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(m){var F;function w($){return $.screenX+y-O}const p=i.value,v=[...p.children].filter($=>$.localName==="th"),y=((F=p.offsetParent)==null?void 0:F.scrollLeft)||0,_=v.map($=>$.clientWidth),C=h(m.target),O=p.getBoundingClientRect().left,E=w(m),k=u(_,E),N=_.slice(0,k).reduce(($,M)=>$+M,0),V=E-N,D=p.offsetWidth,J=v[k].clientWidth;if(n.config[k].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",m.screenX),console.log("Widths",_),console.log("max width",D),console.log("Start Position",E),console.log("Position From",k),console.log("Start Position",k),console.log("Global offset (Отступ самой таблицы от края экрана)",O),console.log("Del",V),console.groupEnd(),a.value.innerText=v[k].textContent||"",a.value.style.display="grid",a.value.style.width=J+"px",a.value.style.cursor="grabbing",d(N),b(J),document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerup",Se);function Se($){if(console.group("END"),document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",Se),C&&(n.config[k].width=a.value.style.width,n.config[k].minWidth=a.value.style.width,n.config[k].maxWidth=a.value.style.width,l(n.config)),!C){const M=$.screenX+y-O;console.log("ENP Position",M);const G=f(_,M);if(console.log(k,"->",G),G!==k){const P=n.config[k],Q=n.config;Q.splice(k,1),Q.splice(G,0,P),l(Q)}else{const P=n.config[k].name;c(P)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function A($){if(C){const P=w($)-E+J;b(P);return}let M=$.screenX+y-O-V;M<0&&(M=0),M+J>D&&(M=D-J),d(M)}})});function l(u){o("update:config",u)}function c(u){if(!u)return;if(Array.isArray(u)){if(u.length<1)return;u=u[0]}if(n.order.length===0||n.order[0]!==u)return void s([u]);const f=n.order.length===1||n.order[1]==="asc"?"asc":"desc";s([u,f==="asc"?"desc":"asc"])}function s(u){o("update:order",u)}return(u,f)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.config,(d,b)=>(r.openBlock(),r.createBlock(Nr,r.mergeProps({key:d,ref_for:!0},d,{onOrder:h=>c(d.name),onSelect:f[0]||(f[0]=h=>o("select")),order:u.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),Rr=U(Ir,[["__scopeId","data-v-ccffc6bd"]]),Lr={class:"widget-list"},Or={class:"widget-list-body position_relative"},Fr=50,Br=r.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e,o=t;function i(s,u=!0){if(n.selectedRows)if(!u)l(n.selectedRows.includes(s)?[]:[s]);else{const f=[...n.selectedRows],d=f.indexOf(s);d===-1?f.push(s):f==null||f.splice(d,1),l(f)}}function a(){var s;if(((s=n.selectedRows)==null?void 0:s.length)!==n.array.length)return l([...n.array]);l([])}function l(s){o("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+Fr>u.scrollHeight&&o("scrollEnd")}return(s,u)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",Lr,[r.createElementVNode("thead",null,[r.createVNode(Rr,{onSelect:u[0]||(u[0]=f=>a()),"onUpdate:order":u[1]||(u[1]=f=>o("update:order",f)),"onUpdate:config":u[2]||(u[2]=f=>o("update:config",f)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",Or,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(f,d)=>{var b;return r.openBlock(),r.createBlock(kr,{key:d,class:"widget-list-row",values:f,config:s.config,selected:(b=s.selectedRows)==null?void 0:b.includes(f),onSelect:h=>i(f,h)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function Ze(){var a;const e=r.computed(()=>Object.keys(n).length===0||Object.values(n).includes(!0)),t=(a=r.getCurrentInstance())==null?void 0:a.uid;if(!t)throw"Undefined instance. Please check it.";const n=r.reactive({});r.provide(T.VISIBLE_ITEM_PROVIDE_NAME,{show(l){n[l]=!0},hide(l){n[l]=!1},remove(l){delete n[l]}});const o=r.inject(T.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(t)},hide(){o==null||o.hide(t)},remove(){o==null||o.remove(t)}},visibleItems:n}}function Vt(e){const t={name:e,entity:r.inject(T.PROVIDE_ENTITY_NAME)};if(!t.name)throw new Error("Field without name try use metadata.");const n=r.ref(!1),o=r.ref(null);return e.split(".").reduce((i,a,l,c)=>l===c.length-1?i:i.then(()=>{var u,f;const s=(f=(u=o.value)==null?void 0:u.fieldsByName[a])==null?void 0:f.referencedEntity;if(!s)throw new Error("---");return ee.initEntity(s).then(()=>s)}).then(s=>{o.value=ee.get(s),t.entity=s,t.name=c[l+1]}),Promise.resolve().then(()=>ee.initEntity(t.entity)).then(()=>{o.value=ee.get(t.entity)})).finally(()=>n.value=!0),r.computed(()=>{if(!n.value||!o.value)return;const i=o.value.fieldsByName[t.name];if(i)return i})}const xr=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{},usageContext:{type:Boolean,default:!0}},setup(e){const t=e,n=R.Form.getParentForm();Te();const o=dt(),i=r.computed(()=>{var g,m,w;const d=c.value,b=s(d),h={type:b,disabled:t.usageContext?!((g=l.value)!=null&&g.canSet):!1,label:t.label};return b==="Decimal"&&((w=(m=d==null?void 0:d.presentationType)==null?void 0:m.toLowerCase)==null?void 0:w.call(m))==="money"&&(h.money=!0),d&&Object.assign(h,{suffix:d.valueUnit||void 0,label:t.label||d.displayName}),Array.isArray(S.arrayFieldParamsHandlers)&&S.arrayFieldParamsHandlers.forEach(p=>Object.assign(h,p(d,l.value,h,n,t.name))),h}),a=["MultiText","MultiWideText"],l=r.computed(()=>{var d;return(d=o==null?void 0:o.value)==null?void 0:d.fields[t.name]}),c=Vt(t.name);function s(d){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(d){if(d.type==="Reference"||d.type==="Owned")return d.referencedEntity;if(d.dataType==="Boolean")return"single-checkbox";if(d.dataType==="DateTime")return"date";if(d.dataType==="Integer"||d.dataType==="Decimal")return"number";if(d.dataType==="List")return d.aggregatedEntity;if(a.includes(d.presentationType))return"textarea";if(d.presentationType==="PhoneNumber")return"tel"}return"text"}const u=r.computed(()=>{var d;return t.usageContext?((d=l.value)==null?void 0:d.canGet)===!0:!0}),{controller:f}=Ze();return r.watch(()=>u.value,d=>d?f.show():f.hide(),{immediate:!0}),r.onUnmounted(()=>f.remove()),(d,b)=>u.value?(r.openBlock(),r.createBlock(r.unref(R.FormField),r.mergeProps({key:0},{...d.$attrs,...i.value},{name:d.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function Vr(e){return Array.isArray(e)&&(e==null?void 0:e[1])||T.DEFAULT_ORDER_DIR}const $r=["fill"],Dr=r.createElementVNode("path",{d:"M440-647 244-451q-12 12-28 11.5T188-452q-11-12-11.5-28t11.5-28l264-264q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l264 264q11 11 11 27.5T772-452q-12 12-28.5 12T715-452L520-647v447q0 17-11.5 28.5T480-160q-17 0-28.5-11.5T440-200v-447Z"},null,-1),Pr=[Dr],Mr=r.defineComponent({__name:"widget-icon-arrow-up",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},Pr,8,$r))}}),jr={class:"widget-fast-table-head-cell-td"},Ur={key:1,class:"widget-head-cell-label"},Wr={key:2,class:"widget-head-cell-order"},qr=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{},type:{},isFullSelected:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=r.computed(()=>Je(n.name));r.computed(()=>Vr(n.order));const i=t;function a(){i("select")}return(l,c)=>{var s;return r.openBlock(),r.createElementBlock("td",jr,[r.createElementVNode("div",{class:r.normalizeClass(["widget-head-cell",[l.type==="multi-select"?"justify-content-center":""]]),onClick:c[0]||(c[0]=u=>l.$emit("order",l.name))},[l.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,"model-value":l.isFullSelected,onClick:a,type:"single-checkbox"},null,8,["model-value"])):(r.openBlock(),r.createElementBlock("span",Ur,r.toDisplayString(l.label),1)),o.value===((s=l.order)==null?void 0:s[0])?(r.openBlock(),r.createElementBlock("div",Wr,[r.createVNode(Mr,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${l.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)],2)])}}}),$t=U(qr,[["__scopeId","data-v-d131e64e"]]),Hr=["fill"],Gr=r.createElementVNode("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"},null,-1),zr=[Gr],Kr=r.defineComponent({__name:"widget-icon-keyboard-arrow-down",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},zr,8,Hr))}}),Yr={class:"widget-filter-item-popup"},Xr=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filters:{},filterItem:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,i=S.tableFilterEntityBind,a=r.ref(),l=r.computed(()=>{const h=n.filterItem;return h.entity?"Entity":h.type?h.type:null});function c(h){s.value=h==="start"}const s=r.ref(!1),u=r.computed(()=>Array.isArray(n.values)||typeof n.values=="string"?n.values.length>0:!!n.values),f=r.ref(!1);let d=null;function b(h=!f.value){f.value=h,!f.value&&d?(d(),d=null):a.value&&(d=R.utils.clickOutside(a.value,b.bind(null,!1)))}return(h,g)=>{var m;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:a},[r.createElementVNode("div",{class:r.normalizeClass(["widget-filter-item",{"widget-filter-item_active":u.value}]),onClick:g[0]||(g[0]=()=>b())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":u.value}])},r.toDisplayString(h.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(Ce,{key:0})):(r.openBlock(),r.createBlock(Kr,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":f.value})},null,8,["class"]))],2),r.withDirectives(r.createElementVNode("div",Yr,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((m=r.unref(i))==null?void 0:m[l.value]),{key:0,"filter-metadata":h.filterItem,values:h.values,filters:h.filters,"base-entity":h.entity,onClear:g[1]||(g[1]=w=>o("clear")),"onUpdate:values":g[2]||(g[2]=w=>o("update:values",w)),onReadProcess:c},null,40,["filter-metadata","values","filters","base-entity"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Dt=U(Xr,[["__scopeId","data-v-43ed0322"]]),Jr={class:"widget-table-search flex"},Qr=["value"],Zr=r.defineComponent({__name:"widget-table-search",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(i){const a=i.target;if(!a)return;const l=a.value;n("update:modelValue",l)}return(i,a)=>(r.openBlock(),r.createElementBlock("div",Jr,[r.createVNode(he,{class:"widget-table-search-icon"},{default:r.withCtx(()=>[r.createTextVNode("search")]),_:1}),r.createElementVNode("input",{class:"widget-table-search-input",type:"text",alt:"Searching for data in a table",value:i.modelValue,onInput:o,placeholder:"Filter by keyword"},null,40,Qr)]))}}),eo=U(Zr,[["__scopeId","data-v-dbdf1e05"]]),to={class:"widget-table-panel-filter flex"},no=r.defineComponent({__name:"widget-table-panel-filters",props:{filtersConfig:{},filters:{},entity:{},search:{}},emits:["update:filters","update:search"],setup(e,{emit:t}){const n=e,o=t;function i(l,c){o("update:filters",{...n.filters,[l]:c})}function a(l){const c={...n.filters};delete c[l],o("update:filters",c)}return(l,c)=>(r.openBlock(),r.createElementBlock("div",to,[r.createVNode(eo,{"model-value":l.search,"onUpdate:modelValue":c[0]||(c[0]=s=>o("update:search",s))},null,8,["model-value"]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.filtersConfig,(s,u)=>{var f;return r.openBlock(),r.createBlock(Dt,{key:u,entity:l.entity,"filter-item":s,values:(f=l.filters)==null?void 0:f[r.unref(re)(s)],filters:l.filters,"onUpdate:values":d=>i(r.unref(re)(s),d),onClear:d=>a(r.unref(re)(s))},null,8,["entity","filter-item","values","filters","onUpdate:values","onClear"])}),128))])]))}}),ro=U(no,[["__scopeId","data-v-3a1abbf9"]]);function Pt(e,t){const n=document.createElement("a");n.href=e,t!=null&&t.blank&&(n.target="_blank"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{n.remove()},100)}const oo={class:"widget-fast-table-tools flex gap-15"},io=r.defineComponent({__name:"widget-fast-table-tools",props:{tools:{},loading:{type:Boolean},selectedRows:{},metadata:{},canCreate:{type:Boolean}},emits:["reload","export","new"],setup(e,{emit:t}){const n=e,o=le.useRouter(),i=t,a=[{name:"export",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:()=>i("export")},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>i("reload")},{name:"new",label:"Add New",icon:"new",buttonStyle:"primary",callback:()=>i("new")}],l=r.inject(T.PROVIDE_NAME_ACTIONS,null),c=r.computed(()=>(Array.isArray(n.tools)?n.tools:[]).reduce((g,m)=>(m.name==="*"?g.push(...a):g.push(m),g),[]));function s(g){return a.find(m=>m.name===g.name)}function u(g){return{...g,label:g.label||"Batch update",callback:async()=>{const m=n.metadata,w=m.name,p=n.selectedRows||[];if(n.selectedRows.length===0)return je.add("error","Kindly select at least one record to update");const v=await H.promptModal(T.MODAL_BATCH_VALUES,{entity:w,availableFields:g.availableFields||[]});if(!v)return;const y=ut(w),_=p.map(C=>({primaryKey:C[y],version:m.versioned?C.Version:void 0}));await Qt(w,{values:v,elements:_}).then(C=>{C.forEach(O=>{O.type==="reject"&&j("error")(O.data)})}).catch(j("error")),i("reload")}}}function f(g){return{...g,callback:()=>o.push(g.to)}}function d(g){return{...g,callback:()=>{const m=en(g.filename);Pt(m,{blank:!0})}}}const b=r.computed(()=>{var w;const g=((w=l==null?void 0:l.actions)==null?void 0:w.value)||[],m=[];return c.value.forEach(p=>{if(!(typeof p.override=="string"&&!g.find(v=>v.name===p.override))){if(s(p)){if(p.name==="new"&&!n.canCreate)return;const v=a.find(y=>y.name===p.name);if(v)return m.push(v)}if(p.name==="redirect")return m.push(f(p));if(p.name==="batch-update")return m.push(u(p));if(p.name==="static-file")return m.push(d(p));{const v=g.find(y=>y.name===p.name);if(v)return m.push({label:v.title,...p,callback:()=>h(v)})}}}),m.map(p=>({...p,process:ie(p.callback)}))});function h(g){var p;const m=(p=g.action.parameters.find(v=>v.dataTypeName==="IntegerArray"))==null?void 0:p.name,w={};return m&&(w[m]=n.selectedRows.map(v=>{if(!(typeof v=="object"&&v!==null))return null;const y=n.metadata.fieldNameForIdentification;return y?v[y]:null})),g.callback(w)}return(g,m)=>{const w=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",oo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.value,p=>(r.openBlock(),r.createBlock(w,{label:p.label,title:p.name,icon:p.icon,type:p.buttonStyle,loading:p.name==="reload"?g.loading:p.process.loading,onClick:()=>p.process.call()},null,8,["label","title","icon","type","loading","onClick"]))),256)),r.renderSlot(g.$slots,"default")])}}});function ao(e,t){const n=Bt(),o=le.useRouter(),i=r.reactive({entity:null,mark:null,settings:null});function a(y){const _={...f.value,...y};l(_)}function l(y){{const _=y.prefilters;_&&(Object.keys(_).forEach(C=>{var E,k;const O=_[C];Array.isArray(_[C])&&_[C].length===0&&i.settings&&!((k=(E=i.settings)==null?void 0:E.prefilters)!=null&&k[C])&&delete _[C],kn(O)&&(typeof O.min!="number"&&delete O.min,typeof O.max!="number"&&delete O.max,Object.keys(O).length===0&&delete _[C])}),R.utils.isEmptyObject(_)&&delete y.prefilters)}localStorage.setItem(u(i.entity,i.mark),JSON.stringify(y)),t&&t()}function c(){return i.entity?JSON.parse(localStorage[u(i.entity,i.mark)]||"{}"):null}function s(y,_){i.entity=y,i.mark=_,b.call()}function u(y,_){return"list-configuration:"+y+(_?"-"+_:"")}const f=r.computed(()=>i.entity?JSON.parse(n[u(i.entity,i.mark)]||"{}"):null),d=r.computed(()=>i.settings?Ke(i.entity,i.settings.config,{router:o,activate:e}):[]),b=ie(async function(){if(!i.entity)return;const _=await Kt(i.entity,i.mark);i.settings=Object.freeze(_),t&&t()}),h=r.computed(()=>{var C;const y=f.value.order||null,_=((C=i.settings)==null?void 0:C.order)||null;return y||_||[]}),g=r.computed(()=>{var C;const y=f.value.prefilters||{};return{...((C=i.settings)==null?void 0:C.prefilters)||{},...y}}),m=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.filters)||[]}),w=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.label)||null}),p=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.tools)||[]}),v=r.computed(()=>!R.utils.isEmptyObject(f.value));return{state:i,get customFilters(){return i.settings.customFilters||[]},set:s,get:c,configuration:f,update:a,computedPrefilter:g,computedFiltersConfiguration:m,get cellConfig(){return i.settings?Ke(i.entity,i.settings.config,{router:o,activate:e}):[]},get prefilters(){var y;return((y=c())==null?void 0:y.prefilters)||i.settings.prefilters||{}},get order(){var y;return((y=c())==null?void 0:y.order)||i.settings.order||[]},clean(){localStorage.removeItem(u(i.entity,i.mark)),t&&t()},cellConfiguration:d,computedLabel:w,computedTools:p,computedHasLocalConfiguration:v,computedOrder:h,get displayModeForNew(){return i.settings.displayModeForNew||"inline"}}}var me;class Mt{constructor(t){Ne(this,me);this.unloaded=!1,this.offset=0,this.array=r.reactive([]),de(this,me,null),this.process=ie(this.load.bind(this)),this.entity=t,this.limit=50}set options(t){de(this,me,t)}get requestReadOptions(){return Object.assign({},Ae(this,me)||null,{offset:this.offset,limit:this.limit})}async next(){this.unloaded||this.process.loading||await this.process.call()}reload(){return this.clear(),this.next()}clear(){this.array.splice(0,this.array.length),this.offset=0,this.unloaded=!1}get loading(){return this.process.loading}init(t){this.options=t,this.clear()}async load(){const t=await ce(this.entity,this.requestReadOptions);this.addData(t),t.length!==this.limit&&(this.unloaded=!0)}addData(t){this.array.push(...t.map(n=>Object.freeze(n))),this.offset+=t.length}}me=new WeakMap;const so=["count"],lo={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},co={class:""},uo=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean},hideActions:{type:Boolean},disableUsageContext:{type:Boolean}},setup(e,{expose:t}){const n=e,o=le.useRouter(),i=r.ref(null),a=r.computed(()=>i.value?c.array.indexOf(i.value[2]):null);function l(A,F,$){i.value=[A,F,$]}const c=new Mt(n.entity),s=r.ref(""),u=r.computed(()=>Array.isArray(k.value)?s.value.length===0?c.array:c.array.filter(A=>!!k.value.find($=>{const M=ke($,A);return typeof M=="string"?M.includes(s.value):!1})):[]),f=r.ref(null),d=R.Form.getParentForm(),b=r.ref([]),h=Te(n.entity),{state:g,update:m}=dt(n.entity,{masterEntities:n.masterEntities||[]}),w=ie(async()=>{try{b.value=[],await c.reload(),n.disableUsageContext||await m()}catch(A){const{message:F}=rt(A);f.value=F}});d instanceof R.Form&&d.subscribe({read:w.call.bind(null),name:n.entity,type:"table"}),r.watch(()=>n.mark,()=>{E.set(n.entity,n.mark)});function p(){return I.and(I(E.prefilters),I(n.binding||{}))}const{controller:v}=Ze();r.watch(()=>g.value,A=>{A&&(A.canRead?v.show():v.hide())},{immediate:!0});let y=[Ee.on("affected-entity",A=>{A.name===n.entity&&w.call()}),Ee.on("display-entity",async A=>{A.name===n.entity&&(c.loading&&await c.process.promise,l(A.name,A.primaryKey,u.value.find(F=>F[h.value.fieldNameForIdentification]===A.primaryKey)))})];r.onUnmounted(()=>{y.map(A=>A()),v.remove()});function _(A){function F(G){return Array.isArray(G)?F(G[0]):typeof G!="string"?null:G}const $=F(A);if(!$)return;const M=E.order;C("order",M[0]!==$?[$,"asc"]:M[1]==="desc"?[]:[$,"desc"])}function C(A,F){E.update({[A]:F})}const O=r.computed(()=>w.wait),E=ao(l,()=>{c.init({customFilters:E.customFilters,fields:it(k.value).join(" "),order:E.order,filter:p()}),c.next()}),k=E.cellConfiguration;E.set(n.entity,n.mark),r.watch(()=>E.state.settings,()=>setTimeout(w.call,50));const N=r.computed(()=>E.state.settings);t({listSettings:N,array:u,config:k,listDataController:c,selectedRows:b});function V(){H.openModal(T.MODAL_LIST_DOWNLOAD,{entity:n.entity,cellConfig:E.cellConfig,order:E.order,prefilters:p(),customFilters:E.customFilters})}function D(){switch(E.displayModeForNew){case"modal":return H.openModal(T.MODAL_ENTITY,{entity:n.entity});case"form":return o.push(ct(n.entity));case"inline":return i.value=[n.entity]}}function J(){E.clean()}function Se(){return{entity:n.entity}}return(A,F)=>{var G;const $=r.resolveComponent("widget-button"),M=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",{class:"es-grid es-gap-15",count:b.value.length},[r.unref(E).computedLabel.value&&!A.hideLabel?(r.openBlock(),r.createElementBlock("p",lo,r.toDisplayString(r.unref(E).computedLabel.value),1)):r.createCommentVNode("",!0),r.unref(h)&&!A.hideActions?(r.openBlock(),r.createBlock(io,{key:1,metadata:r.unref(h),tools:r.unref(E).computedTools.value,loading:O.value,"selected-rows":b.value||[],onReload:r.unref(w).call,onExport:V,onNew:D,"can-create":((G=r.unref(g))==null?void 0:G.canCreate)||!1},{default:r.withCtx(()=>[r.renderSlot(A.$slots,"tools"),r.unref(E).computedHasLocalConfiguration.value?(r.openBlock(),r.createBlock($,{key:0,onClick:J,type:"primary",label:"Clear all filters"})):r.createCommentVNode("",!0)]),_:3},8,["metadata","tools","loading","selected-rows","onReload","can-create"])):r.createCommentVNode("",!0),r.createElementVNode("div",co,[r.createVNode(ro,{search:s.value,"onUpdate:search":F[0]||(F[0]=P=>s.value=P),entity:A.entity,"filters-config":r.unref(E).computedFiltersConfiguration.value,filters:r.unref(E).computedPrefilter.value,"onUpdate:filters":F[1]||(F[1]=P=>C("prefilters",P))},null,8,["search","entity","filters-config","filters"]),r.createVNode(r.unref(xt),{config:r.unref(k),array:u.value,"active-row":a.value,"onUpdate:activeRow":F[3]||(F[3]=P=>i.value=null),onOrder:_,class:"table",selectedRows:b.value,"onUpdate:selectedRows":F[4]||(F[4]=P=>b.value=P),"row-options-handler":Se},{"head-cell":r.withCtx(P=>{var Q,mt,gt;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(A.$slots["head-cell"]?A.$slots["head-cell"]:$t),r.mergeProps({label:P.label},P,{onOrder:_,order:r.unref(E).computedOrder.value,type:P.type,"is-full-selected":((Q=b.value)==null?void 0:Q.length)===((mt=u.value)==null?void 0:mt.length)&&((gt=u.value)==null?void 0:gt.length)>0}),null,16,["label","order","type","is-full-selected"]))]}),default:r.withCtx(()=>{var P,Q;return[r.createVNode(M,{entity:(P=i.value)==null?void 0:P[0],"primary-key":((Q=i.value)==null?void 0:Q[1])||null,"master-entities":A.masterEntities||void 0,binding:A.binding,onFormUpdate:F[2]||(F[2]=()=>{i.value=null,r.unref(c).reload()})},null,8,["entity","primary-key","master-entities","binding"])]}),_:1},8,["config","array","active-row","selectedRows"])])],8,so)}}});function jt(e,t={},n={}){const o=r.inject(T.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:t,a=typeof t=="string"?n:t;return r.computed(()=>{var s;const c=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(u=>u.name===i);return c?{...c,...a}:null})}const fo=r.defineComponent({__name:"widget-action",props:{name:{},overrideParams:{}},setup(e){const t=e,n=jt(t.name,t.overrideParams||{}),o=r.computed(()=>{if(n.value)return ie(n.value.callback)});return(i,a)=>{var c;const l=r.resolveComponent("widget-button");return r.unref(n)?(r.openBlock(),r.createBlock(l,{key:0,label:r.unref(n).label,loading:((c=o.value)==null?void 0:c.loading)||!1,onClick:a[0]||(a[0]=()=>{var s,u;return(u=(s=o.value)==null?void 0:s.call)==null?void 0:u.call(s,i.overrideParams||{})})},null,8,["label","loading"])):r.createCommentVNode("",!0)}}}),po=r.defineComponent({__name:"WidgetResolverEntity",setup(e){const t=le.useRouter(),n=le.useRoute();function o(){const i=n.params.entity,a=n.params.primaryKey;at(i,a).then(l=>t.replace(ct(l,a))).catch(l=>{j("error")(l),t.back()})}return r.onMounted(o),(i,a)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(Pe,{label:"Loading..."})]))}}),mo=r.defineComponent({__name:"modal-list-download",props:{entity:{},cellConfig:{},prefilters:{},order:{},customFilters:{}},setup(e){const t=e,n=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:i,reject:a,start:l}=wn({entity:t.entity,config:t.cellConfig,prefilters:t.prefilters,order:t.order,customFilters:t.customFilters});return H.onBeforeModalClose(a),r.onMounted(l),r.watch(()=>o.finished,()=>{i(),H.popModal()}),(c,s)=>{const u=r.resolveComponent("widget-button"),f=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(f,null,{footer:r.withCtx(()=>[r.createVNode(u,{onClick:s[0]||(s[0]=d=>{r.unref(i)(),r.unref(H.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(Pe,{label:"Loading"})])]),_:1})}}}),et=e=>(r.pushScopeId("data-v-efd61247"),e=e(),r.popScopeId(),e),go={class:"version-item"},ho={class:"text_md"},yo={class:"version-item-date text_md"},vo=et(()=>r.createElementVNode("span",null,null,-1)),wo=et(()=>r.createElementVNode("div",null,null,-1)),bo=et(()=>r.createElementVNode("span",null,null,-1)),Eo={class:"text_sm"},_o={class:"text_sm line-clamp_5"},ko={class:"text_sm line-clamp_5"},Co=r.defineComponent({__name:"version-item",props:{selectedFields:{},date:{},customerName:{},version:{},changes:{},entity:{}},setup(e){const t=e;function n(a,l){const c=a.name.toLowerCase(),s=l.name.toLowerCase();return s==="version"?-1:c==="version"?1:s.startsWith("utc")?-1:c.startsWith("utc")?1:0}const o=r.computed(()=>[...t.changes||[]].sort(n)),i=r.computed(()=>(o.value||[]).filter(a=>Array.isArray(t.selectedFields)&&t.selectedFields.length!==0?t.selectedFields.includes(a.name):!0));return(a,l)=>(r.openBlock(),r.createElementBlock("div",go,[r.createElementVNode("span",ho,[r.createElementVNode("b",null,r.toDisplayString(a.version),1)]),r.createElementVNode("span",yo,[r.createElementVNode("b",null,r.toDisplayString(r.unref(nt)(a.date)),1)]),vo,wo,(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.name},[bo,r.createElementVNode("span",Eo,r.toDisplayString(c.name),1),r.createElementVNode("span",_o,r.toDisplayString(r.unref(He)(a.entity,c.name,c.newValue)),1),r.createElementVNode("span",ko,r.toDisplayString(r.unref(He)(a.entity,c.name,c.oldValue)),1)],64))),128))]))}}),To=U(Co,[["__scopeId","data-v-efd61247"]]),tt=e=>(r.pushScopeId("data-v-321c2f32"),e=e(),r.popScopeId(),e),So={key:1,class:"wrap-history"},Ao={class:"history-header grid gap_10"},No=tt(()=>r.createElementVNode("span",null,null,-1)),Io=tt(()=>r.createElementVNode("span",{class:"text_md"},"New Value",-1)),Ro=tt(()=>r.createElementVNode("span",{class:"text_md"},"Old Value",-1)),Lo={class:"padding_15 grid gap_10 container-history"},Oo=r.defineComponent({__name:"modal-version-history",props:{entity:{},primaryKey:{}},setup(e){const t=e,n=r.computed(()=>`${t.entity} Version History`),o=r.ref(),i=r.computed(()=>!s.value||Array.isArray(s.value)&&s.value.length===0?o.value:(o.value||[]).filter(d=>{var b;return d.action==="Insert"?!0:(b=d.changes)==null?void 0:b.find(h=>s.value&&s.value.includes(h.name))})),a=ie(u),l=Te(t.entity),c=r.computed(()=>l.value.fields.map(d=>({label:d.displayName,value:d.name}))),s=r.ref(null);async function u(){try{const d=await Zt({entity:t.entity,primaryKey:t.primaryKey});o.value=d.history}catch(d){j("error")(d)}}r.onMounted(()=>a.call());function f(d){return d.currentValues.map(b=>({name:b.fieldName,newValue:b.value})).filter(b=>b.newValue)}return(d,b)=>{const h=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(h,{label:n.value,class:"wrap-modal-version-history"},{default:r.withCtx(()=>[r.unref(a).loading?(r.openBlock(),r.createBlock(r.unref(Pe),{key:0,label:"Loading history..."})):(r.openBlock(),r.createElementBlock("div",So,[r.createElementVNode("div",Ao,[No,r.createVNode(r.unref(R.FormField),{type:"select",options:c.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=g=>s.value=g),multiple:""},null,8,["options","modelValue"]),Io,Ro]),r.createElementVNode("div",Lo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(g,m)=>(r.openBlock(),r.createBlock(To,{"selected-fields":s.value,date:g.utcCreated,"customer-name":"",version:g.version,changes:g.action==="Insert"?f(g):g.changes,entity:d.entity,key:m},null,8,["selected-fields","date","version","changes","entity"]))),128))])]))]),_:1},8,["label"])}}}),Fo=U(Oo,[["__scopeId","data-v-321c2f32"]]);function Ut(e,t,n){const o=window.URL.createObjectURL(e);Pt(o,n),setTimeout(()=>{window.URL.revokeObjectURL(o)},100)}function Bo(e,t){return fetch(`/close-api/document-builder/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CatalogId:t})}).then(n=>n.blob()).then(n=>{Ut(n,e+t+"-print-form.pdf",{blank:!0})})}function nt(e){return Be(e,"YYYY/MM/DD HH:mm:ss")}function Be(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Cn.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function ie(e){function t(i){o.status=i}function n(...i){if(o.loading)return Promise.reject("The process has already started.");o.loading=!0,o.wait=!0;const a=Promise.resolve().then(()=>t(1)).then(()=>e(...i)).then(l=>(t(3),l)).catch(l=>{throw t(2),l}).finally(()=>{o.wait=!1,o.loading=!1,o.promise=null});return o.promise=a,a}const o=r.reactive({status:0,wait:!1,loading:!1,call:n,promise:null});return o}var Wt=(e=>(e[e.init=0]="init",e[e.loading=1]="loading",e[e.error=2]="error",e[e.done=3]="done",e))(Wt||{});function rt(e){return typeof e=="string"?Ie(e):xo(e)?Ie(e.message,e.children||e.details||[]):Vo(e)?Ie(e.title,[e.detail||""]):Ie(T.DEFAULT_ERROR_MESSAGE)}function xo(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function Vo(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function Ie(e,t=[]){return{message:e,children:t}}function j(e="error"){return function(t){const{message:n,children:o}=rt(t);je.add(e,n,{children:o})}}function ce(e,t={}){const n=B();return qt(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:read",{entity:e,...t})}function qt(e){return!!(e.id||e.primaryKey)}function ot(e,t){const n=B();return qt(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:update",{...t,entity:e})}function it(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function Ht(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(t,"0"),o[1].length>t&&(o[1]=o[1].substring(0,t)),o.join(".")}function $o(e,t){const n=new Map;return e.forEach(o=>{var a;const i=t(o);n.has(i)||n.set(i,[]),(a=n.get(i))==null||a.push(o)}),n}function Do(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Po(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return T.DEFAULT_ERROR_MESSAGE}})}function q(e,t={}){return K.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=K.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(T.DEFAULT_ERROR_MESSAGE)}).then(n=>Po(n).then(o=>{if(!n.ok)throw o;return o}))}function Gt(e,t=1e3){let n=0;return(...o)=>{clearTimeout(n),n=window.setTimeout(()=>e(...o),t)}}function Mo(e,t){let n=!1;return(...o)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...o)}}const jo=$e(De("pretty-value-field-by-entity"));function He(e,t,n){try{const o=ee.get(e);if(!o)throw new Error("For entity metadata is not loaded");const i=o.fieldsByName[t];if(!i)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return i.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(o){return jo('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,t,n),n}}const ae=$e(De("use-socket"));function B(){return Wo}function Uo(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const Wo=function(){let e=1,t,n;const o=new Set;let i=0;const a=new Set;function l(){if(t)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{t.close()},Dn*2);const p=new Uint8Array(1);p[0]=$n,t.send(p)}setInterval(()=>{Array.from(o).forEach(p=>{w(p)&&(ae("Handler for event %s requestId %d was expired",p.event,p.requestId),p.requestId?s({requestId:p.requestId,event:Ot,data:{message:oe.RequestTookToLong().message}}):o.delete(p))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},T.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:t}}function s(p){const v=[...o.values()];ae("Handlers array length is %d. Response event: %s. Request id: %d",o.size,p.event,p.requestId),v.forEach(y=>{const _=p.requestId;(y.requestId&&y.requestId===_||!y.requestId&&y.event===p.event)&&(ae("Find appropriated handler: %d, event: %s",e,y.event),y.callback(p.data,p),y.once&&(o.delete(y),ae("Handler was removed by *once* params was passed. %o",y)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(p){ae("Connection to server was stopped: %d %s",p.code,p.reason),Array.from(o).forEach(v=>{v.guaranteedAnswer&&v.serializeString&&a.add(v.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(p=>{f(p),a.delete(p)})},t.onerror=function(p){console.warn(p)},t.onmessage=p=>{var v;try{if(Uo(p.data)){l();return}const y=JSON.parse(p.data);if(!zt(y)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(y);return}y.event==="progress"&&o.forEach(_=>{_.event===y.data.for.event&&_.requestId===y.data.for.requestId&&(console.log("UPDATE TIME"),_.timeToLive=new Date().getTime()-_.created+T.TIME_TO_LIVE_SOCKET_REQUEST)}),(v=y==null?void 0:y.data)!=null&&v.refresh&&location.reload(),s(y)}catch(y){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(y)}}}function f(p){t.send(p)}function d(p,v){m({event:p,callback:v})}function b(p,v){m({event:p,callback:v,once:!0})}function h(){return t&&(t==null?void 0:t.readyState)===1}function g(p,v,y){const _=++e,C=JSON.stringify({requestId:_,event:p,data:v,contextId:K.contextId,url:S.socketURLHandler?S.socketURLHandler():window.location.href});return h()?f(C):(a.add(C),ae("Socket is not connected. Message was send to save-queue")),new Promise((O,E)=>{m({event:p,requestId:_,once:!0,guaranteedAnswer:!0,serializeString:C,callback:(k,N)=>{if(ae("Promise was resolve with next data:",k),qo(N))return void E(k);y&&y(k,N),O(k)},timeToLive:T.TIME_TO_LIVE_SOCKET_REQUEST})})}function m(p){const v={timeToLive:0,...p,created:new Date().getTime()};o.add(v)}function w(p){return p.timeToLive===0||typeof p.timeToLive!="number"?!1:new Date().getTime()-p.created>p.timeToLive}return{get socket(){return t},on:d,once:b,emit:g,initialization(p){n=p},getDevInfo:c}}(),qo=e=>!!zt(e)&&e.event===Ot,zt=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Kt(e,t){return B().emit("list-setting:read",{entity:e,mark:t})}function Ho(e,t){return B().emit("metadata-field:treat",{entity:e,fieldName:t})}function Yt(e,t){return B().emit("entity:create",{...t,entity:e})}function Xt(e,t){return B().emit("entity:delete",{...t,entity:e})}function Go(e,t){return B().emit("usage-context:read",{...t,entity:e})}function Jt(e={}){return B().emit("tool:read",e)}function zo(){return B().emit("metadata-list:read",{})}function Qt(e,t){return B().emit("batch:update",{...t,entity:e})}function at(e,t){return B().emit("entity:resolve",{primaryKey:t,entity:e})}function Zt(e){return B().emit("history:read",e)}function Ko(e,t){return B().emit("entity:count",{...t,entity:e})}function en(e){return`/${Pn}/${e}`}function ye(e){return{exec(t,n){switch(e.name){case"replace-boolean":return ye.replaceBoolean(t,e.values);case"replace-record-operation":return ye.replaceRecordOperation(t)}}}}ye.replaceBoolean=Yo;ye.replaceRecordOperation=Xo;function Yo(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function Xo(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Jo(e={}){return B().emit("tool:execute",e)}const Qo=$e(De("wrap-tool-response"));function tn(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=ti),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=ri),e.handleCloseForm===void 0&&(e.handleCloseForm=oi),e.handleValidationResult===void 0&&(e.handleValidationResult=ni),{...t,label:t.title,async callback(n={}){var l;const o=typeof e.values=="function"?e.values(t,e):e.values;let i={};t.action.targetName==="Record"&&o.hasOwnProperty("Id")&&(i.Id=o.Id,delete o.Id);const a=()=>Jo({name:t.name,values:{...o,...n},primaryKeys:i,usageContext:t.usageContext}).then(async c=>{var s,u;if(!Zo(c))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const f of e.handlers)await f(t,c,e);if(!c.success)throw e.handleValidationResult&&c.validationEffect&&((u=(s=c.validationEffect)==null?void 0:s.results)!=null&&u.length)&&e.handleValidationResult(t,c.validationEffect,e),new Error(c.message);return c.message&&je.add("info",c.message),Array.isArray(c.affectedEntities)&&e.handleAffectedEntity&&c.affectedEntities.forEach(f=>{var d;return(d=e.handleAffectedEntity)==null?void 0:d.call(e,t,f,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),c}).catch(c=>{if(j("error")(c),e.handleReject)return e.handleReject(t,c,e)});if((l=e.overrides)!=null&&l[t.name])return e.overrides[t.name](t,e);if(t.paramDialog){const c=await ii(t,e);if(c===null)return;n=Object.assign(n,c||{})}return t.requireSave&&e.form&&e.form.changed?e.form.save().then(a):!t.confirmation||!e.handleConfirmation||t.paramDialog?a():e.handleConfirmation(t,a)}}}function Zo(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function ei(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function ti(e,t){const n=ei(e.confirmation);if(!H.getComponentFromStore(T.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await H.promptModal(T.MODAL_CONFIRM,{message:n}))return t()}function ni(e,t){const n=T.MODAL_VALIDATION_EFFECT;if(!H.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{H.pushModal(n,t)})}function ri(e,t,n){var s;function o(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function i(u,f){u&&(Qo("Affected Entity %s. Find form with name %s.",f,u.name),u.name===f&&o(u)&&u.read(),u instanceof R.Form&&u.dependencies.forEach(d=>i(d,f)))}Ee.emit("affected-entity",t);const{router:a,form:l}=n,c=typeof t.primaryKey=="string"?t.primaryKey:(s=t.primaryKey)==null?void 0:s.Id;if(a&&t&&t.name===e.redirectEntity){Ee.emit("display-entity",{primaryKey:c,name:t.name}),S.getEntityLink&&a.push(S.getEntityLink(t.name,c));return}i(l,t.name)}function oi(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}function ii(e,t){var n;if((n=e.paramDialog)!=null&&n.name)return H.promptModal(e.paramDialog.name,{paramDialog:e.paramDialog,tool:e,options:t})}let se={};function te(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=R.utils.getPropFromObject((this==null?void 0:this.vocabulary)||se,e);if(typeof n=="string")return _t(n,t);const o=R.utils.getPropFromObject(se==null?void 0:se.root,e);return typeof o=="string"?_t(o,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function _t(e,t){return t.forEach((n,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),e}te.setGlobalVocabulary=function(e){se=e};te.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),te.bind({vocabulary:R.utils.getPropFromObject(se,t.toLowerCase())})};te.setVocabulary=function(e){return typeof e=="string"&&(e=R.utils.getPropFromObject(se,e)),te.bind({vocabulary:e})};function ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge={exports:{}},x={},ze={exports:{}},ue={};function nn(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function si(e,t,n){}function li(e,t,n){}var ci=/javascript\s*\:/img;function ui(e,t){return ci.test(t)?"":t}ue.whiteList=nn();ue.getDefaultWhiteList=nn;ue.onAttr=si;ue.onIgnoreAttr=li;ue.safeAttrValue=ui;var di={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,i;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},we=di;function fi(e,t){e=we.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,o=!1,i=0,a=0,l="";function c(){if(!o){var f=we.trim(e.slice(i,a)),d=f.indexOf(":");if(d!==-1){var b=we.trim(f.slice(0,d)),h=we.trim(f.slice(d+1));if(b){var g=t(i,l.length,b,h,f);g&&(l+=g+"; ")}}}i=a+1}for(;a<n;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var u=e.indexOf("*/",a+2);if(u===-1)break;a=u+1,i=a+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||c():s===`
|
|
7
|
-
`&&c()}return we.trim(l)}var pi=fi,Re=ue,mi=pi;function kt(e){return e==null}function gi(e){var t={};for(var n in e)t[n]=e[n];return t}function rn(e){e=gi(e||{}),e.whiteList=e.whiteList||Re.whiteList,e.onAttr=e.onAttr||Re.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Re.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Re.safeAttrValue,this.options=e}rn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,i=n.onAttr,a=n.onIgnoreAttr,l=n.safeAttrValue,c=mi(e,function(s,u,f,d,b){var h=o[f],g=!1;if(h===!0?g=h:typeof h=="function"?g=h(d):h instanceof RegExp&&(g=h.test(d)),g!==!0&&(g=!1),d=l(f,d),!!d){var m={position:u,sourcePosition:s,source:b,isWhite:g};if(g){var w=i(f,d,m);return kt(w)?f+":"+d:w}else{var w=a(f,d,m);if(!kt(w))return w}}});return c};var hi=rn;(function(e,t){var n=ue,o=hi;function i(l,c){var s=new o(c);return s.process(l)}t=e.exports=i,t.FilterCSS=o;for(var a in n)t[a]=n[a];typeof window<"u"&&(window.filterCSS=e.exports)})(ze,ze.exports);var st=ze.exports,lt={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,i;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},yi=st.FilterCSS,vi=st.getDefaultWhiteList,xe=lt;function on(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var an=new yi;function wi(e,t,n){}function bi(e,t,n){}function Ei(e,t,n){}function _i(e,t,n){}function sn(e){return e.replace(Ci,"<").replace(Ti,">")}function ki(e,t,n,o){if(n=pn(n),t==="href"||t==="src"){if(n=xe.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(Le.lastIndex=0,Le.test(n))return""}else if(t==="style"){if(Ct.lastIndex=0,Ct.test(n)||(Tt.lastIndex=0,Tt.test(n)&&(Le.lastIndex=0,Le.test(n))))return"";o!==!1&&(o=o||an,n=o.process(n))}return n=mn(n),n}var Ci=/</g,Ti=/>/g,Si=/"/g,Ai=/"/g,Ni=/&#([a-zA-Z0-9]*);?/gim,Ii=/:?/gim,Ri=/&newline;?/gim,Le=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Ct=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Tt=/u\s*r\s*l\s*\(.*/gi;function ln(e){return e.replace(Si,""")}function cn(e){return e.replace(Ai,'"')}function un(e){return e.replace(Ni,function(n,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function dn(e){return e.replace(Ii,":").replace(Ri," ")}function fn(e){for(var t="",n=0,o=e.length;n<o;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return xe.trim(t)}function pn(e){return e=cn(e),e=un(e),e=dn(e),e=fn(e),e}function mn(e){return e=ln(e),e=sn(e),e}function Li(){return""}function Oi(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function o(l){return n?!0:xe.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,c,s){if(o(l))if(s.isClosing){var u="[/removed]",f=s.position+u.length;return i.push([a!==!1?a:s.position,f]),a=!1,u}else return a||(a=s.position),"[removed]";else return t(l,c,s)},remove:function(l){var c="",s=0;return xe.forEach(i,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function Fi(e){for(var t="",n=0;n<e.length;){var o=e.indexOf("<!--",n);if(o===-1){t+=e.slice(n);break}t+=e.slice(n,o);var i=e.indexOf("-->",o);if(i===-1)break;n=i+3}return t}function Bi(e){var t=e.split("");return t=t.filter(function(n){var o=n.charCodeAt(0);return o===127?!1:o<=31?o===10||o===13:!0}),t.join("")}x.whiteList=on();x.getDefaultWhiteList=on;x.onTag=wi;x.onIgnoreTag=bi;x.onTagAttr=Ei;x.onIgnoreTagAttr=_i;x.safeAttrValue=ki;x.escapeHtml=sn;x.escapeQuote=ln;x.unescapeQuote=cn;x.escapeHtmlEntities=un;x.escapeDangerHtml5Entities=dn;x.clearNonPrintableCharacter=fn;x.friendlyAttrValue=pn;x.escapeAttrValue=mn;x.onIgnoreTagStripAll=Li;x.StripTagBody=Oi;x.stripCommentTag=Fi;x.stripBlankChar=Bi;x.attributeWrapSign='"';x.cssFilter=an;x.getDefaultCSSWhiteList=vi;var Me={},ne=lt;function xi(e){var t=ne.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=ne.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function Vi(e){return e.slice(0,2)==="</"}function $i(e,t,n){var o="",i=0,a=!1,l=!1,c=0,s=e.length,u="",f="";e:for(c=0;c<s;c++){var d=e.charAt(c);if(a===!1){if(d==="<"){a=c;continue}}else if(l===!1){if(d==="<"){o+=n(e.slice(i,c)),a=c,i=c;continue}if(d===">"||c===s-1){o+=n(e.slice(i,a)),f=e.slice(a,c+1),u=xi(f),o+=t(a,o.length,u,f,Vi(f)),i=c+1,a=!1;continue}if(d==='"'||d==="'")for(var b=1,h=e.charAt(c-b);h.trim()===""||h==="=";){if(h==="="){l=d;continue e}h=e.charAt(c-++b)}}else if(d===l){l=!1;continue}}return i<s&&(o+=n(e.substr(i))),o}var Di=/[^a-zA-Z0-9\\_:.-]/gim;function Pi(e,t){var n=0,o=0,i=[],a=!1,l=e.length;function c(b,h){if(b=ne.trim(b),b=b.replace(Di,"").toLowerCase(),!(b.length<1)){var g=t(b,h||"");g&&i.push(g)}}for(var s=0;s<l;s++){var u=e.charAt(s),f,d;if(a===!1&&u==="="){a=e.slice(n,s),n=s+1,o=e.charAt(n)==='"'||e.charAt(n)==="'"?n:ji(e,s+1);continue}if(a!==!1&&s===o){if(d=e.indexOf(u,s+1),d===-1)break;f=ne.trim(e.slice(o+1,d)),c(a,f),a=!1,s=d,n=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(d=Mi(e,s),d===-1){f=ne.trim(e.slice(n,s)),c(f),a=!1,n=s+1;continue}else{s=d-1;continue}else if(d=Ui(e,s-1),d===-1){f=ne.trim(e.slice(n,s)),f=St(f),c(a,f),a=!1,n=s+1;continue}else continue}return n<e.length&&(a===!1?c(e.slice(n)):c(a,St(ne.trim(e.slice(n))))),ne.trim(i.join(" "))}function Mi(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function ji(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function Ui(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Wi(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function St(e){return Wi(e)?e.substr(1,e.length-2):e}Me.parseTag=$i;Me.parseAttr=Pi;var qi=st.FilterCSS,z=x,gn=Me,Hi=gn.parseTag,Gi=gn.parseAttr,Fe=lt;function Oe(e){return e==null}function zi(e){var t=Fe.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=Fe.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=Fe.trim(e.slice(0,-1))),{html:e,closing:n}}function Ki(e){var t={};for(var n in e)t[n]=e[n];return t}function Yi(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(o){return o.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function hn(e){e=Ki(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=z.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Yi(e.whiteList||e.allowList):e.whiteList=z.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":z.attributeWrapSign,e.onTag=e.onTag||z.onTag,e.onTagAttr=e.onTagAttr||z.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||z.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||z.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||z.safeAttrValue,e.escapeHtml=e.escapeHtml||z.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new qi(e.css))}hn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,i=n.onTag,a=n.onIgnoreTag,l=n.onTagAttr,c=n.onIgnoreTagAttr,s=n.safeAttrValue,u=n.escapeHtml,f=t.attributeWrapSign,d=t.cssFilter;n.stripBlankChar&&(e=z.stripBlankChar(e)),n.allowCommentTag||(e=z.stripCommentTag(e));var b=!1;n.stripIgnoreTagBody&&(b=z.StripTagBody(n.stripIgnoreTagBody,a),a=b.onIgnoreTag);var h=Hi(e,function(g,m,w,p,v){var y={sourcePosition:g,position:m,isClosing:v,isWhite:Object.prototype.hasOwnProperty.call(o,w)},_=i(w,p,y);if(!Oe(_))return _;if(y.isWhite){if(y.isClosing)return"</"+w+">";var C=zi(p),O=o[w],E=Gi(C.html,function(k,N){var V=Fe.indexOf(O,k)!==-1,D=l(w,k,N,V);return Oe(D)?V?(N=s(w,k,N,d),N?k+"="+f+N+f:k):(D=c(w,k,N,V),Oe(D)?void 0:D):D});return p="<"+w,E&&(p+=" "+E),C.closing&&(p+=" /"),p+=">",p}else return _=a(w,p,y),Oe(_)?u(p):_},u);return b&&(h=b.remove(h)),h};var Xi=hn;(function(e,t){var n=x,o=Me,i=Xi;function a(c,s){var u=new i(s);return u.process(c)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,function(){for(var c in n)t[c]=n[c];for(var s in o)t[s]=o[s]}(),typeof window<"u"&&(window.filterXSS=e.exports);function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(Ge,Ge.exports);var Ji=Ge.exports;const Qi=ai(Ji);function Zi(e){return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/\[icon:([^\]]+)]/g,"<widget-icon>$1</widget-icon>"),e=e.replace(/\[(.*)]\((.*)\)/g,'<router-link to = "$2">$1</router-link>'),Qi(e)}function ea(e,t,n,o){let i=e+t/60+n/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function ta(e,t){const n={dir:e<0?t==="long"?"W":"S":t==="long"?"E":"N",deg:0|(e<0?e=-e:e),min:0|(e+=1e-9)%1*60,sec:(0|e*60%1*6e3)/100};return`${n.deg}° ${n.min}' ${n.sec}" ${n.dir}`}function ct(e,t){const n=["forms",e];return t&&n.push(t),"/"+n.join("/")}function na(e,t){return"/"+[T.PATH_RESOLVER_ENTITY,e,t].join("/")}function ra(){return`/${T.PATH_RESOLVER_ENTITY}/:entity/:primaryKey`}function ut(e){const t=ee.get(e);if(!t)throw new Error(`Metadata ${e} is still missing.`);return t.useCatalogInsteadId?"CatalogId":t.fieldNameForIdentification}function Ke(e,t,n){const o=te.getScope(e.toLowerCase());return t.map(i=>{typeof i.label=="string"&&(i.label=o(i.label)),i.type==="history"&&(i.onClick=l=>H.openModal(T.MODAL_HISTORY,{primaryKey:l[ut(e)],entity:e}),i.icon="history",i.class="widget-list-cell-history",i.hint="Open the History");const a=i.displayMode;if(a){const l=async c=>{try{const s=c[re(i)];return[await at(ia(i,c),s),s]}catch{return[]}};a&&(a==="form"?i.link=c=>{const s=c[re(i)];return s?na(i.entity,s):null}:i.onClick=async c=>{const[s,u]=await l(c);if(!s||!u)return null;switch(i.displayMode){case"modal":return H.openModal(T.MODAL_ENTITY,{entity:s,primaryKey:u});case"inline":return n.activate(s,u,c)}}),i.class="widget-table-cell_link cursor_pointer",typeof i.value!="string"&&(i.value=(c,s)=>s[i.name[1]])}return oa(i,i.type,i.presentation),S.listConvertCellConfigHandler&&S.listConvertCellConfigHandler(e,i),i})}function oa(e,t,n){switch(t){case"Decimal":{n==="Money"&&(e.type="money");break}}return e}const ia=(e,t)=>e.useObjectTypeName?t[e.name[2]]:e.entity?e.entity:null;function aa(e){if(!Array.isArray(S.arrayListCellHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");S.arrayListCellHandlers.push(e)}function sa(e,t){const n=re(e);return n?R.utils.getPropFromObject(t,n):null}function la(e){if(!Array.isArray(S.arrayFieldParamsHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");S.arrayFieldParamsHandlers.push(e)}function ca(e){if(!Array.isArray(S.arrayListRowHandlers))throw new Error("Configuration has mistake: arrayListRowHandlers is not an array");S.arrayListRowHandlers.push(e)}const ua={addListCellHandler:aa,getCellModelValue:sa,addFieldParamsHandler:la,addListRowHandler:ca};var yn=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(yn||{});function da(){const e=r.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function fa(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function vn(e,t){e()&&(await t(),await vn(e,t))}function pa(e,t,n={}){let o=!1;const i=r.ref(""),a=r.computed(()=>l.filter(E=>u(E,i.value))),l=r.reactive([]);let c=0;const s=r.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((E,k)=>fa(E,k));function f(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function d(){const E=_();return typeof E.limit!="number"&&(E.limit=100),E.offset=c,(n.request||ce)(e,E).then(N=>(c+=N.length,N))}function b(E,k){var V;return typeof E.Version=="number"?E.Version:(V=l.find(D=>D.Id===k))==null?void 0:V.Version}function h(E,k){const N=l.findIndex(V=>V.Id===E);if(N===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(N,1,k)}function g(E){const k=l.findIndex(N=>N.Id===E);if(k===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(k,1)}async function m(E,k){try{const N=_(),V=b(k,E);delete k.Version,await ot(e,{id:E,values:k,version:V,masterEntities:f()});const D=await ce(e,{fields:N.fields||"",id:E});h(E,D)}catch(N){j()(N)}}async function w(E,k={}){try{const N=_(),V=b(k,E);delete k.Version,await Xt(e,{id:E,version:V,masterEntities:f()}),g(E)}catch(N){j()(N)}}async function p(E){try{await Yt(e,{values:E,masterEntities:f()}),await C()}catch(k){j()(k)}}let v;async function y(){s.value=!0;try{v!=null&&v.signal&&!v.signal.aborted&&v.abort();let E=v=new AbortController,k=0;const V=_().limit||0;if(i.value&&!V){console.warn("Using textSearch assumes the use of limit.");return}await vn(()=>(V>0?k<V:!0)&&!o&&!E.signal.aborted,async()=>{const D=await d();E.signal.aborted||(l.push(...D),k+=D.filter(J=>u(J,i.value)).length,(D.length<V||V===0)&&(o=!0))})}catch(E){j()(E)}s.value=!1}function _(){return typeof t=="function"?t():t}async function C(){try{c=0,o=!1,l.splice(0,l.length),await y()}catch(E){j()(E)}}function O(){if(v)return v.abort();s.value=!1}return{array:l,updateById:m,next:y,reload:C,wait:s,create:p,deleteById:w,textSearch:i,filteredArray:a,abort:O}}function ma(){function e(){return{organizations:K.organizations,currentContextId:K.contextId,person:K.person,context:K.context,contextType:K.contextType,userId:K.userId}}const t=r.reactive(e());return K.onupdateContext(()=>{Object.assign(t,e())}),t}function ga(e,t,n){return B().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function ha(e,t,n){return B().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function ya(e,t){return B().emit("communication-message:create",{communicationId:e,text:t})}function va(e){return B().emit("communication-message:read",{communicationId:e})}function wa(e){const t=R.Form.getParentForm(),n=r.reactive([]);return t&&t.subscribe(e),e.read=()=>va(e.id).then(o=>(n.splice(0,n.length,...o),o)),{array:n}}function ba(e,t){e.read=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw oe.EntityWithoutName(e);return ce(e.name,o)}).then(pt).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(j())},e.save=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw oe.EntityWithoutName(e);return ot(e.name,{id:o.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw j()(i),i})};function n(){return typeof t=="function"?t():t}}function Te(e){if(!e)return r.inject(T.PROVIDE_NAME_METADATA);ee.initEntity(e);const t=r.computed(()=>ee.state[e]);return r.provide(T.PROVIDE_NAME_METADATA,t),r.provide(T.PROVIDE_ENTITY_NAME,e),t}function dt(e,t={}){if(!e)return r.inject(T.PROVIDE_NAME_USAGE_CONTEXT);const n=r.ref(null);return r.provide(T.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await Go(e,Ea(t||{}))}}}function Ea(e){return typeof e=="function"?e():e}function _a(e){if(!e)return r.inject(T.PROVIDE_NAME_ACTIONS);const t=r.ref(!1),n=r.reactive([]),o=r.computed(()=>n.map(l=>tn(e,l))),i={actions:o,update:a};r.provide(T.PROVIDE_NAME_ACTIONS,i),e.router=le.useRouter();function a(){if(t.value)return;t.value=!0,n.splice(0,n.length);const l=e==null?void 0:e.form;return Jt({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(c=>n.splice(0,0,...c)).catch(j("error")).finally(()=>t.value=!1)}return{actions:o,update:a,loading:r.readonly(t)}}function ka(e){function t(n){n.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",t)}),r.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function Ca(e,t={}){const n=r.reactive([]),o=s=>{const u=r.unref(e);if(s===void 0){n.length===0?u.forEach(a):u.forEach(l);return}i(s)?l(s):a(s)},i=s=>n.includes(s),a=s=>{t.handleSelect&&!t.handleSelect(s)||i(s)||n.push(s)},l=s=>{const u=n.findIndex(f=>f===s);u!==-1&&n.splice(u,1)},c=r.computed(()=>{const s=r.unref(e);return n.length===s.length&&s.length!==0});return[n,o,c,a,l]}function Ta(e){const t=r.ref(""),n=r.computed(()=>{const o=t.value.toLowerCase();return r.unref(e).filter(i=>t.value.length?Object.values(i).join().toLowerCase().includes(o):!0)});return{search:t,searchArray:n}}class We{static async getStartConfig(t,n){return B().emit("wizard:configuration",{process:t,entity:n})}static async startProcess(t,n){return B().emit("wizard:start",{process:t,entity:n})}static async runStep(t,n,o,i,a){return B().emit("wizard:step",{process:t,entity:n,stepName:o,token:i,values:a})}}function Sa(e){return e.statusName===W.Completed}function Aa(e){return[W.FinalStepWithConfirmation,W.NextStepWithConfirmation].includes(e.statusName)}function Na(e){return e.statusName===W.ValidationError}function Ia(e){return e.statusName===W.Undefined}function Ra(e,t,n){let o=null,i=[];const a=r.ref(!1),l=r.ref(null),c=r.computed(()=>d(i,l.value)),s=r.ref(null),u=r.reactive([]),f=r.computed(()=>u.map(v=>d(i,v)));function d(v,y){return v.find(_=>_.name===y)||null}async function b(v){var y;if(Ia(v)){await n.onDisplayDataSet(v);return}if(!(Aa(v)&&!await n.onDisplayDataSet(v))){if(Na(v))return void n.onValidation(v.validationResults);m(v),await r.nextTick();{const _=((y=d(i,l.value))==null?void 0:y.fields)||[];if([W.FinalStep,W.NextStep,W.FinalStepWithConfirmation,W.NextStepWithConfirmation].includes(v.statusName)&&(!_.length||La(_,n.presets)))return p(n.presets||{})}Sa(v)&&n.onCompleted(v)}}async function h(){try{await g(),await w()}catch(v){j("error")(v)}}function g(){return a.value="Loading process information.",We.getStartConfig(t,e).then(v=>(s.value={label:v.processTitle,info:v.processInfo,icon:v.processIcon},i=v.steps.map(y=>{const _=y.frontendEntity.rootObject,C=Object.fromEntries(y.frontendEntity.objectTypes.map(O=>[O.name,O.properties]));return{label:y.title,name:y.stepName,number:y.number,rootObjectName:_,objectTypes:C,fields:C[_],buttonCaption:y.buttonCaption}}))).finally(()=>{a.value=!1})}function m(v){return[W.FinalStepWithConfirmation,W.NextStepWithConfirmation,W.NextStep,W.Completed,W.FinalStep].includes(v.statusName)?(o=v.token,l.value=v.nextStepName):console.log("Saving is not completed:",v),v}function w(){return a.value="Starting process",We.startProcess(t,e).then(b).catch(j("error")).finally(()=>{a.value=null})}function p(v={}){const y=l.value;return!o||!y?Promise.reject("Not step or token."):(a.value="Waiting for result...",We.runStep(t,e,y,o,v).then(b).then(_=>(u[u.length-1]!==y&&u.push(y),_)).catch(j("error")).finally(()=>{a.value=!1}))}return{initialize:h,loading:a,currentStepConfig:c,currentStepName:l,arrayPassedSteps:f,arrayProcessStepName:u,processInfo:s,next:p}}function La(e,t){for(let n=0;n<e.length;n++){const o=e[n];if(!R.utils.getPropFromObject(t,o.name))return!1}return!0}function Oa(e,t){const n=typeof e=="string"?e:e.name,o=Object.assign({},typeof e=="string"?{}:e.arguments,t||{});return{name:n,arguments:o}}function Fa(e){return e.limit||(e.limit=150),e}function wn(e,t={}){const{limit:n}=Fa(t),{prefilters:o,order:i}=e;if(!e.entity)throw new Error("-");if(!e.config)throw new Error("-");const a=e.entity,l=e.config,c=e.customFilters||[],s=[l.map(m=>f(m.label)).join(",")],u=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function f(m){m===null&&(m=""),m===void 0&&(m="-");let w=typeof m!="string"?String(m):m;return w=w.replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w='"'+w+'"'),w}function d(){return ce(a,{fields:it(l).join(" "),limit:n,offset:u.offset,order:i,filter:typeof o=="string"?o:I(o||{}),customFilters:c.map(m=>{var w;return Oa(m,(w=t.customFiltersData)==null?void 0:w[typeof m=="string"?m:m.name])})}).then(m=>(u.offset+=n,m))}function b(){const m="data:text/csv;charset=utf-8,"+s.join(`\r
|
|
8
|
-
`),w=encodeURI(m),p=document.createElement("a");p.setAttribute("href",w),p.setAttribute("download",`${a}.csv`),document.body.appendChild(p),p.click()}function h(){u.rejected=!0}async function g(){return d().then(m=>{const w=m.map(p=>l.map(v=>f(ke(v,p))).join(","));return s.push(...w),u.count=s.length,m.length}).then(m=>{if(m!==n&&(u.finished=!0),m===n&&!u.rejected)return g()})}return{downloadFile:b,reject:h,state:u,start:g}}const je=new class{constructor(){this.store=r.reactive([])}add(t,n,o={}){const i=
|
|
6
|
+
Please try again later or submit a feedback if problem doesn't go.`)}static AuthServiceError(t,n){return!t&&!n?L.ApiNotAvailable():new L(t||"Authorization Error",n)}static ApiResponseParseFailed(){return L.ApiNotAvailable()}static MissingIdInValuesEntity(t){return new L("Object doesn't have id",t)}static ObjectWithIdNotFound(t,n){return new L(`Can't find object with id: ${t}`,n)}static ObjectWithoutConnectToPresentArray(t,n){return new L("Object is not found.",{object:t,array:n})}static EntityWithoutId(t){return new L("Entity doesn't have id.",t)}static NotFoundedTableIndex(t,n){return new L(`Can't find the element with tableIndex ${t}`,n)}static UndefinedError(t,n=[]){return new L(t,n)}static TableArrayAlreadyIncludeProvidedIndexValue(t,n,o){return new L(`Array already includes the element with value ${t}`,{array:n,table:o})}static MetadataEntityIsNotAvailable(t){return new L(`Metadata for the ${t} is not currently available.`)}static RequestTookToLong(){return new L("The request took too long to complete. Try again later.")}};L.ID=0;let oe=L;const Tn="Please try again later or submit a feedback if problem doesn't go.";function Sn(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return Tn}})}function pe(e,t={}){return t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.replace("/auth"):n).catch(()=>{throw oe.ApiNotAvailable()}).then(n=>Sn(n).then(o=>{if(!n.ok)throw o;return o}))}class An{constructor(){this.public=!1,this.errors=new Proxy([],{set:(t,n,o)=>(n!=="length"&&this.public&&console.log(`Journal [Error] ${JSON.stringify(o)}`),t[n]=o,!0)}),window._journal=this}get error(){return{add:(...t)=>{this.errors.push(t)},clean:()=>{this.errors.splice(0,this.errors.length)},console:()=>{console.log(this.errors)}}}welcome(){console.log("The journal has been initialized. To get access check %c_journal in console.","background: blue; color: white")}}new An;class Nn{static invite(t,n,o){return pe("/close-api/accounts/invitePerson",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:t,personKey:n,relatedRoleCode:o})})}static accept(t,n){return pe("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!0})})}static decline(t,n){return pe("/close-api/accounts/markInvite",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({invitationId:t,version:n,mark:!1})})}}class In{static getRequiredDocuments(t,n,o){const i=new URLSearchParams({entity:t,primaryKey:n,statusCode:o});return fetch(`/close-api/views/required-documents?${i.toString()}`).then(a=>a.json())}}class fe{static url(){return"close-api/billing"}static getBillingMetadata(t){return fetch(`/${fe.url()}/calculator/${t}`)}static calculate(t,n){return pe(`/${fe.url()}/calculator`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({entity:t,values:n})}).then(o=>{if(o&&o.status===1)return o;throw Array.isArray(o.notes)?new Error(o.notes[0]):oe.ApiNotAvailable()})}static parseMetadataField(t){function n(o){switch(o.type){case"ValueType":switch(o.dataType){case"Integer":return"number";default:return o.dataType}case"EntityReference":return o.dataType}}return{name:t.name,label:t.title,required:t.required,type:n(t)}}static createOnlinePayment(t,n){return pe(`/${fe.url()}/online-payment`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentId:t,returnURL:n})})}static applyOnlinePayment(t){return pe(`/${fe.url()}/online-payment`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({response:t})})}}const Rn={class:"widget-table__head-cell"},Ln={key:1,class:"widget-table__head-label margin_0 text_overflow"},Lt=r.defineComponent({__name:"widget-table-head-cell",props:{label:{},type:{}},emits:["select"],setup(e,{emit:t}){const n=t;function o(){n("select")}return(i,a)=>(r.openBlock(),r.createElementBlock("th",Rn,[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,onClick:o})):(r.openBlock(),r.createElementBlock("span",Ln,r.toDisplayString(i.label),1))]))}}),On={class:"widget-table__head"},Fn=r.defineComponent({__name:"widget-table-head",props:{config:{}},setup(e){return r.computed(()=>Lt),(t,n)=>(r.openBlock(),r.createElementBlock("tr",On,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.config,o=>r.renderSlot(t.$slots,"default",r.mergeProps({ref_for:!0},o),void 0,!0)),256))]))}}),U=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Bn=U(Fn,[["__scopeId","data-v-aa18d6fa"]]);function Je(e){return Array.isArray(e)?Je(e[0]):typeof e!="string"?null:e}function re(e){return Je(e.name)}function xn(e){const t=new RegExp(/\$\{([a-zA-Z0-9_.]+)}/,"g"),n=[];let o;for(;(o=t.exec(e))!==null;)n.push(o[1]);return n}function Vn(e,t){return xn(e).forEach(o=>{e=e.replace(new RegExp("\\$\\{"+o+"}","g"),R.utils.getPropFromObject(t,o))}),e}function qe(e){return t=>typeof t=="string"||typeof t=="number"?`${t} ${e}`:""}function ke(e,t){const n=re(e);if(typeof e.value=="string")return Vn(e.value,t);let o=n?R.utils.getPropFromObject(t,n):null;if(o===void 0&&(o=null),typeof e.value=="function")return e.value(o,t);if(e.value===null)return null;switch(e.unitValue&&(o=qe(e.unitValue)(o)),e.unit&&(o=qe(e.unit)(o)),e.type){case"number":{typeof o=="number"&&(o=new Intl.NumberFormat().format(o));break}case"date":{o=Be(typeof o=="string"?o:null);break}case"dateTime":case"dateWithTime":{o=nt(typeof o=="string"?o:null);break}case"money":{o=Ht(o);break}case"DateTime":{o=Be(typeof o=="string"?o:null,e.format||S.dateTimeFormat);break}}return e.formatter&&(o=ye(e.formatter).exec(o,t)),typeof o=="boolean"&&(o=o?"✓":"—"),o}const $n=1,Dn=5e3,Pn="static-folder",Ot="request-error",Ft="EntityTypeName",Mn="REFERENCE_CHANGES",T={LIST_ACTIVE_NEW:-1,DEFAULT_ERROR_MESSAGE:"Please try again later or submit a feedback if problem doesn't go.",LOCALSTORAGE_CURRENT_CONTEXT_KEY:"CurrentContext",LOCALSTORAGE_LANGUAGE_KEY:"CurrentLanguage",DELAY_SOCKET_RECONNECT:1e3,PROVIDE_NAME_METADATA:"provide-metadata-config",PROVIDE_NAME_USAGE_CONTEXT:"provide-usage-context-config",PROVIDE_NAME_ACTIONS:"provide-actions",PROVIDE_ENTITY_NAME:"provide-entity-name",MODAL_VALIDATION_EFFECT:"validation-effect",MODAL_CONFIRM:"confirm",MODAL_LIST_DOWNLOAD:"list-download",MODAL_LIST_SETTINGS:"list-settings",MODAL_SIMPLE_TOOL_PARAMETERS:"SimpleToolParameters",MODAL_BATCH_VALUES:"batch-values",MODAL_ENTITY:"form-entity",MODAL_HISTORY:"entity-history",TIME_TO_LIVE_SOCKET_REQUEST:45e3,CORE_DEBUG_LABEL:"eservices-core",VISIBLE_ITEM_PROVIDE_NAME:"visible-item-provider",EVENT_FORM_UPDATE:"form-update",EVENT_AFFECTED_ENTITY:"affected-entity",DEFAULT_ORDER_DIR:"asc",TABLE_MOCK_FIELD:"_A_MOCK_ID_FIELD",OBJECT_TYPE_NAME_FIELD:Ft,FIELD_NAME_REFERENCE_CHANGES:Mn,PATH_RESOLVER_ENTITY:"resolver",TOOL_PRINT_NAME:"Print"};function De(e){return[T.CORE_DEBUG_LABEL,e].join(":")}const jn={class:"widget-filter-text flex-column gap_10"},Un={class:"flex gap_20"},Wn=r.defineComponent({__name:"widget-filter-text",props:{values:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,i=new R.Form({parent:!1}),a={begin:"Begin with",end:"End with",include:"Contains"};function l(u="",f="include"){return{text:u,option:f}}r.onMounted(()=>{const u=n.values?typeof n.values=="string"?l(n.values):n.values:l();i.setValues(u)});function c(){o("update:values",i.values)}function s(){o("clear")}return r.watch(()=>n.values,u=>i.setValues(u||l()),{immediate:!0}),(u,f)=>{const d=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",jn,[r.createElementVNode("div",Un,[r.createVNode(r.unref(R.FormField),{name:"text",type:"text",label:"Search"})]),r.createVNode(r.unref(R.FormField),{name:"option",type:"radio",options:a}),r.createElementVNode("div",null,[r.createVNode(d,{onClick:c,type:"primary"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(Y)("Apply")),1)]),_:1}),r.createVNode(d,{onClick:s},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(r.unref(Y)("Clear")),1)]),_:1})])])}}}),qn=U(Wn,[["__scopeId","data-v-f6da3bed"]]),Hn={class:"widget-filter-enum"},Gn={class:"flex gap-10 padding-10"},zn=r.defineComponent({__name:"widget-filter-entity",props:{baseEntity:{},filters:{},values:{},filterMetadata:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=r.ref([]),i=Te(n.filterMetadata.entity),a=f=>(n.values||[]).includes(f),l=t;function c(f){const d=n.values||[];return d.includes(f)?l("update:values",d.filter(b=>b!==f)):l("update:values",[...d,f])}const s=ie(async()=>{o.value=await ce(n.baseEntity,{fields:n.filterMetadata.name.join(" "),order:[n.filterMetadata.name[1],"asc"],distinct:!0,filter:I(n.filters)}).then(f=>f.map(d=>({label:d[n.filterMetadata.name[1]],value:d[n.filterMetadata.name[0]]})))});function u(){l("update:values",[])}return r.watch(()=>s.loading,f=>{l("readProcess",f?"start":"end")},{immediate:!0}),r.watch(()=>i.value,()=>{s.loading||s.call()},{immediate:!0}),(f,d)=>{const b=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Hn,[r.createElementVNode("div",Gn,[r.createVNode(b,{label:"Reload filter",loading:r.unref(s).loading||!1,icon:"reload",onClick:d[0]||(d[0]=()=>r.unref(s).call())},null,8,["loading"]),r.createVNode(b,{label:"Clear",onClick:u})]),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,h=>(r.openBlock(),r.createBlock(r.unref(R.FormField),{class:"widget-filter-enum-item",key:h.value,onClick:()=>c(h.value),type:"single-checkbox","model-value":a(h.value),label:h.label},null,8,["onClick","model-value","label"]))),128))])}}}),Kn=U(zn,[["__scopeId","data-v-4c82f6e7"]]),be=r.reactive({});function Yn(){vt(),setInterval(vt,50)}function Bt(){return be}function vt(){const e={};Object.entries(localStorage).forEach(([t,n])=>{e[t]=!0,be[t]!==n&&(be[t]=n)}),Object.keys(be).forEach(t=>{e[t]||delete be[t]})}const Xn={class:"widget-filter-number flex-column es-gap-10"},Jn={class:"flex es-gap-10"},Qn={class:"flex gap-10"},Zn=r.defineComponent({__name:"widget-filter-number",props:{baseEntity:{},values:{}},emits:["update:values","readProcess"],setup(e,{emit:t}){const n=e,o=t,i=new R.Form({parent:!1}),a=Gt(()=>{const c=i.getValueByName("min"),s=i.getValueByName("max");return o("update:values",{min:c,max:s})},800);i.onvalue(a),r.watch(()=>n.values,()=>{n.values&&i.setValues(n.values)},{immediate:!0});function l(){i.cleanValues()}return(c,s)=>{const u=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",Xn,[r.createElementVNode("div",Jn,[r.createVNode(r.unref(R.FormField),{name:"min",label:"More than",type:"number"}),r.createVNode(r.unref(R.FormField),{name:"max",label:"Less than",type:"number"})]),r.createElementVNode("div",Qn,[r.createVNode(u,{label:"Clear",onClick:l})])])}}}),wt=U(Zn,[["__scopeId","data-v-f9cd559e"]]),S={getEntityLink(e,t){return`/forms/${e}/${t}`},iconHandlerText(){return""},iconTag:"i",dateTimeFormat:"DD/MM/YYYY HH:mm:ss",tableFilterEntityBind:{String:qn,Entity:Kn,Decimal:wt,Integer:wt},arrayListCellHandlers:[],arrayListRowHandlers:[],arrayFieldParamsHandlers:[]};function er(e){Yn();for(let t in e)S[t]=e[t]}const tr={props:{name:String},setup(e,t){let n="unknown";try{n=t.slots.default()[0].children}catch{n=e.name}typeof n!="string"&&console.warn(`Name for Icon.vue is not string. ${n}`);try{n=n.replace(/\s+/g,"")}catch{}return()=>r.h(S.iconTag,{class:S.iconHandler?S.iconHandler(n):`icon icon-${n}`},S.iconHandlerText(n))}},he=U(tr,[["__scopeId","data-v-8a72b45f"]]),nr=$e(De("setup-list-row"));function rr(e,t){const n=e.config.map(o=>or(o,e,t));return r.h("tr",{class:"widget-table__row widget-table-row"},n)}function or(e,t,n){const o=t.values;let i=ke(e,o);const a={onClick:[],title:e.hint,class:["widget-table__cell widget-table-cell"]};function l(f){a.onClick.push(()=>f(o,e,n))}function c(f){Array.isArray(f)?a.class.push(...f):a.class.push(f)}const s=[],u=[];if(e.hide&&e.hide(o))return[r.h("td")];if(e.type)switch(c(`widget-table-cell_${e.type}`),e.type){case"multi-select":{u.push(r.h(R.FormField,{type:"single-checkbox",modelValue:t.selected})),l(bt.bind(null,n,!0));break}case"select":{u.push(r.h(R.FormField,{type:"single-radio",modelValue:t.selected})),l(bt.bind(null,n,!1));break}}if(e.onClick&&l(e.onClick),e.link)try{const f=e.link(o);if(f){const d=r.h(le.RouterLink,{to:f});u.push(d),c("widget-table-cell_link")}}catch(f){nr("Can't add router link",f)}if(e.href&&(u.push(r.h("a",{href:e.href(o),target:"_blank"})),c("widget-table-cell_link")),(typeof i=="string"||typeof i=="number")&&u.push(r.h("p",{class:"widget-list-cell-text"},i)),e.icon&&(typeof e.icon=="string"&&u.push(r.h(he,{name:e.icon})),typeof e.icon=="function")){const f=e.icon(o);f!==null&&u.push(r.h(he,{name:f}))}return e.class&&(typeof e.class=="function"?c(e.class(o)):c(e.class)),S.listCellHandler&&(console.log("listCellHandler is deprecated. Please use coreUtils.addListCellHandler instead."),S.listCellHandler(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),S.arrayListCellHandlers&&S.arrayListCellHandlers.forEach(f=>f(e,o,{cellNodeChildren:u,addClass:c,addHandleClick:l,context:n})),s.push(r.h("td",a,u)),s}function bt(e,t){e.emit("select",t)}function Qe(e,t){return()=>{try{return rr(e,t)}catch(n){return console.warn(n),null}}}const ir={props:{values:Object,config:Object,selected:Boolean},setup:Qe},ar=["colspan"],Et=r.defineComponent({__name:"widget-table-form",props:{rowLength:{},component:{},values:{},isNew:{type:Boolean}},emits:["save","close"],setup(e,{emit:t}){const n=t,o=r.ref();return r.onMounted(()=>{setTimeout(()=>{o.value&&o.value.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},250)}),(i,a)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-table-form",ref_key:"refTableForm",ref:o},[r.createElementVNode("td",{colspan:i.rowLength},[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.component),r.mergeProps(i.$attrs,{values:i.values,new:i.isNew,onClose:a[0]||(a[0]=l=>n("close")),onSave:a[1]||(a[1]=l=>n("save",l))}),null,16,["values","new"]))],8,ar)],512))}}),Ue="update:selectedRows",sr="update:activeRow",xt=r.defineComponent({__name:"widget-table",props:{array:{},config:{},activeRow:{default:null},selectedRows:{default:()=>[]},classCallback:{},shortcut:{type:Boolean,default:!1},rowOptionsHandler:{type:Function,default:()=>({})}},emits:["save","order"],setup(e,{emit:t}){const n=e,o=r.ref(),i=t,a=r.useSlots(),l=r.computed(()=>{var h;return(h=a==null?void 0:a.default)==null?void 0:h.call(a)[0]});function c(){const g=n.selectedRows.length!==0?[]:[...n.array];i(Ue,g)}function s(h,g=!0){if(!n.selectedRows)return;if(!g)return i(Ue,n.selectedRows.includes(h)?[]:[h]);const m=[...n.selectedRows],w=m.indexOf(h);return w===-1?m.push(h):m.splice(w,1),i(Ue,m)}function u(h){i(sr,h)}function f(h){i("save",h),i("update:activeRow",null)}const d=r.computed(()=>n.shortcut?n.config.filter(h=>h.name?!!n.array.find(g=>![null,""].includes(ke(h,g))):!0):n.config);r.watch(()=>n.activeRow,(h,g)=>{h===null&&typeof g=="number"&&setTimeout(()=>{if(!o.value)return;const m=o.value.querySelector(`tbody>tr:nth-child(${g+1})`)||o.value;m&&m.scrollIntoView({block:"center",behavior:"smooth"})},100)});function b(h){var m;const g={};return(m=S.arrayListRowHandlers)==null||m.forEach(w=>{try{Object.assign(g,w(h,n.rowOptionsHandler()))}catch{console.warn("Problem with arrayListRowHandler.")}}),g}return(h,g)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("table",{class:"widget-table",ref_key:"refTable",ref:o},[r.createElementVNode("thead",null,[r.createVNode(Bn,{config:d.value,onOrder:g[0]||(g[0]=m=>h.$emit("order",m))},{default:r.withCtx(m=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(h.$slots["head-cell"]||Lt),r.mergeProps(m,{onSelect:c}),null,16))]),_:1},8,["config"])]),r.createElementVNode("tbody",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(h.array,(m,w)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:w},[r.createVNode(ir,r.mergeProps({config:d.value,values:m,selected:h.selectedRows.includes(m),onSelect:p=>s(m,p),onActivate:p=>u(w),class:h.classCallback?h.classCallback(m):"",ref_for:!0},b(m)),null,16,["config","values","selected","onSelect","onActivate","class"]),l.value&&h.activeRow===w?(r.openBlock(),r.createBlock(Et,{key:0,component:l.value,"row-length":h.config.length,values:m,onClose:g[1]||(g[1]=p=>i("update:activeRow",null)),onSave:f,"is-new":!1},null,8,["component","row-length","values"])):r.createCommentVNode("",!0)],64))),128)),h.activeRow===r.unref(T).LIST_ACTIVE_NEW?(r.openBlock(),r.createBlock(Et,{key:0,component:l.value,"row-length":d.value.length,onClose:g[2]||(g[2]=m=>i("update:activeRow",null)),onSave:f,"is-new":!0},null,8,["component","row-length"])):r.createCommentVNode("",!0)])],512)]))}}),lr=r.defineComponent({__name:"widget-spinner",props:{color:{default:"#fff"}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",{class:"widget-spinner",style:r.normalizeStyle({"border-left":`1.1em solid ${t.color}`})},null,4))}}),Ce=U(lr,[["__scopeId","data-v-0ef9ae88"]]),cr={class:"widget-button"},ur=r.defineComponent({__name:"widget-button",props:{wait:{type:Boolean}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("button",cr,[t.wait?(r.openBlock(),r.createBlock(Ce,{key:0,class:"widget-button-spinner"})):r.createCommentVNode("",!0),r.renderSlot(t.$slots,"default",{},void 0,!0)]))}}),dr=U(ur,[["__scopeId","data-v-450dc564"]]),fr={class:"widget-multi-button-wrap position_relative cursor_pointer"},pr={class:"widget-multi-button-body grid"},mr=["onClick"],gr={class:"widget-multi-button-side-wrap"},hr=r.defineComponent({__name:"widget-multi-button",props:{label:{},array:{default:()=>[]}},setup(e){r.useCssVars(l=>({"04895bf1":o.value}));const t=e,n=r.reactive({active:!1,wait:!1}),o=r.computed(()=>t.array.length+(t.label?1:0));function i(l){if(!(typeof l!="function"||n.wait))return n.wait=!0,Promise.resolve().then(l).finally(()=>{n.wait=!1})}function a(l=!n.active){n.active=l}return(l,c)=>(r.openBlock(),r.createElementBlock("div",fr,[r.createElementVNode("div",{class:r.normalizeClass(["overflow_hidden radius_20 widget-multi-button grid",n.active?"widget-multi-button_active":null])},[r.createElementVNode("div",pr,[l.label?(r.openBlock(),r.createElementBlock("p",{key:0,class:"text_md margin_0 text_nowrap widget-multi-button-body-label",onClick:c[0]||(c[0]=s=>a())},r.toDisplayString(l.label),1)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.array,(s,u)=>(r.openBlock(),r.createElementBlock("p",{class:"text_md margin_0 text_nowrap widget-multi-button-body-label",key:u,onClick:f=>{i(s.callback),a(!1)}},r.toDisplayString(s.label),9,mr))),128))]),r.createElementVNode("div",gr,[r.createElementVNode("div",{class:r.normalizeClass(["grid-center widget-multi-button-side",n.active?"widget-multi-button-side_active":null]),onClick:c[1]||(c[1]=s=>a())},[n.wait?(r.openBlock(),r.createBlock(r.unref(Ce),{key:0,class:"widget-multi-button-side-spinner"})):l.array.length>1?(r.openBlock(),r.createBlock(r.unref(he),{key:1,class:"widget-multi-button-side-icon"},{default:r.withCtx(()=>[r.createTextVNode("angle-small-down")]),_:1})):r.createCommentVNode("",!0)],2)])],2)]))}}),yr=U(hr,[["__scopeId","data-v-d43a76ce"]]),vr={class:"widget-loader flex flex-align_center gap_10 padding_15"},wr={class:"text_md"},Pe=r.defineComponent({__name:"widget-loader",props:{label:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("div",vr,[r.createVNode(Ce,{color:"var(--primary)",class:"padding_10"}),r.createElementVNode("span",wr,r.toDisplayString(t.label),1)]))}}),br=["alt","src"],Er=r.defineComponent({__name:"widget-image",props:{src:{},alt:{},default:{}},setup(e){const t=e,n=r.ref();return r.onMounted(()=>{n.value&&(n.value.src=t.src),n.value.onerror=function(){t.default&&(n.value.src=t.default)}}),(o,i)=>(r.openBlock(),r.createElementBlock("img",{alt:o.alt,ref_key:"refImage",ref:n,src:o.src||o.$props.default},null,8,br))}}),_r={props:{config:Array,values:Object,selected:Boolean},setup:Qe},kr=U(_r,[["__scopeId","data-v-344a8cc1"]]),Cr=e=>(r.pushScopeId("data-v-bf495d6a"),e=e(),r.popScopeId(),e),Tr={class:"widget-list-head-cell"},Sr=Cr(()=>r.createElementVNode("div",{class:"head-cell-resize"},null,-1)),Ar=r.defineComponent({__name:"widget-list-head-cell",props:{title:{},label:{},name:{},type:{},minWidth:{},maxWidth:{},width:{},order:{}},emits:["select","order"],setup(e,{emit:t}){const n=e,o=t;return n.title&&console.warn(`For cell ${n.name} using title,it should be replaced with label.`),(i,a)=>(r.openBlock(),r.createElementBlock("th",null,[r.createElementVNode("div",Tr,[r.createElementVNode("div",{class:"head-cell-content flex_grow",style:r.normalizeStyle({"min-width":i.minWidth,"max-width":i.maxWidth,width:i.width})},[i.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,type:"single-checkbox",onClick:a[0]||(a[0]=r.withModifiers(l=>o("select"),["stop","prevent"]))})):(r.openBlock(),r.createElementBlock("p",{key:1,class:"widget-list-head-label head-cell-label list-head-cell-label text_md margin-0",onClick:a[1]||(a[1]=l=>o("order"))},r.toDisplayString(i.title||i.label),1))],4),i.name&&i.order.length&&i.order[0]===i.name?(r.openBlock(),r.createBlock(r.unref(he),{key:0,class:r.normalizeClass(["head-cell-order",{"head-cell-order_down":i.order.length>1&&i.order[1]==="desc"}])},{default:r.withCtx(()=>[r.createTextVNode("core-arrow-up")]),_:1},8,["class"])):r.createCommentVNode("",!0),Sr])]))}}),Nr=U(Ar,[["__scopeId","data-v-bf495d6a"]]),Ir=r.defineComponent({__name:"widget-list-head",props:{config:{},order:{}},emits:["update:config","update:order","select"],setup(e,{emit:t}){const n=e,o=t,i=r.ref(),a=r.ref();r.onMounted(()=>{function u(g,m){let w=-1;do w++,m-=g[w];while(m>0&&w<g.length);return w}function f(g,m){let w=0;for(;m>0&&m>g[w]&&w<g.length;)m-=g[w],w++;return console.log(m,w),w>0?w:0}function d(g){try{a.value.style.insetInlineStart=g+"px"}catch(m){console.log(m)}}function b(g){try{a.value.style.width=g+"px",a.value.style.minWidth=g+"px",a.value.style.maxWidth=g+"px"}catch(m){console.log(m)}}function h(g){return g===null?!1:g.classList.contains("head-cell-resize")}i.value.addEventListener("pointerdown",function(m){var F;function w($){return $.screenX+y-O}const p=i.value,v=[...p.children].filter($=>$.localName==="th"),y=((F=p.offsetParent)==null?void 0:F.scrollLeft)||0,_=v.map($=>$.clientWidth),C=h(m.target),O=p.getBoundingClientRect().left,E=w(m),k=u(_,E),N=_.slice(0,k).reduce(($,M)=>$+M,0),V=E-N,D=p.offsetWidth,Q=v[k].clientWidth;if(n.config[k].type==="multi-select")return;console.group("START"),console.log(),console.log("Start screenX",m.screenX),console.log("Widths",_),console.log("max width",D),console.log("Start Position",E),console.log("Position From",k),console.log("Start Position",k),console.log("Global offset (Отступ самой таблицы от края экрана)",O),console.log("Del",V),console.groupEnd(),a.value.innerText=v[k].textContent||"",a.value.style.display="grid",a.value.style.width=Q+"px",a.value.style.cursor="grabbing",d(N),b(Q),document.addEventListener("pointermove",A,{passive:!0}),document.addEventListener("pointerup",Se);function Se($){if(console.group("END"),document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",Se),C&&(n.config[k].width=a.value.style.width,n.config[k].minWidth=a.value.style.width,n.config[k].maxWidth=a.value.style.width,l(n.config)),!C){const M=$.screenX+y-O;console.log("ENP Position",M);const G=f(_,M);if(console.log(k,"->",G),G!==k){const P=n.config[k],Z=n.config;Z.splice(k,1),Z.splice(G,0,P),l(Z)}else{const P=n.config[k].name;c(P)}}a.value.style.display="none",document.body.style.cursor="unset",console.groupEnd()}function A($){if(C){const P=w($)-E+Q;b(P);return}let M=$.screenX+y-O-V;M<0&&(M=0),M+Q>D&&(M=D-Q),d(M)}})});function l(u){o("update:config",u)}function c(u){if(!u)return;if(Array.isArray(u)){if(u.length<1)return;u=u[0]}if(n.order.length===0||n.order[0]!==u)return void s([u]);const f=n.order.length===1||n.order[1]==="asc"?"asc":"desc";s([u,f==="asc"?"desc":"asc"])}function s(u){o("update:order",u)}return(u,f)=>(r.openBlock(),r.createElementBlock("tr",{class:"widget-list-head",ref_key:"refHead",ref:i},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.config,(d,b)=>(r.openBlock(),r.createBlock(Nr,r.mergeProps({key:d,ref_for:!0},d,{onOrder:h=>c(d.name),onSelect:f[0]||(f[0]=h=>o("select")),order:u.order}),null,16,["onOrder","order"]))),128)),r.createElementVNode("div",{class:"test-block text_md",ref_key:"refDisplayPosition",ref:a},"test",512)],512))}}),Rr=U(Ir,[["__scopeId","data-v-ccffc6bd"]]),Lr={class:"widget-list"},Or={class:"widget-list-body position_relative"},Fr=50,Br=r.defineComponent({__name:"widget-list",props:{array:{},config:{default:()=>[]},selectedRows:{default:()=>[]},order:{default:()=>[]}},emits:["scrollEnd","update:selectedRows","update:order","update:config"],setup(e,{emit:t}){const n=e,o=t;function i(s,u=!0){if(n.selectedRows)if(!u)l(n.selectedRows.includes(s)?[]:[s]);else{const f=[...n.selectedRows],d=f.indexOf(s);d===-1?f.push(s):f==null||f.splice(d,1),l(f)}}function a(){var s;if(((s=n.selectedRows)==null?void 0:s.length)!==n.array.length)return l([...n.array]);l([])}function l(s){o("update:selectedRows",s)}function c(s){if(!s)return;const u=s.target;u.scrollTop+u.clientHeight+Fr>u.scrollHeight&&o("scrollEnd")}return(s,u)=>(r.openBlock(),r.createElementBlock("div",{class:"es-list-container",onScrollPassive:c},[r.createElementVNode("table",Lr,[r.createElementVNode("thead",null,[r.createVNode(Rr,{onSelect:u[0]||(u[0]=f=>a()),"onUpdate:order":u[1]||(u[1]=f=>o("update:order",f)),"onUpdate:config":u[2]||(u[2]=f=>o("update:config",f)),config:s.config,order:s.order},null,8,["config","order"])]),r.createElementVNode("tbody",Or,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.array,(f,d)=>{var b;return r.openBlock(),r.createBlock(kr,{key:d,class:"widget-list-row",values:f,config:s.config,selected:(b=s.selectedRows)==null?void 0:b.includes(f),onSelect:h=>i(f,h)},null,8,["values","config","selected","onSelect"])}),128))])])],32))}});function Ze(){var a;const e=r.computed(()=>Object.keys(n).length===0||Object.values(n).includes(!0)),t=(a=r.getCurrentInstance())==null?void 0:a.uid;if(!t)throw"Undefined instance. Please check it.";const n=r.reactive({});r.provide(T.VISIBLE_ITEM_PROVIDE_NAME,{show(l){n[l]=!0},hide(l){n[l]=!1},remove(l){delete n[l]}});const o=r.inject(T.VISIBLE_ITEM_PROVIDE_NAME,{show(){},hide(){},remove(){}});return{visible:e,controller:{show(){o==null||o.show(t)},hide(){o==null||o.hide(t)},remove(){o==null||o.remove(t)}},visibleItems:n}}function Vt(e){const t={name:e,entity:r.inject(T.PROVIDE_ENTITY_NAME)};if(!t.name)throw new Error("Field without name try use metadata.");const n=r.ref(!1),o=r.ref(null);return e.split(".").reduce((i,a,l,c)=>l===c.length-1?i:i.then(()=>{var u,f;const s=(f=(u=o.value)==null?void 0:u.fieldsByName[a])==null?void 0:f.referencedEntity;if(!s)throw new Error("---");return te.initEntity(s).then(()=>s)}).then(s=>{o.value=te.get(s),t.entity=s,t.name=c[l+1]}),Promise.resolve().then(()=>te.initEntity(t.entity)).then(()=>{o.value=te.get(t.entity)})).finally(()=>n.value=!0),r.computed(()=>{if(!n.value||!o.value)return;const i=o.value.fieldsByName[t.name];if(i)return i})}const xr=r.defineComponent({__name:"widget-field",props:{name:{},type:{},label:{},usageContext:{type:Boolean,default:!0}},setup(e){const t=e,n=R.Form.getParentForm();Te();const o=dt(),i=r.computed(()=>{var g,m,w;const d=c.value,b=s(d),h={type:b,disabled:t.usageContext?!((g=l.value)!=null&&g.canSet):!1,label:t.label};return b==="Decimal"&&((w=(m=d==null?void 0:d.presentationType)==null?void 0:m.toLowerCase)==null?void 0:w.call(m))==="money"&&(h.money=!0),d&&Object.assign(h,{suffix:d.valueUnit||void 0,label:t.label||d.displayName}),Array.isArray(S.arrayFieldParamsHandlers)&&S.arrayFieldParamsHandlers.forEach(p=>Object.assign(h,p(d,l.value,h,n,t.name))),h}),a=["MultiText","MultiWideText"],l=r.computed(()=>{var d;return(d=o==null?void 0:o.value)==null?void 0:d.fields[t.name]}),c=Vt(t.name);function s(d){if(typeof t.type=="string"&&t.type.length!==0)return t.type;if(d){if(d.type==="Reference"||d.type==="Owned")return d.referencedEntity;if(d.dataType==="Boolean")return"single-checkbox";if(d.dataType==="DateTime")return"date";if(d.dataType==="Integer"||d.dataType==="Decimal")return"number";if(d.dataType==="List")return d.aggregatedEntity;if(a.includes(d.presentationType))return"textarea";if(d.presentationType==="PhoneNumber")return"tel"}return"text"}const u=r.computed(()=>{var d;return t.usageContext?((d=l.value)==null?void 0:d.canGet)===!0:!0}),{controller:f}=Ze();return r.watch(()=>u.value,d=>d?f.show():f.hide(),{immediate:!0}),r.onUnmounted(()=>f.remove()),(d,b)=>u.value?(r.openBlock(),r.createBlock(r.unref(R.FormField),r.mergeProps({key:0},{...d.$attrs,...i.value},{name:d.name}),null,16,["name"])):r.createCommentVNode("",!0)}});function Vr(e){return Array.isArray(e)&&(e==null?void 0:e[1])||T.DEFAULT_ORDER_DIR}const $r=["fill"],Dr=r.createElementVNode("path",{d:"M440-647 244-451q-12 12-28 11.5T188-452q-11-12-11.5-28t11.5-28l264-264q6-6 13-8.5t15-2.5q8 0 15 2.5t13 8.5l264 264q11 11 11 27.5T772-452q-12 12-28.5 12T715-452L520-647v447q0 17-11.5 28.5T480-160q-17 0-28.5-11.5T440-200v-447Z"},null,-1),Pr=[Dr],Mr=r.defineComponent({__name:"widget-icon-arrow-up",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},Pr,8,$r))}}),jr={class:"widget-fast-table-head-cell-td"},Ur={key:1,class:"widget-head-cell-label"},Wr={key:2,class:"widget-head-cell-order"},qr=r.defineComponent({__name:"widget-fast-table-head-cell",props:{label:{},name:{},order:{},type:{},isFullSelected:{type:Boolean}},emits:["select"],setup(e,{emit:t}){const n=e,o=r.computed(()=>Je(n.name));r.computed(()=>Vr(n.order));const i=t;function a(){i("select")}return(l,c)=>{var s;return r.openBlock(),r.createElementBlock("td",jr,[r.createElementVNode("div",{class:r.normalizeClass(["widget-head-cell",[l.type==="multi-select"?"justify-content-center":""]]),onClick:c[0]||(c[0]=u=>l.$emit("order",l.name))},[l.type==="multi-select"?(r.openBlock(),r.createBlock(r.unref(R.FormField),{key:0,"model-value":l.isFullSelected,onClick:a,type:"single-checkbox"},null,8,["model-value"])):(r.openBlock(),r.createElementBlock("span",Ur,r.toDisplayString(l.label),1)),o.value===((s=l.order)==null?void 0:s[0])?(r.openBlock(),r.createElementBlock("div",Wr,[r.createVNode(Mr,{color:"var(--color-primary)",class:r.normalizeClass(["widget-head-cell-order-icon",`widget-head-cell-order-icon_${l.order[1]==="desc"?"desc":"asc"}`])},null,8,["class"])])):r.createCommentVNode("",!0)],2)])}}}),$t=U(qr,[["__scopeId","data-v-d131e64e"]]),Hr=["fill"],Gr=r.createElementVNode("path",{d:"M480-361q-8 0-15-2.5t-13-8.5L268-556q-11-11-11-28t11-28q11-11 28-11t28 11l156 156 156-156q11-11 28-11t28 11q11 11 11 28t-11 28L508-372q-6 6-13 8.5t-15 2.5Z"},null,-1),zr=[Gr],Kr=r.defineComponent({__name:"widget-icon-keyboard-arrow-down",props:{color:{}},setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24px",viewBox:"0 -960 960 960",width:"24px",fill:t.color},zr,8,Hr))}}),Yr={class:"widget-filter-item-popup"},Xr=r.defineComponent({__name:"widget-table-panel-filter-item",props:{entity:{},values:{},filters:{},filterItem:{}},emits:["update:values","clear"],setup(e,{emit:t}){const n=e,o=t,i=S.tableFilterEntityBind,a=r.ref(),l=r.computed(()=>{const h=n.filterItem;return h.entity?"Entity":h.type?h.type:null});function c(h){s.value=h==="start"}const s=r.ref(!1),u=r.computed(()=>Array.isArray(n.values)||typeof n.values=="string"?n.values.length>0:!!n.values),f=r.ref(!1);let d=null;function b(h=!f.value){f.value=h,!f.value&&d?(d(),d=null):a.value&&(d=R.utils.clickOutside(a.value,b.bind(null,!1)))}return(h,g)=>{var m;return r.openBlock(),r.createElementBlock("div",{class:"widget-filter-item-container grid",ref_key:"refFilterItem",ref:a},[r.createElementVNode("div",{class:r.normalizeClass(["widget-filter-item",{"widget-filter-item_active":u.value}]),onClick:g[0]||(g[0]=()=>b())},[r.createElementVNode("span",{class:r.normalizeClass(["widget-filter-item-label",{"widget-filter-item-label_active":u.value}])},r.toDisplayString(h.filterItem.label||"--"),3),s.value?(r.openBlock(),r.createBlock(Ce,{key:0})):(r.openBlock(),r.createBlock(Kr,{key:1,color:"white",class:r.normalizeClass({"widget-filter-item-arrow":f.value})},null,8,["class"]))],2),r.withDirectives(r.createElementVNode("div",Yr,[l.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent((m=r.unref(i))==null?void 0:m[l.value]),{key:0,"filter-metadata":h.filterItem,values:h.values,filters:h.filters,"base-entity":h.entity,onClear:g[1]||(g[1]=w=>o("clear")),"onUpdate:values":g[2]||(g[2]=w=>o("update:values",w)),onReadProcess:c},null,40,["filter-metadata","values","filters","base-entity"])):r.createCommentVNode("",!0)],512),[[r.vShow,f.value]])],512)}}}),Dt=U(Xr,[["__scopeId","data-v-43ed0322"]]),Jr={class:"widget-table-search flex"},Qr=["value"],Zr=r.defineComponent({__name:"widget-table-search",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;function o(i){const a=i.target;if(!a)return;const l=a.value;n("update:modelValue",l)}return(i,a)=>(r.openBlock(),r.createElementBlock("div",Jr,[r.createVNode(he,{class:"widget-table-search-icon"},{default:r.withCtx(()=>[r.createTextVNode("search")]),_:1}),r.createElementVNode("input",{class:"widget-table-search-input",type:"text",alt:"Searching for data in a table",value:i.modelValue,onInput:o,placeholder:"Filter by random text"},null,40,Qr)]))}}),eo=U(Zr,[["__scopeId","data-v-99052614"]]),to={class:"widget-table-panel-filter flex"},no={class:"flex"},ro=r.defineComponent({__name:"widget-table-panel-filters",props:{filtersConfig:{},filters:{},entity:{},search:{}},emits:["update:filters","update:search"],setup(e,{emit:t}){const n=e,o=t;function i(l,c){o("update:filters",{...n.filters,[l]:c})}function a(l){const c={...n.filters};delete c[l],o("update:filters",c)}return(l,c)=>(r.openBlock(),r.createElementBlock("div",to,[r.createVNode(eo,{"model-value":l.search,"onUpdate:modelValue":c[0]||(c[0]=s=>o("update:search",s))},null,8,["model-value"]),r.createElementVNode("div",no,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.filtersConfig,(s,u)=>{var f;return r.openBlock(),r.createBlock(Dt,{key:u,entity:l.entity,"filter-item":s,values:(f=l.filters)==null?void 0:f[r.unref(re)(s)],filters:l.filters,"onUpdate:values":d=>i(r.unref(re)(s),d),onClear:d=>a(r.unref(re)(s))},null,8,["entity","filter-item","values","filters","onUpdate:values","onClear"])}),128))])]))}}),oo=U(ro,[["__scopeId","data-v-8f09ec8d"]]);function Pt(e,t){const n=document.createElement("a");n.href=e,t!=null&&t.blank&&(n.target="_blank"),n.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window})),setTimeout(()=>{n.remove()},100)}const io={class:"widget-fast-table-tools flex gap-15"},ao=r.defineComponent({__name:"widget-fast-table-tools",props:{tools:{},loading:{type:Boolean},selectedRows:{},metadata:{},canCreate:{type:Boolean}},emits:["reload","export","new"],setup(e,{emit:t}){const n=e,o=le.useRouter(),i=t,a=[{name:"export",label:"Save as CSV",icon:"list-download",buttonStyle:"default",callback:()=>i("export")},{name:"reload",label:"Reload",icon:"reload",buttonStyle:"default",callback:()=>i("reload")},{name:"new",label:"Add New",icon:"new",buttonStyle:"primary",callback:()=>i("new")}],l=r.inject(T.PROVIDE_NAME_ACTIONS,null),c=r.computed(()=>(Array.isArray(n.tools)?n.tools:[]).reduce((g,m)=>(m.name==="*"?g.push(...a):g.push(m),g),[]));function s(g){return a.find(m=>m.name===g.name)}function u(g){return{...g,label:g.label||"Batch update",callback:async()=>{const m=n.metadata,w=m.name,p=n.selectedRows||[];if(n.selectedRows.length===0)return je.add("error","Kindly select at least one record to update");const v=await H.promptModal(T.MODAL_BATCH_VALUES,{entity:w,availableFields:g.availableFields||[]});if(!v)return;const y=ut(w),_=p.map(C=>({primaryKey:C[y],version:m.versioned?C.Version:void 0}));await Qt(w,{values:v,elements:_}).then(C=>{C.forEach(O=>{O.type==="reject"&&j("error")(O.data)})}).catch(j("error")),i("reload")}}}function f(g){return{...g,callback:()=>o.push(g.to)}}function d(g){return{...g,callback:()=>{const m=en(g.filename);Pt(m,{blank:!0})}}}const b=r.computed(()=>{var w;const g=((w=l==null?void 0:l.actions)==null?void 0:w.value)||[],m=[];return c.value.forEach(p=>{if(!(typeof p.override=="string"&&!g.find(v=>v.name===p.override))){if(s(p)){if(p.name==="new"&&!n.canCreate)return;const v=a.find(y=>y.name===p.name);if(v)return m.push(v)}if(p.name==="redirect")return m.push(f(p));if(p.name==="batch-update")return m.push(u(p));if(p.name==="static-file")return m.push(d(p));{const v=g.find(y=>y.name===p.name);if(v)return m.push({label:v.title,...p,callback:()=>h(v)})}}}),m.map(p=>({...p,process:ie(p.callback)}))});function h(g){var p;const m=(p=g.action.parameters.find(v=>v.dataTypeName==="IntegerArray"))==null?void 0:p.name,w={};return m&&(w[m]=n.selectedRows.map(v=>{if(!(typeof v=="object"&&v!==null))return null;const y=n.metadata.fieldNameForIdentification;return y?v[y]:null})),g.callback(w)}return(g,m)=>{const w=r.resolveComponent("widget-button");return r.openBlock(),r.createElementBlock("div",io,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.value,p=>(r.openBlock(),r.createBlock(w,{label:r.unref(Y)(p.label),title:p.name,icon:p.icon,type:p.buttonStyle,loading:p.name==="reload"?g.loading:p.process.loading,onClick:()=>p.process.call()},null,8,["label","title","icon","type","loading","onClick"]))),256)),r.renderSlot(g.$slots,"default")])}}});function so(e,t){const n=Bt(),o=le.useRouter(),i=r.reactive({entity:null,mark:null,settings:null});function a(y){const _={...f.value,...y};l(_)}function l(y){{const _=y.prefilters;_&&(Object.keys(_).forEach(C=>{var E,k;const O=_[C];Array.isArray(_[C])&&_[C].length===0&&i.settings&&!((k=(E=i.settings)==null?void 0:E.prefilters)!=null&&k[C])&&delete _[C],kn(O)&&(typeof O.min!="number"&&delete O.min,typeof O.max!="number"&&delete O.max,Object.keys(O).length===0&&delete _[C])}),R.utils.isEmptyObject(_)&&delete y.prefilters)}localStorage.setItem(u(i.entity,i.mark),JSON.stringify(y)),t&&t()}function c(){return i.entity?JSON.parse(localStorage[u(i.entity,i.mark)]||"{}"):null}function s(y,_){i.entity=y,i.mark=_,b.call()}function u(y,_){return"list-configuration:"+y+(_?"-"+_:"")}const f=r.computed(()=>i.entity?JSON.parse(n[u(i.entity,i.mark)]||"{}"):null),d=r.computed(()=>i.settings?Ke(i.entity,i.settings.config,{router:o,activate:e}):[]),b=ie(async function(){if(!i.entity)return;const _=await Kt(i.entity,i.mark);i.settings=Object.freeze(_),t&&t()}),h=r.computed(()=>{var C;const y=f.value.order||null,_=((C=i.settings)==null?void 0:C.order)||null;return y||_||[]}),g=r.computed(()=>{var C;const y=f.value.prefilters||{};return{...((C=i.settings)==null?void 0:C.prefilters)||{},...y}}),m=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.filters)||[]}),w=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.label)||null}),p=r.computed(()=>{var y;return((y=i.settings)==null?void 0:y.tools)||[]}),v=r.computed(()=>!R.utils.isEmptyObject(f.value));return{state:i,get customFilters(){return i.settings.customFilters||[]},set:s,get:c,configuration:f,update:a,computedPrefilter:g,computedFiltersConfiguration:m,get cellConfig(){return i.settings?Ke(i.entity,i.settings.config,{router:o,activate:e}):[]},get prefilters(){var y;return((y=c())==null?void 0:y.prefilters)||i.settings.prefilters||{}},get order(){var y;return((y=c())==null?void 0:y.order)||i.settings.order||[]},clean(){localStorage.removeItem(u(i.entity,i.mark)),t&&t()},cellConfiguration:d,computedLabel:w,computedTools:p,computedHasLocalConfiguration:v,computedOrder:h,get displayModeForNew(){return i.settings.displayModeForNew||"inline"}}}var me;class Mt{constructor(t){Ne(this,me);this.unloaded=!1,this.offset=0,this.array=r.reactive([]),de(this,me,null),this.process=ie(this.load.bind(this)),this.entity=t,this.limit=50}set options(t){de(this,me,t)}get requestReadOptions(){return Object.assign({},Ae(this,me)||null,{offset:this.offset,limit:this.limit})}async next(){this.unloaded||this.process.loading||await this.process.call()}reload(){return this.clear(),this.next()}clear(){this.array.splice(0,this.array.length),this.offset=0,this.unloaded=!1}get loading(){return this.process.loading}init(t){this.options=t,this.clear()}async load(){const t=await ce(this.entity,this.requestReadOptions);this.addData(t),t.length!==this.limit&&(this.unloaded=!0)}addData(t){this.array.push(...t.map(n=>Object.freeze(n))),this.offset+=t.length}}me=new WeakMap;const lo=["count"],co={key:0,class:"title-md color-primary margin-0 widget-fast-table-label"},uo={class:""},fo=r.defineComponent({__name:"widget-fast-table",props:{entity:{},mark:{},masterEntities:{},binding:{},actions:{},hideLabel:{type:Boolean},hideActions:{type:Boolean},disableUsageContext:{type:Boolean}},setup(e,{expose:t}){const n=e,o=le.useRouter(),i=r.ref(null),a=r.computed(()=>i.value?c.array.indexOf(i.value[2]):null);function l(A,F,$){i.value=[A,F,$]}const c=new Mt(n.entity),s=r.ref(""),u=r.computed(()=>Array.isArray(k.value)?s.value.length===0?c.array:c.array.filter(A=>!!k.value.find($=>{const M=ke($,A);return typeof M=="string"?M.includes(s.value):!1})):[]),f=r.ref(null),d=R.Form.getParentForm(),b=r.ref([]),h=Te(n.entity),{state:g,update:m}=dt(n.entity,{masterEntities:n.masterEntities||[]}),w=ie(async()=>{try{b.value=[],await c.reload(),n.disableUsageContext||await m()}catch(A){const{message:F}=rt(A);f.value=F}});d instanceof R.Form&&d.subscribe({read:w.call.bind(null),name:n.entity,type:"table"}),r.watch(()=>n.mark,()=>{E.set(n.entity,n.mark)});function p(){return I.and(I(E.prefilters),I(n.binding||{}))}const{controller:v}=Ze();r.watch(()=>g.value,A=>{A&&(A.canRead?v.show():v.hide())},{immediate:!0});let y=[Ee.on("affected-entity",A=>{A.name===n.entity&&w.call()}),Ee.on("display-entity",async A=>{A.name===n.entity&&(c.loading&&await c.process.promise,l(A.name,A.primaryKey,u.value.find(F=>F[h.value.fieldNameForIdentification]===A.primaryKey)))})];r.onUnmounted(()=>{y.map(A=>A()),v.remove()});function _(A){function F(G){return Array.isArray(G)?F(G[0]):typeof G!="string"?null:G}const $=F(A);if(!$)return;const M=E.order;C("order",M[0]!==$?[$,"asc"]:M[1]==="desc"?[]:[$,"desc"])}function C(A,F){E.update({[A]:F})}const O=r.computed(()=>w.wait),E=so(l,()=>{c.init({customFilters:E.customFilters,fields:it(k.value).join(" "),order:E.order,filter:p()}),c.next()}),k=E.cellConfiguration;E.set(n.entity,n.mark),r.watch(()=>E.state.settings,()=>setTimeout(w.call,50));const N=r.computed(()=>E.state.settings);t({listSettings:N,array:u,config:k,listDataController:c,selectedRows:b});function V(){H.openModal(T.MODAL_LIST_DOWNLOAD,{entity:n.entity,cellConfig:E.cellConfig,order:E.order,prefilters:p(),customFilters:E.customFilters})}function D(){switch(E.displayModeForNew){case"modal":return H.openModal(T.MODAL_ENTITY,{entity:n.entity});case"form":return o.push(ct(n.entity));case"inline":return i.value=[n.entity]}}function Q(){E.clean()}function Se(){return{entity:n.entity}}return(A,F)=>{var G;const $=r.resolveComponent("widget-button"),M=r.resolveComponent("widget-fast-table-form");return r.openBlock(),r.createElementBlock("div",{class:"es-grid es-gap-15",count:b.value.length},[r.unref(E).computedLabel.value&&!A.hideLabel?(r.openBlock(),r.createElementBlock("p",co,r.toDisplayString(r.unref(Y)(r.unref(E).computedLabel.value)),1)):r.createCommentVNode("",!0),r.unref(h)&&!A.hideActions?(r.openBlock(),r.createBlock(ao,{key:1,metadata:r.unref(h),tools:r.unref(E).computedTools.value,loading:O.value,"selected-rows":b.value||[],onReload:r.unref(w).call,onExport:V,onNew:D,"can-create":((G=r.unref(g))==null?void 0:G.canCreate)||!1},{default:r.withCtx(()=>[r.renderSlot(A.$slots,"tools"),r.unref(E).computedHasLocalConfiguration.value?(r.openBlock(),r.createBlock($,{key:0,onClick:Q,type:"primary",label:"Clear all filters"})):r.createCommentVNode("",!0)]),_:3},8,["metadata","tools","loading","selected-rows","onReload","can-create"])):r.createCommentVNode("",!0),r.createElementVNode("div",uo,[r.createVNode(oo,{search:s.value,"onUpdate:search":F[0]||(F[0]=P=>s.value=P),entity:A.entity,"filters-config":r.unref(E).computedFiltersConfiguration.value,filters:r.unref(E).computedPrefilter.value,"onUpdate:filters":F[1]||(F[1]=P=>C("prefilters",P))},null,8,["search","entity","filters-config","filters"]),r.createVNode(r.unref(xt),{config:r.unref(k),array:u.value,"active-row":a.value,"onUpdate:activeRow":F[3]||(F[3]=P=>i.value=null),onOrder:_,class:"table",selectedRows:b.value,"onUpdate:selectedRows":F[4]||(F[4]=P=>b.value=P),"row-options-handler":Se},{"head-cell":r.withCtx(P=>{var Z,mt,gt;return[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(A.$slots["head-cell"]?A.$slots["head-cell"]:$t),r.mergeProps({label:P.label},P,{onOrder:_,order:r.unref(E).computedOrder.value,type:P.type,"is-full-selected":((Z=b.value)==null?void 0:Z.length)===((mt=u.value)==null?void 0:mt.length)&&((gt=u.value)==null?void 0:gt.length)>0}),null,16,["label","order","type","is-full-selected"]))]}),default:r.withCtx(()=>{var P,Z;return[r.createVNode(M,{entity:(P=i.value)==null?void 0:P[0],"primary-key":((Z=i.value)==null?void 0:Z[1])||null,"master-entities":A.masterEntities||void 0,binding:A.binding,onFormUpdate:F[2]||(F[2]=()=>{i.value=null,r.unref(c).reload()})},null,8,["entity","primary-key","master-entities","binding"])]}),_:1},8,["config","array","active-row","selectedRows"])])],8,lo)}}});function jt(e,t={},n={}){const o=r.inject(T.PROVIDE_NAME_ACTIONS,null),i=typeof e=="string"?e:t,a=typeof t=="string"?n:t;return r.computed(()=>{var s;const c=((typeof e=="string"?(s=o==null?void 0:o.actions)==null?void 0:s.value:r.unref(e))||[]).find(u=>u.name===i);return c?{...c,...a}:null})}const po=r.defineComponent({__name:"widget-action",props:{name:{},overrideParams:{}},setup(e){const t=e,n=jt(t.name,t.overrideParams||{}),o=r.computed(()=>{if(n.value)return ie(n.value.callback)});return(i,a)=>{var c;const l=r.resolveComponent("widget-button");return r.unref(n)?(r.openBlock(),r.createBlock(l,{key:0,label:r.unref(n).label,loading:((c=o.value)==null?void 0:c.loading)||!1,onClick:a[0]||(a[0]=()=>{var s,u;return(u=(s=o.value)==null?void 0:s.call)==null?void 0:u.call(s,i.overrideParams||{})})},null,8,["label","loading"])):r.createCommentVNode("",!0)}}}),mo=r.defineComponent({__name:"WidgetResolverEntity",setup(e){const t=le.useRouter(),n=le.useRoute();function o(){const i=n.params.entity,a=n.params.primaryKey;at(i,a).then(l=>t.replace(ct(l,a))).catch(l=>{j("error")(l),t.back()})}return r.onMounted(o),(i,a)=>(r.openBlock(),r.createElementBlock("div",null,[r.createVNode(Pe,{label:"Loading..."})]))}}),go=r.defineComponent({__name:"modal-list-download",props:{entity:{},cellConfig:{},prefilters:{},order:{},customFilters:{}},setup(e){const t=e,n=r.computed(()=>o.finished?"Download CSV":`Download ${o.count} records.`),{state:o,downloadFile:i,reject:a,start:l}=wn({entity:t.entity,config:t.cellConfig,prefilters:t.prefilters,order:t.order,customFilters:t.customFilters});return H.onBeforeModalClose(a),r.onMounted(l),r.watch(()=>o.finished,()=>{i(),H.popModal()}),(c,s)=>{const u=r.resolveComponent("widget-button"),f=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(f,null,{footer:r.withCtx(()=>[r.createVNode(u,{onClick:s[0]||(s[0]=d=>{r.unref(i)(),r.unref(H.popModal)()})},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.value),1)]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",null,[r.createVNode(Pe,{label:"Loading"})])]),_:1})}}}),et=e=>(r.pushScopeId("data-v-efd61247"),e=e(),r.popScopeId(),e),ho={class:"version-item"},yo={class:"text_md"},vo={class:"version-item-date text_md"},wo=et(()=>r.createElementVNode("span",null,null,-1)),bo=et(()=>r.createElementVNode("div",null,null,-1)),Eo=et(()=>r.createElementVNode("span",null,null,-1)),_o={class:"text_sm"},ko={class:"text_sm line-clamp_5"},Co={class:"text_sm line-clamp_5"},To=r.defineComponent({__name:"version-item",props:{selectedFields:{},date:{},customerName:{},version:{},changes:{},entity:{}},setup(e){const t=e;function n(a,l){const c=a.name.toLowerCase(),s=l.name.toLowerCase();return s==="version"?-1:c==="version"?1:s.startsWith("utc")?-1:c.startsWith("utc")?1:0}const o=r.computed(()=>[...t.changes||[]].sort(n)),i=r.computed(()=>(o.value||[]).filter(a=>Array.isArray(t.selectedFields)&&t.selectedFields.length!==0?t.selectedFields.includes(a.name):!0));return(a,l)=>(r.openBlock(),r.createElementBlock("div",ho,[r.createElementVNode("span",yo,[r.createElementVNode("b",null,r.toDisplayString(a.version),1)]),r.createElementVNode("span",vo,[r.createElementVNode("b",null,r.toDisplayString(r.unref(nt)(a.date)),1)]),wo,bo,(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.name},[Eo,r.createElementVNode("span",_o,r.toDisplayString(c.name),1),r.createElementVNode("span",ko,r.toDisplayString(r.unref(He)(a.entity,c.name,c.newValue)),1),r.createElementVNode("span",Co,r.toDisplayString(r.unref(He)(a.entity,c.name,c.oldValue)),1)],64))),128))]))}}),So=U(To,[["__scopeId","data-v-efd61247"]]),tt=e=>(r.pushScopeId("data-v-321c2f32"),e=e(),r.popScopeId(),e),Ao={key:1,class:"wrap-history"},No={class:"history-header grid gap_10"},Io=tt(()=>r.createElementVNode("span",null,null,-1)),Ro=tt(()=>r.createElementVNode("span",{class:"text_md"},"New Value",-1)),Lo=tt(()=>r.createElementVNode("span",{class:"text_md"},"Old Value",-1)),Oo={class:"padding_15 grid gap_10 container-history"},Fo=r.defineComponent({__name:"modal-version-history",props:{entity:{},primaryKey:{}},setup(e){const t=e,n=r.computed(()=>`${t.entity} Version History`),o=r.ref(),i=r.computed(()=>!s.value||Array.isArray(s.value)&&s.value.length===0?o.value:(o.value||[]).filter(d=>{var b;return d.action==="Insert"?!0:(b=d.changes)==null?void 0:b.find(h=>s.value&&s.value.includes(h.name))})),a=ie(u),l=Te(t.entity),c=r.computed(()=>l.value.fields.map(d=>({label:d.displayName,value:d.name}))),s=r.ref(null);async function u(){try{const d=await Zt({entity:t.entity,primaryKey:t.primaryKey});o.value=d.history}catch(d){j("error")(d)}}r.onMounted(()=>a.call());function f(d){return d.currentValues.map(b=>({name:b.fieldName,newValue:b.value})).filter(b=>b.newValue)}return(d,b)=>{const h=r.resolveComponent("widget-modal-wrap");return r.openBlock(),r.createBlock(h,{label:n.value,class:"wrap-modal-version-history"},{default:r.withCtx(()=>[r.unref(a).loading?(r.openBlock(),r.createBlock(r.unref(Pe),{key:0,label:"Loading history..."})):(r.openBlock(),r.createElementBlock("div",Ao,[r.createElementVNode("div",No,[Io,r.createVNode(r.unref(R.FormField),{type:"select",options:c.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=g=>s.value=g),multiple:""},null,8,["options","modelValue"]),Ro,Lo]),r.createElementVNode("div",Oo,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,(g,m)=>(r.openBlock(),r.createBlock(So,{"selected-fields":s.value,date:g.utcCreated,"customer-name":"",version:g.version,changes:g.action==="Insert"?f(g):g.changes,entity:d.entity,key:m},null,8,["selected-fields","date","version","changes","entity"]))),128))])]))]),_:1},8,["label"])}}}),Bo=U(Fo,[["__scopeId","data-v-321c2f32"]]);function Ut(e,t,n){const o=window.URL.createObjectURL(e);Pt(o,n),setTimeout(()=>{window.URL.revokeObjectURL(o)},100)}function xo(e,t){return fetch(`/close-api/document-builder/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CatalogId:t})}).then(n=>n.blob()).then(n=>{Ut(n,e+t+"-print-form.pdf",{blank:!0})})}function nt(e){return Be(e,"YYYY/MM/DD HH:mm:ss")}function Be(e,t="YYYY/MM/DD"){if(!e)return"";try{const n=new Date(e);return Cn.format(n,t)}catch(n){return console.log(n),"Invalid date"}}function ie(e){function t(i){o.status=i}function n(...i){if(o.loading)return Promise.reject("The process has already started.");o.loading=!0,o.wait=!0;const a=Promise.resolve().then(()=>t(1)).then(()=>e(...i)).then(l=>(t(3),l)).catch(l=>{throw t(2),l}).finally(()=>{o.wait=!1,o.loading=!1,o.promise=null});return o.promise=a,a}const o=r.reactive({status:0,wait:!1,loading:!1,call:n,promise:null});return o}var Wt=(e=>(e[e.init=0]="init",e[e.loading=1]="loading",e[e.error=2]="error",e[e.done=3]="done",e))(Wt||{});function rt(e){return typeof e=="string"?Ie(e):Vo(e)?Ie(e.message,e.children||e.details||[]):$o(e)?Ie(e.title,[e.detail||""]):Ie(T.DEFAULT_ERROR_MESSAGE)}function Vo(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"message"))}function $o(e){return!!(typeof e=="object"&&e!==null&&Object.hasOwnProperty.call(e,"title"))}function Ie(e,t=[]){return{message:e,children:t}}function j(e="error"){return function(t){const{message:n,children:o}=rt(t);je.add(e,n,{children:o})}}function ce(e,t={}){const n=B();return qt(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:read",{entity:e,...t})}function qt(e){return!!(e.id||e.primaryKey)}function ot(e,t){const n=B();return qt(t)&&t.id&&(t.primaryKey=t.id,delete t.id),n.emit("entity:update",{...t,entity:e})}function it(e){return e.reduce((t,n)=>(n.name&&(typeof n.name=="string"?t.push(n.name):t.push(...n.name)),t),[])}function Ht(e,t=2){if(!(typeof e=="string"||typeof e=="number"))return"";let o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.length<2&&(o[1]=""),o[1]=o[1].padEnd(t,"0"),o[1].length>t&&(o[1]=o[1].substring(0,t)),o.join(".")}function Do(e,t){const n=new Map;return e.forEach(o=>{var a;const i=t(o);n.has(i)||n.set(i,[]),(a=n.get(i))==null||a.push(o)}),n}function Po(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function Mo(e){return e.text().then(t=>{try{return JSON.parse(t)}catch{return T.DEFAULT_ERROR_MESSAGE}})}function q(e,t={}){return K.isFront&&(t.headers||(t.headers={}),t.headers["Context-Id"]=K.contextId),t.redirect="manual",fetch(e,t).then(n=>n.type==="opaqueredirect"?void window.location.reload():n).catch(()=>{throw new Error(T.DEFAULT_ERROR_MESSAGE)}).then(n=>Mo(n).then(o=>{if(!n.ok)throw o;return o}))}function Gt(e,t=1e3){let n=0;return(...o)=>{clearTimeout(n),n=window.setTimeout(()=>e(...o),t)}}function jo(e,t){let n=!1;return(...o)=>{if(!n)return n=!0,setTimeout(()=>n=!1,t),e(...o)}}const Uo=$e(De("pretty-value-field-by-entity"));function He(e,t,n){try{const o=te.get(e);if(!o)throw new Error("For entity metadata is not loaded");const i=o.fieldsByName[t];if(!i)throw new Error(`For entity ${e} can't found fieldMetadata for field ${t}`);return i.dataType==="DateTime"&&typeof n=="string"?new Date(n).toLocaleString():n}catch(o){return Uo('Error by parse pretty value for entity %o "%s", field "%s" with value "%s"',o,e,t,n),n}}const ae=$e(De("use-socket"));function B(){return qo}function Wo(e){return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Blob]"}const qo=function(){let e=1,t,n;const o=new Set;let i=0;const a=new Set;function l(){if(t)i&&(clearTimeout(i),i=0);else return;i=setTimeout(()=>{t.close()},Dn*2);const p=new Uint8Array(1);p[0]=$n,t.send(p)}setInterval(()=>{Array.from(o).forEach(p=>{w(p)&&(ae("Handler for event %s requestId %d was expired",p.event,p.requestId),p.requestId?s({requestId:p.requestId,event:Ot,data:{message:oe.RequestTookToLong().message}}):o.delete(p))})},1e3),setInterval(()=>{(!t||t.readyState===3)&&u()},T.DELAY_SOCKET_RECONNECT);function c(){return{safeQueue:a,requestId:e,handlers:o,socketInstance:t}}function s(p){const v=[...o.values()];ae("Handlers array length is %d. Response event: %s. Request id: %d",o.size,p.event,p.requestId),v.forEach(y=>{const _=p.requestId;(y.requestId&&y.requestId===_||!y.requestId&&y.event===p.event)&&(ae("Find appropriated handler: %d, event: %s",e,y.event),y.callback(p.data,p),y.once&&(o.delete(y),ae("Handler was removed by *once* params was passed. %o",y)))})}function u(){if(typeof n!="string"){console.log("Please initialize use-socket");return}console.log(`%cInitializing sockets: %c${n}`,"color: purple","color: black"),t=new WebSocket(n),t.onclose=function(p){ae("Connection to server was stopped: %d %s",p.code,p.reason),Array.from(o).forEach(v=>{v.guaranteedAnswer&&v.serializeString&&a.add(v.serializeString)})},t.onopen=function(){console.log("Socket was %cconnected.","color: green"),[...a.values()].forEach(p=>{f(p),a.delete(p)})},t.onerror=function(p){console.warn(p)},t.onmessage=p=>{var v;try{if(Wo(p.data)){l();return}const y=JSON.parse(p.data);if(!zt(y)){console.warn("Data is %cnot correct %csocket answer.","color: red","color: black"),console.log(y);return}y.event==="progress"&&o.forEach(_=>{_.event===y.data.for.event&&_.requestId===y.data.for.requestId&&(console.log("UPDATE TIME"),_.timeToLive=new Date().getTime()-_.created+T.TIME_TO_LIVE_SOCKET_REQUEST)}),(v=y==null?void 0:y.data)!=null&&v.refresh&&location.reload(),s(y)}catch(y){console.warn("Socket handle %conmessage%c error.","color: red","color: black"),console.log(y)}}}function f(p){t.send(p)}function d(p,v){m({event:p,callback:v})}function b(p,v){m({event:p,callback:v,once:!0})}function h(){return t&&(t==null?void 0:t.readyState)===1}function g(p,v,y){const _=++e,C=JSON.stringify({requestId:_,event:p,data:v,contextId:K.contextId,url:S.socketURLHandler?S.socketURLHandler():window.location.href});return h()?f(C):(a.add(C),ae("Socket is not connected. Message was send to save-queue")),new Promise((O,E)=>{m({event:p,requestId:_,once:!0,guaranteedAnswer:!0,serializeString:C,callback:(k,N)=>{if(ae("Promise was resolve with next data:",k),Ho(N))return void E(k);y&&y(k,N),O(k)},timeToLive:T.TIME_TO_LIVE_SOCKET_REQUEST})})}function m(p){const v={timeToLive:0,...p,created:new Date().getTime()};o.add(v)}function w(p){return p.timeToLive===0||typeof p.timeToLive!="number"?!1:new Date().getTime()-p.created>p.timeToLive}return{get socket(){return t},on:d,once:b,emit:g,initialization(p){n=p},getDevInfo:c}}(),Ho=e=>!!zt(e)&&e.event===Ot,zt=e=>typeof e=="object"&&e!==null&&"event"in e&&typeof e.event=="string"&&"requestId"in e&&typeof e.requestId=="number"&&"data"in e;function Kt(e,t){return B().emit("list-setting:read",{entity:e,mark:t})}function Go(e,t){return B().emit("metadata-field:treat",{entity:e,fieldName:t})}function Yt(e,t){return B().emit("entity:create",{...t,entity:e})}function Xt(e,t){return B().emit("entity:delete",{...t,entity:e})}function zo(e,t){return B().emit("usage-context:read",{...t,entity:e})}function Jt(e={}){return B().emit("tool:read",e)}function Ko(){return B().emit("metadata-list:read",{})}function Qt(e,t){return B().emit("batch:update",{...t,entity:e})}function at(e,t){return B().emit("entity:resolve",{primaryKey:t,entity:e})}function Zt(e){return B().emit("history:read",e)}function Yo(e,t){return B().emit("entity:count",{...t,entity:e})}function en(e){return`/${Pn}/${e}`}function ye(e){return{exec(t,n){switch(e.name){case"replace-boolean":return ye.replaceBoolean(t,e.values);case"replace-record-operation":return ye.replaceRecordOperation(t)}}}}ye.replaceBoolean=Xo;ye.replaceRecordOperation=Jo;function Xo(e,t){return typeof e!="boolean"?"":e?t[1]:t[0]}function Jo(e){switch(e){case"A":case null:return"+";case"M":return"~";case"N":return"";case"D":return"✖";default:return"?"}}function Qo(e={}){return B().emit("tool:execute",e)}const Zo=$e(De("wrap-tool-response"));function tn(e,t){return e.handleConfirmation===void 0&&(e.handleConfirmation=ni),e.handleAffectedEntity===void 0&&(e.handleAffectedEntity=oi),e.handleCloseForm===void 0&&(e.handleCloseForm=ii),e.handleValidationResult===void 0&&(e.handleValidationResult=ri),{...t,label:t.title,async callback(n={}){var l;const o=typeof e.values=="function"?e.values(t,e):e.values;let i={};t.action.targetName==="Record"&&o.hasOwnProperty("Id")&&(i.Id=o.Id,delete o.Id);const a=()=>Qo({name:t.name,values:{...o,...n},primaryKeys:i,usageContext:t.usageContext}).then(async c=>{var s,u;if(!ei(c))throw new Error("It is impossible to process the result of calls.");if(Array.isArray(e.handlers))for await(const f of e.handlers)await f(t,c,e);if(!c.success)throw e.handleValidationResult&&c.validationEffect&&((u=(s=c.validationEffect)==null?void 0:s.results)!=null&&u.length)&&e.handleValidationResult(t,c.validationEffect,e),new Error(c.message);return c.message&&je.add("info",c.message),Array.isArray(c.affectedEntities)&&e.handleAffectedEntity&&c.affectedEntities.forEach(f=>{var d;return(d=e.handleAffectedEntity)==null?void 0:d.call(e,t,f,e)}),t.closeHostForm&&e.handleCloseForm&&e.handleCloseForm(t,e),c}).catch(c=>{if(j("error")(c),e.handleReject)return e.handleReject(t,c,e)});if((l=e.overrides)!=null&&l[t.name])return e.overrides[t.name](t,e);if(t.paramDialog){const c=await ai(t,e);if(c===null)return;n=Object.assign(n,c||{})}return t.requireSave&&e.form&&e.form.changed?e.form.save().then(a):!t.confirmation||!e.handleConfirmation||t.paramDialog?a():e.handleConfirmation(t,a)}}}function ei(e){return!!(e&&typeof e=="object"&&"affectedEntities"in e&&"success"in e)}function ti(e){const t="Are you sure?";return e===!0||typeof e=="string"&&e.toLowerCase()==="true"||e==="1"?t:typeof e=="string"?e:t}async function ni(e,t){const n=ti(e.confirmation);if(!H.getComponentFromStore(T.MODAL_CONFIRM))throw new Error("The 'confirm' modal window is not installed. It provided inside 'constants.MODAL_CONFIRM'");if(await H.promptModal(T.MODAL_CONFIRM,{message:n}))return t()}function ri(e,t){const n=T.MODAL_VALIDATION_EFFECT;if(!H.getComponentFromStore(n))throw new Error("The 'validation-effect' modal window is not installed. It provided inside 'constants.MODAL_VALIDATION_EFFECT'");return new Promise(()=>{H.pushModal(n,t)})}function oi(e,t,n){var s;function o(u){return u!==null&&typeof u=="object"&&typeof u.read=="function"}function i(u,f){u&&(Zo("Affected Entity %s. Find form with name %s.",f,u.name),u.name===f&&o(u)&&u.read(),u instanceof R.Form&&u.dependencies.forEach(d=>i(d,f)))}Ee.emit("affected-entity",t);const{router:a,form:l}=n,c=typeof t.primaryKey=="string"?t.primaryKey:(s=t.primaryKey)==null?void 0:s.Id;if(a&&t&&t.name===e.redirectEntity){Ee.emit("display-entity",{primaryKey:c,name:t.name}),S.getEntityLink&&a.push(S.getEntityLink(t.name,c));return}i(l,t.name)}function ii(e,t){const{router:n}=t;n&&e.closeHostForm&&n.back()}function ai(e,t){var n;if((n=e.paramDialog)!=null&&n.name)return H.promptModal(e.paramDialog.name,{paramDialog:e.paramDialog,tool:e,options:t})}let se={};function Y(e,...t){if(typeof e!="string")return console.trace(`Label is not provided for translation: ${e}`),"undefined";let n=R.utils.getPropFromObject((this==null?void 0:this.vocabulary)||se,e);if(typeof n=="string")return _t(n,t);const o=R.utils.getPropFromObject(se==null?void 0:se.root,e);return typeof o=="string"?_t(o,t):(typeof n===void 0&&console.warn(`Translation for label "${e}" is not founded.`),e)}function _t(e,t){return t.forEach((n,o)=>{e=e.replaceAll(new RegExp(`\\{${o}}`,"g"),n)}),e}Y.setGlobalVocabulary=function(e){se=e};Y.getScope=function(e){const t=typeof e=="string"?e:"root";return typeof e!="string"&&console.warn(`SCOPE ${e} for translate is not string.`),Y.bind({vocabulary:R.utils.getPropFromObject(se,t.toLowerCase())})};Y.setVocabulary=function(e){return typeof e=="string"&&(e=R.utils.getPropFromObject(se,e)),Y.bind({vocabulary:e})};function si(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ge={exports:{}},x={},ze={exports:{}},ue={};function nn(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function li(e,t,n){}function ci(e,t,n){}var ui=/javascript\s*\:/img;function di(e,t){return ui.test(t)?"":t}ue.whiteList=nn();ue.getDefaultWhiteList=nn;ue.onAttr=li;ue.onIgnoreAttr=ci;ue.safeAttrValue=di;var fi={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,i;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},we=fi;function pi(e,t){e=we.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,o=!1,i=0,a=0,l="";function c(){if(!o){var f=we.trim(e.slice(i,a)),d=f.indexOf(":");if(d!==-1){var b=we.trim(f.slice(0,d)),h=we.trim(f.slice(d+1));if(b){var g=t(i,l.length,b,h,f);g&&(l+=g+"; ")}}}i=a+1}for(;a<n;a++){var s=e[a];if(s==="/"&&e[a+1]==="*"){var u=e.indexOf("*/",a+2);if(u===-1)break;a=u+1,i=a+1,o=!1}else s==="("?o=!0:s===")"?o=!1:s===";"?o||c():s===`
|
|
7
|
+
`&&c()}return we.trim(l)}var mi=pi,Re=ue,gi=mi;function kt(e){return e==null}function hi(e){var t={};for(var n in e)t[n]=e[n];return t}function rn(e){e=hi(e||{}),e.whiteList=e.whiteList||Re.whiteList,e.onAttr=e.onAttr||Re.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Re.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Re.safeAttrValue,this.options=e}rn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,i=n.onAttr,a=n.onIgnoreAttr,l=n.safeAttrValue,c=gi(e,function(s,u,f,d,b){var h=o[f],g=!1;if(h===!0?g=h:typeof h=="function"?g=h(d):h instanceof RegExp&&(g=h.test(d)),g!==!0&&(g=!1),d=l(f,d),!!d){var m={position:u,sourcePosition:s,source:b,isWhite:g};if(g){var w=i(f,d,m);return kt(w)?f+":"+d:w}else{var w=a(f,d,m);if(!kt(w))return w}}});return c};var yi=rn;(function(e,t){var n=ue,o=yi;function i(l,c){var s=new o(c);return s.process(l)}t=e.exports=i,t.FilterCSS=o;for(var a in n)t[a]=n[a];typeof window<"u"&&(window.filterCSS=e.exports)})(ze,ze.exports);var st=ze.exports,lt={indexOf:function(e,t){var n,o;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,o=e.length;n<o;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var o,i;if(Array.prototype.forEach)return e.forEach(t,n);for(o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},vi=st.FilterCSS,wi=st.getDefaultWhiteList,xe=lt;function on(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var an=new vi;function bi(e,t,n){}function Ei(e,t,n){}function _i(e,t,n){}function ki(e,t,n){}function sn(e){return e.replace(Ti,"<").replace(Si,">")}function Ci(e,t,n,o){if(n=pn(n),t==="href"||t==="src"){if(n=xe.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(Le.lastIndex=0,Le.test(n))return""}else if(t==="style"){if(Ct.lastIndex=0,Ct.test(n)||(Tt.lastIndex=0,Tt.test(n)&&(Le.lastIndex=0,Le.test(n))))return"";o!==!1&&(o=o||an,n=o.process(n))}return n=mn(n),n}var Ti=/</g,Si=/>/g,Ai=/"/g,Ni=/"/g,Ii=/&#([a-zA-Z0-9]*);?/gim,Ri=/:?/gim,Li=/&newline;?/gim,Le=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Ct=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Tt=/u\s*r\s*l\s*\(.*/gi;function ln(e){return e.replace(Ai,""")}function cn(e){return e.replace(Ni,'"')}function un(e){return e.replace(Ii,function(n,o){return o[0]==="x"||o[0]==="X"?String.fromCharCode(parseInt(o.substr(1),16)):String.fromCharCode(parseInt(o,10))})}function dn(e){return e.replace(Ri,":").replace(Li," ")}function fn(e){for(var t="",n=0,o=e.length;n<o;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return xe.trim(t)}function pn(e){return e=cn(e),e=un(e),e=dn(e),e=fn(e),e}function mn(e){return e=ln(e),e=sn(e),e}function Oi(){return""}function Fi(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function o(l){return n?!0:xe.indexOf(e,l)!==-1}var i=[],a=!1;return{onIgnoreTag:function(l,c,s){if(o(l))if(s.isClosing){var u="[/removed]",f=s.position+u.length;return i.push([a!==!1?a:s.position,f]),a=!1,u}else return a||(a=s.position),"[removed]";else return t(l,c,s)},remove:function(l){var c="",s=0;return xe.forEach(i,function(u){c+=l.slice(s,u[0]),s=u[1]}),c+=l.slice(s),c}}}function Bi(e){for(var t="",n=0;n<e.length;){var o=e.indexOf("<!--",n);if(o===-1){t+=e.slice(n);break}t+=e.slice(n,o);var i=e.indexOf("-->",o);if(i===-1)break;n=i+3}return t}function xi(e){var t=e.split("");return t=t.filter(function(n){var o=n.charCodeAt(0);return o===127?!1:o<=31?o===10||o===13:!0}),t.join("")}x.whiteList=on();x.getDefaultWhiteList=on;x.onTag=bi;x.onIgnoreTag=Ei;x.onTagAttr=_i;x.onIgnoreTagAttr=ki;x.safeAttrValue=Ci;x.escapeHtml=sn;x.escapeQuote=ln;x.unescapeQuote=cn;x.escapeHtmlEntities=un;x.escapeDangerHtml5Entities=dn;x.clearNonPrintableCharacter=fn;x.friendlyAttrValue=pn;x.escapeAttrValue=mn;x.onIgnoreTagStripAll=Oi;x.StripTagBody=Fi;x.stripCommentTag=Bi;x.stripBlankChar=xi;x.attributeWrapSign='"';x.cssFilter=an;x.getDefaultCSSWhiteList=wi;var Me={},ne=lt;function Vi(e){var t=ne.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=ne.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function $i(e){return e.slice(0,2)==="</"}function Di(e,t,n){var o="",i=0,a=!1,l=!1,c=0,s=e.length,u="",f="";e:for(c=0;c<s;c++){var d=e.charAt(c);if(a===!1){if(d==="<"){a=c;continue}}else if(l===!1){if(d==="<"){o+=n(e.slice(i,c)),a=c,i=c;continue}if(d===">"||c===s-1){o+=n(e.slice(i,a)),f=e.slice(a,c+1),u=Vi(f),o+=t(a,o.length,u,f,$i(f)),i=c+1,a=!1;continue}if(d==='"'||d==="'")for(var b=1,h=e.charAt(c-b);h.trim()===""||h==="=";){if(h==="="){l=d;continue e}h=e.charAt(c-++b)}}else if(d===l){l=!1;continue}}return i<s&&(o+=n(e.substr(i))),o}var Pi=/[^a-zA-Z0-9\\_:.-]/gim;function Mi(e,t){var n=0,o=0,i=[],a=!1,l=e.length;function c(b,h){if(b=ne.trim(b),b=b.replace(Pi,"").toLowerCase(),!(b.length<1)){var g=t(b,h||"");g&&i.push(g)}}for(var s=0;s<l;s++){var u=e.charAt(s),f,d;if(a===!1&&u==="="){a=e.slice(n,s),n=s+1,o=e.charAt(n)==='"'||e.charAt(n)==="'"?n:Ui(e,s+1);continue}if(a!==!1&&s===o){if(d=e.indexOf(u,s+1),d===-1)break;f=ne.trim(e.slice(o+1,d)),c(a,f),a=!1,s=d,n=s+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),a===!1)if(d=ji(e,s),d===-1){f=ne.trim(e.slice(n,s)),c(f),a=!1,n=s+1;continue}else{s=d-1;continue}else if(d=Wi(e,s-1),d===-1){f=ne.trim(e.slice(n,s)),f=St(f),c(a,f),a=!1,n=s+1;continue}else continue}return n<e.length&&(a===!1?c(e.slice(n)):c(a,St(ne.trim(e.slice(n))))),ne.trim(i.join(" "))}function ji(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function Ui(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function Wi(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function qi(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function St(e){return qi(e)?e.substr(1,e.length-2):e}Me.parseTag=Di;Me.parseAttr=Mi;var Hi=st.FilterCSS,z=x,gn=Me,Gi=gn.parseTag,zi=gn.parseAttr,Fe=lt;function Oe(e){return e==null}function Ki(e){var t=Fe.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=Fe.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=Fe.trim(e.slice(0,-1))),{html:e,closing:n}}function Yi(e){var t={};for(var n in e)t[n]=e[n];return t}function Xi(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(o){return o.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function hn(e){e=Yi(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=z.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Xi(e.whiteList||e.allowList):e.whiteList=z.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":z.attributeWrapSign,e.onTag=e.onTag||z.onTag,e.onTagAttr=e.onTagAttr||z.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||z.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||z.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||z.safeAttrValue,e.escapeHtml=e.escapeHtml||z.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Hi(e.css))}hn.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,o=n.whiteList,i=n.onTag,a=n.onIgnoreTag,l=n.onTagAttr,c=n.onIgnoreTagAttr,s=n.safeAttrValue,u=n.escapeHtml,f=t.attributeWrapSign,d=t.cssFilter;n.stripBlankChar&&(e=z.stripBlankChar(e)),n.allowCommentTag||(e=z.stripCommentTag(e));var b=!1;n.stripIgnoreTagBody&&(b=z.StripTagBody(n.stripIgnoreTagBody,a),a=b.onIgnoreTag);var h=Gi(e,function(g,m,w,p,v){var y={sourcePosition:g,position:m,isClosing:v,isWhite:Object.prototype.hasOwnProperty.call(o,w)},_=i(w,p,y);if(!Oe(_))return _;if(y.isWhite){if(y.isClosing)return"</"+w+">";var C=Ki(p),O=o[w],E=zi(C.html,function(k,N){var V=Fe.indexOf(O,k)!==-1,D=l(w,k,N,V);return Oe(D)?V?(N=s(w,k,N,d),N?k+"="+f+N+f:k):(D=c(w,k,N,V),Oe(D)?void 0:D):D});return p="<"+w,E&&(p+=" "+E),C.closing&&(p+=" /"),p+=">",p}else return _=a(w,p,y),Oe(_)?u(p):_},u);return b&&(h=b.remove(h)),h};var Ji=hn;(function(e,t){var n=x,o=Me,i=Ji;function a(c,s){var u=new i(s);return u.process(c)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,function(){for(var c in n)t[c]=n[c];for(var s in o)t[s]=o[s]}(),typeof window<"u"&&(window.filterXSS=e.exports);function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(Ge,Ge.exports);var Qi=Ge.exports;const Zi=si(Qi);function ea(e){return e=e.replace(/\*\*([^*]+)\*\*/g,"<b>$1</b>"),e=e.replace(/\[icon:([^\]]+)]/g,"<widget-icon>$1</widget-icon>"),e=e.replace(/\[(.*)]\((.*)\)/g,'<router-link to = "$2">$1</router-link>'),Zi(e)}function ta(e,t,n,o){let i=e+t/60+n/3600;return(o=="S"||o=="W")&&(i=i*-1),i}function na(e,t){const n={dir:e<0?t==="long"?"W":"S":t==="long"?"E":"N",deg:0|(e<0?e=-e:e),min:0|(e+=1e-9)%1*60,sec:(0|e*60%1*6e3)/100};return`${n.deg}° ${n.min}' ${n.sec}" ${n.dir}`}function ct(e,t){const n=["forms",e];return t&&n.push(t),"/"+n.join("/")}function ra(e,t){return"/"+[T.PATH_RESOLVER_ENTITY,e,t].join("/")}function oa(){return`/${T.PATH_RESOLVER_ENTITY}/:entity/:primaryKey`}function ut(e){const t=te.get(e);if(!t)throw new Error(`Metadata ${e} is still missing.`);return t.useCatalogInsteadId?"CatalogId":t.fieldNameForIdentification}function Ke(e,t,n){const o=Y.getScope(e.toLowerCase());return t.map(i=>{typeof i.label=="string"&&(i.label=o(i.label)),i.type==="history"&&(i.onClick=l=>H.openModal(T.MODAL_HISTORY,{primaryKey:l[ut(e)],entity:e}),i.icon="history",i.class="widget-list-cell-history",i.hint="Open the History");const a=i.displayMode;if(a){const l=async c=>{try{const s=c[re(i)];return[await at(aa(i,c),s),s]}catch{return[]}};a&&(a==="form"?i.link=c=>{const s=c[re(i)];return s?ra(i.entity,s):null}:i.onClick=async c=>{const[s,u]=await l(c);if(!s||!u)return null;switch(i.displayMode){case"modal":return H.openModal(T.MODAL_ENTITY,{entity:s,primaryKey:u});case"inline":return n.activate(s,u,c)}}),i.class="widget-table-cell_link cursor_pointer",typeof i.value!="string"&&(i.value=(c,s)=>s[i.name[1]])}return ia(i,i.type,i.presentation),S.listConvertCellConfigHandler&&S.listConvertCellConfigHandler(e,i),i})}function ia(e,t,n){switch(t){case"Decimal":{n==="Money"&&(e.type="money");break}}return e}const aa=(e,t)=>e.useObjectTypeName?t[e.name[2]]:e.entity?e.entity:null;function sa(e){if(!Array.isArray(S.arrayListCellHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");S.arrayListCellHandlers.push(e)}function la(e,t){const n=re(e);return n?R.utils.getPropFromObject(t,n):null}function ca(e){if(!Array.isArray(S.arrayFieldParamsHandlers))throw new Error("Configuration has mistake: arrayListCellHandlers is not an array");S.arrayFieldParamsHandlers.push(e)}function ua(e){if(!Array.isArray(S.arrayListRowHandlers))throw new Error("Configuration has mistake: arrayListRowHandlers is not an array");S.arrayListRowHandlers.push(e)}const da={addListCellHandler:sa,getCellModelValue:la,addFieldParamsHandler:ca,addListRowHandler:ua};var yn=(e=>(e.form="form",e.inline="inline",e.modal="modal",e))(yn||{});function fa(){const e=r.ref(null);function t(n){e.value=n}return{activeRow:e,activateRow:t}}function pa(e,t){return typeof e!="object"||e===null?!1:Object.values(e).join().toLowerCase().includes(t)}async function vn(e,t){e()&&(await t(),await vn(e,t))}function ma(e,t,n={}){let o=!1;const i=r.ref(""),a=r.computed(()=>l.filter(E=>u(E,i.value))),l=r.reactive([]);let c=0;const s=r.ref(!1);let u=(n==null?void 0:n.filterSearchFn)||((E,k)=>pa(E,k));function f(){return n.masterEntities?typeof n.masterEntities=="function"?n.masterEntities():n.masterEntities:[]}function d(){const E=_();return typeof E.limit!="number"&&(E.limit=100),E.offset=c,(n.request||ce)(e,E).then(N=>(c+=N.length,N))}function b(E,k){var V;return typeof E.Version=="number"?E.Version:(V=l.find(D=>D.Id===k))==null?void 0:V.Version}function h(E,k){const N=l.findIndex(V=>V.Id===E);if(N===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(N,1,k)}function g(E){const k=l.findIndex(N=>N.Id===E);if(k===-1)throw new Error(`Can't found item with Id ${E}`);l.splice(k,1)}async function m(E,k){try{const N=_(),V=b(k,E);delete k.Version,await ot(e,{id:E,values:k,version:V,masterEntities:f()});const D=await ce(e,{fields:N.fields||"",id:E});h(E,D)}catch(N){j()(N)}}async function w(E,k={}){try{const N=_(),V=b(k,E);delete k.Version,await Xt(e,{id:E,version:V,masterEntities:f()}),g(E)}catch(N){j()(N)}}async function p(E){try{await Yt(e,{values:E,masterEntities:f()}),await C()}catch(k){j()(k)}}let v;async function y(){s.value=!0;try{v!=null&&v.signal&&!v.signal.aborted&&v.abort();let E=v=new AbortController,k=0;const V=_().limit||0;if(i.value&&!V){console.warn("Using textSearch assumes the use of limit.");return}await vn(()=>(V>0?k<V:!0)&&!o&&!E.signal.aborted,async()=>{const D=await d();E.signal.aborted||(l.push(...D),k+=D.filter(Q=>u(Q,i.value)).length,(D.length<V||V===0)&&(o=!0))})}catch(E){j()(E)}s.value=!1}function _(){return typeof t=="function"?t():t}async function C(){try{c=0,o=!1,l.splice(0,l.length),await y()}catch(E){j()(E)}}function O(){if(v)return v.abort();s.value=!1}return{array:l,updateById:m,next:y,reload:C,wait:s,create:p,deleteById:w,textSearch:i,filteredArray:a,abort:O}}function ga(){function e(){return{organizations:K.organizations,currentContextId:K.contextId,person:K.person,context:K.context,contextType:K.contextType,userId:K.userId}}const t=r.reactive(e());return K.onupdateContext(()=>{Object.assign(t,e())}),t}function ha(e,t,n){return B().emit("communication:create",{entityName:e,entityCatalogId:t,targetCode:n})}function ya(e,t,n){return B().emit("communication:read",{entityName:e,entityCatalogId:t,targetCode:n})}function va(e,t){return B().emit("communication-message:create",{communicationId:e,text:t})}function wa(e){return B().emit("communication-message:read",{communicationId:e})}function ba(e){const t=R.Form.getParentForm(),n=r.reactive([]);return t&&t.subscribe(e),e.read=()=>wa(e.id).then(o=>(n.splice(0,n.length,...o),o)),{array:n}}function Ea(e,t){e.read=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw oe.EntityWithoutName(e);return ce(e.name,o)}).then(pt).then(i=>(i.hasOwnProperty("Version")&&(e.version=i.Version),e.setValues(i),i)).catch(j())},e.save=()=>{const o=n();return Promise.resolve().then(()=>{if(!e.name)throw oe.EntityWithoutName(e);return ot(e.name,{id:o.id,values:e.changes,version:e.version})}).then(i=>{e.version=i.version}).catch(i=>{throw j()(i),i})};function n(){return typeof t=="function"?t():t}}function Te(e){if(!e)return r.inject(T.PROVIDE_NAME_METADATA);te.initEntity(e);const t=r.computed(()=>te.state[e]);return r.provide(T.PROVIDE_NAME_METADATA,t),r.provide(T.PROVIDE_ENTITY_NAME,e),t}function dt(e,t={}){if(!e)return r.inject(T.PROVIDE_NAME_USAGE_CONTEXT);const n=r.ref(null);return r.provide(T.PROVIDE_NAME_USAGE_CONTEXT,n),{state:n,update:async function(){n.value=await zo(e,_a(t||{}))}}}function _a(e){return typeof e=="function"?e():e}function ka(e){if(!e)return r.inject(T.PROVIDE_NAME_ACTIONS);const t=r.ref(!1),n=r.reactive([]),o=r.computed(()=>n.map(l=>tn(e,l))),i={actions:o,update:a};r.provide(T.PROVIDE_NAME_ACTIONS,i),e.router=le.useRouter();function a(){if(t.value)return;t.value=!0,n.splice(0,n.length);const l=e==null?void 0:e.form;return Jt({masterEntities:e==null?void 0:e.masterEntities,id:l==null?void 0:l.id,entity:l==null?void 0:l.name}).then(c=>n.splice(0,0,...c)).catch(j("error")).finally(()=>t.value=!1)}return{actions:o,update:a,loading:r.readonly(t)}}function Ca(e){function t(n){n.key==="Enter"&&e()}r.onMounted(()=>{document.addEventListener("keypress",t)}),r.onUnmounted(()=>{document.removeEventListener("keypress",t)})}function Ta(e,t={}){const n=r.reactive([]),o=s=>{const u=r.unref(e);if(s===void 0){n.length===0?u.forEach(a):u.forEach(l);return}i(s)?l(s):a(s)},i=s=>n.includes(s),a=s=>{t.handleSelect&&!t.handleSelect(s)||i(s)||n.push(s)},l=s=>{const u=n.findIndex(f=>f===s);u!==-1&&n.splice(u,1)},c=r.computed(()=>{const s=r.unref(e);return n.length===s.length&&s.length!==0});return[n,o,c,a,l]}function Sa(e){const t=r.ref(""),n=r.computed(()=>{const o=t.value.toLowerCase();return r.unref(e).filter(i=>t.value.length?Object.values(i).join().toLowerCase().includes(o):!0)});return{search:t,searchArray:n}}class We{static async getStartConfig(t,n){return B().emit("wizard:configuration",{process:t,entity:n})}static async startProcess(t,n){return B().emit("wizard:start",{process:t,entity:n})}static async runStep(t,n,o,i,a){return B().emit("wizard:step",{process:t,entity:n,stepName:o,token:i,values:a})}}function Aa(e){return e.statusName===W.Completed}function Na(e){return[W.FinalStepWithConfirmation,W.NextStepWithConfirmation].includes(e.statusName)}function Ia(e){return e.statusName===W.ValidationError}function Ra(e){return e.statusName===W.Undefined}function La(e,t,n){let o=null,i=[];const a=r.ref(!1),l=r.ref(null),c=r.computed(()=>d(i,l.value)),s=r.ref(null),u=r.reactive([]),f=r.computed(()=>u.map(v=>d(i,v)));function d(v,y){return v.find(_=>_.name===y)||null}async function b(v){var y;if(Ra(v)){await n.onDisplayDataSet(v);return}if(!(Na(v)&&!await n.onDisplayDataSet(v))){if(Ia(v))return void n.onValidation(v.validationResults);m(v),await r.nextTick();{const _=((y=d(i,l.value))==null?void 0:y.fields)||[];if([W.FinalStep,W.NextStep,W.FinalStepWithConfirmation,W.NextStepWithConfirmation].includes(v.statusName)&&(!_.length||Oa(_,n.presets)))return p(n.presets||{})}Aa(v)&&n.onCompleted(v)}}async function h(){try{await g(),await w()}catch(v){j("error")(v)}}function g(){return a.value="Loading process information.",We.getStartConfig(t,e).then(v=>(s.value={label:v.processTitle,info:v.processInfo,icon:v.processIcon},i=v.steps.map(y=>{const _=y.frontendEntity.rootObject,C=Object.fromEntries(y.frontendEntity.objectTypes.map(O=>[O.name,O.properties]));return{label:y.title,name:y.stepName,number:y.number,rootObjectName:_,objectTypes:C,fields:C[_],buttonCaption:y.buttonCaption}}))).finally(()=>{a.value=!1})}function m(v){return[W.FinalStepWithConfirmation,W.NextStepWithConfirmation,W.NextStep,W.Completed,W.FinalStep].includes(v.statusName)?(o=v.token,l.value=v.nextStepName):console.log("Saving is not completed:",v),v}function w(){return a.value="Starting process",We.startProcess(t,e).then(b).catch(j("error")).finally(()=>{a.value=null})}function p(v={}){const y=l.value;return!o||!y?Promise.reject("Not step or token."):(a.value="Waiting for result...",We.runStep(t,e,y,o,v).then(b).then(_=>(u[u.length-1]!==y&&u.push(y),_)).catch(j("error")).finally(()=>{a.value=!1}))}return{initialize:h,loading:a,currentStepConfig:c,currentStepName:l,arrayPassedSteps:f,arrayProcessStepName:u,processInfo:s,next:p}}function Oa(e,t){for(let n=0;n<e.length;n++){const o=e[n];if(!R.utils.getPropFromObject(t,o.name))return!1}return!0}function Fa(e,t){const n=typeof e=="string"?e:e.name,o=Object.assign({},typeof e=="string"?{}:e.arguments,t||{});return{name:n,arguments:o}}function Ba(e){return e.limit||(e.limit=150),e}function wn(e,t={}){const{limit:n}=Ba(t),{prefilters:o,order:i}=e;if(!e.entity)throw new Error("-");if(!e.config)throw new Error("-");const a=e.entity,l=e.config,c=e.customFilters||[],s=[l.map(m=>f(m.label)).join(",")],u=r.reactive({count:0,rejected:!1,finished:!1,offset:0});function f(m){m===null&&(m=""),m===void 0&&(m="-");let w=typeof m!="string"?String(m):m;return w=w.replace(/"/g,'""'),w.search(/("|,|\n)/g)>=0&&(w='"'+w+'"'),w}function d(){return ce(a,{fields:it(l).join(" "),limit:n,offset:u.offset,order:i,filter:typeof o=="string"?o:I(o||{}),customFilters:c.map(m=>{var w;return Fa(m,(w=t.customFiltersData)==null?void 0:w[typeof m=="string"?m:m.name])})}).then(m=>(u.offset+=n,m))}function b(){const m="data:text/csv;charset=utf-8,"+s.join(`\r
|
|
8
|
+
`),w=encodeURI(m),p=document.createElement("a");p.setAttribute("href",w),p.setAttribute("download",`${a}.csv`),document.body.appendChild(p),p.click()}function h(){u.rejected=!0}async function g(){return d().then(m=>{const w=m.map(p=>l.map(v=>f(ke(v,p))).join(","));return s.push(...w),u.count=s.length,m.length}).then(m=>{if(m!==n&&(u.finished=!0),m===n&&!u.rejected)return g()})}return{downloadFile:b,reject:h,state:u,start:g}}const je=new class{constructor(){this.store=r.reactive([])}add(t,n,o={}){const i=xa(o),a=new Ye(t,n,i.timeout,i.children,i.click);return this.store.push(a),i.timeout&&setTimeout(this.remove.bind(this,a.id),i.timeout*1e3),a}remove(t){const n=this.store.findIndex(o=>o.id===t);if(n===-1)return!1;this.store.splice(n,1)}};function xa(e){function t(o){return!!o&&typeof o=="object"}const n={timeout:10,click:()=>null,children:[]};return t(e)?{timeout:e.timeout||n.timeout,click:e.click||n.click,children:e.children||n.children}:n}const Ve=class Ve{constructor(t,n,o,i,a){this.type=t,this.message=n,this.timeout=o,this.children=i,this.click=a,this.id=Ve.cardId++}};Ve.cardId=1;let Ye=Ve;/*!
|
|
9
9
|
* jenesius-event-emitter v1.0.2
|
|
10
10
|
* (c) 2022 Jenesius
|
|
11
11
|
* @license MIT
|
|
12
|
-
*/const At=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},Nt=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},It=function(e,t){const n=this.events[e];if(!n)return;const o=n.indexOf(t);o!==-1&&n.splice(o,1)},Rt=function(){this.events={}};class Z{constructor(){this.events={}}on(t,n){return At.call(this,t,n)}emit(t,n){return Nt.call(this,t,n)}off(t,n){return It.call(this,t,n)}cleanEvents(){Rt.call(this)}static on(t,n){return At.call(Z,t,n)}static emit(t,n){return Nt.call(Z,t,n)}static off(t,n){return It.call(Z,t,n)}static cleanEvents(){Rt.call(Z)}}Z.events={};class xa extends Z{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return ya(this.id,t)}static checkAndGenerate(t,n,o){return ha(t,n,o).then(i=>i.length===0?ga(t,n,o):i[0])}}function Va(){return B().emit("client:read",{})}class ft extends Error{static ConstContextCannotBeChanged(){return new ft("The current context is set to constant. In order to change it, you need to put Manager into a changeable state.")}}var _e,ge;const X=class X extends Z{constructor(){super(...arguments);Ne(this,_e);Ne(this,ge);this.isConstContext=!1,this.type="front",this.organizations=[],de(this,ge,!1)}set language(n){localStorage.setItem(T.LOCALSTORAGE_LANGUAGE_KEY,n)}get language(){return localStorage.getItem(T.LOCALSTORAGE_LANGUAGE_KEY)||X.DEFAULT_LANGUAGE}get contextId(){return Ae(this,_e)}set contextId(n){if(this.isConstContext)throw ft.ConstContextCannotBeChanged();de(this,_e,n)}get contextType(){var n;if(this.contextId)return((n=this.person)==null?void 0:n.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(n){de(this,ge,n),this.emit(X.EVENT_READY_UPDATE,n)}get ready(){return Ae(this,ge)}onReady(n){return this.on(X.EVENT_READY_UPDATE,n)}onupdateContext(n){return this.on(X.EVENT_CONTEXT_UPDATE,n)}setCurrentContext(n){if(this.contextId===n)return console.warn("[application-manager] The current context has already been installed.");this.contextId=n,localStorage.setItem(T.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(n)),this.emit(X.EVENT_CONTEXT_UPDATE,n),console.log(`Current context id %c${n}`,"color: purple")}get context(){var n;return this.contextId?this.contextId===((n=this.person)==null?void 0:n.id)?this.person:this.organizations.find(o=>o.id===this.contextId)||null:null}async init(){try{const n=await this.loadCustomerData();this.customer=n,this.person=n,this.organizations=n.organizations,this.userId=n.userId,this.restoreCurrentContext(),this.ready=!0}catch(n){j()(n)}}restoreCurrentContext(){var o,i;if(typeof((o=this.customer)==null?void 0:o.constContextId)=="number"||((i=this.customer)==null?void 0:i.constContextId)===null)return this.setCurrentContext(this.customer.constContextId),this.isConstContext=!0;const n=Number.parseInt(localStorage.getItem(T.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(n)&&this.validateContextId(Number(n)))this.setCurrentContext(n);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return Va()}validateContextId(n){var o;try{return((o=this.person)==null?void 0:o.id)==n?!0:!!this.organizations.find(i=>i.id===n)}catch{return!1}}};_e=new WeakMap,ge=new WeakMap,X.DEFAULT_LANGUAGE="en",X.EVENT_CONTEXT_UPDATE="event:context-update",X.EVENT_READY_UPDATE="event:ready-update";let Xe=X;function $a(e){return B().emit("metadata:read",{entity:e})}const ee=function(){const t=r.reactive({}),n=new Map;function o(c){return t[c]}async function i(c){if(n.has(c)&&await n.get(c),t[c])return o(c);const s=await a(c);return l(c,s),o(c)}function a(c){const s=$a(c).finally(()=>{n.delete(c)});return n.set(c,s),s}function l(c,s){t[c]=s}return{state:t,initEntity:i,get:o,loadingFlags:n}}();class Da extends Z{on(t,n){return super.on(t,n)}emit(t,n){console.log("[event-bus] emit",t,n),super.emit(t,n)}off(t,n){super.off(t,n)}}class Y{static login(t){return q(S.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:S.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return Y.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return Y.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return Y.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return Y.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return q(`${S.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return Y.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return Y.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return Y.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return q(`${S.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(Y.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return q(`${S.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,o,i){return q(`${S.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:i})})}static confirmEmailByAccessRecovery(t,n,o,i){return q(`${S.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:i})})}static finishAccessRecovery(t,n,o,i){return q(`${S.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:o,ConfirmedPassword:i})})}}class Pa{static readHistoryById(t,n){return q(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Ma{static getConfiguration(){return q("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await q(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class ja{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return q(`/open-api/internationalization/language/${t}`)}}class Ua{static async upload(t,n){const o=new FormData;return o.append("file",t),o.append("entityName",n),q("/close-api/files",{method:"POST",body:o}).then(i=>(i.filename=t.name,i))}static getFileLink(t){return`/close-api/files/${t}`}}var bn=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(bn||{}),En=(e=>(e.Approved="A",e.AwaitingFeedback="AF",e.AssignedForExam="AFE",e.Cancelled="C",e.Closed="CLS",e.Completed="CT",e.Draft="D",e.NotSatisfied="NSF",e.OnClarification="OC",e.Processing="P",e.Rejected="R",e.ReadyForExam="RFE",e.Submitted="S",e.SecurityCheck="SCK",e.Satisfied="SF",e.Withdrawn="W",e))(En||{});function _n(e){return typeof e!="string"?!1:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}function Wa(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function I(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];if(Array.isArray(o))return t.push(I.in(n,o)),t;if(kn(o)&&(typeof o.min=="number"&&t.push(I.ge(n,o.min)),typeof o.max=="number"&&t.push(I.le(n,o.max))),qa(o)){if(o.text){const a=(l=>{switch(l){case"end":return I.endWith;case"begin":return I.beginWith;default:return I.includes}})(o.option);t.push(a(n,o.text))}return t}if(Wa(o)){let i=function(a){var l;return((l=a.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&t.push(`@${n} ge ${i(o.start)}`),o.end&&t.push(`@${n} le ${i(o.end)}`),t}return typeof o=="number"||typeof o=="boolean"||typeof o=="string"?(t.push(I.eq(n,o)),t):(o===null&&t.push(I.is(n,o)),t)},[]).join(" and ")}function kn(e){return e!==null&&typeof e=="object"&&("min"in e||"max"in e)}function qa(e){return e!==null&&typeof e=="object"&&"text"in e&&"option"in e}function ve(e){return typeof e=="string"&&_n(e)?`{${e}}`:typeof e=="string"?`'${e}'`:`${e}`}I.includes=function(t,n){return`@${t} Contains ${ve(n)}`};I.beginWith=function(t,n){return`@${t} BeginWith ${ve(n)}`};I.endWith=function(t,n){return`@${t} EndWith ${ve(n)}`};I.notEq=function(t,n){return`@${t} nq ${ve(n)}`};I.eq=function(t,n){return Array.isArray(n)?I.in(t,n):`@${t} eq ${ve(n)}`};I.ge=function(t,n){return`@${t} ge ${n}`};I.le=function(t,n){return`@${t} le ${n}`};I.in=function(t,n){const o=n.map(ve).join(", ");return`@${t} in (${o})`};I.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":I.and(...n.map(o=>I.notEq(t,o)))};I.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(I.wrap).join(" and ")};I.wrap=function(t){return`(${t})`};I.is=function(t,n){return`@${t} is ${n}`};I.or=function(...t){return t.join(" or ")};function pt(e){return Object.keys(e).reduce((t,n)=>{let o=e[n];const i=n.charAt(0).toUpperCase()+n.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=pt(o)),t[i]=o,t},{})}var W=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(W||{});const K=new Xe,Ee=new Da;exports.ApplicationStatus=En;exports.AsyncProcessStatus=Wt;exports.Communication=xa;exports.CoreError=oe;exports.DisplayListRow=yn;exports.EventBus=Ee;exports.Filter=I;exports.ListDataController=Mt;exports.Manager=K;exports.MetadataStore=ee;exports.ModalListDownload=mo;exports.ModalVersionHistory=Fo;exports.NotificationSystem=je;exports.OBJECT_TYPE_NAME_FIELD=Ft;exports.RecordOperation=bn;exports.WidgetAction=fo;exports.WidgetButton=dr;exports.WidgetFastTable=uo;exports.WidgetFastTableHeadCell=$t;exports.WidgetField=xr;exports.WidgetIcon=he;exports.WidgetImage=Er;exports.WidgetList=Br;exports.WidgetLoader=Pe;exports.WidgetMultiButton=yr;exports.WidgetResolverEntity=po;exports.WidgetSpinner=Ce;exports.WidgetTable=xt;exports.WidgetTablePanelFilterItem=Dt;exports.asyncProcess=ie;exports.authService=Y;exports.billingService=fe;exports.catchUniversal=j;exports.config=er;exports.configuration=S;exports.constants=T;exports.convertDDToDMS=ta;exports.convertDMSToDD=ea;exports.convertListConfig=Ke;exports.coreUtils=ua;exports.debounce=Gt;exports.documentsService=In;exports.downloadDocumentBuilderFile=Bo;exports.fileService=Ua;exports.formatter=ye;exports.getCellName=re;exports.getCellValue=ke;exports.getEntityLink=ct;exports.getNamesFromListConfig=it;exports.getPathForResolveRouter=ra;exports.getPrimaryFieldNameForEntity=ut;exports.getUnitValue=qe;exports.groupArrayByField=$o;exports.historyService=Pa;exports.injectAction=jt;exports.internationalizationService=ja;exports.invitationService=Nn;exports.isUUID=_n;exports.openBlobFile=Ut;exports.openService=Ma;exports.parseError=rt;exports.parseTextByMarkdown=Zi;exports.prettyDate=Be;exports.prettyDateWithTime=nt;exports.prettyMoney=Ht;exports.prettyValueFieldByEntity=He;exports.request=q;exports.setupListRow=Qe;exports.staticLink=en;exports.t=te;exports.throttle=Mo;exports.universalBatchUpdate=Qt;exports.universalEntityCount=Ko;exports.universalEntityCreate=Yt;exports.universalEntityDelete=Xt;exports.universalEntityRead=ce;exports.universalEntityResolve=at;exports.universalEntityUpdate=ot;exports.universalHistoryRead=Zt;exports.universalListSettingRead=Kt;exports.universalMetadataFieldTreat=Ho;exports.universalMetadataListRead=zo;exports.universalToolRead=Jt;exports.useActions=_a;exports.useCommunication=wa;exports.useEnter=ka;exports.useFormEntity=ba;exports.useListActiveRow=da;exports.useListDownload=wn;exports.useListEntity=pa;exports.useListSearch=Ta;exports.useListSelect=Ca;exports.useLocalStorage=Bt;exports.useManagerState=ma;exports.useMetadata=Te;exports.useMetadataField=Vt;exports.useSocket=B;exports.useUsageContext=dt;exports.useVisibleItem=Ze;exports.useWizard=Ra;exports.uuidv4=Do;exports.valuesToUpperCase=pt;exports.wrapToolResponse=tn;
|
|
12
|
+
*/const At=function(e,t){return e in this.events||(this.events[e]=[]),this.events[e].push(t),this.off.bind(this,e,t)},Nt=function(e,t){e in this.events&&this.events[e].forEach(n=>n(t))},It=function(e,t){const n=this.events[e];if(!n)return;const o=n.indexOf(t);o!==-1&&n.splice(o,1)},Rt=function(){this.events={}};class ee{constructor(){this.events={}}on(t,n){return At.call(this,t,n)}emit(t,n){return Nt.call(this,t,n)}off(t,n){return It.call(this,t,n)}cleanEvents(){Rt.call(this)}static on(t,n){return At.call(ee,t,n)}static emit(t,n){return Nt.call(ee,t,n)}static off(t,n){return It.call(ee,t,n)}static cleanEvents(){Rt.call(ee)}}ee.events={};class Va extends ee{constructor(t){super(),this.name="Communication",this.read=()=>{},this.id=t}sendMessage(t){return va(this.id,t)}static checkAndGenerate(t,n,o){return ya(t,n,o).then(i=>i.length===0?ha(t,n,o):i[0])}}function $a(){return B().emit("client:read",{})}class ft extends Error{static ConstContextCannotBeChanged(){return new ft("The current context is set to constant. In order to change it, you need to put Manager into a changeable state.")}}var _e,ge;const J=class J extends ee{constructor(){super(...arguments);Ne(this,_e);Ne(this,ge);this.isConstContext=!1,this.type="front",this.organizations=[],de(this,ge,!1)}set language(n){localStorage.setItem(T.LOCALSTORAGE_LANGUAGE_KEY,n)}get language(){return localStorage.getItem(T.LOCALSTORAGE_LANGUAGE_KEY)||J.DEFAULT_LANGUAGE}get contextId(){return Ae(this,_e)}set contextId(n){if(this.isConstContext)throw ft.ConstContextCannotBeChanged();de(this,_e,n)}get contextType(){var n;if(this.contextId)return((n=this.person)==null?void 0:n.id)===this.contextId?"person":"organization"}get isBack(){return this.type==="back"}get isFront(){return this.type==="front"}set ready(n){de(this,ge,n),this.emit(J.EVENT_READY_UPDATE,n)}get ready(){return Ae(this,ge)}onReady(n){return this.on(J.EVENT_READY_UPDATE,n)}onupdateContext(n){return this.on(J.EVENT_CONTEXT_UPDATE,n)}setCurrentContext(n){if(this.contextId===n)return console.warn("[application-manager] The current context has already been installed.");this.contextId=n,localStorage.setItem(T.LOCALSTORAGE_CURRENT_CONTEXT_KEY,String(n)),this.emit(J.EVENT_CONTEXT_UPDATE,n),console.log(`Current context id %c${n}`,"color: purple")}get context(){var n;return this.contextId?this.contextId===((n=this.person)==null?void 0:n.id)?this.person:this.organizations.find(o=>o.id===this.contextId)||null:null}async init(){try{const n=await this.loadCustomerData();this.customer=n,this.person=n,this.organizations=n.organizations,this.userId=n.userId,this.restoreCurrentContext(),this.ready=!0}catch(n){j()(n)}}restoreCurrentContext(){var o,i;if(typeof((o=this.customer)==null?void 0:o.constContextId)=="number"||((i=this.customer)==null?void 0:i.constContextId)===null)return this.setCurrentContext(this.customer.constContextId),this.isConstContext=!0;const n=Number.parseInt(localStorage.getItem(T.LOCALSTORAGE_CURRENT_CONTEXT_KEY)||"");if(!Number.isNaN(n)&&this.validateContextId(Number(n)))this.setCurrentContext(n);else{if(!this.person)return console.warn("Make sure you call ID recovery after saving user data");this.setCurrentContext(this.person.id)}}loadCustomerData(){return $a()}validateContextId(n){var o;try{return((o=this.person)==null?void 0:o.id)==n?!0:!!this.organizations.find(i=>i.id===n)}catch{return!1}}};_e=new WeakMap,ge=new WeakMap,J.DEFAULT_LANGUAGE="en",J.EVENT_CONTEXT_UPDATE="event:context-update",J.EVENT_READY_UPDATE="event:ready-update";let Xe=J;function Da(e){return B().emit("metadata:read",{entity:e})}const te=function(){const t=r.reactive({}),n=new Map;function o(c){return t[c]}async function i(c){if(n.has(c)&&await n.get(c),t[c])return o(c);const s=await a(c);return l(c,s),o(c)}function a(c){const s=Da(c).finally(()=>{n.delete(c)});return n.set(c,s),s}function l(c,s){t[c]=s}return{state:t,initEntity:i,get:o,loadingFlags:n}}();class Pa extends ee{on(t,n){return super.on(t,n)}emit(t,n){console.log("[event-bus] emit",t,n),super.emit(t,n)}off(t,n){super.off(t,n)}}class X{static login(t){return q(S.identityServerURL+"/api/Authenticate/Login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...t,AppName:S.applicationName})})}static parseProcessAnswer(t){if(t.statusCode>4)throw new Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startRegistrationProcess(t){return X.requestStepRegistrationProcess("StartRegistration",t)}static confirmPhoneRegistrationProcess(t){return X.requestStepRegistrationProcess("ConfirmPhoneNumberByRegistration",t)}static confirmEmailRegistrationProcess(t){return X.requestStepRegistrationProcess("ConfirmEmailByRegistration",t)}static finishEmailRegistrationProcess(t){return X.requestStepRegistrationProcess("FinishRegistration",t)}static requestStepRegistrationProcess(t,n){return q(`${S.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)})}static startLoginProcess(t){return X.requestStepLoginProcess("StartLogin",t)}static loginWithPassword(t){return X.requestStepLoginProcess("LoginWithPassword",t)}static loginWithOtpCode(t){return X.requestStepLoginProcess("LoginWithOtpCode",t)}static requestStepLoginProcess(t,n){return q(`${S.identityServerURL}/api/Authenticate/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(n)}).then(X.parseLoginProcessAnswer)}static parseLoginProcessAnswer(t){if(t.statusCode>3)throw Error(t.statusName.replace(/([A-Z][a-z])/g," $1").replace(/(\d)/g," $1"));return t}static startPasswordReset(t,n){return q(`${S.identityServerURL}/api/Authenticate/StartAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({UserId:n,AppName:t})})}static confirmPhoneNumberByAccessRecovery(t,n,o,i){return q(`${S.identityServerURL}/api/Authenticate/ConfirmPhoneNumberByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:i})})}static confirmEmailByAccessRecovery(t,n,o,i){return q(`${S.identityServerURL}/api/Authenticate/ConfirmEmailByAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Prefix:o,Code:i})})}static finishAccessRecovery(t,n,o,i){return q(`${S.identityServerURL}/api/Authenticate/FinishAccessRecovery`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({AppName:t,Token:n,Password:o,ConfirmedPassword:i})})}}class Ma{static readHistoryById(t,n){return q(`/close-api/audits/history/${t}/${n}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class ja{static getConfiguration(){return q("/open-api/webserver-configuration",{method:"GET",headers:{"Content-Type":"application/json"}})}static async getList(t){return await q(`/open-api/data/${t}`,{method:"GET",headers:{"Content-Type":"application/json"}})}}class Ua{static getDictionary(t){if(!t)throw new Error(`Can't get dictionary for ${t}.`);return q(`/open-api/internationalization/language/${t}`)}}class Wa{static async upload(t,n){const o=new FormData;return o.append("file",t),o.append("entityName",n),q("/close-api/files",{method:"POST",body:o}).then(i=>(i.filename=t.name,i))}static getFileLink(t){return`/close-api/files/${t}`}}var bn=(e=>(e.Add="A",e.Delete="D",e.Modify="M",e.None="N",e))(bn||{}),En=(e=>(e.Approved="A",e.AwaitingFeedback="AF",e.AssignedForExam="AFE",e.Cancelled="C",e.Closed="CLS",e.Completed="CT",e.Draft="D",e.NotSatisfied="NSF",e.OnClarification="OC",e.Processing="P",e.Rejected="R",e.ReadyForExam="RFE",e.Submitted="S",e.SecurityCheck="SCK",e.Satisfied="SF",e.Withdrawn="W",e))(En||{});function _n(e){return typeof e!="string"?!1:/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}function qa(e){return typeof e!="object"||e===null?!1:!!(e.hasOwnProperty("start")||e.hasOwnProperty("end"))}function I(e){return Object.keys(e).reduce((t,n)=>{const o=e[n];if(Array.isArray(o))return t.push(I.in(n,o)),t;if(kn(o)&&(typeof o.min=="number"&&t.push(I.ge(n,o.min)),typeof o.max=="number"&&t.push(I.le(n,o.max))),Ha(o)){if(o.text){const a=(l=>{switch(l){case"end":return I.endWith;case"begin":return I.beginWith;default:return I.includes}})(o.option);t.push(a(n,o.text))}return t}if(qa(o)){let i=function(a){var l;return((l=a.match(/([^Z]*)/))==null?void 0:l[0])+"0000Z"};return o.start&&t.push(`@${n} ge ${i(o.start)}`),o.end&&t.push(`@${n} le ${i(o.end)}`),t}return typeof o=="number"||typeof o=="boolean"||typeof o=="string"?(t.push(I.eq(n,o)),t):(o===null&&t.push(I.is(n,o)),t)},[]).join(" and ")}function kn(e){return e!==null&&typeof e=="object"&&("min"in e||"max"in e)}function Ha(e){return e!==null&&typeof e=="object"&&"text"in e&&"option"in e}function ve(e){return typeof e=="string"&&_n(e)?`{${e}}`:typeof e=="string"?`'${e}'`:`${e}`}I.includes=function(t,n){return`@${t} Contains ${ve(n)}`};I.beginWith=function(t,n){return`@${t} BeginWith ${ve(n)}`};I.endWith=function(t,n){return`@${t} EndWith ${ve(n)}`};I.notEq=function(t,n){return`@${t} nq ${ve(n)}`};I.eq=function(t,n){return Array.isArray(n)?I.in(t,n):`@${t} eq ${ve(n)}`};I.ge=function(t,n){return`@${t} ge ${n}`};I.le=function(t,n){return`@${t} le ${n}`};I.in=function(t,n){const o=n.map(ve).join(", ");return`@${t} in (${o})`};I.notIn=function(t,n){return!Array.isArray(n)||n.length===0?"":I.and(...n.map(o=>I.notEq(t,o)))};I.and=function(...t){return t.filter(n=>typeof n!="string"||n.trim().length===0?!1:n).map(I.wrap).join(" and ")};I.wrap=function(t){return`(${t})`};I.is=function(t,n){return`@${t} is ${n}`};I.or=function(...t){return t.join(" or ")};function pt(e){return Object.keys(e).reduce((t,n)=>{let o=e[n];const i=n.charAt(0).toUpperCase()+n.slice(1);return typeof o=="object"&&!(o==null||Array.isArray(o))&&(o=pt(o)),t[i]=o,t},{})}var W=(e=>(e.Completed="Completed",e.FinalStep="FinalStep",e.NextStep="NextStep",e.FinalStepWithConfirmation="FinalStepWithConfirmation",e.NextStepWithConfirmation="NextStepWithConfirmation",e.ValidationError="ValidationError",e.Undefined="Undefined",e))(W||{});const K=new Xe,Ee=new Pa;exports.ApplicationStatus=En;exports.AsyncProcessStatus=Wt;exports.Communication=Va;exports.CoreError=oe;exports.DisplayListRow=yn;exports.EventBus=Ee;exports.Filter=I;exports.ListDataController=Mt;exports.Manager=K;exports.MetadataStore=te;exports.ModalListDownload=go;exports.ModalVersionHistory=Bo;exports.NotificationSystem=je;exports.OBJECT_TYPE_NAME_FIELD=Ft;exports.RecordOperation=bn;exports.WidgetAction=po;exports.WidgetButton=dr;exports.WidgetFastTable=fo;exports.WidgetFastTableHeadCell=$t;exports.WidgetField=xr;exports.WidgetIcon=he;exports.WidgetImage=Er;exports.WidgetList=Br;exports.WidgetLoader=Pe;exports.WidgetMultiButton=yr;exports.WidgetResolverEntity=mo;exports.WidgetSpinner=Ce;exports.WidgetTable=xt;exports.WidgetTablePanelFilterItem=Dt;exports.asyncProcess=ie;exports.authService=X;exports.billingService=fe;exports.catchUniversal=j;exports.config=er;exports.configuration=S;exports.constants=T;exports.convertDDToDMS=na;exports.convertDMSToDD=ta;exports.convertListConfig=Ke;exports.coreUtils=da;exports.debounce=Gt;exports.documentsService=In;exports.downloadDocumentBuilderFile=xo;exports.fileService=Wa;exports.formatter=ye;exports.getCellName=re;exports.getCellValue=ke;exports.getEntityLink=ct;exports.getNamesFromListConfig=it;exports.getPathForResolveRouter=oa;exports.getPrimaryFieldNameForEntity=ut;exports.getUnitValue=qe;exports.groupArrayByField=Do;exports.historyService=Ma;exports.injectAction=jt;exports.internationalizationService=Ua;exports.invitationService=Nn;exports.isUUID=_n;exports.openBlobFile=Ut;exports.openService=ja;exports.parseError=rt;exports.parseTextByMarkdown=ea;exports.prettyDate=Be;exports.prettyDateWithTime=nt;exports.prettyMoney=Ht;exports.prettyValueFieldByEntity=He;exports.request=q;exports.setupListRow=Qe;exports.staticLink=en;exports.t=Y;exports.throttle=jo;exports.universalBatchUpdate=Qt;exports.universalEntityCount=Yo;exports.universalEntityCreate=Yt;exports.universalEntityDelete=Xt;exports.universalEntityRead=ce;exports.universalEntityResolve=at;exports.universalEntityUpdate=ot;exports.universalHistoryRead=Zt;exports.universalListSettingRead=Kt;exports.universalMetadataFieldTreat=Go;exports.universalMetadataListRead=Ko;exports.universalToolRead=Jt;exports.useActions=ka;exports.useCommunication=ba;exports.useEnter=Ca;exports.useFormEntity=Ea;exports.useListActiveRow=fa;exports.useListDownload=wn;exports.useListEntity=ma;exports.useListSearch=Sa;exports.useListSelect=Ta;exports.useLocalStorage=Bt;exports.useManagerState=ga;exports.useMetadata=Te;exports.useMetadataField=Vt;exports.useSocket=B;exports.useUsageContext=dt;exports.useVisibleItem=Ze;exports.useWizard=La;exports.uuidv4=Po;exports.valuesToUpperCase=pt;exports.wrapToolResponse=tn;
|
|
13
13
|
//# sourceMappingURL=eservices-core.cjs.js.map
|