vue-data-ui 0.0.4 → 0.0.5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as Ha } from "./index-
|
|
1
|
+
import { _ as Ha } from "./index-75eb9241.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
var Tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
4
|
function Vo(a) {
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vue-ui-xy *[data-v-5d89b22a]{transition:unset}.vue-ui-xy[data-v-5d89b22a]{position:relative}.vue-ui-xy-user-options[data-v-5d89b22a]{border-radius:4px;padding:6px 12px;position:absolute;right:0;top:0;-webkit-user-select:none;user-select:none;max-width:300px;background:inherit;color:#000}.vue-ui-xy-user-options[open][data-v-5d89b22a]{border:1px solid #e1e5e8;box-shadow:0 6px 12px -6px #0003}.vue-ui-xy-user-options summary[data-v-5d89b22a]{text-align:right;direction:rtl}.vue-ui-xy-user-options-items[data-v-5d89b22a]{width:100%;display:flex;flex-direction:column;margin-top:6px}.vue-ui-xy-user-options-item[data-v-5d89b22a]{width:100%;display:flex;flex-direction:row;gap:5px;align-items:center}.vue-ui-xy-legend[data-v-5d89b22a]{align-items:center;column-gap:24px;display:flex;flex-wrap:wrap;justify-content:center;-webkit-user-select:none;user-select:none;width:100%}.vue-ui-xy-legend-item[data-v-5d89b22a]{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:5px}.vue-ui-xy-legend-item-segregated[data-v-5d89b22a]{opacity:.5}.vue-ui-xy-title[data-v-5d89b22a]{align-items:center;display:flex;flex-direction:column;justify-content:center;width:100%}.vue-ui-xy svg rect[data-v-5d89b22a]{transition:all .11s ease-in-out}.vue-ui-xy-tooltip[data-v-5d89b22a]{background:white;color:#000;border:1px solid #e1e5e8;border-radius:4px;box-shadow:0 6px 12px -6px #0003;max-width:300px;padding:12px;position:fixed;z-index:1}.vue-ui-xy-table-wrapper[data-v-5d89b22a]{width:100%;max-height:300px;overflow:auto;margin-top:24px;position:relative}.vue-ui-xy-table-wrapper-printing[data-v-5d89b22a]{max-height:unset;height:fit-content}.vue-ui-xy-table[data-v-5d89b22a]{width:100%;border-collapse:collapse}.vue-ui-xy-table td[data-v-5d89b22a]{border:1px solid #e1e5e8;text-align:right;padding-right:6px;font-variant-numeric:tabular-nums}.vue-ui-xy-table th[data-v-5d89b22a]{border:1px solid #e1e5e8;background:#fafafa;position:sticky;top:0;font-weight:400;outline:1px solid #e1e5e8;-webkit-user-select:none;user-select:none}.vue-ui-xy-table-tr-selected[data-v-5d89b22a]{background:#e1e5e8}.vue-ui-xy-button[data-v-5d89b22a]{margin:6px 0;border-radius:3px;height:30px;border:1px solid #b9bfc4;background:inherit;display:flex;align-items:center;justify-content:center}.vue-ui-xy-button[data-v-5d89b22a]:hover{background:rgba(0,0,0,.05)}.vue-ui-xy-print-icon[data-v-5d89b22a]{animation:smartspin-5d89b22a .5s infinite linear}@keyframes smartspin-5d89b22a{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.smart-table-main[data-v-cfc38e10]{height:fit-content;padding:0 0 98px;position:relative}.smart-table__wrapper[data-v-cfc38e10]{color:#2d353c;overflow-x:auto;padding:0 12px 48px;position:relative;width:calc(100% - 24px)}thead[data-v-cfc38e10]{position:sticky;top:0}.smart-table[data-v-cfc38e10]{width:100%;position:relative}table[data-v-cfc38e10]{border-collapse:collapse}th[data-v-cfc38e10]{background-color:#e1e5e8;outline:1px solid white;background:radial-gradient(at top left,#cdd1d4,#e1e5e8)}th[data-v-cfc38e10],td[data-v-cfc38e10]{padding:3px 8px}tr[data-v-cfc38e10]:nth-child(even){background-color:#f3f5f7}tr td[data-v-cfc38e10]{outline:1px solid white}.th-numeric[data-v-cfc38e10]{text-align:right;font-variant-numeric:tabular-nums}.th-filter[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:6px;justify-content:center;position:relative}.th-fusion[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top left,#cdd1d4,#e1e5e8);display:flex;height:83px;justify-content:center;left:0;outline:1px solid white;position:absolute;top:0;width:100%;z-index:10}button[data-v-cfc38e10]{align-items:center;cursor:pointer;display:flex;justify-content:center;width:32px}input[data-v-cfc38e10]{padding:0 6px;font-family:Satoshi}button[data-v-cfc38e10],input[data-v-cfc38e10]{border-radius:6px;border:1px solid grey;height:32px}button[data-v-cfc38e10]:hover,button[data-v-cfc38e10]:focus,input[data-v-cfc38e10]:hover,input[data-v-cfc38e10]:focus{outline:3px solid rgba(128,128,128,.432)}button.clicked[data-v-cfc38e10]{animation:clicked-cfc38e10 .15s ease-in-out}button[disabled][data-v-cfc38e10]{cursor:not-allowed}button[disabled][data-v-cfc38e10]:focus,button[disabled][data-v-cfc38e10]:hover{outline:none}button.th-reset[data-v-cfc38e10]:not(:disabled){background:radial-gradient(at top,#f19a71,#F17171);border:1px solid #F17171;color:#fff}button.th-reset[data-v-cfc38e10]:not(:disabled):hover,button.th-reset[data-v-cfc38e10]:not(:disabled):focus{outline:3px solid #f171717e}[data-is-open=false][data-v-cfc38e10]{transform:scale(0)}.th-dropdown[data-is-open=true][data-v-cfc38e10]{animation:open-dropdown-cfc38e10 .2s ease-in}.th-dropdown[data-is-open=false][data-v-cfc38e10]{animation:close-dropdown-cfc38e10 .2s ease-in}.th-dropdown[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top left,#d2d7db,#e1e5e8);border-radius:8px;border:1px solid white;box-shadow:0 6px 12px -6px #00000080;display:flex;flex-direction:column;justify-content:flex-start;left:0;max-width:300px;min-width:150px;padding:24px 12px 12px;position:absolute;top:calc(100% + 12px)}.th-option[data-v-cfc38e10]{border-radius:6px;cursor:pointer;padding:2px 6px;text-align:left;-webkit-user-select:none;user-select:none;width:100%;font-weight:400}.th-option[data-v-cfc38e10]:hover{background-color:#fafafa;box-shadow:0 3px 6px -3px #00000080;z-index:1}.th-icon-green[data-v-cfc38e10]{text-shadow:0 2px 4px rgba(0,128,0,.486)}.th-icon-red[data-v-cfc38e10]{text-shadow:0 2px 4px rgba(255,0,0,.486)}button.close-dropdown[data-v-cfc38e10],button.close-chart-modal[data-v-cfc38e10]{align-items:center;background:transparent;border-radius:50%;border:none;color:#2d353c;display:flex;height:20px;padding:2px;position:absolute;right:6px;top:6px;width:20px}button.close-dropdown[data-v-cfc38e10]:hover,button.close-dropdown[data-v-cfc38e10]:focus,button.close-chart-modal[data-v-cfc38e10]:hover,button.close-char-modal[data-v-cfc38e10]:focus{outline:3px solid #2d353c71}.th-button-active[data-v-cfc38e10]{background:radial-gradient(at top,#968bf1,#6376DD);color:#fff}.th-button-active[data-v-cfc38e10]:hover,.th-button-active[data-v-cfc38e10]:focus{outline:3px solid #6375dd7a}.th-date[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:6px;justify-content:center;width:100%}.date-wrapper--inputs[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:column;gap:6px;justify-content:center;width:100%}.date-wrapper--button[data-v-cfc38e10]{display:flex;gap:3px}input[type=date][data-v-cfc38e10]{border-radius:4px;font-size:12px;font-variant-numeric:tabular-nums;height:20px!important;width:100px}.date-fieldset[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:6px;justify-content:center;width:100%}.date-fieldset label[data-v-cfc38e10]{font-size:12px;font-weight:400}@keyframes clicked-cfc38e10{0%{transform:scale(.9)}90%{transform:scale(1.03)}to{transform:scale(1)}}td.td-numeric[data-v-cfc38e10]{cursor:pointer}td.smart-td-selected-neighbor[data-v-cfc38e10]{background:radial-gradient(at top left,#82ecc41e,#63dd821e)}td.smart-td-selected[data-v-cfc38e10]{background:radial-gradient(at top left,#9986ec5b,#6375dd5b)}td.smart-td-selected-first[data-v-cfc38e10]{box-shadow:3px 0 #6376dd inset}td.smart-td-selected-last[data-v-cfc38e10]{box-shadow:-3px 0 #6376dd inset}.td-selector-info[data-v-cfc38e10]{align-items:center;background:linear-gradient(to right,transparent,#e1e5e8);border-radius:0 0 6px 6px;bottom:76px;display:flex;font-size:14px;justify-content:flex-end;min-height:20px;padding:2px 4px 2px 2px;position:absolute;right:0;text-align:right;width:100%;z-index:1}.td-selector-info--active[data-v-cfc38e10]{background:linear-gradient(to right,transparent,#6375dd4f)}button.td-selector-info-reset[data-v-cfc38e10]{background:transparent;border:none;color:#f17171;height:14px;margin-left:24px;padding:0;width:14px}button.td-selector-info-reset[data-v-cfc38e10]:hover,button.td-selector-info-reset[data-v-cfc38e10]:focus{outline:3px solid #f171717e}.format-num[data-v-cfc38e10]{font-variant-numeric:tabular-nums}.td-selector-icon[data-v-cfc38e10]{margin-bottom:-5px;margin-right:6px}.smart-table-pagination[data-v-cfc38e10]{align-items:center;bottom:24px;display:flex;flex-direction:row;gap:12px;height:40px;justify-content:center;position:absolute;width:100%;z-index:1}button.smart-table-navigation[data-v-cfc38e10]{height:36px;padding:1px;width:36px}.smart-table-navigation-indicator[data-v-cfc38e10]{background:linear-gradient(to right,#6375dd88,#6376DD);border-radius:6px;bottom:70px;height:6px;position:absolute;transition:all .1s ease-in-out}.smart-table-page-scroller-wrapper[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:column;justify-content:center}input.smart-table-page-scroller[data-v-cfc38e10]{cursor:pointer;height:24px;padding:0}.smart-table-paginator[data-v-cfc38e10]{position:absolute;bottom:0;z-index:2;left:12px;display:flex;flex-direction:row;gap:6px;font-size:14px;justify-content:center;align-items:center;width:calc(100% - 24px)}.smart-table-paginator select[data-v-cfc38e10]{border-radius:3px}.smart-table-size-warning[data-v-cfc38e10]{align-items:center;bottom:-24px;color:#f17171;display:flex;flex-direction:row;flex-wrap:wrap;font-size:12px;gap:6px;justify-content:center;position:absolute;text-align:center;width:100%}th.smart-table-col-selector[data-v-cfc38e10]{height:12px;background:#e1e5e8}.col-selector[data-v-cfc38e10]{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center;width:100%}th.col-selector--selected[data-v-cfc38e10]{background:radial-gradient(at top left,#9586eb,#6376DD);color:#fff}th.col-selector--selected div[data-v-cfc38e10]{background:transparent;color:#fff}.smart-table-chart-modal[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top left,#e1e5e8,#eceef0);border-radius:8px;border:1px solid white;box-shadow:0 6px 12px -6px #0000004d;display:flex;flex-direction:column;justify-content:center;min-height:200px;min-width:300px;max-width:800px;overflow:hidden;padding:12px;position:fixed;resize:horizontal;-webkit-user-select:none;user-select:none;z-index:10000}.smart-table-chart-svg[data-v-cfc38e10]{background:white;border-radius:6px;margin-bottom:12px;overflow:visible;padding:12px;width:calc(100% - 24px);box-shadow:0 2px 4px -2px #80808099}.smart-table-donut-chart[data-v-cfc38e10]{background:white;border-radius:6px;box-shadow:0 2px 4px -2px #80808099}th.invisible-cell[data-v-cfc38e10]{background:white;border-right:2px solid white}td.smart-table-td-iteration[data-v-cfc38e10]{background:#E1E5E8;font-size:12px;font-variant-numeric:tabular-nums;text-align:right;-webkit-user-select:none;user-select:none}.chart-trend[data-v-cfc38e10]{color:gray;font-size:12px;padding-left:12px}.chart-modal-options[data-v-cfc38e10]{bottom:12px;display:flex;flex-direction:row;gap:8px;position:absolute;right:24px}.chart-modal-options button[data-v-cfc38e10]{height:24px;padding:3px;width:24px}.chart-modal-options button.is-active-chart[data-v-cfc38e10]{background:radial-gradient(at top,#968bf1,#6376DD);border:1px solid #6376DD;color:#fff}.th-range-filter[data-v-cfc38e10]{display:flex;align-items:center;justify-content:center;gap:2px;flex-direction:column}.th-range-filter input[data-v-cfc38e10]{height:20px;width:60px;font-variant-numeric:tabular-nums;font-size:12px}.th-range-filter label[data-v-cfc38e10]{font-size:12px;font-weight:400;margin-bottom:-3px}.smart-table-fieldset-wrapper[data-v-cfc38e10]{display:flex;flex-direction:row;flex-wrap:wrap;gap:24px;margin-bottom:12px}.smart-table-fieldset[data-v-cfc38e10]{border-radius:6px;margin-bottom:24px;border:1px solid white}.smart-table-fieldset legend[data-v-cfc38e10]{color:gray}.smart-table-fieldset-option[data-v-cfc38e10]{display:flex;align-items:center}.smart-table-fieldset-option input[data-v-cfc38e10]{height:14px;width:14px;border-radius:50%}button.smart-table-generate-donut[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top,#968bf1,#6376DD);color:#fff;display:flex;gap:3px;justify-content:center;margin:24px auto 12px;padding-left:12px;padding-right:12px;width:fit-content}input[type=radio][data-v-cfc38e10],input[type=range][data-v-cfc38e10]{accent-color:#6376DD}button.smart-table-generate-donut[disabled][data-v-cfc38e10]{opacity:.5}.smart-table-donut-legend[data-v-cfc38e10]{align-items:center;column-gap:12px;display:flex;flex-wrap:wrap;font-size:12px;justify-content:center;margin:0 auto;max-width:400px;padding-bottom:36px}.smart-table-donut-legend-item[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:3px;justify-content:center}.smart-table-donut-label[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:column;font-size:4px;height:100%;justify-content:center;text-align:center;width:100%}.smart-table-donut-label-name[data-v-cfc38e10]{font-size:3px;line-height:3px}td[data-v-cfc38e10]:focus{outline:3px solid #202d7470}.smart-table-export-hub[data-v-cfc38e10]{left:5px;position:absolute;top:0;z-index:1001}.smart-table-export-hub-dropdown[data-v-cfc38e10]{position:absolute;top:40px;left:0;padding:24px;background:radial-gradient(at top left,#d2d7db,#e1e5e8);border-radius:8px;border:1px solid white;box-shadow:0 6px 12px -6px #00000080;transform:scale(0);opacity:0}.smart-table-export-hub-dropdown[data-is-open=true][data-v-cfc38e10]{animation:open-dropdown-cfc38e10 .2s ease-in forwards}.smart-table-export-hub-dropdown[data-is-open=false][data-v-cfc38e10]{animation:close-dropdown-cfc38e10 .2s ease-in}.smart-table-export-hub-options[data-v-cfc38e10]{margin-top:12px;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}.smart-table-export-hub-options button[data-v-cfc38e10]{width:fit-content;display:flex;align-items:center;justify-content:center;gap:3px;min-width:130px}.smart-table-export-hub-option-wrapper[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-start}.smart-table-export-hub-option-wrapper .label[data-v-cfc38e10]{font-size:12px;line-height:12px;margin-bottom:6px;width:100px}.td-nan[data-v-cfc38e10]{background:#F17171}.td-has-nan[data-v-cfc38e10],.th-has-nan[data-v-cfc38e10]{background:#F17171;min-width:100px;color:#fff}@keyframes open-dropdown-cfc38e10{0%{transform:scaleY(.9);opacity:0}50%{transform:scaleY(1.05);opacity:1}to{transform:scale(1);opacity:1}}@keyframes close-dropdown-cfc38e10{0%{transform:scale(1.05);opacity:1}to{transform:scale(0);opacity:0}}
|
|
1
|
+
.vue-ui-xy *[data-v-03ae9ec2]{transition:unset}.vue-ui-xy[data-v-03ae9ec2]{position:relative}.vue-ui-xy-user-options[data-v-03ae9ec2]{border-radius:4px;padding:6px 12px;position:absolute;right:0;top:0;-webkit-user-select:none;user-select:none;max-width:300px;background:inherit;color:#000}.vue-ui-xy-user-options[open][data-v-03ae9ec2]{border:1px solid #e1e5e8;box-shadow:0 6px 12px -6px #0003}.vue-ui-xy-user-options summary[data-v-03ae9ec2]{text-align:right;direction:rtl}.vue-ui-xy-user-options-items[data-v-03ae9ec2]{width:100%;display:flex;flex-direction:column;margin-top:6px}.vue-ui-xy-user-options-item[data-v-03ae9ec2]{width:100%;display:flex;flex-direction:row;gap:5px;align-items:center}.vue-ui-xy-legend[data-v-03ae9ec2]{align-items:center;column-gap:24px;display:flex;flex-wrap:wrap;justify-content:center;-webkit-user-select:none;user-select:none;width:100%}.vue-ui-xy-legend-item[data-v-03ae9ec2]{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;gap:5px}.vue-ui-xy-legend-item-segregated[data-v-03ae9ec2]{opacity:.5}.vue-ui-xy-title[data-v-03ae9ec2]{align-items:center;display:flex;flex-direction:column;justify-content:center;width:100%}.vue-ui-xy svg rect[data-v-03ae9ec2]{transition:all .11s ease-in-out}.vue-ui-xy-tooltip[data-v-03ae9ec2]{background:white;color:#000;border:1px solid #e1e5e8;border-radius:4px;box-shadow:0 6px 12px -6px #0003;max-width:300px;padding:12px;position:fixed;z-index:1}.vue-ui-xy-table-wrapper[data-v-03ae9ec2]{width:100%;max-height:300px;overflow:auto;margin-top:24px;position:relative}.vue-ui-xy-table-wrapper-printing[data-v-03ae9ec2]{max-height:unset;height:fit-content}.vue-ui-xy-table[data-v-03ae9ec2]{width:100%;border-collapse:collapse}.vue-ui-xy-table td[data-v-03ae9ec2]{border:1px solid #e1e5e8;text-align:right;padding-right:6px;font-variant-numeric:tabular-nums}.vue-ui-xy-table th[data-v-03ae9ec2]{border:1px solid #e1e5e8;background:#fafafa;position:sticky;top:0;font-weight:400;outline:1px solid #e1e5e8;-webkit-user-select:none;user-select:none}.vue-ui-xy-table-tr-selected[data-v-03ae9ec2]{background:#e1e5e8}.vue-ui-xy-button[data-v-03ae9ec2]{margin:6px 0;border-radius:3px;height:30px;border:1px solid #b9bfc4;background:inherit;display:flex;align-items:center;justify-content:center}.vue-ui-xy-button[data-v-03ae9ec2]:hover{background:rgba(0,0,0,.05)}.vue-ui-xy-print-icon[data-v-03ae9ec2]{animation:smartspin-03ae9ec2 .5s infinite linear}@keyframes smartspin-03ae9ec2{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.smart-table-main[data-v-cfc38e10]{height:fit-content;padding:0 0 98px;position:relative}.smart-table__wrapper[data-v-cfc38e10]{color:#2d353c;overflow-x:auto;padding:0 12px 48px;position:relative;width:calc(100% - 24px)}thead[data-v-cfc38e10]{position:sticky;top:0}.smart-table[data-v-cfc38e10]{width:100%;position:relative}table[data-v-cfc38e10]{border-collapse:collapse}th[data-v-cfc38e10]{background-color:#e1e5e8;outline:1px solid white;background:radial-gradient(at top left,#cdd1d4,#e1e5e8)}th[data-v-cfc38e10],td[data-v-cfc38e10]{padding:3px 8px}tr[data-v-cfc38e10]:nth-child(even){background-color:#f3f5f7}tr td[data-v-cfc38e10]{outline:1px solid white}.th-numeric[data-v-cfc38e10]{text-align:right;font-variant-numeric:tabular-nums}.th-filter[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:6px;justify-content:center;position:relative}.th-fusion[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top left,#cdd1d4,#e1e5e8);display:flex;height:83px;justify-content:center;left:0;outline:1px solid white;position:absolute;top:0;width:100%;z-index:10}button[data-v-cfc38e10]{align-items:center;cursor:pointer;display:flex;justify-content:center;width:32px}input[data-v-cfc38e10]{padding:0 6px;font-family:Satoshi}button[data-v-cfc38e10],input[data-v-cfc38e10]{border-radius:6px;border:1px solid grey;height:32px}button[data-v-cfc38e10]:hover,button[data-v-cfc38e10]:focus,input[data-v-cfc38e10]:hover,input[data-v-cfc38e10]:focus{outline:3px solid rgba(128,128,128,.432)}button.clicked[data-v-cfc38e10]{animation:clicked-cfc38e10 .15s ease-in-out}button[disabled][data-v-cfc38e10]{cursor:not-allowed}button[disabled][data-v-cfc38e10]:focus,button[disabled][data-v-cfc38e10]:hover{outline:none}button.th-reset[data-v-cfc38e10]:not(:disabled){background:radial-gradient(at top,#f19a71,#F17171);border:1px solid #F17171;color:#fff}button.th-reset[data-v-cfc38e10]:not(:disabled):hover,button.th-reset[data-v-cfc38e10]:not(:disabled):focus{outline:3px solid #f171717e}[data-is-open=false][data-v-cfc38e10]{transform:scale(0)}.th-dropdown[data-is-open=true][data-v-cfc38e10]{animation:open-dropdown-cfc38e10 .2s ease-in}.th-dropdown[data-is-open=false][data-v-cfc38e10]{animation:close-dropdown-cfc38e10 .2s ease-in}.th-dropdown[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top left,#d2d7db,#e1e5e8);border-radius:8px;border:1px solid white;box-shadow:0 6px 12px -6px #00000080;display:flex;flex-direction:column;justify-content:flex-start;left:0;max-width:300px;min-width:150px;padding:24px 12px 12px;position:absolute;top:calc(100% + 12px)}.th-option[data-v-cfc38e10]{border-radius:6px;cursor:pointer;padding:2px 6px;text-align:left;-webkit-user-select:none;user-select:none;width:100%;font-weight:400}.th-option[data-v-cfc38e10]:hover{background-color:#fafafa;box-shadow:0 3px 6px -3px #00000080;z-index:1}.th-icon-green[data-v-cfc38e10]{text-shadow:0 2px 4px rgba(0,128,0,.486)}.th-icon-red[data-v-cfc38e10]{text-shadow:0 2px 4px rgba(255,0,0,.486)}button.close-dropdown[data-v-cfc38e10],button.close-chart-modal[data-v-cfc38e10]{align-items:center;background:transparent;border-radius:50%;border:none;color:#2d353c;display:flex;height:20px;padding:2px;position:absolute;right:6px;top:6px;width:20px}button.close-dropdown[data-v-cfc38e10]:hover,button.close-dropdown[data-v-cfc38e10]:focus,button.close-chart-modal[data-v-cfc38e10]:hover,button.close-char-modal[data-v-cfc38e10]:focus{outline:3px solid #2d353c71}.th-button-active[data-v-cfc38e10]{background:radial-gradient(at top,#968bf1,#6376DD);color:#fff}.th-button-active[data-v-cfc38e10]:hover,.th-button-active[data-v-cfc38e10]:focus{outline:3px solid #6375dd7a}.th-date[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:6px;justify-content:center;width:100%}.date-wrapper--inputs[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:column;gap:6px;justify-content:center;width:100%}.date-wrapper--button[data-v-cfc38e10]{display:flex;gap:3px}input[type=date][data-v-cfc38e10]{border-radius:4px;font-size:12px;font-variant-numeric:tabular-nums;height:20px!important;width:100px}.date-fieldset[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:6px;justify-content:center;width:100%}.date-fieldset label[data-v-cfc38e10]{font-size:12px;font-weight:400}@keyframes clicked-cfc38e10{0%{transform:scale(.9)}90%{transform:scale(1.03)}to{transform:scale(1)}}td.td-numeric[data-v-cfc38e10]{cursor:pointer}td.smart-td-selected-neighbor[data-v-cfc38e10]{background:radial-gradient(at top left,#82ecc41e,#63dd821e)}td.smart-td-selected[data-v-cfc38e10]{background:radial-gradient(at top left,#9986ec5b,#6375dd5b)}td.smart-td-selected-first[data-v-cfc38e10]{box-shadow:3px 0 #6376dd inset}td.smart-td-selected-last[data-v-cfc38e10]{box-shadow:-3px 0 #6376dd inset}.td-selector-info[data-v-cfc38e10]{align-items:center;background:linear-gradient(to right,transparent,#e1e5e8);border-radius:0 0 6px 6px;bottom:76px;display:flex;font-size:14px;justify-content:flex-end;min-height:20px;padding:2px 4px 2px 2px;position:absolute;right:0;text-align:right;width:100%;z-index:1}.td-selector-info--active[data-v-cfc38e10]{background:linear-gradient(to right,transparent,#6375dd4f)}button.td-selector-info-reset[data-v-cfc38e10]{background:transparent;border:none;color:#f17171;height:14px;margin-left:24px;padding:0;width:14px}button.td-selector-info-reset[data-v-cfc38e10]:hover,button.td-selector-info-reset[data-v-cfc38e10]:focus{outline:3px solid #f171717e}.format-num[data-v-cfc38e10]{font-variant-numeric:tabular-nums}.td-selector-icon[data-v-cfc38e10]{margin-bottom:-5px;margin-right:6px}.smart-table-pagination[data-v-cfc38e10]{align-items:center;bottom:24px;display:flex;flex-direction:row;gap:12px;height:40px;justify-content:center;position:absolute;width:100%;z-index:1}button.smart-table-navigation[data-v-cfc38e10]{height:36px;padding:1px;width:36px}.smart-table-navigation-indicator[data-v-cfc38e10]{background:linear-gradient(to right,#6375dd88,#6376DD);border-radius:6px;bottom:70px;height:6px;position:absolute;transition:all .1s ease-in-out}.smart-table-page-scroller-wrapper[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:column;justify-content:center}input.smart-table-page-scroller[data-v-cfc38e10]{cursor:pointer;height:24px;padding:0}.smart-table-paginator[data-v-cfc38e10]{position:absolute;bottom:0;z-index:2;left:12px;display:flex;flex-direction:row;gap:6px;font-size:14px;justify-content:center;align-items:center;width:calc(100% - 24px)}.smart-table-paginator select[data-v-cfc38e10]{border-radius:3px}.smart-table-size-warning[data-v-cfc38e10]{align-items:center;bottom:-24px;color:#f17171;display:flex;flex-direction:row;flex-wrap:wrap;font-size:12px;gap:6px;justify-content:center;position:absolute;text-align:center;width:100%}th.smart-table-col-selector[data-v-cfc38e10]{height:12px;background:#e1e5e8}.col-selector[data-v-cfc38e10]{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center;width:100%}th.col-selector--selected[data-v-cfc38e10]{background:radial-gradient(at top left,#9586eb,#6376DD);color:#fff}th.col-selector--selected div[data-v-cfc38e10]{background:transparent;color:#fff}.smart-table-chart-modal[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top left,#e1e5e8,#eceef0);border-radius:8px;border:1px solid white;box-shadow:0 6px 12px -6px #0000004d;display:flex;flex-direction:column;justify-content:center;min-height:200px;min-width:300px;max-width:800px;overflow:hidden;padding:12px;position:fixed;resize:horizontal;-webkit-user-select:none;user-select:none;z-index:10000}.smart-table-chart-svg[data-v-cfc38e10]{background:white;border-radius:6px;margin-bottom:12px;overflow:visible;padding:12px;width:calc(100% - 24px);box-shadow:0 2px 4px -2px #80808099}.smart-table-donut-chart[data-v-cfc38e10]{background:white;border-radius:6px;box-shadow:0 2px 4px -2px #80808099}th.invisible-cell[data-v-cfc38e10]{background:white;border-right:2px solid white}td.smart-table-td-iteration[data-v-cfc38e10]{background:#E1E5E8;font-size:12px;font-variant-numeric:tabular-nums;text-align:right;-webkit-user-select:none;user-select:none}.chart-trend[data-v-cfc38e10]{color:gray;font-size:12px;padding-left:12px}.chart-modal-options[data-v-cfc38e10]{bottom:12px;display:flex;flex-direction:row;gap:8px;position:absolute;right:24px}.chart-modal-options button[data-v-cfc38e10]{height:24px;padding:3px;width:24px}.chart-modal-options button.is-active-chart[data-v-cfc38e10]{background:radial-gradient(at top,#968bf1,#6376DD);border:1px solid #6376DD;color:#fff}.th-range-filter[data-v-cfc38e10]{display:flex;align-items:center;justify-content:center;gap:2px;flex-direction:column}.th-range-filter input[data-v-cfc38e10]{height:20px;width:60px;font-variant-numeric:tabular-nums;font-size:12px}.th-range-filter label[data-v-cfc38e10]{font-size:12px;font-weight:400;margin-bottom:-3px}.smart-table-fieldset-wrapper[data-v-cfc38e10]{display:flex;flex-direction:row;flex-wrap:wrap;gap:24px;margin-bottom:12px}.smart-table-fieldset[data-v-cfc38e10]{border-radius:6px;margin-bottom:24px;border:1px solid white}.smart-table-fieldset legend[data-v-cfc38e10]{color:gray}.smart-table-fieldset-option[data-v-cfc38e10]{display:flex;align-items:center}.smart-table-fieldset-option input[data-v-cfc38e10]{height:14px;width:14px;border-radius:50%}button.smart-table-generate-donut[data-v-cfc38e10]{align-items:center;background:radial-gradient(at top,#968bf1,#6376DD);color:#fff;display:flex;gap:3px;justify-content:center;margin:24px auto 12px;padding-left:12px;padding-right:12px;width:fit-content}input[type=radio][data-v-cfc38e10],input[type=range][data-v-cfc38e10]{accent-color:#6376DD}button.smart-table-generate-donut[disabled][data-v-cfc38e10]{opacity:.5}.smart-table-donut-legend[data-v-cfc38e10]{align-items:center;column-gap:12px;display:flex;flex-wrap:wrap;font-size:12px;justify-content:center;margin:0 auto;max-width:400px;padding-bottom:36px}.smart-table-donut-legend-item[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:3px;justify-content:center}.smart-table-donut-label[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:column;font-size:4px;height:100%;justify-content:center;text-align:center;width:100%}.smart-table-donut-label-name[data-v-cfc38e10]{font-size:3px;line-height:3px}td[data-v-cfc38e10]:focus{outline:3px solid #202d7470}.smart-table-export-hub[data-v-cfc38e10]{left:5px;position:absolute;top:0;z-index:1001}.smart-table-export-hub-dropdown[data-v-cfc38e10]{position:absolute;top:40px;left:0;padding:24px;background:radial-gradient(at top left,#d2d7db,#e1e5e8);border-radius:8px;border:1px solid white;box-shadow:0 6px 12px -6px #00000080;transform:scale(0);opacity:0}.smart-table-export-hub-dropdown[data-is-open=true][data-v-cfc38e10]{animation:open-dropdown-cfc38e10 .2s ease-in forwards}.smart-table-export-hub-dropdown[data-is-open=false][data-v-cfc38e10]{animation:close-dropdown-cfc38e10 .2s ease-in}.smart-table-export-hub-options[data-v-cfc38e10]{margin-top:12px;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}.smart-table-export-hub-options button[data-v-cfc38e10]{width:fit-content;display:flex;align-items:center;justify-content:center;gap:3px;min-width:130px}.smart-table-export-hub-option-wrapper[data-v-cfc38e10]{align-items:center;display:flex;flex-direction:row;gap:12px;justify-content:flex-start}.smart-table-export-hub-option-wrapper .label[data-v-cfc38e10]{font-size:12px;line-height:12px;margin-bottom:6px;width:100px}.td-nan[data-v-cfc38e10]{background:#F17171}.td-has-nan[data-v-cfc38e10],.th-has-nan[data-v-cfc38e10]{background:#F17171;min-width:100px;color:#fff}@keyframes open-dropdown-cfc38e10{0%{transform:scaleY(.9);opacity:0}50%{transform:scaleY(1.05);opacity:1}to{transform:scale(1);opacity:1}}@keyframes close-dropdown-cfc38e10{0%{transform:scale(1.05);opacity:1}to{transform:scale(0);opacity:0}}
|
package/dist/vue-data-ui.js
CHANGED
package/dist/vue-data-ui.umd.cjs
CHANGED
|
@@ -355,9 +355,9 @@ end`};e.events.push(["putFont",function(i){(function(a){var s=a.font,o=a.out,l=a
|
|
|
355
355
|
`),o.push(` </office:body>
|
|
356
356
|
`),s.bookType=="fods"?o.push("</office:document>"):o.push("</office:document-content>"),o.join("")}}();function O5(t,e){if(e.bookType=="fods")return Q5(t,e);var r=j1(),A="",n=[],i=[];return A="mimetype",Ot(r,A,"application/vnd.oasis.opendocument.spreadsheet"),A="content.xml",Ot(r,A,Q5(t,e)),n.push([A,"text/xml"]),i.push([A,"ContentFile"]),A="styles.xml",Ot(r,A,qO(t,e)),n.push([A,"text/xml"]),i.push([A,"StylesFile"]),A="meta.xml",Ot(r,A,Gr+OB()),n.push([A,"text/xml"]),i.push([A,"MetadataFile"]),A="manifest.rdf",Ot(r,A,sL(i)),n.push([A,"application/rdf+xml"]),A="META-INF/manifest.xml",Ot(r,A,iL(n)),r}/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */function N0(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function YO(t){return typeof TextEncoder<"u"?new TextEncoder().encode(t):Vn(Mi(t))}function $O(t,e){e:for(var r=0;r<=t.length-e.length;++r){for(var A=0;A<e.length;++A)if(t[r+A]!=e[A])continue e;return!0}return!1}function Sa(t){var e=t.reduce(function(n,i){return n+i.length},0),r=new Uint8Array(e),A=0;return t.forEach(function(n){r.set(n,A),A+=n.length}),r}function JO(t,e,r){var A=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,n=r/Math.pow(10,A-6176);t[e+15]|=A>>7,t[e+14]|=(A&127)<<1;for(var i=0;n>=1;++i,n/=256)t[e+i]=n&255;t[e+15]|=r>=0?0:128}function Yl(t,e){var r=e?e[0]:0,A=t[r]&127;e:if(t[r++]>=128&&(A|=(t[r]&127)<<7,t[r++]<128||(A|=(t[r]&127)<<14,t[r++]<128)||(A|=(t[r]&127)<<21,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,28),++r,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,35),++r,t[r++]<128)||(A+=(t[r]&127)*Math.pow(2,42),++r,t[r++]<128)))break e;return e&&(e[0]=r),A}function Ar(t){var e=new Uint8Array(7);e[0]=t&127;var r=1;e:if(t>127){if(e[r-1]|=128,e[r]=t>>7&127,++r,t<=16383||(e[r-1]|=128,e[r]=t>>14&127,++r,t<=2097151)||(e[r-1]|=128,e[r]=t>>21&127,++r,t<=268435455)||(e[r-1]|=128,e[r]=t/256>>>21&127,++r,t<=34359738367)||(e[r-1]|=128,e[r]=t/65536>>>21&127,++r,t<=4398046511103))break e;e[r-1]|=128,e[r]=t/16777216>>>21&127,++r}return e.slice(0,r)}function vo(t){var e=0,r=t[e]&127;e:if(t[e++]>=128){if(r|=(t[e]&127)<<7,t[e++]<128||(r|=(t[e]&127)<<14,t[e++]<128)||(r|=(t[e]&127)<<21,t[e++]<128))break e;r|=(t[e]&127)<<28}return r}function eA(t){for(var e=[],r=[0];r[0]<t.length;){var A=r[0],n=Yl(t,r),i=n&7;n=Math.floor(n/8);var a=0,s;if(n==0)break;switch(i){case 0:{for(var o=r[0];t[r[0]++]>=128;);s=t.slice(o,r[0])}break;case 5:a=4,s=t.slice(r[0],r[0]+a),r[0]+=a;break;case 1:a=8,s=t.slice(r[0],r[0]+a),r[0]+=a;break;case 2:a=Yl(t,r),s=t.slice(r[0],r[0]+a),r[0]+=a;break;case 3:case 4:default:throw new Error("PB Type ".concat(i," for Field ").concat(n," at offset ").concat(A))}var l={data:s,type:i};e[n]==null?e[n]=[l]:e[n].push(l)}return e}function BA(t){var e=[];return t.forEach(function(r,A){r.forEach(function(n){n.data&&(e.push(Ar(A*8+n.type)),n.type==2&&e.push(Ar(n.data.length)),e.push(n.data))})}),Sa(e)}function jn(t){for(var e,r=[],A=[0];A[0]<t.length;){var n=Yl(t,A),i=eA(t.slice(A[0],A[0]+n));A[0]+=n;var a={id:vo(i[1][0].data),messages:[]};i[2].forEach(function(s){var o=eA(s.data),l=vo(o[3][0].data);a.messages.push({meta:o,data:t.slice(A[0],A[0]+l)}),A[0]+=l}),(e=i[3])!=null&&e[0]&&(a.merge=vo(i[3][0].data)>>>0>0),r.push(a)}return r}function mo(t){var e=[];return t.forEach(function(r){var A=[];A[1]=[{data:Ar(r.id),type:0}],A[2]=[],r.merge!=null&&(A[3]=[{data:Ar(+!!r.merge),type:0}]);var n=[];r.messages.forEach(function(a){n.push(a.data),a.meta[3]=[{type:0,data:Ar(a.data.length)}],A[2].push({data:BA(a.meta),type:2})});var i=BA(A);e.push(Ar(i.length)),e.push(i),n.forEach(function(a){return e.push(a)})}),Sa(e)}function ZO(t,e){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var r=[0],A=Yl(e,r),n=[];r[0]<e.length;){var i=e[r[0]]&3;if(i==0){var a=e[r[0]++]>>2;if(a<60)++a;else{var s=a-59;a=e[r[0]],s>1&&(a|=e[r[0]+1]<<8),s>2&&(a|=e[r[0]+2]<<16),s>3&&(a|=e[r[0]+3]<<24),a>>>=0,a++,r[0]+=s}n.push(e.slice(r[0],r[0]+a)),r[0]+=a;continue}else{var o=0,l=0;if(i==1?(l=(e[r[0]]>>2&7)+4,o=(e[r[0]++]&224)<<3,o|=e[r[0]++]):(l=(e[r[0]++]>>2)+1,i==2?(o=e[r[0]]|e[r[0]+1]<<8,r[0]+=2):(o=(e[r[0]]|e[r[0]+1]<<8|e[r[0]+2]<<16|e[r[0]+3]<<24)>>>0,r[0]+=4)),n=[Sa(n)],o==0)throw new Error("Invalid offset 0");if(o>n[0].length)throw new Error("Invalid offset beyond length");if(l>=o)for(n.push(n[0].slice(-o)),l-=o;l>=n[n.length-1].length;)n.push(n[n.length-1]),l-=n[n.length-1].length;n.push(n[0].slice(-o,-o+l))}}var c=Sa(n);if(c.length!=A)throw new Error("Unexpected length: ".concat(c.length," != ").concat(A));return c}function Wn(t){for(var e=[],r=0;r<t.length;){var A=t[r++],n=t[r]|t[r+1]<<8|t[r+2]<<16;r+=3,e.push(ZO(A,t.slice(r,r+n))),r+=n}if(r!==t.length)throw new Error("data is not a valid framed stream!");return Sa(e)}function wo(t){for(var e=[],r=0;r<t.length;){var A=Math.min(t.length-r,268435455),n=new Uint8Array(4);e.push(n);var i=Ar(A),a=i.length;e.push(i),A<=60?(a++,e.push(new Uint8Array([A-1<<2]))):A<=256?(a+=2,e.push(new Uint8Array([240,A-1&255]))):A<=65536?(a+=3,e.push(new Uint8Array([244,A-1&255,A-1>>8&255]))):A<=16777216?(a+=4,e.push(new Uint8Array([248,A-1&255,A-1>>8&255,A-1>>16&255]))):A<=4294967296&&(a+=5,e.push(new Uint8Array([252,A-1&255,A-1>>8&255,A-1>>16&255,A-1>>>24&255]))),e.push(t.slice(r,r+A)),a+=A,n[0]=0,n[1]=a&255,n[2]=a>>8&255,n[3]=a>>16&255,r+=A}return Sa(e)}function gd(t,e){var r=new Uint8Array(32),A=N0(r),n=12,i=0;switch(r[0]=5,t.t){case"n":r[1]=2,JO(r,n,t.v),i|=1,n+=16;break;case"b":r[1]=6,A.setFloat64(n,t.v?1:0,!0),i|=2,n+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[1]=3,A.setUint32(n,e.indexOf(t.v),!0),i|=8,n+=4;break;default:throw"unsupported cell type "+t.t}return A.setUint32(8,i,!0),r.slice(0,n)}function pd(t,e){var r=new Uint8Array(32),A=N0(r),n=12,i=0;switch(r[0]=3,t.t){case"n":r[2]=2,A.setFloat64(n,t.v,!0),i|=32,n+=8;break;case"b":r[2]=6,A.setFloat64(n,t.v?1:0,!0),i|=32,n+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[2]=3,A.setUint32(n,e.indexOf(t.v),!0),i|=16,n+=4;break;default:throw"unsupported cell type "+t.t}return A.setUint32(4,i,!0),r.slice(0,n)}function _a(t){var e=eA(t);return Yl(e[1][0].data)}function eD(t,e,r){var A,n,i,a;if(!((A=t[6])!=null&&A[0])||!((n=t[7])!=null&&n[0]))throw"Mutation only works on post-BNC storages!";var s=((a=(i=t[8])==null?void 0:i[0])==null?void 0:a.data)&&vo(t[8][0].data)>0||!1;if(s)throw"Math only works with normal offsets";for(var o=0,l=N0(t[7][0].data),c=0,h=[],d=N0(t[4][0].data),u=0,w=[],v=0;v<e.length;++v){if(e[v]==null){l.setUint16(v*2,65535,!0),d.setUint16(v*2,65535);continue}l.setUint16(v*2,c,!0),d.setUint16(v*2,u,!0);var x,y;switch(typeof e[v]){case"string":x=gd({t:"s",v:e[v]},r),y=pd({t:"s",v:e[v]},r);break;case"number":x=gd({t:"n",v:e[v]},r),y=pd({t:"n",v:e[v]},r);break;case"boolean":x=gd({t:"b",v:e[v]},r),y=pd({t:"b",v:e[v]},r);break;default:throw new Error("Unsupported value "+e[v])}h.push(x),c+=x.length,w.push(y),u+=y.length,++o}for(t[2][0].data=Ar(o);v<t[7][0].data.length/2;++v)l.setUint16(v*2,65535,!0),d.setUint16(v*2,65535,!0);return t[6][0].data=Sa(h),t[3][0].data=Sa(w),o}function tD(t,e){if(!e||!e.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var A=un(r["!ref"]);A.s.r=A.s.c=0;var n=!1;A.e.c>9&&(n=!0,A.e.c=9),A.e.r>49&&(n=!0,A.e.r=49),n&&console.error("The Numbers writer is currently limited to ".concat(jr(A)));var i=O0(r,{range:A,header:1}),a=["~Sh33tJ5~"];i.forEach(function(_){return _.forEach(function(S){typeof S=="string"&&a.push(S)})});var s={},o=[],l=or.read(e.numbers,{type:"base64"});l.FileIndex.map(function(_,S){return[_,l.FullPaths[S]]}).forEach(function(_){var S=_[0],O=_[1];if(S.type==2&&S.name.match(/\.iwa/)){var W=S.content,ie=Wn(W),oe=jn(ie);oe.forEach(function(le){o.push(le.id),s[le.id]={deps:[],location:O,type:vo(le.messages[0].meta[1][0].data)}})}}),o.sort(function(_,S){return _-S});var c=o.filter(function(_){return _>1}).map(function(_){return[_,Ar(_)]});l.FileIndex.map(function(_,S){return[_,l.FullPaths[S]]}).forEach(function(_){var S=_[0];if(_[1],!!S.name.match(/\.iwa/)){var O=jn(Wn(S.content));O.forEach(function(W){W.messages.forEach(function(ie){c.forEach(function(oe){W.messages.some(function(le){return vo(le.meta[1][0].data)!=11006&&$O(le.data,oe[1])})&&s[oe[0]].deps.push(W.id)})})})}});for(var h=or.find(l,s[1].location),d=jn(Wn(h.content)),u,w=0;w<d.length;++w){var v=d[w];v.id==1&&(u=v)}var x=_a(eA(u.messages[0].data)[1][0].data);for(h=or.find(l,s[x].location),d=jn(Wn(h.content)),w=0;w<d.length;++w)v=d[w],v.id==x&&(u=v);for(x=_a(eA(u.messages[0].data)[2][0].data),h=or.find(l,s[x].location),d=jn(Wn(h.content)),w=0;w<d.length;++w)v=d[w],v.id==x&&(u=v);for(x=_a(eA(u.messages[0].data)[2][0].data),h=or.find(l,s[x].location),d=jn(Wn(h.content)),w=0;w<d.length;++w)v=d[w],v.id==x&&(u=v);var y=eA(u.messages[0].data);{y[6][0].data=Ar(A.e.r+1),y[7][0].data=Ar(A.e.c+1);var E=_a(y[46][0].data),F=or.find(l,s[E].location),D=jn(Wn(F.content));{for(var X=0;X<D.length&&D[X].id!=E;++X);if(D[X].id!=E)throw"Bad ColumnRowUIDMapArchive";var q=eA(D[X].messages[0].data);q[1]=[],q[2]=[],q[3]=[];for(var N=0;N<=A.e.c;++N){var Q=[];Q[1]=Q[2]=[{type:0,data:Ar(N+420690)}],q[1].push({type:2,data:BA(Q)}),q[2].push({type:0,data:Ar(N)}),q[3].push({type:0,data:Ar(N)})}q[4]=[],q[5]=[],q[6]=[];for(var K=0;K<=A.e.r;++K)Q=[],Q[1]=Q[2]=[{type:0,data:Ar(K+726270)}],q[4].push({type:2,data:BA(Q)}),q[5].push({type:0,data:Ar(K)}),q[6].push({type:0,data:Ar(K)});D[X].messages[0].data=BA(q)}F.content=wo(mo(D)),F.size=F.content.length,delete y[46];var Ae=eA(y[4][0].data);{Ae[7][0].data=Ar(A.e.r+1);var U=eA(Ae[1][0].data),T=_a(U[2][0].data);F=or.find(l,s[T].location),D=jn(Wn(F.content));{if(D[0].id!=T)throw"Bad HeaderStorageBucket";var V=eA(D[0].messages[0].data);for(K=0;K<i.length;++K){var Y=eA(V[2][0].data);Y[1][0].data=Ar(K),Y[4][0].data=Ar(i[K].length),V[2][K]={type:V[2][0].type,data:BA(Y)}}D[0].messages[0].data=BA(V)}F.content=wo(mo(D)),F.size=F.content.length;var ce=_a(Ae[2][0].data);F=or.find(l,s[ce].location),D=jn(Wn(F.content));{if(D[0].id!=ce)throw"Bad HeaderStorageBucket";for(V=eA(D[0].messages[0].data),N=0;N<=A.e.c;++N)Y=eA(V[2][0].data),Y[1][0].data=Ar(N),Y[4][0].data=Ar(A.e.r+1),V[2][N]={type:V[2][0].type,data:BA(Y)};D[0].messages[0].data=BA(V)}F.content=wo(mo(D)),F.size=F.content.length;var he=_a(Ae[4][0].data);(function(){for(var _=or.find(l,s[he].location),S=jn(Wn(_.content)),O,W=0;W<S.length;++W){var ie=S[W];ie.id==he&&(O=ie)}var oe=eA(O.messages[0].data);{oe[3]=[];var le=[];a.forEach(function(Re,Xe){le[1]=[{type:0,data:Ar(Xe)}],le[2]=[{type:0,data:Ar(1)}],le[3]=[{type:2,data:YO(Re)}],oe[3].push({type:2,data:BA(le)})})}O.messages[0].data=BA(oe);var ye=mo(S),Ne=wo(ye);_.content=Ne,_.size=_.content.length})();var me=eA(Ae[3][0].data);{var ge=me[1][0];delete me[2];var we=eA(ge.data);{var Be=_a(we[2][0].data);(function(){for(var _=or.find(l,s[Be].location),S=jn(Wn(_.content)),O,W=0;W<S.length;++W){var ie=S[W];ie.id==Be&&(O=ie)}var oe=eA(O.messages[0].data);{delete oe[6],delete me[7];var le=new Uint8Array(oe[5][0].data);oe[5]=[];for(var ye=0,Ne=0;Ne<=A.e.r;++Ne){var Re=eA(le);ye+=eD(Re,i[Ne],a),Re[1][0].data=Ar(Ne),oe[5].push({data:BA(Re),type:2})}oe[1]=[{type:0,data:Ar(A.e.c+1)}],oe[2]=[{type:0,data:Ar(A.e.r+1)}],oe[3]=[{type:0,data:Ar(ye)}],oe[4]=[{type:0,data:Ar(A.e.r+1)}]}O.messages[0].data=BA(oe);var Xe=mo(S),qe=wo(Xe);_.content=qe,_.size=_.content.length})()}ge.data=BA(we)}Ae[3][0].data=BA(me)}y[4][0].data=BA(Ae)}u.messages[0].data=BA(y);var De=mo(d),C=wo(De);return h.content=C,h.size=h.content.length,l}function rD(t){return function(r){for(var A=0;A!=t.length;++A){var n=t[A];r[n[0]]===void 0&&(r[n[0]]=n[1]),n[2]==="n"&&(r[n[0]]=Number(r[n[0]]))}}}function vd(t){rD([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}function AD(t,e){return e.bookType=="ods"?O5(t,e):e.bookType=="numbers"?tD(t,e):e.bookType=="xlsb"?nD(t,e):iD(t,e)}function nD(t,e){go=1024,t&&!t.SSF&&(t.SSF=$A(Sr)),t&&t.SSF&&(g0(),d0(t.SSF),e.revssf=p0(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,Xl?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r=e.bookType=="xlsb"?"bin":"xml",A=u5.indexOf(e.bookType)>-1,n=IB();vd(e=e||{});var i=j1(),a="",s=0;if(e.cellXfs=[],Fa(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),a="docProps/core.xml",Ot(i,a,DB(t.Props,e)),n.coreprops.push(a),rr(e.rels,2,a,Xt.CORE_PROPS),a="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var o=[],l=0;l<t.SheetNames.length;++l)(t.Workbook.Sheets[l]||{}).Hidden!=2&&o.push(t.SheetNames[l]);t.Props.SheetNames=o}for(t.Props.Worksheets=t.Props.SheetNames.length,Ot(i,a,PB(t.Props)),n.extprops.push(a),rr(e.rels,3,a,Xt.EXT_PROPS),t.Custprops!==t.Props&&pA(t.Custprops||{}).length>0&&(a="docProps/custom.xml",Ot(i,a,RB(t.Custprops)),n.custprops.push(a),rr(e.rels,4,a,Xt.CUST_PROPS)),s=1;s<=t.SheetNames.length;++s){var c={"!id":{}},h=t.Sheets[t.SheetNames[s-1]],d=(h||{})["!type"]||"sheet";switch(d){case"chart":default:a="xl/worksheets/sheet"+s+"."+r,Ot(i,a,sO(s-1,a,e,t,c)),n.sheets.push(a),rr(e.wbrels,-1,"worksheets/sheet"+s+"."+r,Xt.WS[0])}if(h){var u=h["!comments"],w=!1,v="";u&&u.length>0&&(v="xl/comments"+s+"."+r,Ot(i,v,cO(u,v)),n.comments.push(v),rr(c,-1,"../comments"+s+"."+r,Xt.CMNT),w=!0),h["!legacy"]&&w&&Ot(i,"xl/drawings/vmlDrawing"+s+".vml",c5(s,h["!comments"])),delete h["!comments"],delete h["!legacy"]}c["!id"].rId1&&Ot(i,NB(a),uo(c))}return e.Strings!=null&&e.Strings.length>0&&(a="xl/sharedStrings."+r,Ot(i,a,lO(e.Strings,a,e)),n.strs.push(a),rr(e.wbrels,-1,"sharedStrings."+r,Xt.SST)),a="xl/workbook."+r,Ot(i,a,aO(t,a)),n.workbooks.push(a),rr(e.rels,1,a,Xt.WB),a="xl/theme/theme1.xml",Ot(i,a,o5(t.Themes,e)),n.themes.push(a),rr(e.wbrels,-1,"theme/theme1.xml",Xt.THEME),a="xl/styles."+r,Ot(i,a,oO(t,a,e)),n.styles.push(a),rr(e.wbrels,-1,"styles."+r,Xt.STY),t.vbaraw&&A&&(a="xl/vbaProject.bin",Ot(i,a,t.vbaraw),n.vba.push(a),rr(e.wbrels,-1,"vbaProject.bin",Xt.VBA)),a="xl/metadata."+r,Ot(i,a,fO(a)),n.metadata.push(a),rr(e.wbrels,-1,"metadata."+r,Xt.XLMETA),Ot(i,"[Content_Types].xml",LB(n,e)),Ot(i,"_rels/.rels",uo(e.rels)),Ot(i,"xl/_rels/workbook."+r+".rels",uo(e.wbrels)),delete e.revssf,delete e.ssf,i}function iD(t,e){go=1024,t&&!t.SSF&&(t.SSF=$A(Sr)),t&&t.SSF&&(g0(),d0(t.SSF),e.revssf=p0(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,Xl?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r="xml",A=u5.indexOf(e.bookType)>-1,n=IB();vd(e=e||{});var i=j1(),a="",s=0;if(e.cellXfs=[],Fa(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),a="docProps/core.xml",Ot(i,a,DB(t.Props,e)),n.coreprops.push(a),rr(e.rels,2,a,Xt.CORE_PROPS),a="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var o=[],l=0;l<t.SheetNames.length;++l)(t.Workbook.Sheets[l]||{}).Hidden!=2&&o.push(t.SheetNames[l]);t.Props.SheetNames=o}t.Props.Worksheets=t.Props.SheetNames.length,Ot(i,a,PB(t.Props)),n.extprops.push(a),rr(e.rels,3,a,Xt.EXT_PROPS),t.Custprops!==t.Props&&pA(t.Custprops||{}).length>0&&(a="docProps/custom.xml",Ot(i,a,RB(t.Custprops)),n.custprops.push(a),rr(e.rels,4,a,Xt.CUST_PROPS));var c=["SheetJ5"];for(e.tcid=0,s=1;s<=t.SheetNames.length;++s){var h={"!id":{}},d=t.Sheets[t.SheetNames[s-1]],u=(d||{})["!type"]||"sheet";switch(u){case"chart":default:a="xl/worksheets/sheet"+s+"."+r,Ot(i,a,E5(s-1,e,t,h)),n.sheets.push(a),rr(e.wbrels,-1,"worksheets/sheet"+s+"."+r,Xt.WS[0])}if(d){var w=d["!comments"],v=!1,x="";if(w&&w.length>0){var y=!1;w.forEach(function(E){E[1].forEach(function(F){F.T==!0&&(y=!0)})}),y&&(x="xl/threadedComments/threadedComment"+s+"."+r,Ot(i,x,DN(w,c,e)),n.threadedcomments.push(x),rr(h,-1,"../threadedComments/threadedComment"+s+"."+r,Xt.TCMNT)),x="xl/comments"+s+"."+r,Ot(i,x,f5(w)),n.comments.push(x),rr(h,-1,"../comments"+s+"."+r,Xt.CMNT),v=!0}d["!legacy"]&&v&&Ot(i,"xl/drawings/vmlDrawing"+s+".vml",c5(s,d["!comments"])),delete d["!comments"],delete d["!legacy"]}h["!id"].rId1&&Ot(i,NB(a),uo(h))}return e.Strings!=null&&e.Strings.length>0&&(a="xl/sharedStrings."+r,Ot(i,a,e5(e.Strings,e)),n.strs.push(a),rr(e.wbrels,-1,"sharedStrings."+r,Xt.SST)),a="xl/workbook."+r,Ot(i,a,S5(t)),n.workbooks.push(a),rr(e.rels,1,a,Xt.WB),a="xl/theme/theme1.xml",Ot(i,a,o5(t.Themes,e)),n.themes.push(a),rr(e.wbrels,-1,"theme/theme1.xml",Xt.THEME),a="xl/styles."+r,Ot(i,a,i5(t,e)),n.styles.push(a),rr(e.wbrels,-1,"styles."+r,Xt.STY),t.vbaraw&&A&&(a="xl/vbaProject.bin",Ot(i,a,t.vbaraw),n.vba.push(a),rr(e.wbrels,-1,"vbaProject.bin",Xt.VBA)),a="xl/metadata."+r,Ot(i,a,l5()),n.metadata.push(a),rr(e.wbrels,-1,"metadata."+r,Xt.XLMETA),c.length>1&&(a="xl/persons/person.xml",Ot(i,a,kN(c)),n.people.push(a),rr(e.wbrels,-1,"persons/person.xml",Xt.PEOPLE)),Ot(i,"[Content_Types].xml",LB(n,e)),Ot(i,"_rels/.rels",uo(e.rels)),Ot(i,"xl/_rels/workbook."+r+".rels",uo(e.wbrels)),delete e.revssf,delete e.ssf,i}function aD(t,e){var r="";switch((e||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":r=Di(t.slice(0,12));break;case"binary":r=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(e&&e.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}function D5(t,e){switch(e.type){case"base64":case"binary":break;case"buffer":case"array":e.type="";break;case"file":return Dl(e.file,or.write(t,{type:Yt?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");default:throw new Error("Unrecognized type "+e.type)}return or.write(t,e)}function sD(t,e){var r=$A(e||{}),A=AD(t,r);return oD(A,r)}function oD(t,e){var r={},A=Yt?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(e.compression&&(r.compression="DEFLATE"),e.password)r.type=A;else switch(e.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");case"buffer":case"file":r.type=A;break;default:throw new Error("Unrecognized type "+e.type)}var n=t.FullPaths?or.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!e.compression}):t.generate(r);if(typeof Deno<"u"&&typeof n=="string"){if(e.type=="binary"||e.type=="base64")return n;n=new Uint8Array(o0(n))}return e.password&&typeof encrypt_agile<"u"?D5(encrypt_agile(n,e.password),e):e.type==="file"?Dl(e.file,n):e.type=="string"?Pl(n):n}function lD(t,e){var r=e||{},A=bO(t,r);return D5(A,r)}function wi(t,e,r){r||(r="");var A=r+t;switch(e.type){case"base64":return Nl(Mi(A));case"binary":return Mi(A);case"string":return t;case"file":return Dl(e.file,A,"utf8");case"buffer":return Yt?ki(A,"utf8"):typeof TextEncoder<"u"?new TextEncoder().encode(A):wi(A,{type:"binary"}).split("").map(function(n){return n.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function cD(t,e){switch(e.type){case"base64":return Nl(t);case"binary":return t;case"string":return t;case"file":return Dl(e.file,t,"binary");case"buffer":return Yt?ki(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}function Q0(t,e){switch(e.type){case"string":case"base64":case"binary":for(var r="",A=0;A<t.length;++A)r+=String.fromCharCode(t[A]);return e.type=="base64"?Nl(r):e.type=="string"?Pl(r):r;case"file":return Dl(e.file,t);case"buffer":return t;default:throw new Error("Unrecognized type "+e.type)}}function md(t,e){kU(),qQ(t);var r=$A(e||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var A=md(t,r);return r.type="array",o0(A)}var n=0;if(r.sheet&&(typeof r.sheet=="number"?n=r.sheet:n=t.SheetNames.indexOf(r.sheet),!t.SheetNames[n]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return wi(CO(t,r),r);case"slk":case"sylk":return wi(WL.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"htm":case"html":return wi(U5(t.Sheets[t.SheetNames[n]],r),r);case"txt":return cD(P5(t.Sheets[t.SheetNames[n]],r),r);case"csv":return wi(wd(t.Sheets[t.SheetNames[n]],r),r,"\uFEFF");case"dif":return wi(zL.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"dbf":return Q0(jL.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"prn":return wi(XL.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"rtf":return wi(tN.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"eth":return wi(JB.from_sheet(t.Sheets[t.SheetNames[n]],r),r);case"fods":return wi(O5(t,r),r);case"wk1":return Q0(ZB.sheet_to_wk1(t.Sheets[t.SheetNames[n]],r),r);case"wk3":return Q0(ZB.book_to_wk3(t,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),Q0(T5(t,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),lD(t,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return sD(t,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}function fD(t,e,r,A,n,i,a,s){var o=mA(r),l=s.defval,c=s.raw||!Object.prototype.hasOwnProperty.call(s,"raw"),h=!0,d=n===1?[]:{};if(n!==1)if(Object.defineProperty)try{Object.defineProperty(d,"__rowNum__",{value:r,enumerable:!1})}catch{d.__rowNum__=r}else d.__rowNum__=r;if(!a||t[r])for(var u=e.s.c;u<=e.e.c;++u){var w=a?t[r][u]:t[A[u]+o];if(w===void 0||w.t===void 0){if(l===void 0)continue;i[u]!=null&&(d[i[u]]=l);continue}var v=w.v;switch(w.t){case"z":if(v==null)break;continue;case"e":v=v==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+w.t)}if(i[u]!=null){if(v==null)if(w.t=="e"&&v===null)d[i[u]]=null;else if(l!==void 0)d[i[u]]=l;else if(c&&v===null)d[i[u]]=null;else continue;else d[i[u]]=c&&(w.t!=="n"||w.t==="n"&&s.rawNumbers!==!1)?v:Hi(w,v,s);v!=null&&(h=!1)}}return{row:d,isempty:h}}function O0(t,e){if(t==null||t["!ref"]==null)return[];var r={t:"n",v:0},A=0,n=1,i=[],a=0,s="",o={s:{r:0,c:0},e:{r:0,c:0}},l=e||{},c=l.range!=null?l.range:t["!ref"];switch(l.header===1?A=1:l.header==="A"?A=2:Array.isArray(l.header)?A=3:l.header==null&&(A=0),typeof c){case"string":o=wr(c);break;case"number":o=wr(t["!ref"]),o.s.r=c;break;default:o=c}A>0&&(n=0);var h=mA(o.s.r),d=[],u=[],w=0,v=0,x=Array.isArray(t),y=o.s.r,E=0,F={};x&&!t[y]&&(t[y]=[]);var D=l.skipHidden&&t["!cols"]||[],X=l.skipHidden&&t["!rows"]||[];for(E=o.s.c;E<=o.e.c;++E)if(!(D[E]||{}).hidden)switch(d[E]=UA(E),r=x?t[y][E]:t[d[E]+h],A){case 1:i[E]=E-o.s.c;break;case 2:i[E]=d[E];break;case 3:i[E]=l.header[E-o.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),s=a=Hi(r,null,l),v=F[a]||0,!v)F[a]=1;else{do s=a+"_"+v++;while(F[s]);F[a]=v,F[s]=1}i[E]=s}for(y=o.s.r+n;y<=o.e.r;++y)if(!(X[y]||{}).hidden){var q=fD(t,o,y,d,A,i,x,l);(q.isempty===!1||(A===1?l.blankrows!==!1:l.blankrows))&&(u[w++]=q.row)}return u.length=w,u}var k5=/"/g;function uD(t,e,r,A,n,i,a,s){for(var o=!0,l=[],c="",h=mA(r),d=e.s.c;d<=e.e.c;++d)if(A[d]){var u=s.dense?(t[r]||[])[d]:t[A[d]+h];if(u==null)c="";else if(u.v!=null){o=!1,c=""+(s.rawNumbers&&u.t=="n"?u.v:Hi(u,null,s));for(var w=0,v=0;w!==c.length;++w)if((v=c.charCodeAt(w))===n||v===i||v===34||s.forceQuotes){c='"'+c.replace(k5,'""')+'"';break}c=="ID"&&(c='"ID"')}else u.f!=null&&!u.F?(o=!1,c="="+u.f,c.indexOf(",")>=0&&(c='"'+c.replace(k5,'""')+'"')):c="";l.push(c)}return s.blankrows===!1&&o?null:l.join(a)}function wd(t,e){var r=[],A=e??{};if(t==null||t["!ref"]==null)return"";var n=wr(t["!ref"]),i=A.FS!==void 0?A.FS:",",a=i.charCodeAt(0),s=A.RS!==void 0?A.RS:`
|
|
357
357
|
`,o=s.charCodeAt(0),l=new RegExp((i=="|"?"\\|":i)+"+$"),c="",h=[];A.dense=Array.isArray(t);for(var d=A.skipHidden&&t["!cols"]||[],u=A.skipHidden&&t["!rows"]||[],w=n.s.c;w<=n.e.c;++w)(d[w]||{}).hidden||(h[w]=UA(w));for(var v=0,x=n.s.r;x<=n.e.r;++x)(u[x]||{}).hidden||(c=uD(t,n,x,h,a,o,i,A),c!=null&&(A.strip&&(c=c.replace(l,"")),(c||A.blankrows!==!1)&&r.push((v++?s:"")+c)));return delete A.dense,r.join("")}function P5(t,e){e||(e={}),e.FS=" ",e.RS=`
|
|
358
|
-
`;var r=wd(t,e);return r}function hD(t){var e="",r,A="";if(t==null||t["!ref"]==null)return[];var n=wr(t["!ref"]),i="",a=[],s,o=[],l=Array.isArray(t);for(s=n.s.c;s<=n.e.c;++s)a[s]=UA(s);for(var c=n.s.r;c<=n.e.r;++c)for(i=mA(c),s=n.s.c;s<=n.e.c;++s)if(e=a[s]+i,r=l?(t[c]||[])[s]:t[e],A="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;A=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)A=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)A=""+r.v;else if(r.t=="b")A=r.v?"TRUE":"FALSE";else if(r.w!==void 0)A="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?A="'"+r.v:A=""+r.v}}o[o.length]=e+"="+A}return o}function R5(t,e,r){var A=r||{},n=+!A.skipHeader,i=t||{},a=0,s=0;if(i&&A.origin!=null)if(typeof A.origin=="number")a=A.origin;else{var o=typeof A.origin=="string"?sA(A.origin):A.origin;a=o.r,s=o.c}var l,c={s:{c:0,r:0},e:{c:s,r:a+e.length-1+n}};if(i["!ref"]){var h=wr(i["!ref"]);c.e.c=Math.max(c.e.c,h.e.c),c.e.r=Math.max(c.e.r,h.e.r),a==-1&&(a=h.e.r+1,c.e.r=a+e.length-1+n)}else a==-1&&(a=0,c.e.r=e.length-1+n);var d=A.header||[],u=0;e.forEach(function(v,x){pA(v).forEach(function(y){(u=d.indexOf(y))==-1&&(d[u=d.length]=y);var E=v[y],F="z",D="",X=tr({c:s+u,r:a+x+n});l=$l(i,X),E&&typeof E=="object"&&!(E instanceof Date)?i[X]=E:(typeof E=="number"?F="n":typeof E=="boolean"?F="b":typeof E=="string"?F="s":E instanceof Date?(F="d",A.cellDates||(F="n",E=YA(E)),D=A.dateNF||Sr[14]):E===null&&A.nullError&&(F="e",E=0),l?(l.t=F,l.v=E,delete l.w,delete l.R,D&&(l.z=D)):i[X]=l={t:F,v:E},D&&(l.z=D))})}),c.e.c=Math.max(c.e.c,s+d.length-1);var w=mA(a);if(n)for(u=0;u<d.length;++u)i[UA(u+s)+w]={t:"s",v:d[u]};return i["!ref"]=jr(c),i}function dD(t,e){return R5(null,t,e)}function $l(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var A=sA(e);return t[A.r]||(t[A.r]=[]),t[A.r][A.c]||(t[A.r][A.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?$l(t,tr(e)):$l(t,tr({r:e,c:r||0}))}function gD(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function pD(){return{SheetNames:[],Sheets:{}}}function vD(t,e,r,A){var n=1;if(!r)for(;n<=65535&&t.SheetNames.indexOf(r="Sheet"+n)!=-1;++n,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(A&&t.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);n=i&&+i[2]||0;var a=i&&i[1]||r;for(++n;n<=65535&&t.SheetNames.indexOf(r=a+n)!=-1;++n);}if(F5(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function mD(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var A=gD(t,e);switch(t.Workbook.Sheets[A]||(t.Workbook.Sheets[A]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[A].Hidden=r}function wD(t,e){return t.z=e,t}function M5(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function BD(t,e,r){return M5(t,"#"+e,r)}function xD(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function yD(t,e,r,A){for(var n=typeof e!="string"?e:wr(e),i=typeof e=="string"?e:jr(e),a=n.s.r;a<=n.e.r;++a)for(var s=n.s.c;s<=n.e.c;++s){var o=$l(t,a,s);o.t="n",o.F=i,delete o.v,a==n.s.r&&s==n.s.c&&(o.f=r,A&&(o.D=!0))}return t}var Bo={encode_col:UA,encode_row:mA,encode_cell:tr,encode_range:jr,decode_col:ed,decode_row:Z1,split_cell:PI,decode_cell:sA,decode_range:un,format_cell:Hi,sheet_add_aoa:CB,sheet_add_json:R5,sheet_add_dom:I5,aoa_to_sheet:lo,json_to_sheet:dD,table_to_sheet:L5,table_to_book:zO,sheet_to_csv:wd,sheet_to_txt:P5,sheet_to_json:O0,sheet_to_html:U5,sheet_to_formulae:hD,sheet_to_row_object_array:O0,sheet_get_cell:$l,book_new:pD,book_append_sheet:vD,book_set_sheet_visibility:mD,cell_set_number_format:wD,cell_set_hyperlink:M5,cell_set_internal_link:BD,cell_add_comment:xD,sheet_set_array_formula:yD,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const T$="",H5=(t,e)=>{const r=t.__vccOpts||t;for(const[A,n]of e)r[A]=n;return r},CD={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){return{useSafeValues:!0,defaultColors:["#6376DD","#FEB019","#00E396","#FF4560","#775DD0","#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800","#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B","#4ECDC4","#C7F464","#81D4FA","#546E7A","#FD6A6A"],defaultConfig:{showWarnings:!0,showTable:!0,chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#000000",height:300,width:500,padding:{top:36,right:12,bottom:12,left:48},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{show:!0,values:[],fontSize:6}}},labels:{fontSize:10},legend:{show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#000000",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{show:!0,showValue:!0,showPercentage:!0,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#000000"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#000000"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#000000"}},table:{rounding:0}},clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[]}},computed:{chartConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null),id:`uid_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.defaultColors[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.defaultColors[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,A)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*A*this.absoluteDataset.filter(n=>n.type==="bar").filter(n=>!this.segregatedSeries.includes(n.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[A]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){return Math.min(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.min(...t.series)))},maxSeries(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>t.series.length))},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=[...this.plotSet,...this.barSet,...this.lineSet].map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.chartConfig.chart.grid.labels.xAxisLabels.values.forEach((r,A)=>{const n=[r];this.plotSet.length&&this.plotSet.forEach(i=>{n.push(this.canShowValue(i.absoluteValues[A])?Number(i.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.barSet.length&&this.barSet.forEach(i=>{n.push(this.canShowValue(i.absoluteValues[A])?Number(i.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.lineSet.length&&this.lineSet.forEach(i=>{n.push(this.canShowValue(i.absoluteValues[A])?Number(i.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),e.push(n)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(n=>({name:n.name,color:n.color,type:n.type,value:n.absoluteValues.find((i,a)=>a===this.selectedSerieIndex)}));let e="",r=t.map(n=>n.value).filter(n=>this.isSafeValue(n)&&n!==null).reduce((n,i)=>Math.abs(n)+Math.abs(i),0);const A=this.chartConfig.chart.grid.labels.xAxisLabels.values[this.selectedSerieIndex];return A&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${A}</div>`),t.forEach(n=>{this.isSafeValue(n.value)&&n.value!==null&&(e+=`<div><span style="color:${n.color}; margin-right: 3px">${this.icons[n.type]}</span>${n.name} : <b>${this.chartConfig.chart.tooltip.showValue?n.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(n.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="font-variant-numeric: tabular-nums">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,A=48;if(t&&e){const{width:n,height:i}=t.getBoundingClientRect(),a=e.getBoundingClientRect();this.clientPosition.x+n/2>a.right?r=-n:this.clientPosition.x-n/2<a.left?r=0:r=-n/2,this.clientPosition.y+i>a.bottom&&(A=-i-48)}return{top:this.clientPosition.y+A,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let n=5;n>0;n-=1){const i=t*n;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*n),value:i})}const r=this.closestDecimal(this.min/5),A=[];for(let n=5;n>=0;n-=1){const i=Math.abs(r)*n;A.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*n),value:-i})}return[...e,...A]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,A=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${A})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",A),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,A)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
358
|
+
`;var r=wd(t,e);return r}function hD(t){var e="",r,A="";if(t==null||t["!ref"]==null)return[];var n=wr(t["!ref"]),i="",a=[],s,o=[],l=Array.isArray(t);for(s=n.s.c;s<=n.e.c;++s)a[s]=UA(s);for(var c=n.s.r;c<=n.e.r;++c)for(i=mA(c),s=n.s.c;s<=n.e.c;++s)if(e=a[s]+i,r=l?(t[c]||[])[s]:t[e],A="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;A=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)A=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)A=""+r.v;else if(r.t=="b")A=r.v?"TRUE":"FALSE";else if(r.w!==void 0)A="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?A="'"+r.v:A=""+r.v}}o[o.length]=e+"="+A}return o}function R5(t,e,r){var A=r||{},n=+!A.skipHeader,i=t||{},a=0,s=0;if(i&&A.origin!=null)if(typeof A.origin=="number")a=A.origin;else{var o=typeof A.origin=="string"?sA(A.origin):A.origin;a=o.r,s=o.c}var l,c={s:{c:0,r:0},e:{c:s,r:a+e.length-1+n}};if(i["!ref"]){var h=wr(i["!ref"]);c.e.c=Math.max(c.e.c,h.e.c),c.e.r=Math.max(c.e.r,h.e.r),a==-1&&(a=h.e.r+1,c.e.r=a+e.length-1+n)}else a==-1&&(a=0,c.e.r=e.length-1+n);var d=A.header||[],u=0;e.forEach(function(v,x){pA(v).forEach(function(y){(u=d.indexOf(y))==-1&&(d[u=d.length]=y);var E=v[y],F="z",D="",X=tr({c:s+u,r:a+x+n});l=$l(i,X),E&&typeof E=="object"&&!(E instanceof Date)?i[X]=E:(typeof E=="number"?F="n":typeof E=="boolean"?F="b":typeof E=="string"?F="s":E instanceof Date?(F="d",A.cellDates||(F="n",E=YA(E)),D=A.dateNF||Sr[14]):E===null&&A.nullError&&(F="e",E=0),l?(l.t=F,l.v=E,delete l.w,delete l.R,D&&(l.z=D)):i[X]=l={t:F,v:E},D&&(l.z=D))})}),c.e.c=Math.max(c.e.c,s+d.length-1);var w=mA(a);if(n)for(u=0;u<d.length;++u)i[UA(u+s)+w]={t:"s",v:d[u]};return i["!ref"]=jr(c),i}function dD(t,e){return R5(null,t,e)}function $l(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var A=sA(e);return t[A.r]||(t[A.r]=[]),t[A.r][A.c]||(t[A.r][A.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?$l(t,tr(e)):$l(t,tr({r:e,c:r||0}))}function gD(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}function pD(){return{SheetNames:[],Sheets:{}}}function vD(t,e,r,A){var n=1;if(!r)for(;n<=65535&&t.SheetNames.indexOf(r="Sheet"+n)!=-1;++n,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(A&&t.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);n=i&&+i[2]||0;var a=i&&i[1]||r;for(++n;n<=65535&&t.SheetNames.indexOf(r=a+n)!=-1;++n);}if(F5(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}function mD(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var A=gD(t,e);switch(t.Workbook.Sheets[A]||(t.Workbook.Sheets[A]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[A].Hidden=r}function wD(t,e){return t.z=e,t}function M5(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}function BD(t,e,r){return M5(t,"#"+e,r)}function xD(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}function yD(t,e,r,A){for(var n=typeof e!="string"?e:wr(e),i=typeof e=="string"?e:jr(e),a=n.s.r;a<=n.e.r;++a)for(var s=n.s.c;s<=n.e.c;++s){var o=$l(t,a,s);o.t="n",o.F=i,delete o.v,a==n.s.r&&s==n.s.c&&(o.f=r,A&&(o.D=!0))}return t}var Bo={encode_col:UA,encode_row:mA,encode_cell:tr,encode_range:jr,decode_col:ed,decode_row:Z1,split_cell:PI,decode_cell:sA,decode_range:un,format_cell:Hi,sheet_add_aoa:CB,sheet_add_json:R5,sheet_add_dom:I5,aoa_to_sheet:lo,json_to_sheet:dD,table_to_sheet:L5,table_to_book:zO,sheet_to_csv:wd,sheet_to_txt:P5,sheet_to_json:O0,sheet_to_html:U5,sheet_to_formulae:hD,sheet_to_row_object_array:O0,sheet_get_cell:$l,book_new:pD,book_append_sheet:vD,book_set_sheet_visibility:mD,cell_set_number_format:wD,cell_set_hyperlink:M5,cell_set_internal_link:BD,cell_add_comment:xD,sheet_set_array_formula:yD,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};const T$="",H5=(t,e)=>{const r=t.__vccOpts||t;for(const[A,n]of e)r[A]=n;return r},CD={name:"vue-ui-xy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},data(){const t=`vue-data-ui-xy_${Math.random()}_${Math.random()}`;return{useSafeValues:!0,defaultColors:["#6376DD","#FEB019","#00E396","#FF4560","#775DD0","#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800","#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B","#4ECDC4","#C7F464","#81D4FA","#546E7A","#FD6A6A"],defaultConfig:{showWarnings:!0,showTable:!0,chart:{fontFamily:"inherit",backgroundColor:"#FFFFFF",color:"#000000",height:300,width:500,padding:{top:36,right:12,bottom:12,left:48},grid:{stroke:"#e1e5e8",showVerticalLines:!1,labels:{color:"black",show:!0,fontSize:10,axis:{yLabel:"",xLabel:"",fontSize:12},xAxisLabels:{color:"black",show:!0,values:[],fontSize:6}}},labels:{fontSize:10},legend:{color:"black",show:!0,useDiv:!0,fontSize:16},title:{show:!0,useDiv:!0,color:"#000000",text:"",fontSize:20,bold:!0,offsetX:0,offsetY:0,subtitle:{fontSize:16,color:"grey",text:""}},tooltip:{color:"white",backgroundColor:"white",show:!0,showValue:!0,showPercentage:!1,roundingValue:0,roundingPercentage:0},userOptions:{show:!0,title:"options",labels:{dataLabels:"Show datalabels",titleInside:"Title inside",legendInside:"Legend inside",showTable:"Show table"}}},bar:{useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#000000"}},line:{radius:3,useGradient:!0,strokeWidth:2,labels:{show:!1,offsetY:-6,rounding:0,color:"#000000"}},plot:{radius:3,useGradient:!0,labels:{show:!1,offsetY:-6,rounding:0,color:"#000000"}},table:{rounding:0}},clientPosition:{x:0,y:0},icons:{line:"▬",bar:"◼",plot:"●"},isPrinting:!1,isTooltip:!1,mutableConfig:{dataLabels:{show:!0},titleInside:!0,legendInside:!0,showTable:!1},selectedSerieIndex:null,selectedRowIndex:null,segregatedSeries:[],uniqueId:t}},computed:{chartConfig(){return Object.keys(this.config||{}).length?this.treeShake({defaultConfig:this.defaultConfig,userConfig:this.config}):this.defaultConfig},relativeZero(){return this.min>=0?0:Math.abs(this.min)},absoluteMax(){return this.max+this.relativeZero},safeDataset(){return this.useSafeValues?this.dataset.map((t,e)=>({...t,series:t.series.map(r=>this.isSafeValue(r)?r:null),id:`uniqueId_${e}`})):this.dataset},relativeDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.defaultColors[e])})).filter(t=>!this.segregatedSeries.includes(t.id))},absoluteDataset(){return this.safeDataset.map((t,e)=>({...t,series:t.series.map(r=>r+this.relativeZero),absoluteValues:t.series,color:this.convertColorToHex(t.color?t.color:this.defaultColors[e])}))},barSet(){return this.absoluteDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).map((t,e)=>({...t,plots:t.series.map((r,A)=>({x:this.drawingArea.left-this.slot.bar/2+this.slot.bar*e+this.slot.bar*A*this.absoluteDataset.filter(n=>n.type==="bar").filter(n=>!this.segregatedSeries.includes(n.id)).length,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(r),value:t.absoluteValues[A]}))}))},lineSet(){return this.absoluteDataset.filter(t=>t.type==="line").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.line/2+this.slot.line*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},plotSet(){return this.absoluteDataset.filter(t=>t.type==="plot").filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>({...t,plots:t.series.map((e,r)=>({x:this.drawingArea.left+this.slot.plot/2+this.slot.plot*r,y:this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(e),value:t.absoluteValues[r]}))}))},drawingArea(){return{top:this.chartConfig.chart.padding.top,right:this.chartConfig.chart.width-this.chartConfig.chart.padding.right,bottom:this.chartConfig.chart.height-this.chartConfig.chart.padding.bottom,left:this.chartConfig.chart.padding.left,height:this.chartConfig.chart.height-(this.chartConfig.chart.padding.top+this.chartConfig.chart.padding.bottom),width:this.chartConfig.chart.width-(this.chartConfig.chart.padding.right+this.chartConfig.chart.padding.left)}},max(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.max(...t.series)))},min(){return Math.min(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>Math.min(...t.series)))},maxSeries(){return Math.max(...this.safeDataset.filter(t=>!this.segregatedSeries.includes(t.id)).map(t=>t.series.length))},slot(){return{bar:this.drawingArea.width/this.maxSeries/this.safeDataset.filter(t=>t.type==="bar").filter(t=>!this.segregatedSeries.includes(t.id)).length,plot:this.drawingArea.width/this.maxSeries,line:this.drawingArea.width/this.maxSeries}},maxSlot(){return Math.max(...Object.values(this.slot).filter(t=>t!==1/0))},table(){if(this.safeDataset.length===0)return{head:[],body:[]};const t=[...this.plotSet,...this.barSet,...this.lineSet].map(r=>({label:r.name,color:r.color,type:r.type})),e=[];return this.chartConfig.chart.grid.labels.xAxisLabels.values.forEach((r,A)=>{const n=[r];this.plotSet.length&&this.plotSet.forEach(i=>{n.push(this.canShowValue(i.absoluteValues[A])?Number(i.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.barSet.length&&this.barSet.forEach(i=>{n.push(this.canShowValue(i.absoluteValues[A])?Number(i.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),this.lineSet.length&&this.lineSet.forEach(i=>{n.push(this.canShowValue(i.absoluteValues[A])?Number(i.absoluteValues[A].toFixed(this.chartConfig.table.rounding)):"")}),e.push(n)}),{head:t,body:e}},tooltipContent(){const t=this.relativeDataset.map(n=>({name:n.name,color:n.color,type:n.type,value:n.absoluteValues.find((i,a)=>a===this.selectedSerieIndex)}));let e="",r=t.map(n=>n.value).filter(n=>this.isSafeValue(n)&&n!==null).reduce((n,i)=>Math.abs(n)+Math.abs(i),0);const A=this.chartConfig.chart.grid.labels.xAxisLabels.values[this.selectedSerieIndex];return A&&(e+=`<div style="padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid #e1e5e8; width:100%">${A}</div>`),t.forEach(n=>{this.isSafeValue(n.value)&&n.value!==null&&(e+=`<div><span style="color:${n.color}; margin-right: 3px">${this.icons[n.type]}</span>${n.name} : <b>${this.chartConfig.chart.tooltip.showValue?n.value.toFixed(this.chartConfig.chart.tooltip.roundingValue):""}</b> ${this.chartConfig.chart.tooltip.showPercentage?`(${this.checkNaN(Math.abs(n.value)/r*100).toFixed(this.chartConfig.chart.tooltip.roundingPercentage)}%)`:""}</div>`)}),`<div style="font-variant-numeric: tabular-nums">${e}</div>`},tooltipPosition(){const t=this.$refs.tooltip,e=this.$refs.chart;let r=0,A=48;if(t&&e){const{width:n,height:i}=t.getBoundingClientRect(),a=e.getBoundingClientRect();this.clientPosition.x+n/2>a.right?r=-n:this.clientPosition.x-n/2<a.left?r=0:r=-n/2,this.clientPosition.y+i>a.bottom&&(A=-i-48)}return{top:this.clientPosition.y+A,left:this.clientPosition.x+r}},viewBox(){return`0 0 ${this.chartConfig.chart.width} ${this.chartConfig.chart.height}`},yLabels(){const t=this.closestDecimal(this.max/5),e=[];for(let n=5;n>0;n-=1){const i=t*n;e.push({y:this.zero-this.drawingArea.height*this.ratioToMax(t*n),value:i})}const r=this.closestDecimal(this.min/5),A=[];for(let n=5;n>=0;n-=1){const i=Math.abs(r)*n;A.push({y:this.zero+this.drawingArea.height*this.ratioToMax(Math.abs(r)*n),value:-i})}return[...e,...A]},zero(){return this.drawingArea.bottom-this.drawingArea.height*this.ratioToMax(this.relativeZero)}},mounted(){const t=document.getElementById("yAxisLabel");if(t){const r=t.getBBox().height/2+this.chartConfig.chart.padding.left/5,A=this.chartConfig.chart.height/2;t.setAttributeNS(null,"transform",`rotate(-90, ${r}, ${A})`),t.setAttributeNS(null,"x",r),t.setAttributeNS(null,"y",A),t.setAttributeNS(null,"font-size",this.chartConfig.chart.grid.labels.axis.fontSize)}this.chartConfig.showWarnings&&this.dataset.forEach(e=>{e.series.forEach((r,A)=>{this.isSafeValue(r)||console.warn(`SmartXY has detected an unsafe value in your dataset:
|
|
359
359
|
-----> The serie '${e.name}' contains the value '${r}' at index ${A}.
|
|
360
|
-
'${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv}},methods:{treeShake({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(A=>{if(Object.hasOwn(e,A)){const n=e[A];typeof n=="boolean"?r[A]=n:["string","number"].includes(typeof n)?this.isValidUserValue(n)&&(r[A]=n):Array.isArray(r[A])?this.checkArray({userConfig:e,key:A})&&(r[A]=n):this.checkObj({userConfig:e,key:A})&&(r[A]=this.treeShake({defaultConfig:r[A],userConfig:n}))}}),r},calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let A;return t<0,A=Math.round(t/r)*r,A},convertColorToHex(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,i,a,s]=n;return`#${i}${a}${s}`}else if(n=t.match(r)){const[,i,a,s]=n;return`#${this.decimalToHex(i)}${this.decimalToHex(a)}${this.decimalToHex(s)}`}else if(n=t.match(A)){const[,i,a,s]=n,o=this.hslToRgb(Number(i),Number(a),Number(s));return`#${this.decimalToHex(o[0])}${this.decimalToHex(o[1])}${this.decimalToHex(o[2])}`}return null},decimalToHex(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e},hslToRgb(t,e,r){t/=360,e/=100,r/=100;let A,n,i;if(e===0)A=n=i=r;else{const a=(l,c,h)=>(h<0&&(h+=1),h>1&&(h-=1),h<.16666666666666666?l+(c-l)*6*h:h<.5?c:h<.6666666666666666?l+(c-l)*(.6666666666666666-h)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=a(o,s,t+1/3),n=a(o,s,t),i=a(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(i*255)]},ratioToMax(t){return t/this.absoluteMax},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}},shiftHue(t,e){const r=l=>({r:parseInt(l.substring(1,3),16),g:parseInt(l.substring(3,5),16),b:parseInt(l.substring(5,7),16)}),A=({r:l,g:c,b:h})=>{l/=255,c/=255,h/=255;const d=Math.max(l,c,h),u=Math.min(l,c,h);let w,v,x=(d+u)/2;if(d===u)w=v=0;else{const y=d-u;switch(v=x>.5?y/(2-d-u):y/(d+u),d){case l:w=(c-h)/y+(c<h?6:0);break;case c:w=(h-l)/y+2;break;case h:w=(l-c)/y+4;break}w/=6}return{h:w,s:v,l:x}},n=({h:l,s:c,l:h})=>{let d,u,w;if(c===0)d=u=w=h;else{const v=(E,F,D)=>(D<0&&(D+=1),D>1&&(D-=1),D<.16666666666666666?E+(F-E)*6*D:D<.5?F:D<.6666666666666666?E+(F-E)*(.6666666666666666-D)*6:E),x=h<.5?h*(1+c):h+c-h*c,y=2*h-x;d=v(y,x,l+.3333333333333333),u=v(y,x,l),w=v(y,x,l-.3333333333333333)}return{r:Math.round(d*255),g:Math.round(u*255),b:Math.round(w*255)}},i=r(t),a=A(i);a.h+=e,a.h=(a.h+1)%1;const s=n(a);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){const t=this.$refs.chart;t&&(this.isPrinting=!0,this.$nextTick(()=>{const e={height:851.89,width:595.28},r=new xt("","pt","a4");let A,n,i,a,s;Pm(t).then(o=>{A=o.width,n=o.height;let l=n;const c=A/e.width*e.height;let h=0;if(i=e.width,a=582.28/A*n,s=o.toDataURL("image/png",1),l<c)r.addImage(s,"PNG",33,24,i*.9,a*.9,"","FAST");else for(;l>0;)r.addImage(s,"PNG",33,h,i*.9,a*.9,"","FAST"),l-=c,h-=e.height-24,l>0&&r.addPage();r.save(`${this.chartConfig.chart.title.text||"vue-ui-xy"}.pdf`)}).finally(()=>{this.isPrinting=!1})}))},generateXls(){const t=["",...this.table.head.map(l=>l.label)],e=this.table.body,r=[t].concat(e);function A(l){let c=new ArrayBuffer(l.length),h=new Uint8Array(c);for(let d=0;d<l.length;d++)h[d]=l.charCodeAt(d)&255;return c}const n=Bo.book_new(),i=Bo.aoa_to_sheet(r);Bo.book_append_sheet(n,i,"Sheet1");const a=md(n,{bookType:"xlsx",type:"binary"}),s=new Blob([A(a)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),o=document.createElement("a");o.href=window.URL.createObjectURL(s),o.download=`${this.chartConfig.chart.title.text.replaceAll(" ","_")||"vue-ui-xy"}.xlsx`,o.click(),window.URL.revokeObjectURL(o.href),this.isExportRequest=!1},checkArray({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length},checkObj({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"},isValidUserValue(t){return![null,void 0,NaN,1/0,-1/0].includes(t)},isSafeValue(t){return![void 0,NaN,1/0,-1/0].includes(t)},checkNaN(t,e=0){return isNaN(t)?e:t}}},ED=t=>(p.pushScopeId("data-v-5d89b22a"),t=t(),p.popScopeId(),t),bD={key:1,class:"vue-ui-xy-user-options","data-html2canvas-ignore":"",ref:"details"},FD={style:{"`background":"${chartConfig.chart.background}",color:"${chartConfig.chart.color}`"}},SD={class:"vue-ui-xy-user-options-items"},_D={class:"vue-ui-xy-user-option-item"},TD={for:"vue-ui-xy-option-datalabels"},UD={class:"vue-ui-xy-user-option-item"},ID={for:"vue-ui-xy-option-title"},LD={class:"vue-ui-xy-user-option-item"},ND={for:"vue-ui-xy-option-legend"},QD={class:"vue-ui-xy-user-option-item"},OD={for:"vue-ui-xy-option-table"},DD=["disabled"],kD={key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},PD=[p.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-5d89b22a></path><path d="M18 16v.01" data-v-5d89b22a></path><path d="M6 16v.01" data-v-5d89b22a></path><path d="M12 5v.01" data-v-5d89b22a></path><path d="M12 12v.01" data-v-5d89b22a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-5d89b22a></path>',6)],RD={key:1},MD=["viewBox"],HD={class:"vue-ui-xy-grid"},VD=["stroke","x1","x2","y1","y2"],KD=["stroke","x1","x2","y1","y2"],GD={key:0},jD=["x1","x2","y1","y2","stroke"],WD=["id"],zD=["stop-color"],XD=["stop-color"],qD=["stop-color"],YD=["id"],$D=["stop-color"],JD=["stop-color"],ZD=["stop-color"],ek=["id"],tk=["stop-color"],rk=["stop-color"],Ak=["id"],nk=["stop-color"],ik=["stop-color"],ak=["x","y","height","width","fill"],sk=["cx","cy","r","fill","stroke"],ok=["x1","x2","y1","y2","stroke","stroke-width"],lk=["cx","cy","r","fill","stroke"],ck={key:0},fk=["x","y","font-size","fill"],uk={key:1},hk=["x","y","font-size","fill"],dk={key:2},gk=["x","y","font-size","fill"],pk={key:3},vk=["x1","x2","y1","y2","stroke"],mk=["x","y","font-size"],wk={key:0,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},Bk=["x","y","font-size"],xk={key:4},yk={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},Ck={key:5},Ek=["y"],bk={class:"vue-ui-xy-legend"},Fk=["onClick"],Sk={key:6},_k=["y","x","font-size"],Tk={key:7},Uk=["x","y","height","width","fill","onMouseenter"],Ik=["onClick"],Lk=["innerHTML"],Nk=["innerHTML"],Qk={class:"vue-ui-xy-table"},Ok=ED(()=>p.createElementVNode("th",null,null,-1)),Dk={style:{"max-width":"200px",margin:"0 auto"}},kk=["onMouseover"];function Pk(t,e,r,A,n,i){return p.openBlock(),p.createElementBlock("div",{class:"vue-ui-xy",ref:"chart",style:p.normalizeStyle(`background:${i.chartConfig.chart.backgroundColor}; color:${i.chartConfig.chart.color}`)},[i.chartConfig.chart.title.show&&(!n.mutableConfig.titleInside||n.isPrinting)?(p.openBlock(),p.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:p.normalizeStyle(`font-family:${i.chartConfig.chart.fontFamily}`)},[p.createElementVNode("div",{class:"vue-ui-xy-title-main",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.fontSize}px; color:${i.chartConfig.chart.title.color}; font-weight:${i.chartConfig.chart.title.bold?"bold":"400"}`)},p.toDisplayString(i.chartConfig.chart.title.text),5),i.chartConfig.chart.title.subtitle.text?(p.openBlock(),p.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.subtitle.fontSize}px; color:${i.chartConfig.chart.title.subtitle.color}`)},p.toDisplayString(i.chartConfig.chart.title.subtitle.text),5)):p.createCommentVNode("",!0)],4)):p.createCommentVNode("",!0),i.chartConfig.chart.userOptions.show?(p.openBlock(),p.createElementBlock("details",bD,[p.createElementVNode("summary",FD,p.toDisplayString(i.chartConfig.chart.userOptions.title),1),p.createElementVNode("div",SD,[p.createElementVNode("div",_D,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-datalabels",name:"vue-ui-xy-option-datalabels","onUpdate:modelValue":e[0]||(e[0]=a=>n.mutableConfig.dataLabels.show=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.dataLabels.show]]),p.createElementVNode("label",TD,p.toDisplayString(i.chartConfig.chart.userOptions.labels.dataLabels),1)]),p.createElementVNode("div",UD,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-title",name:"vue-ui-xy-option-title","onUpdate:modelValue":e[1]||(e[1]=a=>n.mutableConfig.titleInside=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.titleInside]]),p.createElementVNode("label",ID,p.toDisplayString(i.chartConfig.chart.userOptions.labels.titleInside),1)]),p.createElementVNode("div",LD,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-legend",name:"vue-ui-xy-option-legend","onUpdate:modelValue":e[2]||(e[2]=a=>n.mutableConfig.legendInside=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.legendInside]]),p.createElementVNode("label",ND,p.toDisplayString(i.chartConfig.chart.userOptions.labels.legendInside),1)]),p.createElementVNode("div",QD,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-table",name:"vue-ui-xy-option-table","onUpdate:modelValue":e[3]||(e[3]=a=>n.mutableConfig.showTable=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.showTable]]),p.createElementVNode("label",OD,p.toDisplayString(i.chartConfig.chart.userOptions.labels.showTable),1)]),p.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...a)=>i.generatePdf&&i.generatePdf(...a)),disabled:n.isPrinting,style:{"margin-top":"12px"}},[n.isPrinting?(p.openBlock(),p.createElementBlock("svg",kD,PD)):(p.openBlock(),p.createElementBlock("span",RD,"PDF"))],8,DD),p.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...a)=>i.generateXls&&i.generateXls(...a))}," XLSX ")])],512)):p.createCommentVNode("",!0),(p.openBlock(),p.createElementBlock("svg",{width:"100%",viewBox:i.viewBox,class:"vue-ui-xy-svg",style:p.normalizeStyle(`background:${i.chartConfig.chart.backgroundColor}; color:${i.chartConfig.chart.color}; font-family:${i.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...a)=>i.closeDetails&&i.closeDetails(...a))},[p.createElementVNode("g",HD,[p.createElementVNode("line",{stroke:i.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:i.drawingArea.left,x2:i.drawingArea.left,y1:i.drawingArea.top,y2:i.drawingArea.bottom,"stroke-linecap":"round"},null,8,VD),p.createElementVNode("line",{stroke:i.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:i.drawingArea.left,x2:i.drawingArea.right,y1:i.zero,y2:i.zero,"stroke-linecap":"round"},null,8,KD),i.chartConfig.chart.grid.showVerticalLines?(p.openBlock(),p.createElementBlock("g",GD,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.maxSeries+1,(a,s)=>(p.openBlock(),p.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:i.drawingArea.width/i.maxSeries*s+i.drawingArea.left,x2:i.drawingArea.width/i.maxSeries*s+i.drawingArea.left,y1:i.drawingArea.top,y2:i.drawingArea.bottom,"stroke-width":"0.5",stroke:i.chartConfig.chart.grid.stroke},null,8,jD))),128))])):p.createCommentVNode("",!0)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.barSet,(a,s)=>(p.openBlock(),p.createElementBlock("defs",{key:`def_rect_${s}`},[p.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}`,x2:"0%",y2:"100%"},[p.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,zD),p.createElementVNode("stop",{offset:"62%","stop-color":`${i.shiftHue(a.color,.02)}DE`},null,8,XD),p.createElementVNode("stop",{offset:"100%","stop-color":`${i.shiftHue(a.color,.05)}66`},null,8,qD)],8,WD),p.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}`,x2:"0%",y2:"100%"},[p.createElementVNode("stop",{offset:"0%","stop-color":`${i.shiftHue(a.color,.05)}66`},null,8,$D),p.createElementVNode("stop",{offset:"38%","stop-color":`${i.shiftHue(a.color,.02)}DE`},null,8,JD),p.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ZD)],8,YD)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.plotSet,(a,s)=>(p.openBlock(),p.createElementBlock("defs",{key:`def_plot_${s}`},[p.createElementVNode("radialGradient",{id:`plotGradient_${s}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[p.createElementVNode("stop",{offset:"0%","stop-color":`${i.shiftHue(a.color,.05)}`},null,8,tk),p.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,rk)],8,ek)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.lineSet,(a,s)=>(p.openBlock(),p.createElementBlock("defs",{key:`def_line_${s}`},[p.createElementVNode("radialGradient",{id:`lineGradient_${s}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[p.createElementVNode("stop",{offset:"0%","stop-color":`${i.shiftHue(a.color,.05)}`},null,8,nk),p.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ik)],8,Ak)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.barSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`serie_bar_${s}`,class:p.normalizeClass(`serie_bar_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`bar_plot_${s}_${l}`},[i.canShowValue(o.value)?(p.openBlock(),p.createElementBlock("rect",{key:0,x:i.calcRectX(o),y:i.calcRectY(o),height:i.calcRectHeight(o),width:i.calcRectWidth(),fill:i.chartConfig.bar.useGradient?o.value>=0?`url(#rectGradient_pos_${s})`:`url(#rectGradient_neg_${s})`:a.color},null,8,ak)):p.createCommentVNode("",!0)]))),128))],2))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.plotSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`serie_plot_${s}`,class:p.normalizeClass(`serie_plot_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`circle_plot_${s}_${l}`},[i.canShowValue(o.value)?(p.openBlock(),p.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:i.chartConfig.plot.radius,fill:i.chartConfig.plot.useGradient?`url(#plotGradient_${s})`:a.color,stroke:i.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,sk)):p.createCommentVNode("",!0)]))),128))],2))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.lineSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`serie_line_${s}`,class:p.normalizeClass(`serie_line_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`line_${s}_${l}`},[l<a.plots.length-1&&i.canShowValue(o.value)&&i.canShowValue(a.plots[l+1].value)?(p.openBlock(),p.createElementBlock("line",{key:0,x1:o.x,x2:a.plots[l+1].x,y1:o.y,y2:a.plots[l+1].y,stroke:a.color,"stroke-width":i.chartConfig.line.strokeWidth},null,8,ok)):p.createCommentVNode("",!0)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`circle_line_${s}_${l}`},[i.canShowValue(o.value)?(p.openBlock(),p.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:i.chartConfig.line.radius,fill:i.chartConfig.line.useGradient?`url(#lineGradient_${s})`:a.color,stroke:i.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,lk)):p.createCommentVNode("",!0)]))),128))],2))),128)),i.chartConfig.bar.labels.show&&n.mutableConfig.dataLabels.show?(p.openBlock(),p.createElementBlock("g",ck,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.barSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_bar_${s}`,class:p.normalizeClass(`xLabel_bar_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_bar_${s}_${l}`},[p.createElementVNode("text",{x:o.x+i.calcRectWidth(),y:o.y+i.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":i.chartConfig.chart.labels.fontSize,fill:i.chartConfig.bar.labels.color},p.toDisplayString(i.canShowValue(o.value)?o.value.toFixed(i.chartConfig.bar.labels.rounding):""),9,fk)]))),128))],2))),128))])):p.createCommentVNode("",!0),i.chartConfig.plot.labels.show&&n.mutableConfig.dataLabels.show?(p.openBlock(),p.createElementBlock("g",uk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.plotSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_plot_${s}`,class:p.normalizeClass(`xLabel_plot_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_plot_${s}_${l}`},[p.createElementVNode("text",{x:o.x,y:o.y+i.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":i.chartConfig.chart.labels.fontSize,fill:i.chartConfig.plot.labels.color},p.toDisplayString(i.canShowValue(o.value)?o.value.toFixed(i.chartConfig.plot.labels.rounding):""),9,hk)]))),128))],2))),128))])):p.createCommentVNode("",!0),i.chartConfig.line.labels.show&&n.mutableConfig.dataLabels.show?(p.openBlock(),p.createElementBlock("g",dk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.lineSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_line_${s}`,class:p.normalizeClass(`xLabel_line_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_line_${s}_${l}`},[p.createElementVNode("text",{x:o.x,y:o.y+i.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":i.chartConfig.chart.labels.fontSize,fill:i.chartConfig.line.labels.color},p.toDisplayString(i.canShowValue(o.value)?o.value.toFixed(i.chartConfig.line.labels.rounding):""),9,gk)]))),128))],2))),128))])):p.createCommentVNode("",!0),i.chartConfig.chart.grid.labels.show?(p.openBlock(),p.createElementBlock("g",pk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.yLabels,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`yLabel_${s}`},[a.value>=i.min&&a.value<=i.max?(p.openBlock(),p.createElementBlock("line",{key:0,x1:i.drawingArea.left,x2:i.drawingArea.left-5,y1:a.y,y2:a.y,stroke:i.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,vk)):p.createCommentVNode("",!0),a.value>=i.min&&a.value<=i.max?(p.openBlock(),p.createElementBlock("text",{key:1,x:i.drawingArea.left-5,y:a.y+i.chartConfig.chart.labels.fontSize/3,"font-size":i.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end"},p.toDisplayString(i.canShowValue(a.value)?a.value.toFixed(0):""),9,mk)):p.createCommentVNode("",!0)]))),128))])):p.createCommentVNode("",!0),p.createElementVNode("g",null,[i.chartConfig.chart.grid.labels.axis.yLabel?(p.openBlock(),p.createElementBlock("text",wk,p.toDisplayString(i.chartConfig.chart.grid.labels.axis.yLabel),1)):p.createCommentVNode("",!0),i.chartConfig.chart.grid.labels.axis.xLabel?(p.openBlock(),p.createElementBlock("text",{key:1,"text-anchor":"middle",x:i.chartConfig.chart.width/2,y:i.drawingArea.bottom+i.chartConfig.chart.grid.labels.axis.fontSize+i.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":i.chartConfig.chart.grid.labels.axis.fontSize},p.toDisplayString(i.chartConfig.chart.grid.labels.axis.xLabel),9,Bk)):p.createCommentVNode("",!0)]),i.chartConfig.chart.title.show&&n.mutableConfig.titleInside&&!n.isPrinting?(p.openBlock(),p.createElementBlock("g",xk,[(p.openBlock(),p.createElementBlock("foreignObject",yk,[p.createElementVNode("div",{class:"vue-ui-xy-title",style:p.normalizeStyle(`font-family:${i.chartConfig.chart.fontFamily}`)},[p.createElementVNode("div",{class:"vue-ui-xy-title-main",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.fontSize*.6}px; color:${i.chartConfig.chart.title.color}; font-weight:${i.chartConfig.chart.title.bold?"bold":"400"}`)},p.toDisplayString(i.chartConfig.chart.title.text),5),i.chartConfig.chart.title.subtitle.text?(p.openBlock(),p.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${i.chartConfig.chart.title.subtitle.color}`)},p.toDisplayString(i.chartConfig.chart.title.subtitle.text),5)):p.createCommentVNode("",!0)],4)]))])):p.createCommentVNode("",!0),i.chartConfig.chart.legend.show&&n.mutableConfig.legendInside&&!n.isPrinting?(p.openBlock(),p.createElementBlock("g",Ck,[(p.openBlock(),p.createElementBlock("foreignObject",{x:"0",y:i.drawingArea.bottom+i.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:p.normalizeStyle(`overflow:visible; font-size:${i.chartConfig.chart.legend.fontSize*.6}px`)},[p.createElementVNode("div",bk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.absoluteDataset,(a,s)=>(p.openBlock(),p.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>i.segregate(a),class:p.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(a.id)})},[["plot"].includes(a.type)?(p.openBlock(),p.createElementBlock("span",{key:0,style:p.normalizeStyle(`color:${a.color}`)},"●",4)):p.createCommentVNode("",!0),["line"].includes(a.type)?(p.openBlock(),p.createElementBlock("span",{key:1,style:p.normalizeStyle(`color:${a.color}`)},"▬",4)):p.createCommentVNode("",!0),["bar"].includes(a.type)?(p.openBlock(),p.createElementBlock("span",{key:2,style:p.normalizeStyle(`color:${a.color}`)},"◼",4)):p.createCommentVNode("",!0),p.createElementVNode("span",null,p.toDisplayString(a.name),1)],10,Fk))),128))])],12,Ek))])):p.createCommentVNode("",!0),i.chartConfig.chart.grid.labels.xAxisLabels.show?(p.openBlock(),p.createElementBlock("g",Sk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.maxSeries,(a,s)=>(p.openBlock(),p.createElementBlock("text",{key:`time_label_${s}`,"text-anchor":"middle",y:i.drawingArea.bottom+i.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:i.drawingArea.left+i.drawingArea.width/i.maxSeries*s+i.drawingArea.width/i.maxSeries/2,"font-size":i.chartConfig.chart.grid.labels.xAxisLabels.fontSize},p.toDisplayString(i.chartConfig.chart.grid.labels.xAxisLabels.values[s]||""),9,_k))),128))])):p.createCommentVNode("",!0),i.chartConfig.chart.tooltip.show?(p.openBlock(),p.createElementBlock("g",Tk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.maxSeries,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`tooltip_trap_${s}`},[p.createElementVNode("rect",{x:i.drawingArea.left+i.drawingArea.width/i.maxSeries*s,y:i.drawingArea.top,height:i.drawingArea.height,width:i.drawingArea.width/i.maxSeries,fill:n.selectedSerieIndex===s||n.selectedRowIndex===s?"rgba(0,0,0,0.03)":"transparent",onMouseenter:o=>i.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=o=>i.toggleTooltip(!1))},null,40,Uk)]))),128))])):p.createCommentVNode("",!0)],12,MD)),i.chartConfig.chart.legend.show&&(!n.mutableConfig.legendInside||n.isPrinting)?(p.openBlock(),p.createElementBlock("div",{key:2,class:"vue-ui-xy-legend",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.legend.fontSize}px`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.absoluteDataset,(a,s)=>(p.openBlock(),p.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>i.segregate(a),class:p.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(a.id)})},[p.createElementVNode("span",{style:p.normalizeStyle(`color:${a.color}`),innerHTML:n.icons[a.type]},null,12,Lk),p.createElementVNode("span",null,p.toDisplayString(a.name),1)],10,Ik))),128))],4)):p.createCommentVNode("",!0),i.chartConfig.chart.tooltip.show&&n.isTooltip?(p.openBlock(),p.createElementBlock("div",{key:3,class:"vue-ui-xy-tooltip",ref:"tooltip",style:p.normalizeStyle(`top:${i.tooltipPosition.top}px; left:${i.tooltipPosition.left}px`),innerHTML:i.tooltipContent},null,12,Nk)):p.createCommentVNode("",!0),i.chartConfig.showTable&&n.mutableConfig.showTable?(p.openBlock(),p.createElementBlock("div",{key:4,class:p.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":n.isPrinting}),onClick:e[9]||(e[9]=(...a)=>i.closeDetails&&i.closeDetails(...a))},[p.createElementVNode("table",Qk,[p.createElementVNode("thead",null,[p.createElementVNode("tr",null,[Ok,(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.table.head,(a,s)=>(p.openBlock(),p.createElementBlock("th",{key:`th_${s}`},[p.createElementVNode("div",Dk,[p.createElementVNode("span",{style:p.normalizeStyle(`color:${a.color}; margin-right:3px`)},p.toDisplayString(n.icons[a.type]),5),p.createTextVNode(p.toDisplayString(a.label),1)])]))),128))])]),p.createElementVNode("tbody",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.table.body,(a,s)=>(p.openBlock(),p.createElementBlock("tr",{key:`tr_${s}`,class:p.normalizeClass({"vue-ui-xy-table-tr-selected":n.selectedSerieIndex===s||n.selectedRowIndex===s}),onMouseover:o=>n.selectedRowIndex=s,onMouseleave:e[8]||(e[8]=o=>n.selectedRowIndex=null)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a,(o,l)=>(p.openBlock(),p.createElementBlock("td",{key:`td_${s}_${l}`},p.toDisplayString(o),1))),128))],42,kk))),128))])])],2)):p.createCommentVNode("",!0)],4)}const Rk=H5(CD,[["render",Pk],["__scopeId","data-v-5d89b22a"]]),I$="",Mk={name:"vue-ui-table",props:{locale:{type:String,default:"fr-fr"},header:{type:Array,default(){return[]}},body:{type:Array,default(){return[]}},fontFamily:{type:String,default:"inherit"},maxHeight:{type:String,default:"500px"},rowsPerPage:{type:Number,default:25},translations:{type:Object,default(){return{average:"Moyenne",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"Du",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"Au",total:"Total",totalRows:"Total rows"}}},useChart:{type:Boolean,default:!0}},data(){return{bodyCopy:JSON.parse(JSON.stringify(this.body)).map((t,e)=>({...t,absoluteIndex:e})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.rowsPerPage,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.rowsPerPage,this.body.length])].sort((t,e)=>t-e),palette:["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"],percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.body)).map((t,e)=>({...t,absoluteIndex:e})),tableHead:JSON.parse(JSON.stringify(this.header)).map(t=>({average:Object.hasOwn(t,"average")?t.average:!1,decimals:Object.hasOwn(t,"decimals")?t.decimals:0,isMultiselect:Object.hasOwn(t,"isMultiselect")?t.isMultiselect:!1,isPercentage:Object.hasOwn(t,"isPercentage")?t.isPercentage:!1,isSearch:Object.hasOwn(t,"isSearch")?t.isSearch:!1,isSort:Object.hasOwn(t,"isSort")?t.isSort:!1,name:t.name,percentageTo:Object.hasOwn(t,"percentageTo")?t.percentageTo:void 0,prefix:Object.hasOwn(t,"prefix")?t.prefix:"",rangeFilter:Object.hasOwn(t,"rangeFilter")?t.rangeFilter:!1,suffix:Object.hasOwn(t,"suffix")?t.suffix:"",sum:Object.hasOwn(t,"sum")?t.sum:!1,type:t.type}))}},mounted(){if(this.header.length===0)throw new Error(`SmartTable error: missing header data.
|
|
360
|
+
'${r}' was converted to null to allow the chart to display.`)})}),document.addEventListener("mousemove",e=>{this.clientPosition={x:e.clientX,y:e.clientY}}),this.mutableConfig={dataLabels:{show:!0},titleInside:!this.chartConfig.chart.title.useDiv,legendInside:!this.chartConfig.chart.legend.useDiv}},methods:{treeShake({defaultConfig:t,userConfig:e}){const r={...t};return Object.keys(r).forEach(A=>{if(Object.hasOwn(e,A)){const n=e[A];typeof n=="boolean"?r[A]=n:["string","number"].includes(typeof n)?this.isValidUserValue(n)&&(r[A]=n):Array.isArray(r[A])?this.checkArray({userConfig:e,key:A})&&(r[A]=n):this.checkObj({userConfig:e,key:A})&&(r[A]=this.treeShake({defaultConfig:r[A],userConfig:n}))}}),r},calcRectHeight(t){return t.value>=0?this.zero-t.y:t.y-this.zero},calcRectWidth(){return this.slot.bar*.9},calcRectX(t){return t.x+this.slot.bar*.05+this.slot.bar/2},calcRectY(t){return t.value>=0?t.y:this.zero},canShowValue(t){return![null,void 0,NaN].includes(t)},closeDetails(){const t=this.$refs.details;t&&t.removeAttribute("open")},closestDecimal(t){if(t===0)return 0;const r=10**Math.floor(Math.log10(Math.abs(t)));let A;return t<0,A=Math.round(t/r)*r,A},convertColorToHex(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,r=/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)$/i,A=/^hsla?\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(?:,\s*[\d.]+)?\)$/i;let n;if(n=t.match(e)){const[,i,a,s]=n;return`#${i}${a}${s}`}else if(n=t.match(r)){const[,i,a,s]=n;return`#${this.decimalToHex(i)}${this.decimalToHex(a)}${this.decimalToHex(s)}`}else if(n=t.match(A)){const[,i,a,s]=n,o=this.hslToRgb(Number(i),Number(a),Number(s));return`#${this.decimalToHex(o[0])}${this.decimalToHex(o[1])}${this.decimalToHex(o[2])}`}return null},decimalToHex(t){const e=Number(t).toString(16);return e.length===1?"0"+e:e},hslToRgb(t,e,r){t/=360,e/=100,r/=100;let A,n,i;if(e===0)A=n=i=r;else{const a=(l,c,h)=>(h<0&&(h+=1),h>1&&(h-=1),h<.16666666666666666?l+(c-l)*6*h:h<.5?c:h<.6666666666666666?l+(c-l)*(.6666666666666666-h)*6:l),s=r<.5?r*(1+e):r+e-r*e,o=2*r-s;A=a(o,s,t+1/3),n=a(o,s,t),i=a(o,s,t-1/3)}return[Math.round(A*255),Math.round(n*255),Math.round(i*255)]},ratioToMax(t){return t/this.absoluteMax},segregate(t){if(this.segregatedSeries.includes(t.id))this.segregatedSeries=this.segregatedSeries.filter(e=>e!==t.id);else{if(this.segregatedSeries.length+1===this.safeDataset.length)return;this.segregatedSeries.push(t.id)}},shiftHue(t,e){const r=l=>({r:parseInt(l.substring(1,3),16),g:parseInt(l.substring(3,5),16),b:parseInt(l.substring(5,7),16)}),A=({r:l,g:c,b:h})=>{l/=255,c/=255,h/=255;const d=Math.max(l,c,h),u=Math.min(l,c,h);let w,v,x=(d+u)/2;if(d===u)w=v=0;else{const y=d-u;switch(v=x>.5?y/(2-d-u):y/(d+u),d){case l:w=(c-h)/y+(c<h?6:0);break;case c:w=(h-l)/y+2;break;case h:w=(l-c)/y+4;break}w/=6}return{h:w,s:v,l:x}},n=({h:l,s:c,l:h})=>{let d,u,w;if(c===0)d=u=w=h;else{const v=(E,F,D)=>(D<0&&(D+=1),D>1&&(D-=1),D<.16666666666666666?E+(F-E)*6*D:D<.5?F:D<.6666666666666666?E+(F-E)*(.6666666666666666-D)*6:E),x=h<.5?h*(1+c):h+c-h*c,y=2*h-x;d=v(y,x,l+.3333333333333333),u=v(y,x,l),w=v(y,x,l-.3333333333333333)}return{r:Math.round(d*255),g:Math.round(u*255),b:Math.round(w*255)}},i=r(t),a=A(i);a.h+=e,a.h=(a.h+1)%1;const s=n(a);return`#${(s.r<<16|s.g<<8|s.b).toString(16).padStart(6,"0")}`},toggleTooltip(t,e=null){this.isTooltip=t,t?this.selectedSerieIndex=e:this.selectedSerieIndex=null},generatePdf(){const t=this.$refs.chart;t&&(this.isPrinting=!0,this.$nextTick(()=>{const e={height:851.89,width:595.28},r=new xt("","pt","a4");let A,n,i,a,s;Pm(t).then(o=>{A=o.width,n=o.height;let l=n;const c=A/e.width*e.height;let h=0;if(i=e.width,a=582.28/A*n,s=o.toDataURL("image/png",1),l<c)r.addImage(s,"PNG",33,24,i*.9,a*.9,"","FAST");else for(;l>0;)r.addImage(s,"PNG",33,h,i*.9,a*.9,"","FAST"),l-=c,h-=e.height-24,l>0&&r.addPage();r.save(`${this.chartConfig.chart.title.text||"vue-ui-xy"}.pdf`)}).finally(()=>{this.isPrinting=!1})}))},generateXls(){const t=["",...this.table.head.map(l=>l.label)],e=this.table.body,r=[t].concat(e);function A(l){let c=new ArrayBuffer(l.length),h=new Uint8Array(c);for(let d=0;d<l.length;d++)h[d]=l.charCodeAt(d)&255;return c}const n=Bo.book_new(),i=Bo.aoa_to_sheet(r);Bo.book_append_sheet(n,i,"Sheet1");const a=md(n,{bookType:"xlsx",type:"binary"}),s=new Blob([A(a)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),o=document.createElement("a");o.href=window.URL.createObjectURL(s),o.download=`${this.chartConfig.chart.title.text.replaceAll(" ","_")||"vue-ui-xy"}.xlsx`,o.click(),window.URL.revokeObjectURL(o.href),this.isExportRequest=!1},checkArray({userConfig:t,key:e}){return Object.hasOwn(t,e)&&Array.isArray(t[e])&&t[e].length},checkObj({userConfig:t,key:e}){return Object.hasOwn(t,e)&&!Array.isArray(t[e])&&typeof t[e]=="object"},isValidUserValue(t){return![null,void 0,NaN,1/0,-1/0].includes(t)},isSafeValue(t){return![void 0,NaN,1/0,-1/0].includes(t)},checkNaN(t,e=0){return isNaN(t)?e:t}}},ED=t=>(p.pushScopeId("data-v-03ae9ec2"),t=t(),p.popScopeId(),t),bD={key:1,class:"vue-ui-xy-user-options","data-html2canvas-ignore":"",ref:"details"},FD={style:{"`background":"${chartConfig.chart.background}",color:"${chartConfig.chart.color}`"}},SD={class:"vue-ui-xy-user-options-items"},_D={class:"vue-ui-xy-user-option-item"},TD={for:"vue-ui-xy-option-datalabels"},UD={class:"vue-ui-xy-user-option-item"},ID={for:"vue-ui-xy-option-title"},LD={class:"vue-ui-xy-user-option-item"},ND={for:"vue-ui-xy-option-legend"},QD={class:"vue-ui-xy-user-option-item"},OD={for:"vue-ui-xy-option-table"},DD=["disabled"],kD={key:0,class:"vue-ui-xy-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"#2c3e50",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},PD=[p.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-03ae9ec2></path><path d="M18 16v.01" data-v-03ae9ec2></path><path d="M6 16v.01" data-v-03ae9ec2></path><path d="M12 5v.01" data-v-03ae9ec2></path><path d="M12 12v.01" data-v-03ae9ec2></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-03ae9ec2></path>',6)],RD={key:1},MD=["viewBox"],HD={class:"vue-ui-xy-grid"},VD=["stroke","x1","x2","y1","y2"],KD=["stroke","x1","x2","y1","y2"],GD={key:0},jD=["x1","x2","y1","y2","stroke"],WD=["id"],zD=["stop-color"],XD=["stop-color"],qD=["stop-color"],YD=["id"],$D=["stop-color"],JD=["stop-color"],ZD=["stop-color"],ek=["id"],tk=["stop-color"],rk=["stop-color"],Ak=["id"],nk=["stop-color"],ik=["stop-color"],ak=["x","y","height","width","fill"],sk=["cx","cy","r","fill","stroke"],ok=["x1","x2","y1","y2","stroke","stroke-width"],lk=["cx","cy","r","fill","stroke"],ck={key:0},fk=["x","y","font-size","fill"],uk={key:1},hk=["x","y","font-size","fill"],dk={key:2},gk=["x","y","font-size","fill"],pk={key:3},vk=["x1","x2","y1","y2","stroke"],mk=["x","y","font-size","fill"],wk={key:0,id:"yAxisLabel","text-anchor":"middle",style:{transition:"none"}},Bk=["x","y","font-size","fill"],xk={key:4},yk={x:"0",y:"0",width:"100%",height:"40px",style:{overflow:"visible"}},Ck={key:5},Ek=["y"],bk={class:"vue-ui-xy-legend"},Fk=["onClick"],Sk={key:6},_k=["y","x","font-size"],Tk={key:7},Uk=["x","y","height","width","fill","onMouseenter"],Ik=["onClick"],Lk=["innerHTML"],Nk=["innerHTML"],Qk={class:"vue-ui-xy-table"},Ok=ED(()=>p.createElementVNode("th",null,null,-1)),Dk={style:{"max-width":"200px",margin:"0 auto"}},kk=["onMouseover"];function Pk(t,e,r,A,n,i){return p.openBlock(),p.createElementBlock("div",{class:"vue-ui-xy",ref:"chart",style:p.normalizeStyle(`background:${i.chartConfig.chart.backgroundColor}; color:${i.chartConfig.chart.color}`)},[i.chartConfig.chart.title.show&&(!n.mutableConfig.titleInside||n.isPrinting)?(p.openBlock(),p.createElementBlock("div",{key:0,class:"vue-ui-xy-title",style:p.normalizeStyle(`font-family:${i.chartConfig.chart.fontFamily}`)},[p.createElementVNode("div",{class:"vue-ui-xy-title-main",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.fontSize}px; color:${i.chartConfig.chart.title.color}; font-weight:${i.chartConfig.chart.title.bold?"bold":"400"}`)},p.toDisplayString(i.chartConfig.chart.title.text),5),i.chartConfig.chart.title.subtitle.text?(p.openBlock(),p.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.subtitle.fontSize}px; color:${i.chartConfig.chart.title.subtitle.color}`)},p.toDisplayString(i.chartConfig.chart.title.subtitle.text),5)):p.createCommentVNode("",!0)],4)):p.createCommentVNode("",!0),i.chartConfig.chart.userOptions.show?(p.openBlock(),p.createElementBlock("details",bD,[p.createElementVNode("summary",FD,p.toDisplayString(i.chartConfig.chart.userOptions.title),1),p.createElementVNode("div",SD,[p.createElementVNode("div",_D,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-datalabels",name:"vue-ui-xy-option-datalabels","onUpdate:modelValue":e[0]||(e[0]=a=>n.mutableConfig.dataLabels.show=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.dataLabels.show]]),p.createElementVNode("label",TD,p.toDisplayString(i.chartConfig.chart.userOptions.labels.dataLabels),1)]),p.createElementVNode("div",UD,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-title",name:"vue-ui-xy-option-title","onUpdate:modelValue":e[1]||(e[1]=a=>n.mutableConfig.titleInside=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.titleInside]]),p.createElementVNode("label",ID,p.toDisplayString(i.chartConfig.chart.userOptions.labels.titleInside),1)]),p.createElementVNode("div",LD,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-legend",name:"vue-ui-xy-option-legend","onUpdate:modelValue":e[2]||(e[2]=a=>n.mutableConfig.legendInside=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.legendInside]]),p.createElementVNode("label",ND,p.toDisplayString(i.chartConfig.chart.userOptions.labels.legendInside),1)]),p.createElementVNode("div",QD,[p.withDirectives(p.createElementVNode("input",{type:"checkbox",id:"vue-ui-xy-option-table",name:"vue-ui-xy-option-table","onUpdate:modelValue":e[3]||(e[3]=a=>n.mutableConfig.showTable=a)},null,512),[[p.vModelCheckbox,n.mutableConfig.showTable]]),p.createElementVNode("label",OD,p.toDisplayString(i.chartConfig.chart.userOptions.labels.showTable),1)]),p.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[4]||(e[4]=(...a)=>i.generatePdf&&i.generatePdf(...a)),disabled:n.isPrinting,style:{"margin-top":"12px"}},[n.isPrinting?(p.openBlock(),p.createElementBlock("svg",kD,PD)):(p.openBlock(),p.createElementBlock("span",RD,"PDF"))],8,DD),p.createElementVNode("button",{class:"vue-ui-xy-button",onClick:e[5]||(e[5]=(...a)=>i.generateXls&&i.generateXls(...a))}," XLSX ")])],512)):p.createCommentVNode("",!0),(p.openBlock(),p.createElementBlock("svg",{width:"100%",viewBox:i.viewBox,class:"vue-ui-xy-svg",style:p.normalizeStyle(`background:${i.chartConfig.chart.backgroundColor}; color:${i.chartConfig.chart.color}; font-family:${i.chartConfig.chart.fontFamily}`),onClick:e[7]||(e[7]=(...a)=>i.closeDetails&&i.closeDetails(...a))},[p.createElementVNode("g",HD,[p.createElementVNode("line",{stroke:i.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:i.drawingArea.left,x2:i.drawingArea.left,y1:i.drawingArea.top,y2:i.drawingArea.bottom,"stroke-linecap":"round"},null,8,VD),p.createElementVNode("line",{stroke:i.chartConfig.chart.grid.stroke,"stroke-width":"1",x1:i.drawingArea.left,x2:i.drawingArea.right,y1:i.zero,y2:i.zero,"stroke-linecap":"round"},null,8,KD),i.chartConfig.chart.grid.showVerticalLines?(p.openBlock(),p.createElementBlock("g",GD,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.maxSeries+1,(a,s)=>(p.openBlock(),p.createElementBlock("line",{key:`grid_vertical_line_${s}`,x1:i.drawingArea.width/i.maxSeries*s+i.drawingArea.left,x2:i.drawingArea.width/i.maxSeries*s+i.drawingArea.left,y1:i.drawingArea.top,y2:i.drawingArea.bottom,"stroke-width":"0.5",stroke:i.chartConfig.chart.grid.stroke},null,8,jD))),128))])):p.createCommentVNode("",!0)]),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.barSet,(a,s)=>(p.openBlock(),p.createElementBlock("defs",{key:`def_rect_${s}`},[p.createElementVNode("linearGradient",{id:`rectGradient_pos_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[p.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,zD),p.createElementVNode("stop",{offset:"62%","stop-color":`${i.shiftHue(a.color,.02)}DE`},null,8,XD),p.createElementVNode("stop",{offset:"100%","stop-color":`${i.shiftHue(a.color,.05)}66`},null,8,qD)],8,WD),p.createElementVNode("linearGradient",{id:`rectGradient_neg_${s}_${n.uniqueId}`,x2:"0%",y2:"100%"},[p.createElementVNode("stop",{offset:"0%","stop-color":`${i.shiftHue(a.color,.05)}66`},null,8,$D),p.createElementVNode("stop",{offset:"38%","stop-color":`${i.shiftHue(a.color,.02)}DE`},null,8,JD),p.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ZD)],8,YD)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.plotSet,(a,s)=>(p.openBlock(),p.createElementBlock("defs",{key:`def_plot_${s}`},[p.createElementVNode("radialGradient",{id:`plotGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[p.createElementVNode("stop",{offset:"0%","stop-color":`${i.shiftHue(a.color,.05)}`},null,8,tk),p.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,rk)],8,ek)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.lineSet,(a,s)=>(p.openBlock(),p.createElementBlock("defs",{key:`def_line_${s}`},[p.createElementVNode("radialGradient",{id:`lineGradient_${s}_${n.uniqueId}`,cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%"},[p.createElementVNode("stop",{offset:"0%","stop-color":`${i.shiftHue(a.color,.05)}`},null,8,nk),p.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,ik)],8,Ak)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.barSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`serie_bar_${s}`,class:p.normalizeClass(`serie_bar_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`bar_plot_${s}_${l}`},[i.canShowValue(o.value)?(p.openBlock(),p.createElementBlock("rect",{key:0,x:i.calcRectX(o),y:i.calcRectY(o),height:i.calcRectHeight(o),width:i.calcRectWidth(),fill:i.chartConfig.bar.useGradient?o.value>=0?`url(#rectGradient_pos_${s}_${n.uniqueId})`:`url(#rectGradient_neg_${s}_${n.uniqueId})`:a.color},null,8,ak)):p.createCommentVNode("",!0)]))),128))],2))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.plotSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`serie_plot_${s}`,class:p.normalizeClass(`serie_plot_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`circle_plot_${s}_${l}`},[i.canShowValue(o.value)?(p.openBlock(),p.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:i.chartConfig.plot.radius,fill:i.chartConfig.plot.useGradient?`url(#plotGradient_${s}_${n.uniqueId})`:a.color,stroke:i.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,sk)):p.createCommentVNode("",!0)]))),128))],2))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.lineSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`serie_line_${s}`,class:p.normalizeClass(`serie_line_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`line_${s}_${l}`},[l<a.plots.length-1&&i.canShowValue(o.value)&&i.canShowValue(a.plots[l+1].value)?(p.openBlock(),p.createElementBlock("line",{key:0,x1:o.x,x2:a.plots[l+1].x,y1:o.y,y2:a.plots[l+1].y,stroke:a.color,"stroke-width":i.chartConfig.line.strokeWidth},null,8,ok)):p.createCommentVNode("",!0)]))),128)),(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`circle_line_${s}_${l}`},[i.canShowValue(o.value)?(p.openBlock(),p.createElementBlock("circle",{key:0,cx:o.x,cy:o.y,r:i.chartConfig.line.radius,fill:i.chartConfig.line.useGradient?`url(#lineGradient_${s}_${n.uniqueId})`:a.color,stroke:i.chartConfig.chart.backgroundColor,"stroke-width":"0.5"},null,8,lk)):p.createCommentVNode("",!0)]))),128))],2))),128)),i.chartConfig.bar.labels.show&&n.mutableConfig.dataLabels.show?(p.openBlock(),p.createElementBlock("g",ck,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.barSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_bar_${s}`,class:p.normalizeClass(`xLabel_bar_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_bar_${s}_${l}`},[p.createElementVNode("text",{x:o.x+i.calcRectWidth(),y:o.y+i.chartConfig.bar.labels.offsetY,"text-anchor":"middle","font-size":i.chartConfig.chart.labels.fontSize,fill:i.chartConfig.bar.labels.color},p.toDisplayString(i.canShowValue(o.value)?o.value.toFixed(i.chartConfig.bar.labels.rounding):""),9,fk)]))),128))],2))),128))])):p.createCommentVNode("",!0),i.chartConfig.plot.labels.show&&n.mutableConfig.dataLabels.show?(p.openBlock(),p.createElementBlock("g",uk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.plotSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_plot_${s}`,class:p.normalizeClass(`xLabel_plot_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_plot_${s}_${l}`},[p.createElementVNode("text",{x:o.x,y:o.y+i.chartConfig.plot.labels.offsetY,"text-anchor":"middle","font-size":i.chartConfig.chart.labels.fontSize,fill:i.chartConfig.plot.labels.color},p.toDisplayString(i.canShowValue(o.value)?o.value.toFixed(i.chartConfig.plot.labels.rounding):""),9,hk)]))),128))],2))),128))])):p.createCommentVNode("",!0),i.chartConfig.line.labels.show&&n.mutableConfig.dataLabels.show?(p.openBlock(),p.createElementBlock("g",dk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.lineSet,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_line_${s}`,class:p.normalizeClass(`xLabel_line_${s}`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a.plots,(o,l)=>(p.openBlock(),p.createElementBlock("g",{key:`xLabel_line_${s}_${l}`},[p.createElementVNode("text",{x:o.x,y:o.y+i.chartConfig.line.labels.offsetY,"text-anchor":"middle","font-size":i.chartConfig.chart.labels.fontSize,fill:i.chartConfig.line.labels.color},p.toDisplayString(i.canShowValue(o.value)?o.value.toFixed(i.chartConfig.line.labels.rounding):""),9,gk)]))),128))],2))),128))])):p.createCommentVNode("",!0),i.chartConfig.chart.grid.labels.show?(p.openBlock(),p.createElementBlock("g",pk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.yLabels,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`yLabel_${s}`},[a.value>=i.min&&a.value<=i.max?(p.openBlock(),p.createElementBlock("line",{key:0,x1:i.drawingArea.left,x2:i.drawingArea.left-5,y1:a.y,y2:a.y,stroke:i.chartConfig.chart.grid.stroke,"stroke-width":"1"},null,8,vk)):p.createCommentVNode("",!0),a.value>=i.min&&a.value<=i.max?(p.openBlock(),p.createElementBlock("text",{key:1,x:i.drawingArea.left-5,y:a.y+i.chartConfig.chart.labels.fontSize/3,"font-size":i.chartConfig.chart.grid.labels.fontSize,"text-anchor":"end",fill:i.chartConfig.chart.grid.labels.color},p.toDisplayString(i.canShowValue(a.value)?a.value.toFixed(0):""),9,mk)):p.createCommentVNode("",!0)]))),128))])):p.createCommentVNode("",!0),p.createElementVNode("g",null,[i.chartConfig.chart.grid.labels.axis.yLabel?(p.openBlock(),p.createElementBlock("text",wk,p.toDisplayString(i.chartConfig.chart.grid.labels.axis.yLabel),1)):p.createCommentVNode("",!0),i.chartConfig.chart.grid.labels.axis.xLabel?(p.openBlock(),p.createElementBlock("text",{key:1,"text-anchor":"middle",x:i.chartConfig.chart.width/2,y:i.drawingArea.bottom+i.chartConfig.chart.grid.labels.axis.fontSize+i.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,"font-size":i.chartConfig.chart.grid.labels.axis.fontSize,fill:i.chartConfig.chart.grid.labels.xAxisLabels.color},p.toDisplayString(i.chartConfig.chart.grid.labels.axis.xLabel),9,Bk)):p.createCommentVNode("",!0)]),i.chartConfig.chart.title.show&&n.mutableConfig.titleInside&&!n.isPrinting?(p.openBlock(),p.createElementBlock("g",xk,[(p.openBlock(),p.createElementBlock("foreignObject",yk,[p.createElementVNode("div",{class:"vue-ui-xy-title",style:p.normalizeStyle(`font-family:${i.chartConfig.chart.fontFamily}`)},[p.createElementVNode("div",{class:"vue-ui-xy-title-main",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.fontSize*.6}px; color:${i.chartConfig.chart.title.color}; font-weight:${i.chartConfig.chart.title.bold?"bold":"400"}`)},p.toDisplayString(i.chartConfig.chart.title.text),5),i.chartConfig.chart.title.subtitle.text?(p.openBlock(),p.createElementBlock("div",{key:0,class:"vue-ui-xy-title-subtitle",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.title.subtitle.fontSize*.6}px; color:${i.chartConfig.chart.title.subtitle.color}`)},p.toDisplayString(i.chartConfig.chart.title.subtitle.text),5)):p.createCommentVNode("",!0)],4)]))])):p.createCommentVNode("",!0),i.chartConfig.chart.legend.show&&n.mutableConfig.legendInside&&!n.isPrinting?(p.openBlock(),p.createElementBlock("g",Ck,[(p.openBlock(),p.createElementBlock("foreignObject",{x:"0",y:i.drawingArea.bottom+i.chartConfig.chart.padding.bottom/3+12,width:"100%",height:"20px",style:p.normalizeStyle(`overflow:visible; font-size:${i.chartConfig.chart.legend.fontSize*.6}px`)},[p.createElementVNode("div",bk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.absoluteDataset,(a,s)=>(p.openBlock(),p.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>i.segregate(a),class:p.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(a.id)})},[["plot"].includes(a.type)?(p.openBlock(),p.createElementBlock("span",{key:0,style:p.normalizeStyle(`color:${a.color}`)},"●",4)):p.createCommentVNode("",!0),["line"].includes(a.type)?(p.openBlock(),p.createElementBlock("span",{key:1,style:p.normalizeStyle(`color:${a.color}`)},"▬",4)):p.createCommentVNode("",!0),["bar"].includes(a.type)?(p.openBlock(),p.createElementBlock("span",{key:2,style:p.normalizeStyle(`color:${a.color}`)},"◼",4)):p.createCommentVNode("",!0),p.createElementVNode("span",{style:p.normalizeStyle(`color:${i.chartConfig.chart.legend.color}`)},p.toDisplayString(a.name),5)],10,Fk))),128))])],12,Ek))])):p.createCommentVNode("",!0),i.chartConfig.chart.grid.labels.xAxisLabels.show?(p.openBlock(),p.createElementBlock("g",Sk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.maxSeries,(a,s)=>(p.openBlock(),p.createElementBlock("text",{key:`time_label_${s}`,"text-anchor":"middle",y:i.drawingArea.bottom+i.chartConfig.chart.grid.labels.xAxisLabels.fontSize*1.3,x:i.drawingArea.left+i.drawingArea.width/i.maxSeries*s+i.drawingArea.width/i.maxSeries/2,"font-size":i.chartConfig.chart.grid.labels.xAxisLabels.fontSize},p.toDisplayString(i.chartConfig.chart.grid.labels.xAxisLabels.values[s]||""),9,_k))),128))])):p.createCommentVNode("",!0),i.chartConfig.chart.tooltip.show?(p.openBlock(),p.createElementBlock("g",Tk,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.maxSeries,(a,s)=>(p.openBlock(),p.createElementBlock("g",{key:`tooltip_trap_${s}`},[p.createElementVNode("rect",{x:i.drawingArea.left+i.drawingArea.width/i.maxSeries*s,y:i.drawingArea.top,height:i.drawingArea.height,width:i.drawingArea.width/i.maxSeries,fill:n.selectedSerieIndex===s||n.selectedRowIndex===s?"rgba(0,0,0,0.03)":"transparent",onMouseenter:o=>i.toggleTooltip(!0,s),onMouseleave:e[6]||(e[6]=o=>i.toggleTooltip(!1))},null,40,Uk)]))),128))])):p.createCommentVNode("",!0)],12,MD)),i.chartConfig.chart.legend.show&&(!n.mutableConfig.legendInside||n.isPrinting)?(p.openBlock(),p.createElementBlock("div",{key:2,class:"vue-ui-xy-legend",style:p.normalizeStyle(`font-size:${i.chartConfig.chart.legend.fontSize}px`)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.absoluteDataset,(a,s)=>(p.openBlock(),p.createElementBlock("div",{key:`div_legend_item_${s}`,onClick:o=>i.segregate(a),class:p.normalizeClass({"vue-ui-xy-legend-item":!0,"vue-ui-xy-legend-item-segregated":n.segregatedSeries.includes(a.id)})},[p.createElementVNode("span",{style:p.normalizeStyle(`color:${a.color}`),innerHTML:n.icons[a.type]},null,12,Lk),p.createElementVNode("span",{style:p.normalizeStyle(`color:${i.chartConfig.chart.legend.color}`)},p.toDisplayString(a.name),5)],10,Ik))),128))],4)):p.createCommentVNode("",!0),i.chartConfig.chart.tooltip.show&&n.isTooltip?(p.openBlock(),p.createElementBlock("div",{key:3,class:"vue-ui-xy-tooltip",ref:"tooltip",style:p.normalizeStyle(`top:${i.tooltipPosition.top}px; left:${i.tooltipPosition.left}px; background:${i.chartConfig.chart.tooltip.backgroundColor}, color:${i.chartConfig.chart.tooltip.color}`),innerHTML:i.tooltipContent},null,12,Nk)):p.createCommentVNode("",!0),i.chartConfig.showTable&&n.mutableConfig.showTable?(p.openBlock(),p.createElementBlock("div",{key:4,class:p.normalizeClass({"vue-ui-xy-table-wrapper":!0,"vue-ui-xy-table-wrapper-printing":n.isPrinting}),onClick:e[9]||(e[9]=(...a)=>i.closeDetails&&i.closeDetails(...a))},[p.createElementVNode("table",Qk,[p.createElementVNode("thead",null,[p.createElementVNode("tr",null,[Ok,(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.table.head,(a,s)=>(p.openBlock(),p.createElementBlock("th",{key:`th_${s}`},[p.createElementVNode("div",Dk,[p.createElementVNode("span",{style:p.normalizeStyle(`color:${a.color}; margin-right:3px`)},p.toDisplayString(n.icons[a.type]),5),p.createTextVNode(p.toDisplayString(a.label),1)])]))),128))])]),p.createElementVNode("tbody",null,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(i.table.body,(a,s)=>(p.openBlock(),p.createElementBlock("tr",{key:`tr_${s}`,class:p.normalizeClass({"vue-ui-xy-table-tr-selected":n.selectedSerieIndex===s||n.selectedRowIndex===s}),onMouseover:o=>n.selectedRowIndex=s,onMouseleave:e[8]||(e[8]=o=>n.selectedRowIndex=null)},[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(a,(o,l)=>(p.openBlock(),p.createElementBlock("td",{key:`td_${s}_${l}`},p.toDisplayString(o),1))),128))],42,kk))),128))])])],2)):p.createCommentVNode("",!0)],4)}const Rk=H5(CD,[["render",Pk],["__scopeId","data-v-03ae9ec2"]]),I$="",Mk={name:"vue-ui-table",props:{locale:{type:String,default:"fr-fr"},header:{type:Array,default(){return[]}},body:{type:Array,default(){return[]}},fontFamily:{type:String,default:"inherit"},maxHeight:{type:String,default:"500px"},rowsPerPage:{type:Number,default:25},translations:{type:Object,default(){return{average:"Moyenne",by:"by",chooseCategoryColumn:"Choose category column",exportAllButton:"XLSX all",exportAllLabel:"Export all rows of your current filtered dataset",exportPageButton:"XLSX page",exportPageLabel:"Export rows of the current page",from:"Du",inputPlaceholder:"Search...",makeDonut:"Generate",nb:"Nb",page:"Page",paginatorLabel:"Rows per page",sizeWarning:"Displaying too many rows at a time can lead to slower performance",sum:"Somme",to:"Au",total:"Total",totalRows:"Total rows"}}},useChart:{type:Boolean,default:!0}},data(){return{bodyCopy:JSON.parse(JSON.stringify(this.body)).map((t,e)=>({...t,absoluteIndex:e})),buttonTimeout:null,canMoveChart:!1,chart:{height:316,type:"bar",width:512},constants:{ASC:1,BAR:"bar",DATE:"date",DESC:-1,DONUT:"donut",LINE:"line",NUMERIC:"numeric",PERCENTAGE:"percentage",TEXT:"text"},clientX:100,clientY:100,cssClass:{CELL:"smart-td-selected",FIRST_TD:"smart-td-selected-first",LAST_TD:"smart-td-selected-last",ROW:"smart-td-selected-neighbor"},currentDonut:void 0,currentFilter:void 0,currentSearch:void 0,currentSelectionSpan:{col:void 0,rows:[]},currentPage:0,dates:{},filteredDatesIndexes:{},hasNaN:{},iconColor:"#2D353C",iconSize:20,immutableRangeFilters:{},isExportRequest:!1,isLoading:!1,itemsPerPage:this.rowsPerPage,multiselects:{},paginatorOptions:[...new Set([10,25,50,100,250,500,this.rowsPerPage,this.body.length])].sort((t,e)=>t-e),palette:["#3366cc","#dc3912","#ff9900","#109618","#990099","#0099c6","#dd4477","#66aa00","#b82e2e","#316395","#994499","#22aa99","#aaaa11","#6633cc","#e67300","#8b0707","#651067","#329262","#5574a6","#3b3eac","#b77322","#16d620","#b91383","#f4359e","#9c5935","#a9c413","#2a778d","#668d1c","#bea413","#0c5922","#743411"],percentages:{},rafId:null,rangeFilters:{},searches:{},selectedColumn:void 0,selectedDonutCategory:void 0,selectedPlot:void 0,showChart:!1,showDonutOptions:!1,sorts:{},tableBody:JSON.parse(JSON.stringify(this.body)).map((t,e)=>({...t,absoluteIndex:e})),tableHead:JSON.parse(JSON.stringify(this.header)).map(t=>({average:Object.hasOwn(t,"average")?t.average:!1,decimals:Object.hasOwn(t,"decimals")?t.decimals:0,isMultiselect:Object.hasOwn(t,"isMultiselect")?t.isMultiselect:!1,isPercentage:Object.hasOwn(t,"isPercentage")?t.isPercentage:!1,isSearch:Object.hasOwn(t,"isSearch")?t.isSearch:!1,isSort:Object.hasOwn(t,"isSort")?t.isSort:!1,name:t.name,percentageTo:Object.hasOwn(t,"percentageTo")?t.percentageTo:void 0,prefix:Object.hasOwn(t,"prefix")?t.prefix:"",rangeFilter:Object.hasOwn(t,"rangeFilter")?t.rangeFilter:!1,suffix:Object.hasOwn(t,"suffix")?t.suffix:"",sum:Object.hasOwn(t,"sum")?t.sum:!1,type:t.type}))}},mounted(){if(this.header.length===0)throw new Error(`SmartTable error: missing header data.
|
|
361
361
|
Provide an array of objects of type:
|
|
362
362
|
{
|
|
363
363
|
name: string;
|
package/package.json
CHANGED