@heartlandone/vega 2.68.0 → 2.68.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-58ea899e.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/vega-calendar_4.cjs.entry.js +7 -5
- package/dist/cjs/vega-env-manager-23b8b23c.js +2 -2
- package/dist/cjs/{vega-table_8.cjs.entry.js → vega-table_11.cjs.entry.js} +742 -315
- package/dist/cjs/vega.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/layout/day-view-timed-event-layout-column.js +3 -1
- package/dist/collection/components/vega-calendar/slimmers/day-view/renderers/timed-event/vega-calendar-day-event-layout-renderer.js +4 -4
- package/dist/collection/components/vega-table/slimmers/controllers/vega-table-children-controller.js +25 -1
- package/dist/collection/components/vega-table/vega-table-foot/slimmers/controllers/vega-table-foot-state-controller.js +67 -0
- package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.css +34 -0
- package/dist/collection/components/vega-table/vega-table-foot/vega-table-foot.js +65 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/controllers/vega-table-foot-cell-state-controller.js +43 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.js +32 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.css +116 -0
- package/dist/collection/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.js +130 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.js +77 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.js +41 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.css +52 -0
- package/dist/collection/components/vega-table/vega-table-foot-row/vega-table-foot-row.js +71 -0
- package/dist/collection/components/vega-table/vega-table.css +10 -0
- package/dist/collection/components/vega-table/vega-table.js +1 -1
- package/dist/esm/index-090d31ca.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/vega-calendar_4.entry.js +7 -5
- package/dist/esm/vega-env-manager-8f8dc473.js +2 -2
- package/dist/esm/{vega-table_8.entry.js → vega-table_11.entry.js} +740 -316
- package/dist/esm/vega.js +1 -1
- package/dist/sri/vega-sri-manifest.json +10 -10
- package/dist/types/components/vega-calendar/slimmers/day-view/renderers/timed-event/vega-calendar-day-event-layout-renderer.d.ts +1 -1
- package/dist/types/components/vega-table/interface.d.ts +4 -0
- package/dist/types/components/vega-table/slimmers/controllers/vega-table-children-controller.d.ts +9 -1
- package/dist/types/components/vega-table/vega-table-foot/slimmers/controllers/vega-table-foot-state-controller.d.ts +22 -0
- package/dist/types/components/vega-table/vega-table-foot/types.d.ts +4 -0
- package/dist/types/components/vega-table/vega-table-foot/vega-table-foot.d.ts +23 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/controllers/vega-table-foot-cell-state-controller.d.ts +10 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/slimmers/renderers/vega-table-foot-cell-renderer.d.ts +8 -0
- package/dist/types/components/vega-table/vega-table-foot-cell/vega-table-foot-cell.d.ts +45 -0
- package/dist/types/components/vega-table/vega-table-foot-row/slimmers/controllers/vega-table-foot-row-state-controller.d.ts +20 -0
- package/dist/types/components/vega-table/vega-table-foot-row/slimmers/renderers/vega-table-foot-row-renderer.d.ts +11 -0
- package/dist/types/components/vega-table/vega-table-foot-row/types.d.ts +4 -0
- package/dist/types/components/vega-table/vega-table-foot-row/vega-table-foot-row.d.ts +41 -0
- package/dist/types/components.d.ts +69 -0
- package/dist/vega/p-5a555092.entry.js +1 -0
- package/dist/vega/p-5f377954.js +1 -1
- package/dist/vega/p-82ef2de0.entry.js +1 -0
- package/dist/vega/vega.esm.js +1 -1
- package/package.json +1 -1
- package/dist/vega/p-634499cb.entry.js +0 -1
- package/dist/vega/p-8233d814.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,f as t,F as i,H as o,r,c as a,g as s}from"./p-6b2342e0.js";import{c as l,V as n,L as d,M as c,I as h}from"./p-6e1ab235.js";import{m as p,s as v}from"./p-6bd5c49b.js";import{V as b,I as u}from"./p-d849e0f5.js";import{g as f}from"./p-bf19682d.js";import{C as w}from"./p-2d0d575f.js";import{l as g,m,n as y,o as x,S as R}from"./p-a528714c.js";import{O as S}from"./p-331a62d5.js";import{f as C,a as k,l as j}from"./p-d9671d27.js";import{d as E,D as O,a as T,f as D,Q as A,b as L,W as M,X as N,Y as P,Z as W,_ as K,$ as I}from"./p-447c7590.js";import{r as z}from"./p-77e64f26.js";import{K as B,L as V,M as _,N as G,O as $,P as F,Q as X}from"./p-308aa2e3.js";import{R as H}from"./p-85407fb9.js";import{i as U,s as Y,W as q}from"./p-b1faebe0.js";import{s as Q}from"./p-519a7d55.js";import{g as Z}from"./p-a4670e23.js";import{P as J,g as ee}from"./p-7d9cd9c8.js";import{M as te}from"./p-78a57a17.js";import{T as ie}from"./p-52b8f2d2.js";import{c as oe}from"./p-a0467b83.js";import{C as re}from"./p-db57dddc.js";import{c as ae}from"./p-de97c6d9.js";import{I as se}from"./p-b28d4f7d.js";import{T as le}from"./p-d5ff8b7f.js";import{S as ne}from"./p-fde50319.js";import{F as de}from"./p-e77a83e4.js";import{B as ce}from"./p-ed45b3b6.js";import{n as he}from"./p-018d70a5.js";import{c as pe}from"./p-86194314.js";import{a as ve}from"./p-8c9ea6f4.js";import{c as be}from"./p-1ec763ab.js";import{c as ue}from"./p-613ddaab.js";import"./p-262ec334.js";import"./p-74168615.js";import"./p-0c667d6a.js";import"./p-d27ae9ff.js";import"./p-5f377954.js";import"./p-5d676a94.js";import"./p-39482a1a.js";import"./p-d4893487.js";import"./p-8506e8c3.js";import"./p-02841589.js";import"./p-4c192985.js";import"./p-112455b1.js";import"./p-54ae02db.js";import"./p-b75ee3ba.js";import"./p-d884c644.js";import"./p-6a334573.js";import"./p-bccee21e.js";import"./p-db8cdba6.js";import"./p-a7b5f497.js";class fe{constructor(e,t){this.size=0,this.set=new Set,e&&(this.set=e,this.size=e.size),t&&(this.onMutate=t)}onMutate(e){}add(...e){return this.withMutation((t=>{e.forEach((e=>t.add(e)))}))}clear(){this.withMutation((e=>e.clear()))}delete(e){return this.withMutation((t=>{t.delete(e)}))}withMutation(e){const t=new Set(this.set);e(t);const i=new fe(t,this.onMutate);return this.onMutate(i),i}has(e){return this.set.has(e)}toArray(){return[...this.set]}}const we=["input","input-select","stepper","checkbox","textarea","combo-box","date-picker","time-picker"];var ge=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class me extends n{constructor(){super(...arguments),this.renderTableCellContent=(t,i,o)=>{var r,a;const s=f(i,t.prop),l=this.vegaTableDataSourceController.getRecordKey(i),n=!this.vegaTableDataSourceController.getDataSource().find((e=>this.vegaTableDataSourceController.getRecordKey(e)===l)),c=this.vegaTableEditableController.isEditing(l),h=this.vegaTableEditableController.getRowFormRefMap().get(l);if(c&&h&&t.renderFormItem)return t.renderFormItem(e,t.prop?s:l,i,o,{rowForm:h,isNewRow:n});if(c&&h&&t.editable){const e=null===(r=t.formItemProps)||void 0===r?void 0:r.call(t,h,{record:i,index:o}),l=Object.assign({dataVegaForm:(null==e?void 0:e.dataVegaForm)||t.prop,size:"small",value:s},null===(a=t.formItemProps)||void 0===a?void 0:a.call(t,h,{record:i,index:o}));return this.generateEditComponentByType(t.formItemType,l)}return t.render?t.render(e,t.prop?s:l,i,o):"string"==typeof s||"number"==typeof s?String(s):null==s?"":void d.error(`Column ${t.prop}'s value has a wrong type(${typeof i[t.prop]}) in table cell. Only 'VegaTableNode | string | number' can be rendered in table cell`)},this.generateEditComponentByType=(t="input",i)=>{const o=`vega-${t}`,{dataVegaForm:r}=i,a=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(i[o[r]]=e[o[r]])}return i}(i,["dataVegaForm"]);if(this.isVegaTableEditableFieldType(o))return e(o,Object.assign(Object.assign({},a),{"data-vega-form":r}));d.error(`Type must be one of the form field types. [${we.join(",")}]`)},this.isVegaTableEditableFieldType=e=>e.toUpperCase().startsWith("VEGA")&&new RegExp(we.join("|"),"i").test(e)}render(t,i,o){const r=this.columns.find((e=>e.key===t.key||e.prop===t.key||e.label===t.key));if(r){const a=this.vegaTableDataSourceController.getRecordKey(i);return e("vega-table-cell",{key:`${a}_${r.key||r.prop}`,textAlign:r.align,breakpoint:r.breakpoint,overflow:r.overflow,ref:e=>{this.vegaTableRenderInputController.addCellRenderInputMap(e,t)}},this.renderTableCellContent(r,i,o))}return e("vega-table-cell",{key:t.key,ref:e=>{this.vegaTableRenderInputController.addCellRenderInputMap(e,t)}})}}ge([l()],me.prototype,"rowKey",void 0),ge([l()],me.prototype,"columns",void 0),ge([l()],me.prototype,"vegaTableDataSourceController",void 0),ge([l()],me.prototype,"vegaTableEditableController",void 0),ge([l()],me.prototype,"vegaTableRenderInputController",void 0);var ye=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class xe extends n{constructor(){super(...arguments),this.toggleExpandRow=e=>{this.rowExpandable&&this.handleToggleExpandRow(e,!this.isExpanded(e))},this.openExpandRow=e=>{this.rowExpandable&&this.handleToggleExpandRow(e,!0)},this.closeExpandRow=e=>{this.rowExpandable&&this.handleToggleExpandRow(e,!1)},this.closeAllExpandRow=()=>{this.rowExpandable&&this.handleCloseAllExpandRow()},this.isExpanded=e=>this.expandedRowKeySet.has(e),this.handleCloseAllExpandRow=()=>{this.expandedRowKeySet.toArray().forEach((e=>{w.notify(g,{host:this.host,rowKey:e,expanded:!1})})),this.expandedRowKeySet.clear()},this.handleToggleExpandRow=(e,t)=>{t?this.expandedRowKeySet.add(e):this.expandedRowKeySet.delete(e),w.notify(g,{host:this.host,rowKey:e,expanded:t})},this.initMutationObserver=()=>{this.mutationObserver=new MutationObserver((async e=>{this.expandRowSlotGuard(e)&&t(this.host)})),this.mutationObserver.observe(this.host,{childList:!0,subtree:!0})},this.expandRowSlotGuard=e=>{const t=this.vegaTableDataSourceController.getCurrentData().map((e=>`${xe.expandRowSlotNamePrefix}${this.vegaTableDataSourceController.getRecordKey(e)}`)),i=[];for(let o=0;o<e.length;o++)Array.from(e[o].addedNodes).filter((e=>e instanceof HTMLElement&&e.getAttribute("slot"))).forEach((e=>{e.removeAttribute("hidden");const o=e.getAttribute("slot");t.includes(o)?i.push(e):d.warn(`The vega-table expand row slot name '${o}' is not as expected, it must be like: vega-table-expand-row-[rowKey]`)}));return i.length>0}}connectedCallback(){this.initRowExpandObserver()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect(),w.unregister(g,this.expandObserver),z.unRegister(E.getSubject(this.host,B))}componentDidLoad(){this.initMutationObserver()}watchRowExpandable(){this.handleCloseAllExpandRow()}initRowExpandObserver(){this.expandObserver=new S(this.isAcceptableTableRowObserver.bind({host:this.host}),(e=>{e.expanded?this.expandedRowKeySet.add(e.rowKey):this.expandedRowKeySet.delete(e.rowKey)})),w.register(g,this.expandObserver),z.register(E.getSubject(this.host,B),(({rowKey:e,expanded:t})=>this.rowExpandEventEmitter.emit({record:this.vegaTableDataSourceController.getRecordByKey(e),expanded:t})))}isAcceptableTableRowObserver(e){return"VEGA-TABLE-ROW"===e.host.tagName&&this.host===C(e.host,"vega-table")}}xe.expandRowSlotNamePrefix="vega-table-expand-row-",ye([l()],xe.prototype,"host",void 0),ye([l()],xe.prototype,"expandedRowKeySet",void 0),ye([l()],xe.prototype,"rowExpandable",void 0),ye([l()],xe.prototype,"rowExpandEventEmitter",void 0),ye([l()],xe.prototype,"vegaTableDataSourceController",void 0),ye([c("connectedCallback")],xe.prototype,"connectedCallback",null),ye([c("disconnectedCallback")],xe.prototype,"disconnectedCallback",null),ye([c("componentDidLoad")],xe.prototype,"componentDidLoad",null),ye([c("toggleExpandRow")],xe.prototype,"toggleExpandRow",void 0),ye([c("openExpandRow")],xe.prototype,"openExpandRow",void 0),ye([c("closeExpandRow")],xe.prototype,"closeExpandRow",void 0),ye([c("closeAllExpandRow")],xe.prototype,"closeAllExpandRow",void 0),ye([c("watchRowExpandable")],xe.prototype,"watchRowExpandable",null);var Re=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Se extends n{constructor(){super(...arguments),this.handleRowSelect=(e,t)=>{const i=this.vegaTableDataSourceController.getRecordKey(t);let o=!1;e?this.selectedRowKeySet.has(i)||(this.selectedRowKeySet.add(i),o=!0):this.selectedRowKeySet.has(i)&&(this.selectedRowKeySet.delete(i),o=!0),o&&this.selectChangeEventEmitter.emit({selected:e,record:t,selectedRows:this.getSelectedRecords()})},this.getRowSelectionType=()=>{if(this.rowSelection)return this.rowSelection.type||"multiple"},this.handleSingleRowSelect=e=>{const t=this.vegaTableDataSourceController.getRecordKey(e);this.isChecked(t)?this.handleRowSelect(!1,e):(this.selectedRowKeySet.clear(),this.handleRowSelect(!0,e))},this.isChecked=e=>this.selectedRowKeySet.has(e),this.handleSelectAll=e=>{if(e){const e=this.vegaTableDataSourceController.getAllRecordKeys();this.selectedRowKeySet.add(...e.filter((e=>!this.selectedRowKeySet.has(e))))}else this.isCheckedAll()&&this.selectedRowKeySet.clear()},this.isCheckedAll=()=>this.selectedRowKeySet.size>0&&this.vegaTableDataSourceController.getCurrentData().every((e=>this.selectedRowKeySet.has(this.vegaTableDataSourceController.getRecordKey(e)))),this.setupRowSelection=e=>{this.rowSelection=Object.assign({hideSelectAll:!1,type:"multiple"},e)},this.getSelectedRecords=()=>this.selectedRowKeySet.toArray().map(this.vegaTableDataSourceController.getRecordByKey).filter(Boolean),this.syncUpSelectedKeySetWithCurrentData=e=>{this.selectedRowKeySet.withMutation((t=>{t.clear(),e.forEach((e=>{const i=this.vegaTableDataSourceController.getRecordKey(e);this.selectedRowKeySet.has(i)&&t.add(i)}))}))}}connectedCallback(){this.initRowSelection(),this.initRowClickObserver(),this.initRowSelectionAllObserver()}disconnectedCallback(){w.unregister(m,this.rowSelectionObserver),w.unregister(y,this.rowSelectionAllObserver),w.unregister(x,this.rowClickObserver),z.unRegister(E.getSubject(this.host,V)),z.unRegister(E.getSubject(this.host,_))}componentWillLoad(){this.rowSelection&&this.setupRowSelection(this.rowSelection)}watchRowSelection(e,t){(null==t?void 0:t.type)!==(null==e?void 0:e.type)&&this.clearSelection()}setSelection(e){"single"===this.getRowSelectionType()&&e.splice(1),this.selectedRowKeySet.toArray().forEach((e=>{w.notify(m,{host:this.host,rowKey:e,checked:!1})})),this.selectedRowKeySet.clear(),e.forEach((e=>{this.vegaTableDataSourceController.getRecordByKey(e)&&(this.selectedRowKeySet.add(e),w.notify(m,{host:this.host,rowKey:e,checked:!0}))}))}watchCurrentData(e){this.syncUpSelectedKeySetWithCurrentData(e)}clearSelection(){this.selectedRowKeySet.clear(),w.notify(y,{host:this.host,checked:!1,noneChecked:0===this.selectedRowKeySet.size})}getSelection(){return this.selectedRowKeySet.toArray()}watchSelectedRowKeySet(){this.isSelectedAll=this.isCheckedAll()}watchSelectedAll(){w.notify(y,{host:this.host,checked:this.isCheckedAll(),noneChecked:0===this.selectedRowKeySet.size}),this.selectAllChangeEventEmitter.emit({selected:this.isCheckedAll(),selectedRows:this.getSelectedRecords()})}isAcceptableRowSelectionObserver(e){return"VEGA-TABLE"===e.host.tagName?this.host===e.host:"VEGA-TABLE-ROW"===e.host.tagName?this.host===C(e.host,"vega-table"):void 0}isAcceptableRowSelectionAllObserver(e){return"VEGA-TABLE"===e.host.tagName?this.host===e.host:"VEGA-TABLE-HEAD-ROW"===e.host.tagName?this.host===C(e.host,"vega-table"):void 0}initRowSelection(){this.rowSelectionObserver=new S(this.isAcceptableRowSelectionObserver.bind(this),(e=>{const{rowKey:t,checked:i}=e,o=this.vegaTableDataSourceController.getRecordByKey(t);this.handleRowSelect(i,o)})),w.register(m,this.rowSelectionObserver),z.register(E.getSubject(this.host,V),(({rowKey:e,checked:t})=>this.rowSelectEventEmitter.emit({selected:t,record:this.vegaTableDataSourceController.getRecordByKey(e),selectedRows:this.getSelectedRecords()}))),z.register(E.getSubject(this.host,_),(({checked:e})=>this.rowSelectAllEventEmitter.emit({selected:e,selectedRows:this.getSelectedRecords(),changedRows:e?this.vegaTableDataSourceController.getCurrentData().filter((e=>!this.selectedRowKeySet.has(e.key))):this.getSelectedRecords()})))}initRowSelectionAllObserver(){this.rowSelectionAllObserver=new S(this.isAcceptableRowSelectionAllObserver.bind(this),(e=>{this.handleSelectAll(e.checked)})),w.register(y,this.rowSelectionAllObserver)}initRowClickObserver(){this.rowClickObserver=new S(this.isAcceptableRowClickObserver.bind(this),(e=>{if("single"===this.getRowSelectionType()){const t=this.vegaTableDataSourceController.getRecordByKey(e.rowKey);this.handleSingleRowSelect(t)}})),w.register(x,this.rowClickObserver)}isAcceptableRowClickObserver(e){return"VEGA-TABLE-ROW"===e.host.tagName&&this.host===C(e.host,"vega-table")}}Re([l()],Se.prototype,"host",void 0),Re([l({writable:!0})],Se.prototype,"isSelectedAll",void 0),Re([l()],Se.prototype,"selectedRowKeySet",void 0),Re([l({writable:!0})],Se.prototype,"rowSelection",void 0),Re([l()],Se.prototype,"rowKey",void 0),Re([l()],Se.prototype,"selectChangeEventEmitter",void 0),Re([l()],Se.prototype,"selectAllChangeEventEmitter",void 0),Re([l()],Se.prototype,"vegaTableDataSourceController",void 0),Re([l()],Se.prototype,"rowSelectEventEmitter",void 0),Re([l()],Se.prototype,"rowSelectAllEventEmitter",void 0),Re([c("connectedCallback")],Se.prototype,"connectedCallback",null),Re([c("disconnectedCallback")],Se.prototype,"disconnectedCallback",null),Re([c("componentWillLoad")],Se.prototype,"componentWillLoad",null),Re([c("watchRowSelection")],Se.prototype,"watchRowSelection",null),Re([c("setSelection")],Se.prototype,"setSelection",null),Re([c("watchCurrentData")],Se.prototype,"watchCurrentData",null),Re([c("clearSelection")],Se.prototype,"clearSelection",null),Re([c("getSelection")],Se.prototype,"getSelection",null),Re([c("watchSelectedRowKeySet")],Se.prototype,"watchSelectedRowKeySet",null),Re([c("watchSelectedAll")],Se.prototype,"watchSelectedAll",null);var Ce=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ke extends n{constructor(){super(...arguments),this.getRecordKey=e=>null!=e[this.rowKey]?String(e[this.rowKey]):"",this.getRecordByKey=e=>this.currentData.find((t=>this.getRecordKey(t)===e)),this.setCurrentData=e=>{this.currentData=this.tableDataValidation(e)?e:[]}}componentWillLoad(){this.vegaTableSortController.syncSortOrder(),this.syncCurrentData()}watchSortersMap(){this.syncCurrentData()}watchDataSource(){this.syncCurrentData()}getAllRecordKeys(){return this.currentData.map(this.getRecordKey)}getDataSource(){return this.dataSource}setDataSource(e){this.dataSource=e}getCurrentData(){return this.currentData}isCurrentDataEmpty(){return 0===this.currentData.length}tableDataValidation(e){return!e.some((e=>!this.getRecordKey(e)))||(d.error('Each item in dataSource should have a unique "key" prop.'," Otherwise, you should specify the primary key of dataSource item via rowKey."," For more details, please refer to: https://heartlandpayments.github.io/Vega/?path=/docs/components-table-v2--basic-table#rowkey"),!1)}syncCurrentData(){if(this.isTemplateRenderMode)return;const e=this.sortersMap.size>0?this.columns.filter((e=>e.sorter&&"event"!==e.sorter&&this.sortersMap.has(e.prop))):[];this.setCurrentData(e.length>0?this.vegaTableSortController.sortData(this.dataSource,Array.from(this.sortersMap.values())):this.dataSource)}}Ce([l()],ke.prototype,"rowKey",void 0),Ce([l({writable:!0})],ke.prototype,"currentData",void 0),Ce([l({writable:!0})],ke.prototype,"dataSource",void 0),Ce([l()],ke.prototype,"columns",void 0),Ce([l()],ke.prototype,"sortersMap",void 0),Ce([l()],ke.prototype,"vegaTableSortController",void 0),Ce([l()],ke.prototype,"vegaTableRenderer",void 0),Ce([l()],ke.prototype,"isTemplateRenderMode",void 0),Ce([c("componentWillLoad")],ke.prototype,"componentWillLoad",null),Ce([c("watchSortersMap")],ke.prototype,"watchSortersMap",null),Ce([c("watchDataSource")],ke.prototype,"watchDataSource",null);var je=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ee extends n{constructor(){super(...arguments),this.renderTableBody=t=>{const o=this.vegaTableDataSourceController.getCurrentData();return e("vega-table-body",null,o.map(((r,a)=>{const s=this.vegaTableDataSourceController.getRecordKey(r),l=this.vegaTablePaginationController.isRowVisible(a);return e(i,null,this.vegaTableRowRenderer.render({rowKey:s,index:a,record:r,isVisibleInCurrentPage:l,isLastRow:a===o.length-1},t),this.rowExpandable&&e("vega-table-expand-row",{class:{"v-hidden":!l},key:`vega-table-expanded-row-${s}`,rowKey:s,striped:this.striped&&a%2==1},e("slot",{name:`${xe.expandRowSlotNamePrefix}${s}`})))})))}}getTableFormRef(){return this.tableFormRef}render(){const t=this.columnStructureModel.generateColumnConfigByLeaves(this.columns).some((e=>null==e?void 0:e.editable));return t?e("vega-form",{ref:e=>this.tableFormRef=e},this.renderTableBody(t)):this.renderTableBody(!1)}}je([l()],Ee.prototype,"striped",void 0),je([l()],Ee.prototype,"rowDivider",void 0),je([l()],Ee.prototype,"columns",void 0),je([l()],Ee.prototype,"currentBreakpoint",void 0),je([l()],Ee.prototype,"rowExpandable",void 0),je([l()],Ee.prototype,"rowClickable",void 0),je([l()],Ee.prototype,"vegaTableDataSourceController",void 0),je([l()],Ee.prototype,"vegaTablePaginationController",void 0),je([l()],Ee.prototype,"vegaTableRowSelectionController",void 0),je([l()],Ee.prototype,"vegaTableRowRenderer",void 0),je([l()],Ee.prototype,"columnStructureModel",void 0);var Oe=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Te extends n{constructor(){super(...arguments),this.renderHeaderRows=()=>{const t=[];let i=this.vegaTableRenderInputController.getHeadRenderInputs();for(;i.length>0;)t.push(i),i=i.flatMap((e=>e.children));return t.map((t=>{var i;return e("vega-table-head-row",{hideSelectAll:null===(i=this.rowSelection)||void 0===i?void 0:i.hideSelectAll,ref:e=>{this.vegaTableRenderInputController.addHeadRowRenderInputMap(e,t)}},t.map((e=>{if(e.label)return this.renderGroupCell(e);{const t=this.columns.find((t=>t.key===e.key||t.prop===e.key||t.label===e.key));return this.renderCell(e,t)}})))}))},this.renderGroupCell=t=>e("vega-table-head-cell",{key:t.key,ref:e=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(e,t)}},t.label),this.renderCell=(t,i)=>{var o;return i?e("vega-table-head-cell",{key:i.key||i.prop,textAlign:i.align,sorter:i.sorter,sortOrder:null===(o=this.sortersMap.get(i.prop))||void 0===o?void 0:o.getSortOrder(),sortConfig:this.sortConfig,breakpoint:i.breakpoint,ref:e=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(e,t),O.addUniqueObserverToNode(e,T,(e=>{this.vegaTableSortController.handleHeadSortClick(i,e.detail.sortOrder)}))}},i.label):e("vega-table-head-cell",{key:t.key,ref:e=>{this.vegaTableRenderInputController.addHeadCellRenderInputMap(e,t)}})}}render(){return this.showHeader&&e("vega-table-head",null,this.renderHeaderRows())}}Oe([l()],Te.prototype,"showHeader",void 0),Oe([l()],Te.prototype,"sortersMap",void 0),Oe([l()],Te.prototype,"sortConfig",void 0),Oe([l()],Te.prototype,"columns",void 0),Oe([l()],Te.prototype,"rowSelection",void 0),Oe([l()],Te.prototype,"vegaTableSortController",void 0),Oe([l()],Te.prototype,"vegaTableDataSourceController",void 0),Oe([l()],Te.prototype,"vegaTableRenderInputController",void 0);var De=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ae extends n{constructor(){super(...arguments),this.paginationRefCallback=e=>{O.addUniqueObserverToNode(e,D,this.handlePaginationChange),O.addUniqueObserverToNode(e,A,this.handlePaginationPageSizeChange)},this.handlePaginationChange=e=>{var t,i;this.vegaTablePaginationController.setCurrentPage(e.detail);const o=new CustomEvent("vegaChange",{detail:e.detail});null===(i=(t=this.pagination).vegaChange)||void 0===i||i.call(t,o)},this.handlePaginationPageSizeChange=e=>{var t,i;this.vegaTablePaginationController.setPageSize(e.detail);const o=new CustomEvent("vegaPageSizeChange",{detail:e.detail});null===(i=(t=this.pagination).vegaPageSizeChange)||void 0===i||i.call(t,o)},this.getPaginationConfig=()=>{const e=this.pagination,{position:t}=e,i=function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(i[o[r]]=e[o[r]])}return i}(e,["position"]),o=H.formatCustom(this.pagination.extensions);return Object.assign(Object.assign({},i),{position:(null==o?void 0:o.length)>1?void 0:t||"bottom-center",pageSize:this.pageSize})}}render(){if(!this.pagination)return;const{pageSize:t,position:i,extensions:o,pageSizeSelectorOptions:r}=this.getPaginationConfig(),a=["vega-table-pagination-container",i],s=this.vegaTableDataSourceController.getCurrentData().length;return s>0&&e("div",{class:k(a)},e("vega-pagination",{total:s,pageSize:t,current:this.currentPage,extensions:o,pageSizeSelectorOptions:r,ref:this.paginationRefCallback}))}}De([l()],Ae.prototype,"pagination",void 0),De([l()],Ae.prototype,"pageSize",void 0),De([l()],Ae.prototype,"currentPage",void 0),De([l()],Ae.prototype,"vegaTablePaginationController",void 0),De([l()],Ae.prototype,"vegaTableDataSourceController",void 0);const Le=({scrollConfig:t={},ref:i,onScroll:o},r)=>{const{maxHeight:a}=t,s=U(a);return e("div",{class:"vega-table-scrollable-container",style:{maxHeight:"number"==typeof a?`${a}px`:a},ref:i,onScroll:e=>{if(!s)return;const t=e.target;0!==t.scrollTop?(t.scrollTop>0&&!t.classList.contains("scrolled")&&t.classList.add("scrolled"),o(e)):t.classList.remove("scrolled")}},r)};var Me=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ne extends n{constructor(){super(...arguments),this.scrollContainerToTop=()=>{this.tableScrollContainerRef&&(this.tableScrollContainerRef.scrollTop=0)},this.notifyContentScrolling=()=>{this.isTemplateRenderMode&&w.notify(R,{host:this.host})}}watchCurrentPage(){this.scrollContainerToTop()}render(t){return e(Le,{scrollConfig:this.scrollConfig,ref:e=>this.setTableScrollContainerRef(e),onScroll:()=>this.notifyContentScrolling()},t)}setTableScrollContainerRef(e){this.tableScrollContainerRef=e}}Me([l()],Ne.prototype,"scrollConfig",void 0),Me([l()],Ne.prototype,"host",void 0),Me([l()],Ne.prototype,"isTemplateRenderMode",void 0),Me([c("watchCurrentPage")],Ne.prototype,"watchCurrentPage",null);var Pe=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class We extends n{constructor(){super(...arguments),this.renderInternalTable=()=>{const t=this.columns.some((e=>e.overflow))||Array.from(this.host.querySelectorAll("vega-table-cell")).some((e=>e.overflow));return e("table",{class:{"v-table-fixed":t}},this.columns.length>0&&[this.vegaTableColGroupRenderer.render(),this.vegaTableHeaderRenderer.render()],(this.dataSource.length>0||this.editingRows.size>0)&&this.vegaTableBodyRenderer.render(),this.isTemplateRenderMode&&e("slot",null))},this.renderEmpty=()=>this.vegaTableDataSourceController.isCurrentDataEmpty()&&this.emptyDescription&&e("div",{class:"vega-table-empty-description"},this.translationSlimmer.t(this.emptyDescription))}render(){const t=k([this.rowDivider&&"row-divider",this.columnDivider&&"column-divider",`density-${H.formatCustom(this.density)}`,this.striped&&"striped",this.columnStructureModel.hasGroupColumn()&&"is-group-table",(this.columnStructureModel.hasLeftPinnedColumn()||this.columnStructureModel.hasRightPinnedColumn())&&"is-pinned-table"]);return Q(e(o,{class:t},this.vegaTableScrollContainerRenderer.render(this.renderInternalTable()),this.vegaTablePaginationRenderer.render(),this.renderEmpty()),this.host)}}Pe([l()],We.prototype,"host",void 0),Pe([l()],We.prototype,"columns",void 0),Pe([l()],We.prototype,"emptyDescription",void 0),Pe([l()],We.prototype,"rowDivider",void 0),Pe([l()],We.prototype,"columnDivider",void 0),Pe([l()],We.prototype,"density",void 0),Pe([l()],We.prototype,"dataSource",void 0),Pe([l()],We.prototype,"striped",void 0),Pe([l()],We.prototype,"columnStructureModel",void 0),Pe([l()],We.prototype,"vegaTableHeaderRenderer",void 0),Pe([l()],We.prototype,"vegaTableBodyRenderer",void 0),Pe([l()],We.prototype,"vegaTableColGroupRenderer",void 0),Pe([l()],We.prototype,"vegaTableScrollContainerRenderer",void 0),Pe([l()],We.prototype,"vegaTablePaginationRenderer",void 0),Pe([l()],We.prototype,"vegaTableDataSourceController",void 0),Pe([l()],We.prototype,"translationSlimmer",void 0),Pe([l({writable:!0})],We.prototype,"vegaTableChildrenController",void 0),Pe([l()],We.prototype,"isTemplateRenderMode",void 0),Pe([l()],We.prototype,"editingRows",void 0);var Ke=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ie extends n{componentWillLoad(){var e,t;this.currentPage=(null===(e=this.pagination)||void 0===e?void 0:e.current)||1,this.pageSize=(null===(t=this.pagination)||void 0===t?void 0:t.pageSize)||10}watchPagination(){if(this.pagination){const{pageSize:e,current:t}=this.pagination;e>0&&(this.pageSize=e),t>0&&(this.currentPage=t)}}setPageSize(e){this.pageSize=e}setCurrentPage(e){this.currentPage=e}isRowVisible(e){if(!this.pagination)return!0;const t=this.pageSize,i=this.currentPage;return e>=(i-1)*t&&e<i*t}}Ke([l()],Ie.prototype,"pagination",void 0),Ke([l({writable:!0})],Ie.prototype,"pageSize",void 0),Ke([l({writable:!0})],Ie.prototype,"currentPage",void 0),Ke([c("componentWillLoad")],Ie.prototype,"componentWillLoad",null),Ke([c("watchPagination")],Ie.prototype,"watchPagination",null);var ze=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Be extends n{constructor(){super(...arguments),this.rowFormRefMap=new Map}getRowFormRefMap(){return this.rowFormRefMap}async saveAllEditRows(){if(!this.canMethodBeInvokedInCurrentState("saveAllEditRows"))return;const e=this.vegaTableDataSourceController.getCurrentData().slice();for(const t of this.editingRows.toArray()){const i=await this.getRowData(t),o=e.findIndex((e=>this.vegaTableDataSourceController.getRecordKey(e)===t));o>-1&&e.splice(o,1,i)}this.vegaTableDataSourceController.setDataSource([...e]),this.stopAllRowEditMode()}stopAllRowEditMode(){this.canMethodBeInvokedInCurrentState("stopAllRowEditMode")&&this.editingRows.clear()}watchDataSource(e){this.isEditableTable()&&this.getEditingRowsKey().forEach((t=>{e.find((e=>e.key===t))||this.stopRowEditMode(t)}))}async saveEditRow(e){if(!this.canMethodBeInvokedInCurrentState("saveEditRow"))return;const t=await this.getRowData(e),i=this.vegaTableDataSourceController.getCurrentData().slice(),o=i.findIndex((t=>this.vegaTableDataSourceController.getRecordKey(t)===e));o>-1&&(i.splice(o,1,t),this.vegaTableDataSourceController.setDataSource([...i])),this.stopRowEditMode(e)}stopRowEditMode(e){this.canMethodBeInvokedInCurrentState("stopRowEditMode")&&this.editingRows.delete(e)}removeRow(e){this.canMethodBeInvokedInCurrentState("removeRow")&&this.vegaTableDataSourceController.setDataSource(this.vegaTableDataSourceController.getCurrentData().filter((t=>this.vegaTableDataSourceController.getRecordKey(t)!==e)))}startRowEditMode(e){this.canMethodBeInvokedInCurrentState("startRowEditMode")&&this.editingRows.add(e)}addNewRow(e={}){var t;if(!this.canMethodBeInvokedInCurrentState("addNewRow"))return;const i=(null===(t=e[this.rowKey])||void 0===t?void 0:t.toString())||Z(),o=Object.assign({},e);return o[this.rowKey]=i,this.vegaTableDataSourceController.setCurrentData([...this.vegaTableDataSourceController.getCurrentData(),o]),this.editingRows.add(i),i}async getRowsData(){if(!this.canMethodBeInvokedInCurrentState("getRowsData"))return;const e=this.vegaTableBodyRenderer.getTableFormRef(),t=e?await e.getValue():[];return[...this.vegaTableDataSourceController.getCurrentData().map((e=>{const i=t[`${Be.rowFormKeyPrefix}${this.vegaTableDataSourceController.getRecordKey(e)}`];return Object.assign(Object.assign({},e),i)}))]}getEditingRowsKey(){if(this.canMethodBeInvokedInCurrentState("getEditingRowsKey"))return this.editingRows.toArray()}getFormRef(e){if(this.canMethodBeInvokedInCurrentState("getFormRef"))return e?this.rowFormRefMap.get(e):this.vegaTableBodyRenderer.getTableFormRef()}async getRowData(e){if(!this.canMethodBeInvokedInCurrentState("getRowData"))return;const t=await this.rowFormRefMap.get(e).getValue();return Object.assign(Object.assign({},this.vegaTableDataSourceController.getRecordByKey(e)),t)}isEditing(e){return this.editingRows.has(e)}isEditableTable(){return this.columns.some((e=>e.editable))}canMethodBeInvokedInCurrentState(e){return!!this.isEditableTable()||(d.warn(`Method ${e} only works with editable tables`),!1)}}Be.rowFormKeyPrefix="vega-table-row-form-",ze([l()],Be.prototype,"editingRows",void 0),ze([l()],Be.prototype,"rowKey",void 0),ze([l()],Be.prototype,"columns",void 0),ze([l()],Be.prototype,"vegaTableDataSourceController",void 0),ze([l()],Be.prototype,"vegaTableBodyRenderer",void 0),ze([c("saveAllEditRows")],Be.prototype,"saveAllEditRows",null),ze([c("stopAllRowEditMode")],Be.prototype,"stopAllRowEditMode",null),ze([c("watchDataSource")],Be.prototype,"watchDataSource",null),ze([c("saveEditRow")],Be.prototype,"saveEditRow",null),ze([c("stopRowEditMode")],Be.prototype,"stopRowEditMode",null),ze([c("removeRow")],Be.prototype,"removeRow",null),ze([c("startRowEditMode")],Be.prototype,"startRowEditMode",null),ze([c("addNewRow")],Be.prototype,"addNewRow",null),ze([c("getRowsData")],Be.prototype,"getRowsData",null),ze([c("getEditingRowsKey")],Be.prototype,"getEditingRowsKey",null),ze([c("getFormRef")],Be.prototype,"getFormRef",null),ze([c("getRowData")],Be.prototype,"getRowData",null);class Ve{constructor(e,t,i){this.prop=e,this.order=t,this.sorter=i}sort(e,t){const i=this.sorter(e,t);if(0!==i)return"asc"===this.order?i:-i}toExternalFormat(){return{prop:this.prop,order:this.order}}getSortOrder(){return this.order}}var _e=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ge extends n{watchColumns(){this.syncSortOrder()}handleHeadSortClick(e,t){"single"===this.sortConfig.type&&this.sortersMap.clear(),t?this.sortersMap.set(e.prop,new Ve(e.prop,t,e.sorter)):this.sortersMap.has(e.prop)&&this.sortersMap.delete(e.prop),"event"!==e.sorter&&this.vegaTableDataSourceController.setCurrentData(this.sortData(this.vegaTableDataSourceController.getDataSource(),Array.from(this.sortersMap.values()))),this.changeEventEmitter.emit({sorters:Array.from(this.sortersMap.values()).map((e=>e.toExternalFormat()))})}syncSortOrder(){this.columns.filter((e=>U(e.sorter)&&U(e.sortOrder))).forEach((e=>{this.sortersMap.set(e.prop,new Ve(e.prop,e.sortOrder,e.sorter))}))}sortData(e,t){return[...e].sort(((e,i)=>{for(const o of t){const t=o.sort(e,i);if(U(t))return t}return 0}))}}_e([l({writable:!0})],Ge.prototype,"sortersMap",void 0),_e([l()],Ge.prototype,"columns",void 0),_e([l()],Ge.prototype,"changeEventEmitter",void 0),_e([l()],Ge.prototype,"vegaTableDataSourceController",void 0),_e([l()],Ge.prototype,"sortConfig",void 0),_e([c("watchColumns")],Ge.prototype,"watchColumns",null);var $e=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Fe extends n{constructor(){super(...arguments),this.getColResponsiveClass=e=>e.breakpoint&&Y(e.breakpoint)?`v-hidden ${e.breakpoint}:v-table-column`:""}render(){return e("colgroup",null,e("col",{style:{minWidth:this.paddingX[0],width:this.paddingX[0]}}),"multiple"===this.vegaTableRowSelectionController.getRowSelectionType()&&e("col",{style:{minWidth:"40px",width:"40px"}}),this.columnStructureModel.generateColumnConfigByLeaves(this.columns).map((t=>{if(t){const i=this.getColResponsiveClass(t);return e("col",{class:i,style:{width:t.width?t.width:null}})}return e("col",null)})),this.rowExpandable&&e("col",{style:{minWidth:"40px",width:"40px"}}),e("col",{style:{minWidth:this.paddingX[1],width:this.paddingX[1]}}))}}$e([l()],Fe.prototype,"paddingX",void 0),$e([l()],Fe.prototype,"columnStructureModel",void 0),$e([l()],Fe.prototype,"columns",void 0),$e([l()],Fe.prototype,"rowExpandable",void 0),$e([l()],Fe.prototype,"vegaTableRowSelectionController",void 0);var Xe=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class He extends n{constructor(){super(...arguments),this.currentDataObserver=new te({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:ie("VEGA-TABLE-BODY","VEGA-TABLE-ROW"),callback:()=>{this.syncUpTableCurrentData(),this.syncUpTableHeadRowProps()}}),this.rowStripedObserver=new te({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:ie("VEGA-TABLE-BODY","VEGA-TABLE-ROW","VEGA-TABLE-EXPAND-ROW"),callback:()=>{this.syncRowStates()}}),this.syncUpTableCurrentData=()=>{if(!this.isTemplateRenderMode)return;const e=Array.from(this.host.querySelectorAll("vega-table-row")).map((e=>({key:e.rowKey})));this.vegaTableDataSourceController.setCurrentData(e)},this.syncRowStates=()=>{const e=this.host.querySelectorAll("vega-table-row");e.forEach(((t,i)=>{this.updateRowStriped(t,i),this.updateRowDivider(t,i===e.length-1)})),this.host.querySelectorAll("vega-table-expand-row").forEach(((e,t)=>{this.updateRowStriped(e,t)}))},this.syncUpTableHeadRowProps=()=>{var e;if(!this.isTemplateRenderMode)return;const t=this.host.querySelector("vega-table-head-row");t&&(t.hideSelectAll=t.hideSelectAll||(null===(e=this.rowSelection)||void 0===e?void 0:e.hideSelectAll))}}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.syncUpTableCurrentData(),this.syncUpTableHeadRowProps(),this.syncRowStates()}componentDidLoad(){}clearSelection(){w.notify(y,{host:this.host,checked:!1,noneChecked:!0})}watchStriped(){this.syncRowStates()}watchRowDivider(){this.syncRowStates()}updateRowStriped(e,t){e.striped=this.striped&&t%2==1}updateRowDivider(e,t){e.rowDivider=this.rowDivider&&!t}}Xe([l()],He.prototype,"host",void 0),Xe([l()],He.prototype,"columns",void 0),Xe([l()],He.prototype,"dataSource",void 0),Xe([l()],He.prototype,"currentData",void 0),Xe([l()],He.prototype,"rowSelection",void 0),Xe([l()],He.prototype,"striped",void 0),Xe([l()],He.prototype,"rowDivider",void 0),Xe([l()],He.prototype,"vegaTableDataSourceController",void 0),Xe([l()],He.prototype,"vegaTableRenderer",void 0),Xe([l()],He.prototype,"isTemplateRenderMode",void 0),Xe([h()],He.prototype,"currentDataObserver",void 0),Xe([h()],He.prototype,"rowStripedObserver",void 0),Xe([c("connectedCallback")],He.prototype,"connectedCallback",null),Xe([c("disconnectedCallback")],He.prototype,"disconnectedCallback",null),Xe([c("componentWillLoad")],He.prototype,"componentWillLoad",null),Xe([c("componentDidLoad")],He.prototype,"componentDidLoad",null),Xe([c("clearSelection")],He.prototype,"clearSelection",null),Xe([c("watchStriped")],He.prototype,"watchStriped",null),Xe([c("watchRowDivider")],He.prototype,"watchRowDivider",null);var Ue=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ye extends n{constructor(){super(...arguments),this.renderTableRowComponent=t=>{const{rowKey:i,index:o,record:r,isVisibleInCurrentPage:a}=t,s=this.vegaTableRenderInputController.getLeafRenderInputs();return e("vega-table-row",{class:{"v-hidden":!a},key:`vega-table-row-${i}`,rowKey:i,ref:e=>{O.addUniqueObserverToNode(e,T,(()=>{this.rowClickEventEmitter.emit({record:r,index:o})}))},striped:this.striped&&o%2==1,rowDivider:this.rowDivider&&!t.isLastRow},s.map((e=>this.vegaTableCellRenderer.render(e,r,o))))}}render(t,i){const{rowKey:o}=t;return i?e("vega-form",{key:`vega-table-row-form-${o}`,"data-vega-form":`${Be.rowFormKeyPrefix}${o}`,ref:e=>this.vegaTableEditableController.getRowFormRefMap().set(o,e)},this.renderTableRowComponent(t)):this.renderTableRowComponent(t)}}Ue([l()],Ye.prototype,"rowClickEventEmitter",void 0),Ue([l()],Ye.prototype,"vegaTableEditableController",void 0),Ue([l()],Ye.prototype,"vegaTableCellRenderer",void 0),Ue([l()],Ye.prototype,"striped",void 0),Ue([l()],Ye.prototype,"rowDivider",void 0),Ue([l()],Ye.prototype,"vegaTableRenderInputController",void 0);var qe=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Qe extends n{constructor(){super(...arguments),this.currentDataObserver=new te({target:()=>this.host,options:{childList:!0,subtree:!0},mutationFilter:ie("VEGA-TABLE-ROW"),callback:()=>{this.isTemplateRenderMode=this.checkIsTemplateRenderMode(this.host)}}),this.checkIsTemplateRenderMode=e=>Array.from(e.children).some((e=>e.tagName.startsWith("VEGA-TABLE-")))}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){this.isTemplateRenderMode=this.checkIsTemplateRenderMode(this.host)}componentDidLoad(){}}qe([l()],Qe.prototype,"host",void 0),qe([l({writable:!0})],Qe.prototype,"isTemplateRenderMode",void 0),qe([h()],Qe.prototype,"currentDataObserver",void 0),qe([c("connectedCallback")],Qe.prototype,"connectedCallback",null),qe([c("disconnectedCallback")],Qe.prototype,"disconnectedCallback",null),qe([c("componentWillLoad")],Qe.prototype,"componentWillLoad",null),qe([c("componentDidLoad")],Qe.prototype,"componentDidLoad",null);const Ze=[{payloadKey:"IS_USING_TEMPLATE",payloadDescription:"Contains the data records to be rendered and displayed within the table",payloadValue:e=>0===e.dataSource.length},{payloadKey:"IS_USING_DATA_SOURCE",payloadDescription:"Contains the data records to be rendered and displayed within the table",payloadValue:e=>e.dataSource.length>0}];class Je{constructor(e,t,i,o,r){this.key=e,this.level=t,this.parent=i,this.label=o,this.pinned=r,this.leaves=[],this.orderedChildren=[],this.iteratorCacheMap=new Map}static from(e,t){const i=new Je(this.ROOT_KEY,Je.ROOT_LEVEL);return t?(i.children=this.fromGroupColumns(i,t),i):e?(i.children=e.map((e=>new Je(e.key||e.prop||e.label,0,i,null,e.pinned))),i):(i.children=[],i)}static fromGroupColumns(e,t,i=0){return t&&t.length>0?t.map((t=>{if(q(t)){const o=new Je(t.key,i,e,t.label,t.pinned);return o.children=this.fromGroupColumns(o,t.children,i+1),o}return new Je(t.key,i,e)})):[]}generateColumnConfigByLeaves(e){return this.getLeaves().map((t=>e.find((e=>e.key===t.key||e.prop===t.key||e.label===t.key))))}getMaxDepth(){const e=this.dfsIterator();return 0===e.length?0:Math.max(...e.map((e=>e.level)))+1}hasGroupColumn(){return!!this.children.find((e=>!e.isLeaf()))}hasLeftPinnedColumn(){return!!this.children.find((e=>"left"===e.pinned))}hasRightPinnedColumn(){return!!this.children.find((e=>"right"===e.pinned))}isLeaf(){return!this.children||0===this.children.length}iterator(e="dfs"){return"dfs"===e?this.dfsIterator():[]}getLeaves(){if(this.leaves.length>0)return this.leaves;const e=this.dfsIterator().filter((e=>e.isLeaf()));return this.leaves=e,e}getOrderedChildren(){return this.isRoot()?this.orderedChildren:this.children}orderChildrenByPinned(){if(!this.isRoot())return this.children;if(this.orderedChildren.length>0)return this.orderedChildren;const e=[],t=[],i=[];this.children.forEach((o=>{"left"===o.pinned?e.push(o):"right"===o.pinned?i.push(o):t.push(o)}));const o=[...e,...t,...i];return this.orderedChildren=o,o}isRoot(){return this.level===Je.ROOT_LEVEL}dfsIterator(){if(this.iteratorCacheMap.has("dfs"))return this.iteratorCacheMap.get("dfs");const e=[],t=this.orderChildrenByPinned();return this.isRoot()||e.push(this),t&&t.length>0&&t.forEach((t=>{e.push(...t.dfsIterator())})),this.iteratorCacheMap.set("dfs",e),e}}Je.ROOT_LEVEL=-1,Je.ROOT_KEY="#root-model#";var et=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class tt extends n{componentWillLoad(){this.setColumnStructureModel()}watchColumns(){this.setColumnStructureModel()}watchGroupColumns(){this.setColumnStructureModel()}setColumnStructureModel(){this.columnStructureModel=Je.from(this.columns,this.groupColumns)}}et([l()],tt.prototype,"host",void 0),et([l()],tt.prototype,"columns",void 0),et([l()],tt.prototype,"groupColumns",void 0),et([l({writable:!0})],tt.prototype,"columnStructureModel",void 0),et([c("componentWillLoad")],tt.prototype,"componentWillLoad",null),et([c("watchColumns")],tt.prototype,"watchColumns",null),et([c("watchGroupColumns")],tt.prototype,"watchGroupColumns",null);class it{constructor(e,t,i,o,r,a,s,l,n,d,c,h,p,v,b,u,f=[]){this.key=e,this.label=t,this.pinned=i,this.colSpan=o,this.rowSpan=r,this.isViewStart=a,this.isViewEnd=s,this.isLeftEndPinned=l,this.isRightStartPinned=n,this.isNoPinnedEnd=d,this.headHasGroupColumn=c,this.headHasPinnedColumn=h,this.headMaxDepth=p,this.level=v,this.columnIndex=b,this.parent=u,this.children=f,this.iteratorCacheMap=new Map,this.leaves=[]}static from(e){const t=[],i=[],o=e.getMaxDepth(),r=e.hasGroupColumn(),a=e.hasLeftPinnedColumn()||e.hasRightPinnedColumn();let s=0;return e.iterator().forEach((e=>{const l=e.level>0?i[e.level-1]:null,n=r&&this.isParentStart(e),d=r&&this.isParentEnd(e),c=new it(e.key,e.label,l?l.pinned:e.pinned,r?this.getColSpan(e):null,r?e.isLeaf()?o-e.level:1:null,l?l.isViewStart&&n:n,l?l.isViewEnd&&d:d,l?l.isLeftEndPinned&&d:a&&this.isLeftEndPinned(e),l?l.isRightStartPinned&&n:a&&this.isRightStartPinned(e),l?l.isNoPinnedEnd&&d:a&&this.isNoPinnedEnd(e),r,a,o,e.level,s,l);l?l.children.push(c):t.push(c),i[e.level]=c,i.length=e.level+1,e.isLeaf()&&s++})),t}static isLeftEndPinned(e){const t=e.parent.getOrderedChildren().filter((e=>"left"===e.pinned));return t[t.length-1]===e}static isRightStartPinned(e){return e.parent.getOrderedChildren().filter((e=>"right"===e.pinned))[0]===e}static isNoPinnedEnd(e){const t=e.parent.getOrderedChildren().filter((e=>!e.pinned));return t[t.length-1]===e}static isParentStart(e){return e.parent.getOrderedChildren()[0]===e}static isParentEnd(e){const t=e.parent.getOrderedChildren();return t[t.length-1]===e}static getColSpan(e){const t=e.iterator(),i={};return t.forEach((e=>{i[e.level]=(i[e.level]||0)+1})),Math.max(...Object.values(i))}getLeaves(){if(this.leaves.length>0)return this.leaves;const e=this.iterator().filter((e=>e.isLeaf()));return this.leaves=e,e}iterator(e="dfs"){return"dfs"===e?this.dfsIterator():[]}dfsIterator(){if(this.iteratorCacheMap.has("dfs"))return this.iteratorCacheMap.get("dfs");const e=[];return e.push(this),this.children&&this.children.length>0&&this.children.forEach((t=>{e.push(...t.dfsIterator())})),this.iteratorCacheMap.set("dfs",e),e}isLeaf(){return!this.children||0===this.children.length}}var ot=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class rt extends n{constructor(){super(...arguments),this.headRowRenderInputMap=new Map,this.headCellRenderInputMap=new Map,this.pinnedColumnBodyCellRenderInputMap=new Map}connectedCallback(){this.registerRenderInputRICObserver()}disconnectedCallback(){this.unRegisterRenderInputRICObserver()}componentWillLoad(){this.setRenderInputModel()}watchColumnStructureModel(){this.setRenderInputModel()}getLeafRenderInputs(){return this.leavesRenderInputModels}getHeadRenderInputs(){return this.columnRenderInputModels}addHeadRowRenderInputMap(e,t){this.headRowRenderInputMap.set(e,t)}addHeadCellRenderInputMap(e,t){this.headCellRenderInputMap.set(e,t)}addCellRenderInputMap(e,t){(e&&["left","right"].includes(t.pinned)||t.isNoPinnedEnd)&&this.pinnedColumnBodyCellRenderInputMap.set(e,t)}getHeadCellRenderInputMap(){return this.headCellRenderInputMap}getPinnedColumnBodyCellRenderInputMap(){return this.pinnedColumnBodyCellRenderInputMap}registerRenderInputRICObserver(){z.register(E.getSubject(this.host,G),(e=>this.headRowRenderInputMap.get(e))),z.register(E.getSubject(this.host,$),(e=>this.headCellRenderInputMap.get(e))),z.register(E.getSubject(this.host,F),(e=>this.pinnedColumnBodyCellRenderInputMap.get(e)))}unRegisterRenderInputRICObserver(){z.unRegister(E.getSubject(this.host,G)),z.unRegister(E.getSubject(this.host,$)),z.unRegister(E.getSubject(this.host,F))}setRenderInputModel(){this.columnRenderInputModels=it.from(this.columnStructureModel),this.leavesRenderInputModels=this.columnRenderInputModels.flatMap((e=>e.getLeaves()))}}ot([l()],rt.prototype,"host",void 0),ot([l()],rt.prototype,"columnStructureModel",void 0),ot([l()],rt.prototype,"vegaTableColGroupRenderer",void 0),ot([c("connectedCallback")],rt.prototype,"connectedCallback",null),ot([c("disconnectedCallback")],rt.prototype,"disconnectedCallback",null),ot([c("componentWillLoad")],rt.prototype,"componentWillLoad",null),ot([c("watchColumnStructureModel")],rt.prototype,"watchColumnStructureModel",null);var at=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class st extends n{constructor(){super(...arguments),this.pageResizeObserverSlimmer=new J({target:()=>this.host.shadowRoot.querySelector("table"),isDeferred:!0,callback:async()=>{await this.host.componentOnReady().then((()=>{this.updateTableRowPinnedPosition(),this.updateTableCellPinnedPosition()}))}})}componentDidLoad(){}componentDidRender(){this.updateTableRowPinnedPosition(),this.updateTableCellPinnedPosition()}updateTableCellPinnedPosition(){if(!this.columnStructureModel.hasLeftPinnedColumn()&&!this.columnStructureModel.hasRightPinnedColumn())return;if(!this.host.shadowRoot.querySelector("vega-table-head-row"))return;const e=this.vegaTableRenderInputController.getHeadCellRenderInputMap(),t=this.vegaTableRenderInputController.getPinnedColumnBodyCellRenderInputMap(),[i,o]=this.getRowShadowThWidths(),r=this.getLeafWidths();e.forEach(((e,t)=>{this.updateCellPinnedPosition(e,t,i,r,o)})),t.forEach(((e,t)=>{this.updateCellPinnedPosition(e,t,i,r,o)}))}getRowShadowThWidths(){const e=this.host.shadowRoot.querySelector("vega-table-head-row").shadowRoot,t=e.querySelector("th:first-of-type"),i=e.querySelector(".vega-table-selection-column"),o=e.querySelector(".vega-table-expand-action-column"),r=e.querySelector("th:last-of-type");return t?[t.getBoundingClientRect().width+((null==i?void 0:i.getBoundingClientRect().width)||0),((null==o?void 0:o.getBoundingClientRect().width)||0)+r.getBoundingClientRect().width]:[0,0]}getLeafWidths(){const e=this.vegaTableRenderInputController.getHeadCellRenderInputMap();return this.vegaTableRenderInputController.getLeafRenderInputs().map((t=>{var i;for(const[o,r]of e.entries())if(t===r)return(null===(i=o.shadowRoot.querySelector("th, td"))||void 0===i?void 0:i.getBoundingClientRect().width)||0}))}updateCellPinnedPosition(e,t,i,o,r){if(["left","right"].includes(e.pinned)){const a=t.shadowRoot.querySelector("th, td");if("left"===e.pinned){const t=i+o.slice(0,e.columnIndex).reduce(((e,t)=>e+t),0);this.updatePinnedPosition(a,"left",t)}if("right"===e.pinned){const t=U(e.colSpan)?e.colSpan:1,i=r+o.slice(e.columnIndex+(t-1)+1).reduce(((e,t)=>e+t),0);this.updatePinnedPosition(a,"right",i)}}}updateTableRowPinnedPosition(){const e=this.columnStructureModel.hasLeftPinnedColumn(),t=this.columnStructureModel.hasRightPinnedColumn(),i=this.host.getBoundingClientRect().width,o=j(this.paddingX[0]),r=j(this.paddingX[1]),a=i-o-r-2;this.host.shadowRoot.querySelectorAll("vega-table-head-row, vega-table-row, vega-table-expand-row").forEach((i=>{const s=i.shadowRoot;if(e){const e=s.querySelector("th:first-of-type, td:first-of-type"),t=s.querySelector(".vega-table-selection-column");this.updatePinnedPosition(e,"left",0),this.updatePinnedPosition(t,"left",o)}if(t){const e=s.querySelector(".vega-table-expand-action-column"),t=s.querySelector("th:last-of-type, td:last-of-type");this.updatePinnedPosition(e,"right",r),this.updatePinnedPosition(t,"right",0)}if(t||e){const e=s.querySelector(".vega-table-expanded-row-slot-container");if(e){const t=e.querySelector(".expanded-row-slot-inner");this.updatePinnedPosition(t,"left",o),t.style.width=`${a}px`}}}))}updatePinnedPosition(e,t,i){e&&(e.style.position="sticky",e.style.zIndex="1",e.style[t]=`${i}px`)}}at([l()],st.prototype,"host",void 0),at([l()],st.prototype,"columnStructureModel",void 0),at([l()],st.prototype,"paddingX",void 0),at([l()],st.prototype,"vegaTableRenderInputController",void 0),at([h()],st.prototype,"pageResizeObserverSlimmer",void 0),at([c("componentDidLoad")],st.prototype,"componentDidLoad",null),at([c("componentDidRender")],st.prototype,"componentDidRender",null);var lt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const nt=class{constructor(e){r(this,e),this.vegaChange=a(this,"vegaChange",7),this.change=a(this,"change",7),this.vegaRowClick=a(this,"vegaRowClick",7),this.rowClick=a(this,"rowClick",7),this.vegaRowExpand=a(this,"vegaRowExpand",7),this.rowExpand=a(this,"rowExpand",7),this.vegaSelectChange=a(this,"vegaSelectChange",7),this.selectChange=a(this,"selectChange",7),this.vegaSelectAllChange=a(this,"vegaSelectAllChange",7),this.selectAllChange=a(this,"selectAllChange",7),this.vegaRowSelect=a(this,"vegaRowSelect",7),this.rowSelect=a(this,"rowSelect",7),this.vegaRowSelectAll=a(this,"vegaRowSelectAll",7),this.rowSelectAll=a(this,"rowSelectAll",7),this.globalSlimmers={},this.translationSlimmer=new le,this.vegaTableRenderModeController=new Qe,this.vegaTableColumnStructureModelController=new tt,this.vegaTableRenderInputController=new rt,this.vegaTablePinnedRenderer=new st,this.vegaTableRenderer=new We,this.vegaTableHeaderRenderer=new Te,this.vegaTableBodyRenderer=new Ee,this.vegaTableRowRenderer=new Ye,this.vegaTableCellRenderer=new me,this.vegaTablePaginationRenderer=new Ae,this.vegaTableScrollContainerRenderer=new Ne,this.vegaTableExpandRowController=new xe,this.vegaTableRowSelectionController=new Se,this.vegaTableDataSourceController=new ke,this.vegaTablePaginationController=new Ie,this.vegaTableEditableController=new Be,this.vegaTableSortController=new Ge,this.vegaTableColGroupRenderer=new Fe,this.vegaTableChildrenController=new He,this.pageResizeObserverSlimmer=new J,this.rowSelectionNotifySlimmer=oe(nt,"rowSelection","watchRowSelection"),this.rowExpandableNotifySlimmer=oe(nt,"rowExpandable","watchRowExpandable"),this.paddingXNotifySlimmer=oe(nt,"paddingX","watchPaddingX"),this.rowClickableNotifySlimmer=oe(nt,"rowClickable","watchRowClickable"),this.scrollConfigNotifySlimmer=oe(nt,"scrollConfig","watchScrollConfig"),this.eventsPrevent=new re([D,A,L],(()=>this.host)),this.changeEventEmitter=ae(nt,D),this.selectChangeEventEmitter=ae(nt,M),this.selectAllChangeEventEmitter=ae(nt,N),this.rowClickEventEmitter=ae(nt,P),this.rowExpandEventEmitter=ae(nt,W),this.rowDividerNotifySlimmer=oe(nt,"rowDivider","watchRowDivider"),this.columnDividerNotifySlimmer=oe(nt,"columnDivider","watchColumnDivider"),this.densityNotifySlimmer=oe(nt,"density","watchDensity"),this.isTemplateRenderModeNotifySlimmer=oe(nt,"isTemplateRenderMode","watchTemplateRenderMode"),this.currentDataNotifySlimmer=oe(nt,"currentData","watchCurrentData"),this.vegaComponentUsageRuntimeMetricsSlimmer=new b(Ze),this.rowSelectEventEmitter=ae(nt,K),this.rowSelectAllEventEmitter=ae(nt,I),this.selectedRowKeySet=new fe(new Set,(e=>{this.selectedRowKeySet=e})),this.expandedRowKeySet=new fe(new Set,(e=>{this.expandedRowKeySet=e})),this.currentBreakpoint=ee(),this.sortersMap=new se(new Map,(e=>{this.sortersMap=e})),this.currentData=[],this.currentPage=1,this.pageSize=10,this.editingRows=new fe(new Set,(e=>{this.editingRows=e})),this.isSelectedAll=!1,this.columns=[],this.dataSource=[],this.rowSelection=null,this.rowExpandable=!1,this.rowClickable=!1,this.rowDivider=!1,this.columnDivider=!1,this.striped=!0,this.density="default",this.paddingX=["8px","8px"],this.showHeader=!0,this.pagination=null,this.emptyDescription="There is no data to display",this.rowKey="key",this.sortConfig={type:"multiple"}}watchSelectedRowKeySet(){}watchSortersMap(){}watchCurrentData(e,t){}watchCurrentPage(){}watchSelectedAll(){}watchTemplateRenderMode(){}watchColumnStructureModel(){}watchColumns(){}watchGroupColumns(){}watchDataSource(){}watchRowSelection(){}watchRowExpandable(){}watchRowClickable(){}watchRowDivider(){}watchColumnDivider(){}watchStriped(){}watchDensity(){}watchPaddingX(){}watchPagination(){}watchScrollConfig(){}async openExpandRow(e){}async closeExpandRow(e){}async closeAllExpandRow(){}async toggleExpandRow(e){}async clearSelection(){}async getSelection(){return p()}async setSelection(e){}async startRowEditMode(e){}async stopRowEditMode(e){}async stopAllRowEditMode(){}async getRowData(e){return p(e)}async getRowsData(){return p()}async getFormRef(e){return p(e)}async addNewRow(e={}){return p(e)}async saveEditRow(e){return p(e)}async saveAllEditRows(){}async getEditingRowsKey(){return p()}async removeRow(e){}render(){return v(e("slot",null)),this.vegaTableRenderer.render()}get host(){return s(this)}static get watchers(){return{selectedRowKeySet:["watchSelectedRowKeySet"],sortersMap:["watchSortersMap"],currentData:["watchCurrentData"],currentPage:["watchCurrentPage"],isSelectedAll:["watchSelectedAll"],isTemplateRenderMode:["watchTemplateRenderMode"],columnStructureModel:["watchColumnStructureModel"],columns:["watchColumns"],groupColumns:["watchGroupColumns"],dataSource:["watchDataSource"],rowSelection:["watchRowSelection"],rowExpandable:["watchRowExpandable"],rowClickable:["watchRowClickable"],rowDivider:["watchRowDivider"],columnDivider:["watchColumnDivider"],striped:["watchStriped"],density:["watchDensity"],paddingX:["watchPaddingX"],pagination:["watchPagination"],scrollConfig:["watchScrollConfig"]}}};lt([u()],nt.prototype,"globalSlimmers",void 0),lt([h()],nt.prototype,"translationSlimmer",void 0),lt([h()],nt.prototype,"vegaTableRenderModeController",void 0),lt([h()],nt.prototype,"vegaTableColumnStructureModelController",void 0),lt([h()],nt.prototype,"vegaTableRenderInputController",void 0),lt([h()],nt.prototype,"vegaTablePinnedRenderer",void 0),lt([h()],nt.prototype,"vegaTableRenderer",void 0),lt([h()],nt.prototype,"vegaTableHeaderRenderer",void 0),lt([h()],nt.prototype,"vegaTableBodyRenderer",void 0),lt([h()],nt.prototype,"vegaTableRowRenderer",void 0),lt([h()],nt.prototype,"vegaTableCellRenderer",void 0),lt([h()],nt.prototype,"vegaTablePaginationRenderer",void 0),lt([h()],nt.prototype,"vegaTableScrollContainerRenderer",void 0),lt([h()],nt.prototype,"vegaTableExpandRowController",void 0),lt([h()],nt.prototype,"vegaTableRowSelectionController",void 0),lt([h()],nt.prototype,"vegaTableDataSourceController",void 0),lt([h()],nt.prototype,"vegaTablePaginationController",void 0),lt([h()],nt.prototype,"vegaTableEditableController",void 0),lt([h()],nt.prototype,"vegaTableSortController",void 0),lt([h()],nt.prototype,"vegaTableColGroupRenderer",void 0),lt([h()],nt.prototype,"vegaTableChildrenController",void 0),lt([h()],nt.prototype,"pageResizeObserverSlimmer",void 0),lt([h()],nt.prototype,"rowSelectionNotifySlimmer",void 0),lt([h()],nt.prototype,"rowExpandableNotifySlimmer",void 0),lt([h()],nt.prototype,"paddingXNotifySlimmer",void 0),lt([h()],nt.prototype,"rowClickableNotifySlimmer",void 0),lt([h()],nt.prototype,"scrollConfigNotifySlimmer",void 0),lt([h()],nt.prototype,"eventsPrevent",void 0),lt([h()],nt.prototype,"changeEventEmitter",void 0),lt([h()],nt.prototype,"selectChangeEventEmitter",void 0),lt([h()],nt.prototype,"selectAllChangeEventEmitter",void 0),lt([h()],nt.prototype,"rowClickEventEmitter",void 0),lt([h()],nt.prototype,"rowExpandEventEmitter",void 0),lt([h()],nt.prototype,"rowDividerNotifySlimmer",void 0),lt([h()],nt.prototype,"columnDividerNotifySlimmer",void 0),lt([h()],nt.prototype,"densityNotifySlimmer",void 0),lt([h()],nt.prototype,"isTemplateRenderModeNotifySlimmer",void 0),lt([h()],nt.prototype,"currentDataNotifySlimmer",void 0),lt([h()],nt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),lt([h()],nt.prototype,"rowSelectEventEmitter",void 0),lt([h()],nt.prototype,"rowSelectAllEventEmitter",void 0),nt.style=':host{display:block}table{width:100%;border-spacing:0}.vega-table-empty-description{text-align:center;padding:24px;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1))}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-table-empty-description{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}table.v-table-fixed{table-layout:fixed}.vega-table-scrollable-container{overflow:auto}.vega-table-scrollable-container vega-table-head{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.vega-table-scrollable-container.scrolled vega-table-head.fixed-header,.vega-table-scrollable-container.scrolled ::slotted(vega-table-head.fixed-header){box-shadow:0px 4px 0px rgba(0, 0, 0, 0.1);}vega-form{display:contents}*::part(field-error-message){display:none !important}.vega-table-pagination-container{margin-top:24px}.vega-table-pagination-container.bottom-center{display:flex;justify-content:center}.vega-table-pagination-container.bottom-right{display:flex;justify-content:flex-end}.vega-table-pagination-container.bottom-left{display:flex;justify-content:flex-start}col.v-hidden{display:none}@media (min-width: 320px){col.S\\:v-table-column{display:table-column}}@media (min-width: 768px){col.M\\:v-table-column{display:table-column}}@media (min-width: 1024px){col.L\\:v-table-column{display:table-column}}@media (min-width: 1440px){col.XL\\:v-table-column{display:table-column}}:host(.is-group-table) .vega-table-scrollable-container{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-width:1px;border-style:solid}:host(.is-group-table.density-relaxed) .vega-table-scrollable-container{border-radius:12px}:host(.is-group-table.density-default) .vega-table-scrollable-container{border-radius:12px}:host(.is-group-table.density-compact) .vega-table-scrollable-container{border-radius:4px}:host(.is-pinned-table) table{min-width:max-content}';var dt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const ct=class{constructor(e){r(this,e),this.globalSlimmers={},this.childChangeEventPrevent=new re([D],(()=>this.host)),this.vegaComponentUsageRuntimeMetricsSlimmer=new b}render(){return Q(e(o,null,e("tbody",null,e("slot",null))),this.host)}get host(){return s(this)}};dt([u()],ct.prototype,"globalSlimmers",void 0),dt([h()],ct.prototype,"childChangeEventPrevent",void 0),dt([h()],ct.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ct.style=":host{display:contents}";const ht=(e,t)=>e&&Y(e)?`v-hidden ${e}:${t}`:"";var pt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class vt extends ne{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:e=>{const t=this.host.parentElement;if(t){const i=t.querySelector("vega-table-cell:last-of-type");this.columnDivider=e&&i!==this.host}}},{subStateName:"clickable",parentStateName:"rowClickable"}]})}}pt([l()],vt.prototype,"host",void 0),pt([l({writable:!0})],vt.prototype,"density",void 0),pt([l({writable:!0})],vt.prototype,"columnDivider",void 0),pt([l({writable:!0})],vt.prototype,"clickable",void 0);var bt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ut extends ne{constructor(){super({parent:"vega-table-row",subStates:[{subStateName:"checked",parentStateName:"checked"},{subStateName:"expanded",parentStateName:"expanded"},{subStateName:"striped",parentStateName:"striped"},{subStateName:"rowDivider",parentStateName:"rowDivider"}]})}}bt([l({writable:!0})],ut.prototype,"checked",void 0),bt([l({writable:!0})],ut.prototype,"expanded",void 0),bt([l({writable:!0})],ut.prototype,"striped",void 0),bt([l({writable:!0})],ut.prototype,"rowDivider",void 0);var ft=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const wt=class{constructor(e){r(this,e),this.globalSlimmers={},this.vegaTableCellStateController=new vt,this.vegaTableRowStateSubscriber=new ut,this.pageResizeObserverSlimmer=new J,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.currentBreakpoint=ee(),this.getCellOverflowClass=()=>{switch(this.overflow){case"ellipsis":return"vega-table-cell-ellipsis";case"scroll":return"vega-table-cell-scroll"}}}render(){const t=ht(this.breakpoint,"v-table-cell"),i=(()=>{let e;switch(this.textAlign){case"center":e="v-text-center";break;case"left":e="v-text-left";break;case"right":e="v-text-right";break;default:e=""}return e})(),r=this.getCellOverflowClass(),a=[t,i,"vega-table-cell"];de.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE")||a.push("break-word");const s=C(this.host,"vega-table"),l=s&&z.call(E.getSubject(s,F),this.host);return(null==l?void 0:l.isRightStartPinned)&&a.push("left-divider"),(null==l?void 0:l.isLeftEndPinned)&&a.push("right-divider"),(null==l?void 0:l.isNoPinnedEnd)&&a.push("hide-right-border"),Q(e(o,{class:k([`density-${H.formatCustom(this.density)}`,this.rowDivider&&"row-divider",this.columnDivider&&"column-divider",this.clickable&&"clickable",this.checked&&"checked",this.striped&&"striped",this.expanded&&"expanded"])},e("td",{class:k(a),part:"cell",onMouseEnter:this.onMouseEnter.bind(this),onMouseLeave:this.onMouseLeave.bind(this),style:{width:this.width}},e("div",{class:r},e("slot",null)))),this.host)}onMouseEnter(){this.host.parentElement.querySelectorAll("vega-table-cell").forEach((e=>e.classList.add("hovered")))}onMouseLeave(){this.host.parentElement.querySelectorAll("vega-table-cell").forEach((e=>e.classList.remove("hovered")))}get host(){return s(this)}};ft([u()],wt.prototype,"globalSlimmers",void 0),ft([h()],wt.prototype,"vegaTableCellStateController",void 0),ft([h()],wt.prototype,"vegaTableRowStateSubscriber",void 0),ft([h()],wt.prototype,"pageResizeObserverSlimmer",void 0),ft([h()],wt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),wt.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}.vega-table-cell{padding:12px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.vega-table-cell{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.vega-table-cell.break-word{word-break:break-word}td{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;padding:0px;vertical-align:middle}td.v-text-center{text-align:center}td.v-text-left{text-align:left}td.v-text-right{text-align:right}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}.vega-table-cell-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.vega-table-cell-scroll{overflow:auto}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host(.row-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host(.striped) .vega-table-cell{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.clickable.hovered:not(.checked)) .vega-table-cell{cursor:pointer;background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}:host(.checked) .vega-table-cell{background-color:rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))}:host(.expanded) .vega-table-cell{border-top-width:1px;border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}';var gt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class mt extends n{render(){return e("tr",{class:{"vega-table-expanded-row":!0,expanded:this.expanded,checked:this.checked,striped:this.striped},key:`vega-table-expanded-row-${this.rowKey}`,"data-expanded-row-key":this.rowKey},e("td",null),e("td",{colSpan:this.colSpan,key:`${xe.expandRowSlotNamePrefix}${this.rowKey}`,class:"vega-table-expanded-row-slot-container"},e("div",{class:"expanded-row-slot-inner"},e("slot",null))),e("td",null))}}gt([l()],mt.prototype,"host",void 0),gt([l()],mt.prototype,"rowKey",void 0),gt([l()],mt.prototype,"expanded",void 0),gt([l()],mt.prototype,"checked",void 0),gt([l()],mt.prototype,"colSpan",void 0),gt([l()],mt.prototype,"striped",void 0);var yt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class xt extends n{connectedCallback(){this.expandObserver=new S(this.isAcceptableTableExpandRowObserver.bind(this),(e=>{e.rowKey===this.rowKey&&(this.expanded=e.expanded)})),w.register(g,this.expandObserver)}disconnectedCallback(){w.unregister(g,this.expandObserver)}isAcceptableTableExpandRowObserver(e){return"VEGA-TABLE"===e.host.tagName?"VEGA-TABLE"===e.host.tagName&&e.host===C(this.host,"vega-table"):"VEGA-TABLE-ROW"===e.host.tagName?C(this.host,"vega-table")===C(e.host,"vega-table"):void 0}}function Rt(e){return"VEGA-TABLE-ROW"===e.host.tagName&&C(this.host,"vega-table")===C(e.host,"vega-table")}function St(e){return"VEGA-TABLE"===e.host.tagName&&e.host===C(this.host,"vega-table")}yt([l()],xt.prototype,"host",void 0),yt([l()],xt.prototype,"rowKey",void 0),yt([l({writable:!0})],xt.prototype,"expanded",void 0),yt([c("connectedCallback")],xt.prototype,"connectedCallback",null),yt([c("disconnectedCallback")],xt.prototype,"disconnectedCallback",null);var Ct=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class kt extends n{connectedCallback(){this.rowSelectionObserver=new S(Rt.bind(this),(e=>{e.rowKey===this.rowKey&&(this.checked=e.checked)})),w.register(m,this.rowSelectionObserver)}disconnectedCallback(){w.unregister(m,this.rowSelectionObserver)}}Ct([l({writable:!0})],kt.prototype,"checked",void 0),Ct([l()],kt.prototype,"host",void 0),Ct([l()],kt.prototype,"rowKey",void 0),Ct([c("connectedCallback")],kt.prototype,"connectedCallback",null),Ct([c("disconnectedCallback")],kt.prototype,"disconnectedCallback",null);var jt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Et extends ne{constructor(){super({parent:"vega-table",subStates:[{subStateName:"withMultipleSelection",parentStateName:"rowSelection",callback:e=>{if(e){const{type:t="multiple"}=e;this.withMultipleSelection="multiple"===t}else this.withMultipleSelection=!1}}]})}}jt([l()],Et.prototype,"host",void 0),jt([l({writable:!0})],Et.prototype,"withMultipleSelection",void 0),jt([l()],Et.prototype,"vegaTableExpandRowColSpanController",void 0);var Ot=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Tt extends n{constructor(){super(...arguments),this.updateColSpan=()=>{this.colSpan=this.getVisibleColumnsNumber()+(this.withMultipleSelection?2:1)}}componentWillLoad(){this.updateColSpan()}watchCurrentBreakpoint(){this.updateColSpan()}watchWithMultipleSelection(){this.updateColSpan()}getVisibleColumnsNumber(){const e=C(this.host,"vega-table"),t=ee(),i=e.children&&Array.from(e.children).filter((e=>{var t;return!(null===(t=e.getAttribute("slot"))||void 0===t?void 0:t.startsWith("vega-table-expand-row-"))})).length>0?e.querySelectorAll("vega-table-row:nth-of-type(1) vega-table-cell"):e.shadowRoot.querySelectorAll("vega-table-row:nth-of-type(1) vega-table-cell");return Array.from(i).filter((e=>!e.breakpoint||"default"!==t&&ce[t]>=ce[e.breakpoint])).length}}Ot([l()],Tt.prototype,"host",void 0),Ot([l({writable:!0})],Tt.prototype,"colSpan",void 0),Ot([l()],Tt.prototype,"withMultipleSelection",void 0),Ot([c("componentWillLoad")],Tt.prototype,"componentWillLoad",null),Ot([c("watchCurrentBreakpoint")],Tt.prototype,"watchCurrentBreakpoint",null),Ot([c("watchWithMultipleSelection")],Tt.prototype,"watchWithMultipleSelection",null);var Dt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const At=class{constructor(e){r(this,e),this.globalSlimmers={},this.vegaTableExpandRowRenderer=new mt,this.vegaTableExpandRowExpandController=new xt,this.vegaTableExpandRowSelectionController=new kt,this.vegaTableExpandRowStateController=new Et,this.vegaTableExpandRowColSpanController=new Tt,this.pageResizeObserverSlimmer=new J,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.currentBreakpoint=ee(),this.expanded=!1,this.checked=!1}watchCurrentBreakpoint(){}watchWithMultipleSelection(){}render(){return v(e("slot",null)),Q(e(o,null,this.vegaTableExpandRowRenderer.render()),this.host)}get host(){return s(this)}static get watchers(){return{currentBreakpoint:["watchCurrentBreakpoint"],withMultipleSelection:["watchWithMultipleSelection"]}}};Dt([u()],At.prototype,"globalSlimmers",void 0),Dt([h()],At.prototype,"vegaTableExpandRowRenderer",void 0),Dt([h()],At.prototype,"vegaTableExpandRowExpandController",void 0),Dt([h()],At.prototype,"vegaTableExpandRowSelectionController",void 0),Dt([h()],At.prototype,"vegaTableExpandRowStateController",void 0),Dt([h()],At.prototype,"vegaTableExpandRowColSpanController",void 0),Dt([h()],At.prototype,"pageResizeObserverSlimmer",void 0),Dt([h()],At.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),At.style=":host{display:contents}:host .vega-table-expanded-row.striped:not(.checked) td{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}:host(.v-hidden){display:none}.vega-table-expanded-row{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}.vega-table-expanded-row:not(.expanded){display:none}.vega-table-expanded-row.expanded td{border-bottom-width:1px;border-top-width:0px;border-right-width:0px;border-left-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1));padding:0px;vertical-align:middle}.vega-table-expanded-row.expanded td:first-of-type{border-left-width:1px;border-bottom-width:1px;border-top-left-radius:12px;border-bottom-left-radius:12px;border-top-left-radius:0px}.vega-table-expanded-row.expanded td:last-of-type{border-right-width:1px;border-bottom-width:1px;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-right-radius:0px}.vega-table-expanded-row.expanded td.vega-table-expanded-row-slot-container{border-top-width:1px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}.vega-table-expanded-row.expanded.checked{background-color:rgba(var(--v-bg-table-row-selected-expanded, 229, 239, 255, 1))}:host tr.is-pinned-row td:first-of-type{position:sticky;z-index:1;left:0px}:host tr.is-pinned-row td.vega-table-expanded-row-slot-container div{position:sticky;z-index:1;left:8px}";var Lt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Mt extends ne{constructor(){super({parent:"vega-table",subStates:[{subStateName:"fixed",parentStateName:"scrollConfig",callback:e=>{this.fixed=e&&e.maxHeight&&!1!==e.fixedHeader}}]})}}Lt([l()],Mt.prototype,"host",void 0),Lt([l({writable:!0})],Mt.prototype,"fixed",void 0);var Nt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Pt=class{constructor(e){r(this,e),this.globalSlimmers={},this.vegaTableHeadStateController=new Mt,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.headCellEventPrevent=new re([D],(()=>this.host)),this.fixed=!1,this.handleTableHeadRefChange=e=>{this.tableHeadRef&&he.removeZIndex(this.tableHeadRef,"base"),this.fixed&&he.setZIndex(e,"base"),this.tableHeadRef=e}}disconnectedCallback(){he.removeZIndex(this.tableHeadRef,"base")}render(){return Q(e(o,{class:{"fixed-header":this.fixed},ref:e=>this.handleTableHeadRefChange(e)},e("thead",null,e("slot",null))),this.host)}get host(){return s(this)}};Nt([u()],Pt.prototype,"globalSlimmers",void 0),Nt([h()],Pt.prototype,"vegaTableHeadStateController",void 0),Nt([h()],Pt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Nt([h()],Pt.prototype,"headCellEventPrevent",void 0),Pt.style=":host{display:table-header-group;border-top-right-radius:12px;border-bottom-right-radius:12px;border-top-left-radius:12px;border-bottom-left-radius:12px}:host thead{display:contents}:host(.fixed-header){position:sticky;top:0px}";var Wt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Kt extends ne{constructor(){super({parent:"vega-table",subStates:[{subStateName:"density",parentStateName:"density"},{subStateName:"columnDivider",parentStateName:"columnDivider",callback:e=>{const t=this.host.parentElement;if(t){const i=t.querySelector("vega-table-head-cell:last-of-type");this.columnDivider=e&&i!==this.host}}}]})}}Wt([l({writable:!0})],Kt.prototype,"density",void 0),Wt([l({writable:!0})],Kt.prototype,"columnDivider",void 0);var It=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class zt extends n{render(){if(!this.sorter)return;const{icon:t,color:i}=zt.SORT_ICON_MAP[this.sortOrder||"default"];return e("span",{class:"vega-table-column-sorter"},e("vega-icon",{color:i,icon:ve.getIconKey(t),size:"size-12"}))}}zt.SORT_ICON_MAP={asc:{icon:"circle-arrow-up",color:"text-link"},desc:{icon:"circle-arrow-down",color:"text-link"},default:{icon:"arrow-up-arrow-down",color:"text-secondary"}},It([l()],zt.prototype,"sorter",void 0),It([l()],zt.prototype,"sortOrder",void 0);var Bt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Vt extends n{disconnectedCallback(){const e=C(this.host,"vega-table-head");e&&w.unregister(E.getSubject(e,X),this.observer)}componentWillLoad(){const e=C(this.host,"vega-table-head");e&&(this.hostTable=C(e,"vega-table"),this.isTemplateRenderMode=this.checkIsTemplateRenderMode(),this.observer=new S(this.isAcceptableObserver.bind(this),this.observerListener.bind(this)),w.register(E.getSubject(e,X),this.observer))}notifyOtherHeadCellOnClickSort(){const e=C(this.host,"vega-table-head");e&&w.notify(E.getSubject(e,X),{host:this.host})}isAcceptableObserver(e){return e.host!==this.host}observerListener(){var e;this.isTemplateRenderMode&&"single"===(null===(e=this.hostTable.sortConfig)||void 0===e?void 0:e.type)&&(this.sortOrder=void 0)}checkIsTemplateRenderMode(){return Array.from(this.hostTable.children).some((e=>e.tagName.startsWith("VEGA-TABLE-")))}}Bt([l()],Vt.prototype,"host",void 0),Bt([l({writable:!0})],Vt.prototype,"sortOrder",void 0),Bt([l()],Vt.prototype,"sortConfig",void 0),Bt([c("disconnectedCallback")],Vt.prototype,"disconnectedCallback",null),Bt([c("componentWillLoad")],Vt.prototype,"componentWillLoad",null);var _t=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Gt=class{constructor(e){r(this,e),this.vegaClick=a(this,"vegaClick",7),this.click=a(this,"click",7),this.globalSlimmers={},this.clickEventEmitter=ae(Gt,T),this.vegaTableHeadCellStateController=new Kt,this.pageResizeObserverSlimmer=new J,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.sortIconRenderer=new zt,this.vegaTableHeadCellSortConfigController=new Vt,this.currentBreakpoint=ee(),this.handleSort=e=>{this.sortOrder=this.getNextSortOrder(this.sortOrder),this.clickEventEmitter.emit({sortOrder:this.sortOrder},e),this.vegaTableHeadCellSortConfigController.notifyOtherHeadCellOnClickSort()},this.getNextSortOrder=e=>{var t;const i=de.isEnabled("VEGA_TABLE.REVERSE_SORT_ORDER")?["asc","desc"]:["desc","asc"],o=(null===(t=this.sortConfig)||void 0===t?void 0:t.disableUnsorted)?i:[...i,null];return o[(o.indexOf(e)+1)%o.length]}}render(){const t=this.sorter?{role:"button",onKeyDown:pe(),tabIndex:0,onClick:e=>this.handleSort(e)}:null,i=C(this.host,"vega-table"),r=i&&z.call(E.getSubject(i,$),this.host);return Q(e(o,{class:{[`density-${H.formatCustom(this.density)}`]:!0,sortable:!!this.sorter,"column-divider":this.columnDivider},style:{width:this.width}},e("th",Object.assign({class:{"vega-table-cell":!0,"break-word":!de.isEnabled("VEGA_TABLE.ENABLE_NEW_CELL_BREAK_WORDS_STYLE"),"is-group-cell":null==r?void 0:r.headHasGroupColumn,"hide-right-border":(null==r?void 0:r.isViewEnd)||(null==r?void 0:r.isNoPinnedEnd),"right-divider":null==r?void 0:r.isLeftEndPinned,"left-divider":null==r?void 0:r.isRightStartPinned,[ht(this.breakpoint,"v-table-cell")]:!0}},t,{colSpan:null==r?void 0:r.colSpan,rowSpan:null==r?void 0:r.rowSpan}),e("div",{class:k(["vega-table-column",this.textAlign])},e("span",{class:"vega-table-column-label"},e("slot",null)),this.sortIconRenderer.render()))),this.host)}get host(){return s(this)}};ve.register({"chevron-up":be,"chevron-down":ue,"arrow-up-arrow-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M489 377c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55V56c0-13.3-10.7-24-24-24s-24 10.7-24 24V398.1l-55-55c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l96 96c9.4 9.4 24.6 9.4 33.9 0l96-96zM137 39c-9.4-9.4-24.6-9.4-33.9 0L7 135c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55V456c0 13.3 10.7 24 24 24s24-10.7 24-24V113.9l55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L137 39z"/></svg>'},"circle-arrow-down":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 281c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 136c0-13.3 10.7-24 24-24s24 10.7 24 24l0 182.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 393c-9.4 9.4-24.6 9.4-33.9 0L127 281z"/></svg>'},"circle-arrow-up":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 231c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71V376c0 13.3-10.7 24-24 24s-24-10.7-24-24V193.9l-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 119c9.4-9.4 24.6-9.4 33.9 0L385 231z"/></svg>'}}),_t([u()],Gt.prototype,"globalSlimmers",void 0),_t([h()],Gt.prototype,"clickEventEmitter",void 0),_t([h()],Gt.prototype,"vegaTableHeadCellStateController",void 0),_t([h()],Gt.prototype,"pageResizeObserverSlimmer",void 0),_t([h()],Gt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),_t([h()],Gt.prototype,"sortIconRenderer",void 0),_t([h()],Gt.prototype,"vegaTableHeadCellSortConfigController",void 0),Gt.style=':host .vega-table-cell.v-hidden{display:none}@media (min-width: 320px){:host .vega-table-cell.S\\:v-table-cell{display:table-cell}}@media (min-width: 768px){:host .vega-table-cell.M\\:v-table-cell{display:table-cell}}@media (min-width: 1024px){:host .vega-table-cell.L\\:v-table-cell{display:table-cell}}@media (min-width: 1440px){:host .vega-table-cell.XL\\:v-table-cell{display:table-cell}}:host{display:contents}:host(.sortable){cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.sortable:hover){background-color:rgba(var(--v-bg-table-row-hover, 241, 248, 251, 1))}th{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));color:rgba(var(--v-text-primary, 32, 54, 69, 1));text-align:left;vertical-align:middle;padding:0px;padding:12px;font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;overflow-wrap:break-word}@media screen and (min-width: 768px) and (max-width: 1023px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){th{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}th.break-word{word-break:break-word}.vega-table-column{display:flex;align-items:center}.vega-table-column.center{justify-content:center;text-align:center}.vega-table-column.right{justify-content:flex-end;text-align:right}.vega-table-column.left{justify-content:flex-start;text-align:left}.vega-table-column .vega-table-column-label{min-width:0px}.vega-table-column .vega-table-column-sorter{display:flex;align-items:center;justify-content:center;padding:2px;margin-left:8px;cursor:pointer;outline:none}:host(.density-default) .vega-table-cell{padding:12px}:host(.density-compact) .vega-table-cell{padding:4px}:host(.density-relaxed) .vega-table-cell{padding:16px}:host(.column-divider) .vega-table-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}:host .vega-table-cell.is-group-cell{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-bottom-width:1px;border-right-style:solid;border-bottom-style:solid}:host .vega-table-cell.hide-right-border{border-right-width:0px}:host .vega-table-cell.bottom-border{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host .vega-table-cell.right-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:2px;border-right-style:solid}:host .vega-table-cell.left-divider{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-left-width:2px;border-left-style:solid}';var $t=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ft extends n{constructor(){super(...arguments),this.renderHeaderSelectionCell=t=>{if("multiple"===this.selectionType)return e("th",{rowSpan:t.startRowSpan,class:{"vega-table-selection-column":!0,hidden:t.isStartHidden}},!this.hideSelectAll&&e("div",{class:"vega-table-checkbox-wrapper"},e("vega-checkbox",{size:"small",disabled:this.isEmptyTable||this.selectAllDisabled,checked:this.checkedAll,onClick:this.handleClick,ref:e=>{O.addUniqueObserverToNode(e,D,this.handleSelectAll)}})))},this.handleSelectAll=e=>{if("vegaChange"===e.eventName){const t=e.detail;U(t)&&t!==this.checkedAll&&w.notify(y,{host:this.host,checked:t})}},this.renderHeaderExpandableCell=t=>this.expandable&&e("th",{rowSpan:t.endRowSpan,class:{"vega-table-expand-action-column":!0,hidden:t.isEndHidden}}),this.handleClick=e=>{e.stopPropagation(),z.call(E.getSubject(C(this.host,"vega-table"),_),{host:this.host,checked:!this.checkedAll}).defaultPrevented&&e.preventDefault()}}connectedCallback(){}disconnectedCallback(){}componentDidLoad(){}render(){var t,i;const o=this.getRowRenderInput();return e("tr",{class:{"is-group-row":o.headHasGroupColumn,"is-pinned-row":o.headHasPinnedColumn}},e("th",{style:{width:null===(t=this.paddingX)||void 0===t?void 0:t[0]},rowSpan:o.startRowSpan,class:{hidden:o.isStartHidden}}),this.renderHeaderSelectionCell(o),e("slot",null),this.renderHeaderExpandableCell(o),e("th",{style:{width:null===(i=this.paddingX)||void 0===i?void 0:i[1]},rowSpan:o.endRowSpan,class:{hidden:o.isEndHidden}}))}getRowRenderInput(){const e={},t=C(this.host,"vega-table"),i=t&&z.call(E.getSubject(t,G),this.host),o=null==i?void 0:i[0],r=null==i?void 0:i[i.length-1];return o&&(e.headHasGroupColumn=o.headHasGroupColumn,e.headHasPinnedColumn=o.headHasPinnedColumn,e.headHasGroupColumn&&(e.startRowSpan="multiple"===this.selectionType&&0===o.level?o.headMaxDepth:o.rowSpan,e.isStartHidden=o.headHasGroupColumn&&("multiple"===this.selectionType&&o.level>0||!o.isViewStart))),r&&r.headHasGroupColumn&&(e.endRowSpan=r.rowSpan,e.isEndHidden=o.headHasGroupColumn&&!r.isViewEnd),e}}$t([l()],Ft.prototype,"host",void 0),$t([l()],Ft.prototype,"paddingX",void 0),$t([l()],Ft.prototype,"selectionType",void 0),$t([l()],Ft.prototype,"hideSelectAll",void 0),$t([l()],Ft.prototype,"selectAllDisabled",void 0),$t([l()],Ft.prototype,"checkedAll",void 0),$t([l()],Ft.prototype,"expandable",void 0),$t([l()],Ft.prototype,"isEmptyTable",void 0),$t([l()],Ft.prototype,"isTemplateRenderMode",void 0),$t([c("connectedCallback")],Ft.prototype,"connectedCallback",null),$t([c("disconnectedCallback")],Ft.prototype,"disconnectedCallback",null),$t([c("componentDidLoad")],Ft.prototype,"componentDidLoad",null);var Xt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Ht extends n{connectedCallback(){this.initRowSelectionAllObserver()}disconnectedCallback(){w.unregister(y,this.rowSelectionAllObserver)}initRowSelectionAllObserver(){this.rowSelectionAllObserver=new S(St.bind({host:this.host}),(e=>{this.checkedAll=e.noneChecked||!1!==e.checked?e.checked:null})),w.register(y,this.rowSelectionAllObserver)}}Xt([l()],Ht.prototype,"host",void 0),Xt([l({writable:!0})],Ht.prototype,"checkedAll",void 0),Xt([c("connectedCallback")],Ht.prototype,"connectedCallback",null),Xt([c("disconnectedCallback")],Ht.prototype,"disconnectedCallback",null);var Ut=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Yt extends ne{constructor(){super({parent:"vega-table",subStates:[{subStateName:"expandable",parentStateName:"rowExpandable"},{subStateName:"paddingX",parentStateName:"paddingX",callback:e=>{const t=C(this.host,"vega-table");0!==t.dataSource.length&&0!==t.columns.length||(this.paddingX=e)}},{subStateName:"selectionType",parentStateName:"rowSelection",callback:e=>{this.updateSelectionType(e)}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"},{subStateName:"isTemplateRenderMode",parentStateName:"isTemplateRenderMode"},{subStateName:"isEmptyTable",parentStateName:"currentData",callback:e=>{this.isEmptyTable=0===e.length}}]}),this.updateSelectionType=e=>{if(e){const{type:t="multiple"}=e;this.selectionType=t}else this.selectionType=null}}}Ut([l()],Yt.prototype,"host",void 0),Ut([l({writable:!0})],Yt.prototype,"expandable",void 0),Ut([l({writable:!0})],Yt.prototype,"selectionType",void 0),Ut([l({writable:!0})],Yt.prototype,"paddingX",void 0),Ut([l({writable:!0})],Yt.prototype,"columnDivider",void 0),Ut([l({writable:!0})],Yt.prototype,"density",void 0),Ut([l({writable:!0})],Yt.prototype,"isTemplateRenderMode",void 0),Ut([l({writable:!0})],Yt.prototype,"isEmptyTable",void 0);var qt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const Qt=class{constructor(e){r(this,e),this.globalSlimmers={},this.vegaTableHeadRowStateController=new Yt,this.vegaTableHeadRowRenderer=new Ft,this.vegaTableHeadRowController=new Ht,this.headCellEventPrevent=new re([T],(()=>this.host),void 0,!0),this.pageResizeObserverSlimmer=new J,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.currentBreakpoint=ee(),this.expandable=!1}render(){return v(e("slot",null)),Q(e(o,{class:{"column-divider":this.columnDivider,[`density-${H.formatCustom(this.density)}`]:!0}},this.vegaTableHeadRowRenderer.render()),this.host)}get host(){return s(this)}};qt([u()],Qt.prototype,"globalSlimmers",void 0),qt([h()],Qt.prototype,"vegaTableHeadRowStateController",void 0),qt([h()],Qt.prototype,"vegaTableHeadRowRenderer",void 0),qt([h()],Qt.prototype,"vegaTableHeadRowController",void 0),qt([h()],Qt.prototype,"headCellEventPrevent",void 0),qt([h()],Qt.prototype,"pageResizeObserverSlimmer",void 0),qt([h()],Qt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Qt.style=":host{display:table-row}:host tr{display:contents}th{background-color:rgba(var(--v-bg-table-header, 240, 243, 247, 1));padding:0px;vertical-align:middle}th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.column-divider) ::slotted(vega-table-head-cell:not(:last-of-type)){border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-right-width:1px;border-right-style:solid}.vega-table-checkbox-wrapper{display:flex;align-items:center;justify-content:center}:host(.density-default) th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-compact) th:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) th:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}:host(.density-relaxed) th:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-relaxed) th:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}:host tr.is-group-row th{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host tr.is-group-row th.hidden{display:none}:host tr.is-group-row th.vega-table-selection-column{border-right-width:1px;border-right-style:solid}:host tr.is-group-row th:first-of-type{border-top-left-radius:0px;border-bottom-left-radius:0px}:host tr.is-group-row th:last-of-type{border-top-right-radius:0px;border-bottom-right-radius:0px}:host tr.is-pinned-row th{position:sticky;z-index:1}:host tr.is-pinned-row th:first-of-type{left:0px}:host tr.is-pinned-row th.vega-table-selection-column{left:8px}:host tr.is-pinned-row th.vega-table-expand-action-column{right:8px}:host tr.is-pinned-row th:last-of-type{right:0px}";var Zt=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class Jt extends n{constructor(){super(...arguments),this.renderRowSelection=()=>{if("multiple"===this.selectionType)return e("td",{class:"vega-table-selection-column"},e("div",{class:"vega-table-checkbox-wrapper"},e("vega-checkbox",{size:"small",checked:this.checked,onClick:this.handleClick,ref:e=>{O.addUniqueObserverToNode(e,D,this.onRowSelectionChange)}})))},this.renderExpandIcon=()=>this.expandable&&e("td",{class:"vega-table-expand-action-column"},e("div",{class:"vega-table-expand-icon-wrapper"},e("vega-icon",{icon:ve.getIconKey("chevron-down"),color:"text-link",onClick:this.onExpandIconClick}))),this.onRowClick=()=>{this.vegaTableRowClickController.handleRowClick()},this.onRowSelectionChange=e=>{"vegaChange"===e.eventName&&this.vegaTableRowSelectionController.handleRowSelect(e.detail)},this.handleClick=e=>{e.stopPropagation(),z.call(E.getSubject(this.parentTableRef,V),{host:this.host,rowKey:this.rowKey,checked:!this.checked}).defaultPrevented&&e.preventDefault()},this.onExpandIconClick=async e=>{e.stopPropagation();const t=this.expandEventEmitter.emit({expanded:!this.expanded,rowKey:this.rowKey});t&&!t.defaultPrevented&&this.vegaTableRowExpandController.handleExpandIconClick()}}connectedCallback(){this.setParentTableRef()}getParentTableRef(){return this.parentTableRef}render(){var t,o;return e(i,null,this.renderExpandRowSpace(this.rowKey),e("tr",{class:{"vega-table-row":!0,checked:this.checked,clickable:this.clickable,"current-clicked-row":this.clicked,"expand-row":this.expanded},onClick:this.clickable?this.onRowClick:null},e("td",{style:{width:null===(t=this.paddingX)||void 0===t?void 0:t[0]}}),this.renderRowSelection(),e("slot",null),this.renderExpandIcon(),e("td",{style:{width:null===(o=this.paddingX)||void 0===o?void 0:o[1]}})))}renderExpandRowSpace(t){return this.expandable&&e("tr",{key:`vega-table-expand-row-space-${t}`,class:"expand-row-space"})}setParentTableRef(){this.parentTableRef=C(this.host,"vega-table")}}ve.register({"chevron-down":ue}),Zt([l()],Jt.prototype,"host",void 0),Zt([l()],Jt.prototype,"rowKey",void 0),Zt([l()],Jt.prototype,"checked",void 0),Zt([l()],Jt.prototype,"clickable",void 0),Zt([l()],Jt.prototype,"clicked",void 0),Zt([l()],Jt.prototype,"expanded",void 0),Zt([l()],Jt.prototype,"paddingX",void 0),Zt([l()],Jt.prototype,"expandable",void 0),Zt([l()],Jt.prototype,"vegaClick",void 0),Zt([l()],Jt.prototype,"selectionType",void 0),Zt([l()],Jt.prototype,"vegaTableRowSelectionController",void 0),Zt([l()],Jt.prototype,"vegaTableRowExpandController",void 0),Zt([l()],Jt.prototype,"vegaTableRowClickController",void 0),Zt([l()],Jt.prototype,"expandEventEmitter",void 0),Zt([c("connectedCallback")],Jt.prototype,"connectedCallback",null);var ei=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ti extends n{constructor(){super(...arguments),this.handleRowSelect=e=>{this.checked=e,w.notify(m,{host:this.host,checked:e,rowKey:this.rowKey})}}connectedCallback(){this.initRowSelectionObserver()}disconnectedCallback(){w.unregister(y,this.rowSelectionAllObserver),w.unregister(m,this.rowSelectionObserver)}setChecked(e){this.checked=e}initRowSelectionObserver(){this.rowSelectionAllObserver=new S(St.bind(this),(e=>{(e.checked||!1===e.checked&&e.noneChecked)&&(this.checked=e.checked)})),w.register(y,this.rowSelectionAllObserver),this.rowSelectionObserver=new S(St.bind(this),(e=>{e.rowKey===this.rowKey&&(this.checked=e.checked)})),w.register(m,this.rowSelectionObserver)}}ei([l()],ti.prototype,"host",void 0),ei([l()],ti.prototype,"selectionType",void 0),ei([l()],ti.prototype,"rowKey",void 0),ei([l({writable:!0})],ti.prototype,"checked",void 0),ei([c("connectedCallback")],ti.prototype,"connectedCallback",null),ei([c("disconnectedCallback")],ti.prototype,"disconnectedCallback",null);var ii=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class oi extends n{connectedCallback(){this.initRowExpandObserver()}disconnectedCallback(){w.unregister(g,this.rowExpandObserver)}handleExpandIconClick(){z.call(E.getSubject(this.vegaTableRowRenderer.getParentTableRef(),B),{host:this.host,rowKey:this.rowKey,expanded:!this.expanded}).defaultPrevented||(this.expanded=!this.expanded,w.notify(g,{host:this.host,rowKey:this.rowKey,expanded:this.expanded}))}initRowExpandObserver(){this.rowExpandObserver=new S(St.bind({host:this.host}),(e=>{e.rowKey===this.rowKey&&(this.expanded=e.expanded)})),w.register(g,this.rowExpandObserver)}}ii([l()],oi.prototype,"host",void 0),ii([l()],oi.prototype,"rowKey",void 0),ii([l()],oi.prototype,"expandable",void 0),ii([l({writable:!0})],oi.prototype,"expanded",void 0),ii([l()],oi.prototype,"vegaTableRowRenderer",void 0),ii([c("connectedCallback")],oi.prototype,"connectedCallback",null),ii([c("disconnectedCallback")],oi.prototype,"disconnectedCallback",null);var ri=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class ai extends n{connectedCallback(){this.initRowClickObserver()}disconnectedCallback(){w.unregister(x,this.rowClickObserver)}handleRowClick(){z.call(E.getSubject(this.vegaTableRowRenderer.getParentTableRef(),V),{host:this.host,rowKey:this.rowKey,checked:!this.checked}).defaultPrevented||(w.notify(x,{host:this.host,rowKey:this.rowKey}),this.clickEventEmitter.emit({rowKey:this.rowKey}))}initRowClickObserver(){this.rowClickObserver=new S(Rt.bind(this),(e=>{this.clicked=e.host===this.host,"single"===this.selectionType&&this.vegaTableRowSelectionController.setChecked(e.host===this.host&&!this.checked)})),w.register(x,this.rowClickObserver)}}ri([l()],ai.prototype,"host",void 0),ri([l()],ai.prototype,"rowKey",void 0),ri([l({writable:!0})],ai.prototype,"clicked",void 0),ri([l()],ai.prototype,"checked",void 0),ri([l()],ai.prototype,"selectionType",void 0),ri([l()],ai.prototype,"vegaClick",void 0),ri([l()],ai.prototype,"vegaTableRowSelectionController",void 0),ri([l()],ai.prototype,"clickEventEmitter",void 0),ri([l()],ai.prototype,"vegaTableRowRenderer",void 0),ri([c("connectedCallback")],ai.prototype,"connectedCallback",null),ri([c("disconnectedCallback")],ai.prototype,"disconnectedCallback",null);var si=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};class li extends ne{constructor(){super({parent:"vega-table",subStates:[{subStateName:"expandable",parentStateName:"rowExpandable"},{subStateName:"clickable",parentStateName:"rowClickable"},{subStateName:"paddingX",parentStateName:"paddingX",callback:e=>{const t=C(this.host,"vega-table");0!==t.dataSource.length&&0!==t.columns.length||(this.paddingX=e)}},{subStateName:"selectionType",parentStateName:"rowSelection",callback:e=>{if(e){const{type:t="multiple"}=e;this.selectionType=t}else this.selectionType=null}},{subStateName:"columnDivider",parentStateName:"columnDivider"},{subStateName:"density",parentStateName:"density"}]})}watchSelectionType(){this.updateClickable()}handleComponentWillLoad(){this.updateClickable()}updateClickable(){this.selectionType&&(this.clickable="single"===this.selectionType||this.clickable)}}si([l()],li.prototype,"host",void 0),si([l({writable:!0})],li.prototype,"expandable",void 0),si([l({writable:!0})],li.prototype,"clickable",void 0),si([l({writable:!0})],li.prototype,"paddingX",void 0),si([l({writable:!0})],li.prototype,"selectionType",void 0),si([l({writable:!0})],li.prototype,"columnDivider",void 0),si([l({writable:!0})],li.prototype,"density",void 0),si([c("watchSelectionType")],li.prototype,"watchSelectionType",null),si([c("componentWillLoad")],li.prototype,"handleComponentWillLoad",null);var ni=function(e,t,i,o){var r,a=arguments.length,s=a<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(s=(a<3?r(s):a>3?r(t,i,s):r(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s};const di=class{constructor(e){r(this,e),this.vegaClick=a(this,"vegaClick",7),this.click=a(this,"click",7),this.vegaExpand=a(this,"vegaExpand",7),this.expand=a(this,"expand",7),this.globalSlimmers={},this.vegaTableRowRenderer=new Jt,this.vegaTableRowSelectionController=new ti,this.vegaTableRowExpandController=new oi,this.vegaTableRowClickController=new ai,this.vegaTableRowStateController=new li,this.clickEventEmitter=ae(di,T),this.expandEventEmitter=ae(di,L),this.checkboxValueChangeEventPrevent=new re([T],(()=>this.host),void 0,!0),this.pageResizeObserverSlimmer=new J,this.vegaComponentUsageRuntimeMetricsSlimmer=new b,this.checkedNotifySlimmer=oe(di,"checked","watchChecked"),this.expandedNotifySlimmer=oe(di,"expanded","watchExpanded"),this.stripedNotifySlimmer=oe(di,"striped","watchStriped"),this.rowDividerNotifySlimmer=oe(di,"rowDivider","watchRowDivider"),this.currentBreakpoint=ee()}watchSelectionType(){}watchChecked(){}watchExpanded(){}watchStriped(){}watchRowDivider(){}render(){return v(e("slot",null)),Q(e(o,{class:{"row-divider":this.rowDivider,"column-divider":this.columnDivider,striped:this.striped,[`density-${H.formatCustom(this.density)}`]:!0}},this.vegaTableRowRenderer.render()),this.host)}get host(){return s(this)}static get watchers(){return{selectionType:["watchSelectionType"],checked:["watchChecked"],expanded:["watchExpanded"],striped:["watchStriped"],rowDivider:["watchRowDivider"]}}};ni([u()],di.prototype,"globalSlimmers",void 0),ni([h()],di.prototype,"vegaTableRowRenderer",void 0),ni([h()],di.prototype,"vegaTableRowSelectionController",void 0),ni([h()],di.prototype,"vegaTableRowExpandController",void 0),ni([h()],di.prototype,"vegaTableRowClickController",void 0),ni([h()],di.prototype,"vegaTableRowStateController",void 0),ni([h()],di.prototype,"clickEventEmitter",void 0),ni([h()],di.prototype,"expandEventEmitter",void 0),ni([h()],di.prototype,"checkboxValueChangeEventPrevent",void 0),ni([h()],di.prototype,"pageResizeObserverSlimmer",void 0),ni([h()],di.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),ni([h()],di.prototype,"checkedNotifySlimmer",void 0),ni([h()],di.prototype,"expandedNotifySlimmer",void 0),ni([h()],di.prototype,"stripedNotifySlimmer",void 0),ni([h()],di.prototype,"rowDividerNotifySlimmer",void 0),di.style=":host{display:contents}:host(.v-hidden){display:none}td{padding:0px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));vertical-align:middle}td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.striped) .vega-table-row:not(.checked):not(.clickable:hover) td{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.checked td{background-color:rgba(var(--v-bg-table-selected-row, 204, 223, 255, 1))}:not(.checked).clickable:hover{cursor:pointer}:not(.checked).clickable:hover td{background-color:rgba(var(--v-bg-quaternary, 241, 248, 251, 1))}.vega-table-checkbox-wrapper{display:flex;align-items:center;justify-content:center}.vega-table-row .vega-table-expand-icon-wrapper{display:flex;align-items:center;justify-content:center}.vega-table-row .vega-table-expand-icon-wrapper vega-icon{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;cursor:pointer}.vega-table-row.expand-row .vega-table-expand-icon-wrapper vega-icon{transform:rotate(180deg)}:host tr.expand-row td{border-top-width:1px;border-left-width:0px;border-right-width:0px;border-bottom-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-input-field, 171, 198, 216, 1))}:host tr.expand-row td:first-of-type{border-left-width:1px;border-top-width:1px;border-bottom-left-radius:0px}:host tr.expand-row td:last-of-type{border-right-width:1px;border-top-width:1px;border-bottom-right-radius:0px}tr.expand-row-space{display:block;padding-top:8px}:host(.row-divider:not(:last-of-type)) td{border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));border-bottom-width:1px;border-bottom-style:solid}:host(.row-divider:not(:last-of-type)) td:first-of-type,:host(.row-divider:not(:last-of-type)) td:last-of-type{border-radius:0px}:host(.density-default) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-default) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-default) tr.expand-row-space{display:block;padding-top:8px}:host(.density-compact) td:first-of-type{border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.density-compact) td:last-of-type{border-top-right-radius:4px;border-bottom-right-radius:4px}:host(.density-compact) tr.expand-row-space{display:block;padding-top:4px}:host(.density-relaxed) td:first-of-type{border-top-left-radius:12px;border-bottom-left-radius:12px}:host(.density-relaxed) td:last-of-type{border-top-right-radius:12px;border-bottom-right-radius:12px}:host(.density-relaxed) tr.expand-row-space{display:block;padding-top:12px}.vega-table-expand-action-column{width:40px;min-width:40px}.vega-table-selection-column{width:40px;min-width:40px}";export{nt as vega_table,ct as vega_table_body,wt as vega_table_cell,At as vega_table_expand_row,Pt as vega_table_head,Gt as vega_table_head_cell,Qt as vega_table_head_row,di as vega_table_row}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,F as t,f as i,r as n,c as r,H as o,g as a}from"./p-6b2342e0.js";import{s}from"./p-519a7d55.js";import{c as l,V as d,L as c,M as h,I as v}from"./p-6e1ab235.js";import{V as p,I as f}from"./p-d849e0f5.js";import{D as w,a as u,f as m,V as g,d as x,S as b,g as y,h as k,i as C,j as R}from"./p-447c7590.js";import{a as j}from"./p-8c9ea6f4.js";import{c as D}from"./p-86194314.js";import{p as E}from"./p-08835909.js";import{c as z}from"./p-de97c6d9.js";import{V as I}from"./p-39482a1a.js";import{s as O}from"./p-824a06ba.js";import{q as M}from"./p-b1faebe0.js";import{C as P}from"./p-db57dddc.js";import{y as S,z as T,A as $,B as V}from"./p-308aa2e3.js";import{O as L}from"./p-331a62d5.js";import{C as A}from"./p-2d0d575f.js";import{f as B}from"./p-d27ae9ff.js";import{g as F}from"./p-a4670e23.js";import{P as W}from"./p-7d9cd9c8.js";import{d as N}from"./p-1bc5b3bc.js";import{c as H}from"./p-a0467b83.js";import{T as _}from"./p-d5ff8b7f.js";import{s as U}from"./p-6bd5c49b.js";import{v as Y}from"./p-54ae02db.js";import{S as K}from"./p-fde50319.js";import{b as Z}from"./p-0c667d6a.js";import{f as q}from"./p-d9671d27.js";import"./p-6a334573.js";import"./p-bccee21e.js";import"./p-b75ee3ba.js";import"./p-a528714c.js";import"./p-ed45b3b6.js";import"./p-74168615.js";import"./p-d884c644.js";import"./p-5f377954.js";import"./p-e77a83e4.js";import"./p-db8cdba6.js";import"./p-112455b1.js";import"./p-262ec334.js";var X=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class G extends d{getEventPreviewRef(){return this.eventPreviewRef}render(){return e(t,null,this.switchPanelRenderer.render(),this.viewRenderer.render(),e("vega-calendar-event-preview",{ref:e=>{this.eventPreviewRef=e}}))}}X([l()],G.prototype,"host",void 0),X([l()],G.prototype,"switchPanelRenderer",void 0),X([l()],G.prototype,"viewRenderer",void 0);var J=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Q extends d{constructor(){super(...arguments),this.handleViewChange=e=>{this.currentPeriodController.updateCalendarPeriod(e.detail,this.postOperationDate)},this.todayButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.now())},this.nextButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.next())},this.prevButtonClick=()=>{this.currentPeriodController.setCurrentPeriod(this.currentPeriod.previous())},this.moreActionMenuClick=e=>{this.moreActionClickEmitter.emit(e.detail)}}getSwitchPanelRef(){return this.switchPanelRef}render(){return e("vega-flex",{direction:"row",gap:"size-16",justifyContent:"space-between",alignItems:"center",class:"calendar-switch-panel",ref:e=>this.switchPanelRef=e},this.renderDateSwitch(),e("div",{class:"calendar-view-switch-container"},this.showSwitchView?this.renderViewSwitch():null,this.renderMoreActionMenu()))}renderDateSwitch(){return e("div",{class:"calendar-date-switch-container"},e("vega-button",{variant:"secondary",size:"small",ref:e=>{w.addUniqueObserverToNode(e,u,this.todayButtonClick)},label:this.translationSlimmer.t("Today")}),e("vega-button-circle",{variant:"secondary",size:"small",icon:j.getIconKey("chevron-left"),label:"previous",showTooltip:!1,ref:e=>{w.addUniqueObserverToNode(e,u,this.prevButtonClick)}}),e("vega-button-circle",{variant:"secondary",size:"small",icon:j.getIconKey("chevron-right"),label:"next",showTooltip:!1,ref:e=>{w.addUniqueObserverToNode(e,u,this.nextButtonClick)}}),this.renderCurrentPeriod())}renderCurrentPeriod(){return e("vega-font",{class:"calendar-current-date",variant:"font-field-label",color:"text-primary"},this.getViewDateSummary())}renderViewSwitch(){return e("vega-segment-control",{segments:Q.views.map((e=>Object.assign(Object.assign({},e),{text:this.translationSlimmer.t(e.text)}))),size:"small",variant:"text-only",selected:this.viewMode,ref:e=>{w.addUniqueObserverToNode(e,m,this.handleViewChange)}})}renderMoreActionMenu(){var t,i;if(null===(i=null===(t=this.moreActionDropdownProps)||void 0===t?void 0:t.source)||void 0===i?void 0:i.length)return e("vega-dropdown",Object.assign({alignment:"end",trigger:"click"},this.moreActionDropdownProps,{ref:e=>{w.addUniqueObserverToNode(e,g,this.moreActionMenuClick)}}),e("vega-button-circle",{size:"small",icon:j.getIconKey("ellipsis-vertical"),variant:"icon-only"}))}getViewDateSummary(){const e=this.currentPeriod.current;let t="";switch(this.viewMode){case"day":{const i=this.translationSlimmer.t(e.getMonthName());t=`${e.date} ${i}, ${e.year}`;break}case"week":{const e=this.calendarView.dateItems[0],i=e[0],n=e[e.length-1],[r,o]=[i,n].map((e=>this.translationSlimmer.t(e.getMonthName())));t=`${i.date} ${r}${i.year===n.year?"":", "+i.year} - ${n.date} ${o}, ${n.year}`;break}case"month":t=`${this.translationSlimmer.t(e.getMonthName())}, ${e.year}`}return t}}j.register({"chevron-right":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>'},"chevron-left":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>'},"ellipsis-vertical":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M48 464a48 48 0 1 1 0-96 48 48 0 1 1 0 96zm0-160a48 48 0 1 1 0-96 48 48 0 1 1 0 96zM0 96a48 48 0 1 1 96 0A48 48 0 1 1 0 96z"/></svg>'}}),Q.views=[{text:"Day",key:"day"},{text:"Week",key:"week"},{text:"Month",key:"month"}],J([l()],Q.prototype,"viewMode",void 0),J([l()],Q.prototype,"calendarView",void 0),J([l()],Q.prototype,"currentPeriod",void 0),J([l()],Q.prototype,"moreActionDropdownProps",void 0),J([l()],Q.prototype,"moreActionClickEmitter",void 0),J([l()],Q.prototype,"currentPeriodController",void 0),J([l()],Q.prototype,"calendarViewController",void 0),J([l()],Q.prototype,"translationSlimmer",void 0),J([l()],Q.prototype,"postOperationDate",void 0),J([l()],Q.prototype,"showSwitchView",void 0);var ee=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class te extends d{getCalendarViewElementRef(){return this.calendarViewElementRef}render(){return e("div",{class:`calendar-view calendar-view-${this.viewMode} ${!1===this.showWeekends?"calendar-hide-weekends":""}`,ref:e=>this.calendarViewElementRef=e},"month"===this.viewMode?this.monthViewRenderer.render():this.viewWithTimeRenderer.render())}}ee([l()],te.prototype,"viewMode",void 0),ee([l()],te.prototype,"showWeekends",void 0),ee([l()],te.prototype,"monthViewRenderer",void 0),ee([l()],te.prototype,"viewWithTimeRenderer",void 0);var ie=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class ne extends d{emit(e,t){this.shouldHandleClickEvent(e)?this.dateClickEmitter.emit(t):this.shouldHandleDblClickEvent(e)&&this.dateDblClickEmitter.emit(t)}shouldHandleClickEvent(e){return!0===this.enableDateClick&&"click"===e.type}shouldHandleDblClickEvent(e){return!0!==this.enableDateClick&&"dblclick"===e.type}generateDateBlockRenderProps(e,t,i){const n={};return e||(this.enableDateClick?(n.tabIndex=0,n.role="button",n.onClick=e=>{this.handleDateBlockClick(e,t,i)},n.onKeyDown=D()):n.onDblClick=e=>{this.handleDateBlockClick(e,t,i)}),n}}ie([l()],ne.prototype,"enableDateClick",void 0),ie([l()],ne.prototype,"dateClickEmitter",void 0),ie([l()],ne.prototype,"dateDblClickEmitter",void 0);var re=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class oe extends ne{render(){return e("div",{class:"calendar-view-month-container"},e("div",{class:"calendar-view-row calendar-view-title border-divider-bottom"},this.calendarView.weekdays.map((t=>e("div",{key:t},this.translationSlimmer.t(t))))),this.renderMonthViewContent())}handleDateBlockClick(e,t){const{target:i,clientX:n,clientY:r}=e;if(this.isMonthBlockBlankArea(i)){const{year:i,month:o,date:a}=t;this.emit(e,{year:i,month:o,date:a,hour:0,mouseEventInfo:{clientX:n,clientY:r}})}}renderMonthViewContent(){const t=this.currentPeriod.current;return this.calendarView.dateItems.map(((i,n)=>{const r=this.monthEventRenderer.getCurrentRowEvents(i),o=this.monthEventRenderer.filterRowDisplayEvents(r);return e("div",{key:n,class:"calendar-view-row border-divider-bottom"},i.map(((i,n)=>{var a;const s=null===(a=this.isDateDisabled)||void 0===a?void 0:a.call(this,i.toDate()),l=this.generateDateBlockRenderProps(s,i);return e("div",Object.assign({class:{"row-cell border-divider-right":!0,"current-month-day":i.compare(t).inMonth,active:i.isToday(this.timezone),disabled:s},key:`${i.month}-${i.date}`},l),this.renderDateBlock(i),this.monthEventRenderer.render(i,r[n],o[n],n))})))}))}renderDateBlock(t){return e("div",{class:"date"},1===t.date&&e("div",{class:"month-block"},t.getMonthName(!0)),e("div",{role:"button",tabIndex:0,class:"grid-col",onDblClick:e=>{this.handleDateLabelClick(e,t)},onClick:e=>{this.handleDateLabelClick(e,t)},onKeyDown:D()},t.date))}goToCurrentDayView(e){this.currentPeriodController.updateCalendarPeriod("day",e)}handleDateLabelClick(e,t){e.stopPropagation(),this.showSwitchView&&(this.shouldHandleClickEvent(e)||this.shouldHandleDblClickEvent(e))&&this.goToCurrentDayView(t)}isMonthBlockBlankArea(e){return!e.classList.contains("more-button")&&"VEGA-CALENDAR-EVENT"!==e.tagName}}re([l()],oe.prototype,"viewMode",void 0),re([l()],oe.prototype,"calendarView",void 0),re([l()],oe.prototype,"currentPeriod",void 0),re([l()],oe.prototype,"currentPeriodController",void 0),re([l()],oe.prototype,"monthEventRenderer",void 0),re([l()],oe.prototype,"translationSlimmer",void 0),re([l()],oe.prototype,"isDateDisabled",void 0),re([l()],oe.prototype,"showSwitchView",void 0),re([l()],oe.prototype,"timezone",void 0);var ae=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class se extends ne{render(){return e("div",{class:"calendar-view-container"},this.renderViewTitle(),this.renderViewContent())}handleDateBlockClick(e,t,i){const{year:n,month:r,date:o}=t,{clientX:a,clientY:s}=e;this.emit(e,{year:n,month:r,date:o,hour:i,mouseEventInfo:{clientX:a,clientY:s}})}renderViewTitle(){const t=this.calendarView.dateItems[0],i=this.calendarView.weekdays;return e("div",{class:"calendar-view-title-container"},e("div",{class:"calendar-view-row"},e("div",{class:"time-line-empty"}),e("div",{class:"calendar-view-title"},t.map(((t,n)=>e("div",{key:t.date,class:{active:t.isToday(this.timezone)}},e("div",null,this.translationSlimmer.t(i[n])),e("div",{class:"week-day"},t.date)))))),e("div",{class:"calendar-view-row calendar-view-event-all-container border-divider-bottom"},e("div",{class:"time-line-all"},this.translationSlimmer.t("All Day")),this.dayViewFullDayEventRenderer.render()))}renderViewContent(){const t=this.calendarView.dateItems[0];return e("div",{class:"calendar-view-row calendar-view-day-container"},this.timeLineRenderer.render(),e("div",{class:"calendar-view-content-container"},e("div",{class:"calendar-view-content"},t.map((t=>{var i;const n=null===(i=this.isDateDisabled)||void 0===i?void 0:i.call(this,t.toDate());return e("div",{class:{"grid-col border-divider-left":!0,disabled:n},key:t.date},e("div",{class:"hour-empty border-divider-top"}),this.renderHourBlock(t,n))}))),this.dayViewTimedEventRenderer.render(),this.timeMarkerRenderer.render(t)))}renderHourBlock(t,i){return Array(24).fill("").map(((n,r)=>{var o;let a=!1;if(!i){const e=new Date(t.toDate().setHours(r));a=null===(o=this.isDateDisabled)||void 0===o?void 0:o.call(this,e)}const s=this.generateDateBlockRenderProps(i||a,t,r);return e("div",Object.assign({key:r,class:{"grid-cell border-divider-top":!0,disabled:i||a}},s))}))}}ae([l()],se.prototype,"viewMode",void 0),ae([l()],se.prototype,"timeLineRenderer",void 0),ae([l()],se.prototype,"timeMarkerRenderer",void 0),ae([l()],se.prototype,"dayViewTimedEventRenderer",void 0),ae([l()],se.prototype,"dayViewFullDayEventRenderer",void 0),ae([l()],se.prototype,"calendarView",void 0),ae([l()],se.prototype,"translationSlimmer",void 0),ae([l()],se.prototype,"isDateDisabled",void 0),ae([l()],se.prototype,"enableDateClick",void 0),ae([l()],se.prototype,"timezone",void 0);class le extends d{render(){const t=this.getTimeLineTitles();return e("div",{class:"time-line"},e("div",{class:"hour-empty"}),t.map(((t,i)=>e("div",{key:t},e("div",{class:"time-text","data-time":0===i?24:i},t)))))}getTimeLineTitles(){const e=[];if("12-hour"===this.timeFormat){e.push("12 AM");for(let t=1;t<12;t++)e.push(`${t} AM`);e.push("12 PM");for(let t=1;t<12;t++)e.push(`${t} PM`)}else for(let t=0;t<24;t++)e.push(`${E(t)}`);return e}}!function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);o>3&&a&&Object.defineProperty(t,i,a)}([l()],le.prototype,"timeFormat",void 0);const de=(e=0)=>{const t=[0,1,2,3,4,5,6];return t.concat(t).slice(e,e+7)};var ce;!function(e){e.sun="Sunday",e.mon="Monday",e.tue="Tuesday",e.wed="Wednesday",e.thu="Thursday",e.fri="Friday",e.sat="Saturday"}(ce||(ce={}));const he=()=>Intl.DateTimeFormat().resolvedOptions().timeZone;class ve{constructor(){this.WEEKDAYS_SHORT=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.weekdays=de()}getWeekdayNames(){return this.WEEKDAYS_SHORT}generateDates(e){const t=e.startDate.toDate(),i=[];for(let n=0;n<e.count;n++)i.push(new Date(t)),t.setDate(t.getDate()+1);return i}generateWeekHead(){return this.weekdays.map((e=>this.getWeekdayNames()[e]))}}class pe{constructor(e,t){this._weekdays=e,this._dateItems=t}get weekdays(){return this._weekdays}get dateItems(){return this._dateItems}}class fe extends ve{generate(e){return new pe([this.generateWeekHead()[e.current.toDate().getDay()]],[[e.current]])}}class we{constructor(e,t){this._hours=e,this._minutes=t}static fromString(e){const t=this.convertTimeTo24Hour(e),[i,n]=t.split(":");return new we(Number(i),Number(n))}static fromDate(e){return new we(e.getHours(),e.getMinutes())}static calculateDuration(e,t,i="minutes"){let n=t.totalMinutes;0===t.hours&&0!==e.hours&&(n+=1440);const r=n-e.totalMinutes;return"hours"===i?r/60:r}static convertTimeTo24Hour(e){const t=e.toLocaleLowerCase();if(t.includes("am")||t.includes("pm")){const e=t.includes("am"),i=t.replace("am","").replace("pm","").trim(),[n,r]=i.split(":"),o=r.padStart(2,"0");return e?`${"12"===n?"00":n}:${o}`:`${"12"===n?"12":`${Number(n)+12}`}:${o}`}return e}get hours(){return this._hours}get minutes(){return this._minutes}get totalMinutes(){return 60*this._hours+this._minutes}toString(e="hh:mm"){const t=this._hours.toString().padStart(2,"0"),i=this._minutes.toString().padStart(2,"0");switch(e.toLowerCase()){case"hh:m":return`${t}:${this._minutes}`;case"h:mm":return`${this._hours}:${i}`;case"h:m":return`${this._hours}:${this._minutes}`;case"12-hour":return`${this._hours%12||12}:${i} ${I.t(this._hours>=12?"pm":"am")}`;default:return`${t}:${i}`}}}class ue{constructor(e,t){this.originalDate=e,this.timezone=t,this.syncDateTime()}static fromDate(e,t){return new ue(e,t)}static fromInitDataSource(e,t){const i=new Date(e);if(t.time){const e=we.fromString(t.time);i.setHours(e.hours,e.minutes,0,0)}else t.endTimeMissing&&i.setHours(23,59,59,0);return ue.fromDate(i,t.timezone)}get calendarDate(){return this.date}get calendarTime(){return this.time}toDate(){return this.date.toDate()}setTimezone(e){this.timezone=e,this.syncDateTime()}syncDateTime(){const e=this.convertDateToTimezone(this.originalDate);this.date=new me(e.getFullYear(),e.getMonth()+1,e.getDate()),this.time=we.fromDate(e)}convertDateToTimezone(e){if(this.timezone===he())return e;try{const t=new Intl.DateTimeFormat([],{timeZone:this.timezone,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(e),i=this.findDateTimeFormatPart(t,"year"),n=this.findDateTimeFormatPart(t,"month"),r=this.findDateTimeFormatPart(t,"day"),o=this.findDateTimeFormatPart(t,"hour"),a=this.findDateTimeFormatPart(t,"minute"),s=this.findDateTimeFormatPart(t,"second");if(i&&n&&r&&o&&a&&s){const e=parseInt(i.value,10),t=parseInt(n.value,10),l=parseInt(r.value,10),d=parseInt(o.value,10),c=parseInt(a.value,10),h=parseInt(s.value,10);return new Date(e,t-1,l,d,c,h)}}catch(e){c.warn("Invalid timezone:",this.timezone)}return e}findDateTimeFormatPart(e,t){return e.find((e=>e.type===t))}}class me{constructor(e,t,i){this._date=i,this._month=t,this._year=e}static from(e,t=he()){return ue.fromDate(e,t).calendarDate}get year(){return this._year}set year(e){this._year=e}get month(){return this._month}set month(e){this._month=e}get date(){return this._date}set date(e){this._date=e}isToday(e=he()){if(e===he()){const e=new Date;return e.getFullYear()===this.year&&e.getMonth()+1===this.month&&e.getDate()===this.date}const{year:t,month:i,date:n}=ue.fromDate(new Date,e).calendarDate;return t===this.year&&i===this.month&&n===this.date}toDate(){return new Date(this.year,this.month-1,this.date)}compare(e){const{year:t,month:i}=e,n={isPreviousMonth:!1,inMonth:!1,isNextMonth:!1};return this.year===t?this.month<i?n.isPreviousMonth=!0:this.month>i?n.isNextMonth=!0:n.inMonth=!0:this.year>t?n.isNextMonth=!0:n.isPreviousMonth=!0,n}equal(e){const{year:t,month:i,date:n}=e;return this._year===t&&this._month===i&&this._date===n}getMonthName(e=!1){return I.t(this.toDate().toLocaleDateString("en-US",{month:e?"short":"long"}))}}class ge extends ve{generate(e){const t=this.generateDates(e),i=e.showWeekends;let n=this.generateWeekHead(),r=[t.map((e=>me.from(e)))];return!1===i&&(n=n.slice(1,6),r=r.map((e=>e.slice(1,6)))),new pe(n,r)}}class xe extends ve{generate(e){const t=e.showWeekends;let i=[],n=[];this.generateDates(e).forEach(((e,t)=>{t%7||(i[t/7]=n=[]);const r=me.from(e);n.push(r)}));let r=this.generateWeekHead();return!1===t&&(r=r.slice(1,6),i=i.map((e=>e.slice(1,6)))),new pe(r,i)}}class be{constructor(e,t,i){this._count=e,this._timezone=i||he(),this._current=t||me.from(new Date,this._timezone),this.calculatePeriod(this._current)}get current(){return this._current}get startDate(){return this._startDate}get endDate(){return this._endDate}get count(){return this._count}get type(){return this._type}get showWeekends(){return this._showWeekends}get timezone(){return this._timezone}goTo(e){return this.createBy(e)}now(){return this.createBy(me.from(new Date,this._timezone))}calculatePeriod(e){const t=e.toDate();this.count>1&&t.setDate(t.getDate()-de().indexOf(t.getDay())),this._startDate=me.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=me.from(t)}}var ye;function ke(e,t=15){const[i,n]=e.split(":");return Math.round((60*Number(i)+Number(n))/t)}function Ce(e){return"vega-calendar-event-slot-"+e}function Re(e,t=ye.NEXT){const i=e.toDate().getDay();if(0===i||6===i){let n=0===i?1:2;return t===ye.PREVIOUS&&(n=0===i?-2:-1),me.from(new Date(e.year,e.month-1,e.date+n))}return e}function je(e="bg-accent6-primary"){return M(e)?`.event-bg-color{${O.formatToken(e)}}`:`.event-bg-color{background-color:${e}}`}!function(e){e.PREVIOUS="-1",e.NEXT="1"}(ye||(ye={}));class De extends be{constructor(e,t,i){super(De.DISPLAY_DATE_COUNT,e,i),this._type="day",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();e.setDate(e.getDate()+1);let t=me.from(e);return!1===this._showWeekends&&(t=Re(t)),this.createBy(t)}previous(){const e=this.current.toDate();e.setDate(e.getDate()-1);let t=me.from(e);return!1===this._showWeekends&&(t=Re(t,ye.PREVIOUS)),this.createBy(t)}now(){let e=me.from(new Date,this.timezone);return!1===this._showWeekends&&(e=Re(e)),this.createBy(e)}createBy(e){return new De(e,this._showWeekends,this.timezone)}}De.DISPLAY_DATE_COUNT=1;class Ee extends be{constructor(e,t,i){super(Ee.DISPLAY_DATE_COUNT,e,i),this._type="week",this._showWeekends=!0,this._showWeekends=!1!==t}next(){const e=this.current.toDate();return e.setDate(e.getDate()+7),this.createBy(me.from(e))}previous(){const e=this.current.toDate();return e.setDate(e.getDate()-7),this.createBy(me.from(e))}createBy(e){return new Ee(e,this._showWeekends,this.timezone)}}Ee.DISPLAY_DATE_COUNT=7;class ze extends be{constructor(e,t,i){super(ze.DISPLAY_DATE_COUNT,e,i),this._type="month",this._showWeekends=!0,this._showWeekends=!1!==t}static getMonthFirstDay(e,t){const i=e||me.from(new Date,t);return new me(i.year,i.month,1)}calculatePeriod(e){const t=ze.getMonthFirstDay(e).toDate();t.setDate(t.getDate()-de().indexOf(t.getDay())),this._startDate=me.from(t),t.setDate(t.getDate()+this.count-1),this._endDate=me.from(t)}next(){const e=this.current.toDate();return e.setMonth(e.getMonth()+1),this.createBy(me.from(e))}previous(){const e=this.current.toDate();return e.setMonth(e.getMonth()-1),this.createBy(me.from(e))}createBy(e){return new ze(e,this._showWeekends,this.timezone)}}ze.DISPLAY_DATE_COUNT=42;var Ie=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Oe extends d{constructor(){super(...arguments),this.monthViewGenerator=new xe,this.weekViewGenerator=new ge,this.dayViewGenerator=new fe}initialCalendarView(){this.setCalendarView(this.getCalendarViewByPeriod(this.currentPeriod))}generateCalendarView(e){this.setCalendarView(this.getCalendarViewByPeriod(e))}getCalendarViewByPeriod(e){switch(e.type){case"week":return this.weekViewGenerator.generate(e);case"day":return this.dayViewGenerator.generate(e);default:return this.monthViewGenerator.generate(e)}}setCalendarView(e){this.calendarView=e}}Ie([l({writable:!0})],Oe.prototype,"calendarView",void 0),Ie([l()],Oe.prototype,"currentPeriod",void 0),Ie([l()],Oe.prototype,"showWeekends",void 0),Ie([l()],Oe.prototype,"currentPeriodController",void 0),Ie([h("componentWillLoad")],Oe.prototype,"initialCalendarView",null),Ie([h("watchCurrentPeriodChange")],Oe.prototype,"generateCalendarView",null);var Me=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Pe extends d{setCurrentPeriod(e){this.currentPeriod=e}updateCalendarPeriod(e,t){switch(e){case"month":this.setCurrentPeriod(new ze(t,this.showWeekends,this.timezone));break;case"week":this.setCurrentPeriod(new Ee(t,this.showWeekends,this.timezone));break;case"day":t=!1===this.showWeekends?Re(t):t,this.setCurrentPeriod(new De(t,this.showWeekends,this.timezone))}}initialCurrentPeriod(){this.updateCalendarPeriod(this.viewMode,me.from(new Date,this.timezone))}emitChangeEvent(e,t){e&&t&&e.startDate.equal(t.startDate)&&e.endDate.equal(t.endDate)||(e&&e.type!==this.viewMode&&(this.viewMode=e.type),this.changeEventEmitter.emit({viewMode:e.type,currentPeriod:this.getCurrentPeriodSummary()}))}updateCurrentPeriodByViewMode(e){this.currentPeriod&&e!==this.currentPeriod.type&&this.updateCalendarPeriod(e,this.currentPeriod.current)}updateCurrentPeriodAfterHideWeekEndsChange(){this.updateCalendarPeriod(this.viewMode,this.currentPeriod.current)}getCurrentPeriodSummary(){const{current:e,startDate:t,endDate:i}=this.currentPeriod;return{year:e.year,month:e.month,startDate:{date:t.date,month:t.month,year:t.year},endDate:{date:i.date,month:i.month,year:i.year}}}}Me([l({writable:!0})],Pe.prototype,"currentPeriod",void 0),Me([l()],Pe.prototype,"changeEventEmitter",void 0),Me([l({writable:!0})],Pe.prototype,"viewMode",void 0),Me([l()],Pe.prototype,"showWeekends",void 0),Me([l()],Pe.prototype,"timezone",void 0),Me([h("componentWillLoad")],Pe.prototype,"initialCurrentPeriod",null),Me([h("watchCurrentPeriodChange")],Pe.prototype,"emitChangeEvent",null),Me([h("watchViewModeChange")],Pe.prototype,"updateCurrentPeriodByViewMode",null),Me([h("watchShowWeekendsChange")],Pe.prototype,"updateCurrentPeriodAfterHideWeekEndsChange",null);var Se=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Te extends d{constructor(){super(...arguments),this.maxMonthDisplayEventsCount=2,this.popoverHideObserver=null}getCurrentRowEvents(e){const t=[];return e.forEach((e=>{const i=this.calendarEventController.getCurrentDateEvents(e);t.push(i)})),this.fullDayEventLayoutRenderer.sortLongEvents(t)}filterRowDisplayEvents(e){const t=[];return e.forEach((e=>{const i=e.length>this.maxMonthDisplayEventsCount?e.slice(0,this.maxMonthDisplayEventsCount-1):e;t.push(i)})),this.hideTheCutOffEvents(e,t)}getMonthEventContainerRef(){return this.eventContainerRef}render(t,i,n,r){const o=i.slice(n.length).filter((e=>e)).length;return e("div",{class:"events-container",ref:e=>this.eventContainerRef=e},e("div",{class:"event-list"},this.fullDayEventLayoutRenderer.render(n,r,t)),this.renderMoreButton(i,o,t))}addMaxDisplayCountChange(){w.addUniqueObserverToNode(this.host,S,(e=>{this.maxMonthDisplayEventsCount!==e.detail&&(this.maxMonthDisplayEventsCount=e.detail,"month"===this.viewMode&&i(this.host))}))}renderMoreButton(t,i,n){if(i){const r=t.filter((e=>e&&(e.isAllDayEvent||e.isGroupEvent()))),o=t.filter((e=>e&&!e.isAllDayEvent&&!e.isGroupEvent()));return e("div",{class:"month-event-more"},e("vega-popover",{trigger:"click",placement:"right",padding:"0",ref:e=>{this.setPopoverHideObserver(e)},isScreenPosition:!0},e("div",{tabIndex:0,slot:"popover-content",role:"button",class:"more-button",onKeyDown:D()},`${i} More`),e("vega-flex",{slot:"popover"},e("vega-box",{padding:"size-12",width:256},e("vega-flex",{direction:"col",gap:"0",class:"group-events"},e("vega-font",{textAlign:"center",variant:"font-field-label",color:"text-primary",style:{padding:"4px 0",marginBottom:"8px"}},`${n.date} ${n.getMonthName()} ${n.year}`),e("vega-box",{maxHeight:"calc(60vh - 6px)",style:{overflowY:"auto"},padding:"size-4"},e("vega-flex",{direction:"col",gap:"size-4",style:{paddingBottom:o.length?"4px":"0px"}},r.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0},n,!0)))),o.map((e=>this.eventItemRenderer.render(e,{"month-event":!0,"calendar-event-large-size":!0,"calendar-event-in-popover":!0},n,!0)))))),e("div",{class:"preview-container",ref:e=>{e?this.eventPreviewPopoverController.setEventPreviewContainerMap(t,n,e):this.eventPreviewPopoverController.deleteEventPreviewContainer(t,n)}}))))}}hideTheCutOffEvents(e,t){const i=[],n=[],r=t.map((e=>e[e.length-1])).filter((e=>e&&e.isGroupEvent()));return r.length&&r.forEach((i=>{e.filter((e=>e.includes(i))).length>t.filter((e=>e.includes(i))).length&&n.push(i)})),n.length?(t.forEach((e=>{e.length&&e[e.length-1]&&n.includes(e[e.length-1])?i.push(e.slice(0,e.length-1)):i.push(e)})),i):t}setPopoverHideObserver(e){e?(this.popoverHideObserver=new L((()=>!0),(async()=>await e.hide())),A.register(x.getSubject(this.host,T),this.popoverHideObserver)):this.popoverHideObserver&&A.unregister(x.getSubject(this.host,T),this.popoverHideObserver),e&&w.addUniqueObserverToNode(e,b,(()=>{A.notify(x.getSubject(this.renderer.getEventPreviewRef(),$),{})}))}}Se([l()],Te.prototype,"viewMode",void 0),Se([l()],Te.prototype,"host",void 0),Se([l()],Te.prototype,"calendarEventController",void 0),Se([l()],Te.prototype,"eventItemRenderer",void 0),Se([l()],Te.prototype,"fullDayEventLayoutRenderer",void 0),Se([l()],Te.prototype,"eventPreviewPopoverRenderer",void 0),Se([l()],Te.prototype,"renderer",void 0),Se([l()],Te.prototype,"eventPreviewPopoverController",void 0),Se([h("componentWillLoad")],Te.prototype,"addMaxDisplayCountChange",null);class $e{constructor(e,t,i,n){this.repeatStartDate=e,this.interval=t,this.count=i,this.until=n}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.cache.filter((i=>this.isSeriesInPeriod(i,t,e)))}isSeriesInPeriod(e,t,i){const n=e.toDate(),r=new Date(e.year,e.month-1,e.date+t-1),{startDate:o,endDate:a}=i,s=o.toDate(),l=a.toDate();return n>=s&&n<=l||r>=s&&r<=l||n<=s&&r>=l}generateRepeatEndsString(){return this.until?` ${I.t("until {0}",`${this.until.getMonthName()} ${this.until.date}, ${this.until.year}`)}`:this.count?` ${I.t("after {0} occurrences",this.count)}`:""}}$e.daySeconds=864e5;class Ve extends $e{constructor(e,t,i,n){super(e,t,i,n),this.initCache()}generateRepeatString(){return(this.interval>1?I.t("Repeat every {0} days",this.interval):I.t("Repeat daily"))+this.generateRepeatEndsString()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let i=this.getNextRepeatStartDate(t);for(;i&&i.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e.toDate()<=i.toDate()){this.cache.pop();break}if(i=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=new Date(e.year,e.month-1,e.date+this.interval),i=me.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(i),i)}}class Le extends $e{constructor(e,t,i,n){super(e,t,i,n),this.byMonthDay=this.repeatStartDate.date,this.initCache()}generateRepeatString(){return(this.interval>1?I.t("Repeat every {0} months on day {1}",this.interval,this.byMonthDay):I.t("Repeat monthly on day {0}",this.byMonthDay))+this.generateRepeatEndsString()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let i=this.getNextRepeatStartDate(t);for(;i&&i.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e.toDate()<=i.toDate()){this.cache.pop();break}if(i=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}initCache(){this.cache=[this.repeatStartDate]}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year,e.month-1+this.interval),i=me.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(i),i)}getNextStartDate(e,t){const i=new Date(e,t,this.byMonthDay);return i.getDate()===this.byMonthDay?i:this.getNextStartDate(e,t+1)}}class Ae extends $e{constructor(e,t,i,n,r){super(e,t,i,n),this.byWeekDay=this.sortWeekDay(r),this.initCache()}getRepeatSeries(e,t=1){return this.generateRepeatDateCacheUntilEndDate(e.endDate),this.getValidCache().filter((i=>this.isSeriesInPeriod(i,t,e)))}generateRepeatString(){const e=this.byWeekDay.map((e=>I.t(ce[e])));return(this.interval>1?I.t("Repeat every {0} weeks on {1}",this.interval,e.join(", ")):I.t("Repeat weekly on {0}",e.join(", ")))+this.generateRepeatEndsString()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t[0].toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let i=this.getNextRepeatStartDate(t);for(;i&&i[0].toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e[0]&&e[0].toDate()<=i[0].toDate()){this.cache.pop();break}if(i=e,"number"==typeof this.count&&this.getValidCache().length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDates(e);if(0===t.length||"number"==typeof this.count&&this.getValidCache().length>=this.count)return null;{const e=t.map((e=>me.from(e)));return this.cache.push(e),e}}getNextStartDates(e){return e.map((e=>new Date(e.year,e.month-1,e.date+7*this.interval))).filter((e=>!this.until||e<=this.until.toDate()))}initCache(){const e=[],t=this.getCurrentDayIndex(this.repeatStartDate);this.byWeekDay.forEach((i=>{const n=Ae.weekDay.indexOf(i)-t,{year:r,month:o,date:a}=this.repeatStartDate,s=me.from(new Date(r,o-1,a+n));(!this.until||s.toDate()<=this.until.toDate())&&e.push(s)})),this.cache=[e]}sortWeekDay(e){return e&&e.length?e.map((e=>e.toLocaleLowerCase())).sort(((e,t)=>Ae.weekDay.indexOf(e)-Ae.weekDay.indexOf(t))):[Ae.weekDay[this.getCurrentDayIndex(this.repeatStartDate)]]}getCurrentDayIndex(e){return e.toDate().getDay()}getValidCache(){const e=B(this.cache.slice(1));return this.cache[0].filter((e=>e.toDate()>=this.repeatStartDate.toDate())).concat(e).slice(0,"number"==typeof this.count?this.count:void 0)}}Ae.weekDay=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((e=>e.toLowerCase()));class Be extends $e{constructor(e,t,i,n){super(e,t,i,n),this.matchDay=this.repeatStartDate.date,this.matchMonth=this.repeatStartDate.month,this.initCache()}generateRepeatString(){const e=I.t(this.repeatStartDate.getMonthName());return(this.interval>1?I.t("Repeat every {0} years on {1} {2}",this.interval,e,this.matchDay):I.t("Repeat yearly on {0} {1}",e,this.matchDay))+this.generateRepeatEndsString()}generateRepeatDateCacheUntilEndDate(e){const t=this.cache[this.cache.length-1];if(t.toDate()<e.toDate()&&(!this.count||"number"==typeof this.count&&this.cache.length<this.count)){let i=this.getNextRepeatStartDate(t);for(;i&&i.toDate()<e.toDate();){const e=this.getNextRepeatStartDate(i);if(e&&e.toDate()<=i.toDate()){this.cache.pop();break}if(i=e,"number"==typeof this.count&&this.cache.length>=this.count)break}}}getNextRepeatStartDate(e){const t=this.getNextStartDate(e.year+this.interval),i=me.from(t);return this.until&&t>this.until.toDate()||"number"==typeof this.count&&this.cache.length>=this.count?null:(this.cache.push(i),i)}getNextStartDate(e){const t=new Date(e,this.matchMonth-1,this.matchDay);return t.getDate()===this.matchDay&&t.getMonth()+1===this.matchMonth?t:this.getNextStartDate(e+1)}initCache(){this.cache=[this.repeatStartDate]}}const Fe=new class{getPattern(e,t,i=he()){const n=me.from(e),{frequency:r,interval:o=1,byWeekDay:a,until:s,count:l}=t,d=this.initDate(s,i);return this.initRepeatPattern(r,n,o<1?1:o,l,d,a)}initDate(e,t){if(e)return me.from(new Date(e),t)}initRepeatPattern(e,t,i,n,r,o){switch(e){case"daily":return new Ve(t,i,n,r);case"weekly":return new Ae(t,i,n,r,o);case"monthly":return new Le(t,i,n,r);default:return new Be(t,i,n,r)}}},We=/^\d{1,2}\/\d{1,2}\/\d{4}/,Ne=/^\d{1,2}:\d{1,2}/;class He{constructor(e,t,i){this._eventSpansDays=1,this.repeatPattern=null,this._event=e,this._eventKey=t||F(),this._timezone=i||he(),this.checkEventRequireField(e),this.initDate(e),this.initEventSpansDays(),this.initRepeatPattern()}get event(){return this._event}get eventKey(){return this._eventKey}get title(){return this._event.title}get disabled(){return!!this._event.disabled}get variant(){return this._event.variant}get color(){return this._event.color}get isAllDayEvent(){return!!this._event.isAllDay}get isRepeatEvent(){return null!==this.repeatPattern}get startDate(){return this._startDateTime.toDate()}get endDate(){return this._endDateTime.toDate()}get startTime(){return this._startDateTime.calendarTime}get endTime(){return this._endDateTime.calendarTime}get eventSpansDays(){return this._eventSpansDays}copyTo(e,t){const i=this._eventSpansDays>1?new Date(t.year,t.month-1,t.date+(this._eventSpansDays-1)):t.toDate();return new He(Object.assign(Object.assign({},this._event),{startDate:t.toDate(),endDate:i,startTime:this.startTime.toString(),endTime:this.endTime.toString()}),e)}isGroupEvent(){return this._eventSpansDays>1}isCurrentDayEvent(e){const{startDate:t,endDate:i}=this,n=me.from(t),r=me.from(new Date(i.getFullYear(),i.getMonth(),i.getDate()+1)),o=e.toDate();return n.toDate()<=o&&r.toDate()>o}generateRepeatString(){var e;return(null===(e=this.repeatPattern)||void 0===e?void 0:e.generateRepeatString())||""}generateDateTimeString(e,t){const i=I.t(Object.values(ce)[e.toDate().getDay()]),n=this.startTime.toString(t),r=this.endTime.toString(t);return`${i}, ${e.date} ${e.getMonthName(!0)} ${e.year} ${n} - ${r}`}getEventMinutes(){return we.calculateDuration(this.startTime,this.endTime,"minutes")}getRepeatSeries(e){return this.repeatPattern?this.repeatPattern.getRepeatSeries(e,this._eventSpansDays):[]}updateTimezone(e){this._timezone=e,this._startDateTime.setTimezone(e),this._endDateTime.setTimezone(e)}checkEventRequireField(e){const{title:t,startDate:i,endDate:n,startTime:r,endTime:o}=e;if(i&&"string"==typeof i&&!We.test(i)||n&&"string"==typeof n&&!We.test(n))throw new Error("Invalid calendar event item, the date format should be MM/DD/YYYY!");if(r&&"string"==typeof r&&!Ne.test(r)||o&&"string"==typeof o&&!Ne.test(o))throw new Error("Invalid calendar event item, the time format should be HH:mm!");if(!t||!i||!n&&!o)throw new Error("Invalid calendar event item, the required field should not empty!")}initDate(e){const{startDate:t,startTime:i,endDate:n,endTime:r}=e;this.processStartDate(t,i),this.processEndDate(n,r,t)}processStartDate(e,t){this._startDateTime=ue.fromInitDataSource(e,{timezone:this._timezone,time:t})}processEndDate(e,t,i){this._endDateTime=ue.fromInitDataSource(e||i,{timezone:this._timezone,time:t,endTimeMissing:!t&&!e})}initRepeatPattern(){this._event.repeatOptions&&this._event.repeatOptions.frequency&&(this.repeatPattern=Fe.getPattern(this.startDate,this._event.repeatOptions,this._timezone))}initEventSpansDays(){const e=me.from(this.startDate),t=me.from(this.endDate);this._eventSpansDays=(t.toDate().valueOf()-e.toDate().valueOf())/864e5+1}}var _e=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ue extends d{constructor(){super(...arguments),this.repeatEventMap=new Map}getCurrentDateEvents(e){return this.createRepeatEvents().filter((t=>t.isCurrentDayEvent(e)))}updateAfterEventChange(e){this.initCalendarEvents(e),this.repeatEventMap.clear()}updateWhenComponentWillLoad(){this.initCalendarEvents(this.events)}updateAfterTimezoneChange(){this.calendarEvents.length>0&&this.calendarEvents.forEach((e=>e.updateTimezone(this.timezone))),A.notify(x.getSubject(this.host,T),{}),this.repeatEventMap.clear()}initCalendarEvents(e){const t=[];e&&e.forEach((e=>{try{const i=new He(e,void 0,this.timezone);t.push(i)}catch(t){c.warn("Invalid calendar event item:",e)}})),this.calendarEvents=t}createRepeatEvents(){const e=[],t=[];return this.calendarEvents.forEach((i=>{i.isRepeatEvent?i.getRepeatSeries(this.currentPeriod).forEach((e=>{t.push(this.generateCalendarEventByRepeatSeries(i,e))})):e.push(i)})),t.concat(e)}generateCalendarEventByRepeatSeries(e,t){const i=`${e.eventKey}-${t.year}${t.month}${t.date}`;if(this.repeatEventMap.has(i))return this.repeatEventMap.get(i);{const n=e.copyTo(i,t);return this.repeatEventMap.set(i,n),n}}}_e([l()],Ue.prototype,"host",void 0),_e([l({writable:!0})],Ue.prototype,"calendarEvents",void 0),_e([l()],Ue.prototype,"currentPeriod",void 0),_e([l()],Ue.prototype,"events",void 0),_e([l()],Ue.prototype,"timezone",void 0),_e([h("watchEventsChange")],Ue.prototype,"updateAfterEventChange",null),_e([h("componentWillLoad")],Ue.prototype,"updateWhenComponentWillLoad",null),_e([h("watchTimezoneChange")],Ue.prototype,"updateAfterTimezoneChange",null);var Ye=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ke extends d{render(t,i,n,r=!1){return e("vega-calendar-event",{"data-calendar-ref":this.host,key:`${t.eventKey}-${t.startTime.toString()}-${t.endTime.toString()}`,calendarEvent:t,class:i,onKeyDown:D(),onClick:()=>{this.handleEventClick(t),this.enabledEventPreview&&this.setupPreviewContainer(t,n,r)}},!t.isRepeatEvent&&e("slot",{name:Ce(t.event.key)}))}handleEventClick(e){this.eventClickEmitter.emit({rawEvent:e.event})}setupPreviewContainer(e,t,i){const n=this.eventPreviewPopoverController.getEventPreviewContainer(e,t,i);if(n){const r=this.renderer.getEventPreviewRef();i?(r.classList.remove("single-event-preview"),r.classList.add("group-event-preview")):(r.classList.remove("group-event-preview"),r.classList.add("single-event-preview")),A.notify(x.getSubject(r,V),{event:e,targetCalendarViewDate:t,timeFormat:this.timeFormat});const o=this.host.querySelector("[slot=event-preview-additional-fields]");o&&r.append(o);const a=Ce(e.event.key),s=this.host.querySelector(`[slot=${a}]`),l=r.querySelector(`[slot=${a}]`);s&&!l&&r.append(s.cloneNode(!0)),n.append(r)}}}Ke.backgroundColorModeEventHeight=18,Ye([l()],Ke.prototype,"host",void 0),Ye([l()],Ke.prototype,"calendarView",void 0),Ye([l()],Ke.prototype,"eventClickEmitter",void 0),Ye([l()],Ke.prototype,"timeFormat",void 0),Ye([l()],Ke.prototype,"enabledEventPreview",void 0),Ye([l()],Ke.prototype,"renderer",void 0),Ye([l()],Ke.prototype,"eventPreviewPopoverController",void 0);var Ze=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class qe extends W{constructor(){super({target:()=>this.host,callback:()=>this.updateMaxDisplayCountWithDebounce()}),this.updateMaxDisplayCountWithDebounce=N(this.updateMaxDisplayCount,500,this)}updateMaxDisplayCount(){try{const e=this.monthEventRenderer.getMonthEventContainerRef();if("month"===this.viewMode&&e&&e.parentElement){const t=e.parentElement.getBoundingClientRect().height,i=Math.floor((t-qe.monthDateTitleHeight)/Ke.backgroundColorModeEventHeight);A.notify(x.getSubject(this.host,S),{host:this.host,detail:i})}}catch(e){}}updateMaxDisplayCountAfterSwitchToMonthView(e){"month"===e&&this.updateMaxDisplayCountWithDebounce()}}qe.monthDateTitleHeight=26,Ze([l()],qe.prototype,"host",void 0),Ze([l()],qe.prototype,"monthEventRenderer",void 0),Ze([l()],qe.prototype,"viewMode",void 0),Ze([h("componentDidLoad")],qe.prototype,"updateMaxDisplayCount",null),Ze([h("watchViewModeChange")],qe.prototype,"updateMaxDisplayCountAfterSwitchToMonthView",null);var Xe=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Ge extends d{render(){const t=this.calendarView.dateItems[0],i=t.map((e=>this.calendarEventController.getCurrentDateEvents(e).filter((e=>e.isAllDayEvent||e.isGroupEvent())))),n=this.fullDayEventLayoutRenderer.sortLongEvents(i),r=this.filterDisplayEvents(n);return e("div",{class:"calendar-view-event-all"},t.map(((t,i)=>e("div",{class:"event-all-col border-divider-left",key:t.date},this.renderCurrentFullDayEvents(r[i],i,n[i],t)))))}renderCurrentFullDayEvents(i,n,r,o){const a=i.length*Ke.backgroundColorModeEventHeight-2,s=r.slice(i.length).filter(Boolean).length;return e(t,null,e("div",{class:"placeholder-block",style:{height:a+"px"}},e("span",null,i.length," events")),this.fullDayEventLayoutRenderer.render(i,n,o),s>0&&this.dayViewFullDayEventMoreButtonRenderer.render(s))}filterDisplayEvents(e){if(this.showAllEventsInDayOrWeekView)return e;{const t=[],i=Ge.maxDisplayEventLength;return e.forEach((e=>{const n=e.length>i?e.slice(0,i):e;t.push(n)})),t}}}Ge.maxDisplayEventLength=2,Xe([l()],Ge.prototype,"calendarView",void 0),Xe([l()],Ge.prototype,"calendarEventController",void 0),Xe([l()],Ge.prototype,"eventItemRenderer",void 0),Xe([l()],Ge.prototype,"fullDayEventLayoutRenderer",void 0),Xe([l()],Ge.prototype,"showAllEventsInDayOrWeekView",void 0),Xe([l()],Ge.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0);var Je=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Qe extends d{render(t,i){const n=[];return t.eventLayoutCells.forEach(((r,o)=>{let a=r.getEventBySlotIndex(0),s=0;for(let l=0;l<Qe.totalNumberOfCells;l++){const d=r.getEventBySlotIndex(l);d!==a&&(a&&n.push(e("div",{key:o,class:"time-event-block",style:this.getTimeEventStyle(s,l,o,t.getEventColumnsSpannedCount(a))},this.eventPreviewPopoverRenderer.render(a,i,{"day-event":!0,"bg-shadow":o>0}))),a=d,s=l)}})),n}getTimeEventStyle(e,t,i,n){const r=i*(1/n);return{position:"absolute",left:100*r+"%",top:100/Qe.totalNumberOfCells*e+"%",width:`calc(100% - ${100*r}%)`,height:100/Qe.totalNumberOfCells*(t-e)+"%",zIndex:i>0?`${i}`:void 0}}}Qe.totalNumberOfCells=96,Je([l()],Qe.prototype,"eventItemRenderer",void 0),Je([l()],Qe.prototype,"eventPreviewPopoverRenderer",void 0);class et{addCurrentEventToLayout(e,t){let i=e.find((e=>!e.hasOverlapEvent(t)));i?i.updateSlots(t):(i=this.createNewLayoutCell(),i.updateSlots(t),e.push(i))}}class tt{get eventLayoutCells(){return this.cells}}class it extends tt{constructor(e){super(),this.cells=e}getEventColumnsSpannedCount(e){const t=this.cells.findIndex((t=>t.getEventStartIndex(e)>=0));let i=t+1;return t<this.cells.length-1&&this.cells.slice(t+1).forEach((t=>{t.hasOverlapEvent(e)&&i++})),i}}class nt{getEventBySlotIndex(e){return this.slots[e]}getEventStartIndex(e){return this.slots.findIndex((t=>t===e))}getEventEndIndex(e){const t=this.getEventStartIndex(e);let i=t;if(t>=0)for(let n=t+1;n<this.slots.length;n++){if(this.slots[n]!==e){i=n-1;break}n===this.slots.length-1&&(i=n)}return i}}class rt extends nt{constructor(){super(...arguments),this.slots=rt.defaultSlots}hasOverlapEvent(e){const[t,i]=this.getIndexRangeFromEvent(e);let n=!1;for(let e=t;e<i;e++)if(this.slots[e]){n=!0;break}return n}updateSlots(e){const[t,i]=this.getIndexRangeFromEvent(e);i>t&&(this.slots=this.slots.slice(0,t).concat(Array(i-t).fill(e),this.slots.slice(i)))}getIndexRangeFromEvent(e){const{startTime:t,endTime:i}=e;return[ke(t.toString()),ke(i.toString())]}}rt.defaultSlots=Array(96).fill(null);class ot extends et{generate(e){const t=[new rt];return e.forEach((e=>{this.addCurrentEventToLayout(t,e)})),new it(t)}createNewLayoutCell(){return new rt}}class at{sort(e,t,i){const n=[],r=[],o=[];for(let t=0;t<e.length;t++){const i=e[t];i&&(i.isGroupEvent()?r.push(i):i.isAllDayEvent?n.push(i):o.push(i))}let a=n.concat(this.sortCalendarEventByTime(o)),s=i.getEventsByIndex(t);const l=s.filter((e=>e));if(a=r.filter((e=>l.findIndex((t=>t===e))<0)).concat(a),s.length>l.length){const e=a.slice(0,s.length-l.length);a=a.slice(s.length-l.length),s=this.insertEventsToEmptyPosition(s,e)}return a=s.concat(a),a}sortCalendarEventByTime(e){return e.sort(((e,t)=>{const i=ke(e.startTime.toString()),n=ke(t.startTime.toString());return i===n?ke(t.endTime.toString())-ke(e.endTime.toString()):i-n}))}insertEventsToEmptyPosition(e,t){return e.map((e=>{if(t.length&&!e){const e=t[0];return t=t.slice(1),e}return e}))}}var st=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class lt extends d{constructor(){super(...arguments),this.calendarEventSorter=new at,this.dayViewTimedEventLayoutGenerator=new ot}render(){return e("div",{class:"day-event-container"},this.calendarView.dateItems[0].map((t=>e("div",{key:`${t.month}-${t.date}`,class:"day-event-col"},this.renderTimedEvents(t)))))}renderTimedEvents(e){const t=this.calendarEventController.getCurrentDateEvents(e).filter((e=>!e.isAllDayEvent&&!e.isGroupEvent())),i=this.calendarEventSorter.sortCalendarEventByTime(t),n=this.dayViewTimedEventLayoutGenerator.generate(i);return this.dayViewEventLayoutRenderer.render(n,e)}}st([l()],lt.prototype,"calendarView",void 0),st([l()],lt.prototype,"calendarEventController",void 0),st([l()],lt.prototype,"dayViewEventLayoutRenderer",void 0);class dt extends tt{constructor(e){super(),this.cells=e}getEventRowsIndex(e){return this.cells.findIndex((t=>t.getEventStartIndex(e)>=0))}getEventsByIndex(e){const t=[];let i=0;return this.cells.forEach(((n,r)=>{const o=n.getEventBySlotIndex(e);t.push(o),o&&(i=r)})),t.slice(0,i+1)}}class ct extends nt{constructor(){super(...arguments),this.slots=ct.defaultSlots}updateSlots(e){const{start:t,end:i}=e;this.slots=this.slots.slice(0,t).concat(Array(i-t+1).fill(e.event),this.slots.slice(i+1))}hasOverlapEvent(e){const{start:t,end:i}=e;let n=!1;for(let e=t;e<i+1;e++)if(this.slots[e]){n=!0;break}return n}}ct.defaultSlots=Array(7).fill(null);class ht extends et{generate(e){const t=this.collectAllShouldOrderLongEvents(e),i=[this.createNewLayoutCell()];return t.forEach((e=>{this.addCurrentEventToLayout(i,e)})),new dt(i)}createNewLayoutCell(){return new ct}collectAllShouldOrderLongEvents(e){const t={};e.forEach(((e,i)=>{e.filter((e=>e&&e.isGroupEvent())).forEach((e=>{t[e.eventKey]=t[e.eventKey]?Object.assign(Object.assign({},t[e.eventKey]),{end:i,start:i-t[e.eventKey].end!=1?i:t[e.eventKey].start}):{start:i,end:i,event:e}}))}));const i=Object.values(t);return this.sortLongEventViews(i)}sortLongEventViews(e){return e.sort(((e,t)=>{const{startDate:i,endDate:n}=e.event,{startDate:r,endDate:o}=t.event;i.setHours(0,0,0),r.setHours(0,0,0),n.setHours(23,59,59),o.setHours(23,59,59);const a=o.valueOf()-r.valueOf()-(n.valueOf()-i.valueOf());return i.valueOf()!==r.valueOf()?i.valueOf()-r.valueOf():a}))}}var vt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class pt extends d{constructor(){super(...arguments),this.longEventLayoutGenerator=new ht,this.calendarEventSorter=new at}sortLongEvents(e){return this.fullDayEventLayout=this.longEventLayoutGenerator.generate(e),e.map(((e,t)=>this.calendarEventSorter.sort(e,t,this.fullDayEventLayout)))}render(t,i,n){return t.map(((t,r)=>{if(t)return e("div",{key:t.eventKey,class:"month"===this.viewMode?"month-event-block":"day-event-block",style:this.getEventStyle(t,i,r,"month"===this.viewMode?pt.monthViewEventOffsetTop:0)},this.eventPreviewPopoverRenderer.render(t,n,{"month-event":"month"===this.viewMode,"day-event":"month"!==this.viewMode}))}))}getEventStyle(e,t,i,n){const r=this.calendarView.weekdays.length,o=t;let a=t+1;const s=i;let l=!0;const d=this.fullDayEventLayout.getEventRowsIndex(e);if(d>=0){const i=this.fullDayEventLayout.eventLayoutCells[d].getEventStartIndex(e),n=this.fullDayEventLayout.eventLayoutCells[d].getEventEndIndex(e);i===t?a=n+1:l=!1}return{position:"absolute",left:100/r*o+"%",top:`${s*Ke.backgroundColorModeEventHeight+n}px`,width:100/r*(a-o)+"%",opacity:l?"1":"0"}}}pt.monthViewEventOffsetTop=26,vt([l()],pt.prototype,"eventItemRenderer",void 0),vt([l()],pt.prototype,"viewMode",void 0),vt([l()],pt.prototype,"calendarView",void 0),vt([l()],pt.prototype,"eventPreviewPopoverRenderer",void 0);var ft=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class wt extends d{constructor(){super(...arguments),this.updateShowAllFlag=e=>{e.stopPropagation(),this.showAllEventsInDayOrWeekView=!0}}render(t){if(!this.showAllEventsInDayOrWeekView)return e("div",{tabIndex:0,role:"button",class:"more-button",onKeyDown:D(),onClick:this.updateShowAllFlag},`${t} More`)}resetShowAllFlag(){this.showAllEventsInDayOrWeekView=!1}}ft([l({writable:!0})],wt.prototype,"showAllEventsInDayOrWeekView",void 0),ft([h("watchViewModeChange")],wt.prototype,"resetShowAllFlag",null);var ut=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class mt extends d{render(t){const i=t.findIndex((e=>e.isToday(this.timezone)))>=0;return e("div",{class:{"time-marker-container":!0,hidden:!i}},e("div",{class:"time-marker",style:{top:this.getTimeMarkerPosition()},ref:e=>this.timeMarkerRef=e},t.map((t=>e("div",{key:t.date,class:{active:t.isToday(this.timezone)}})))))}updateTimeLine(e){this.scrollToTargetTimeBlock(e),this.syncTimeMarkerPosition(e)}clearTimer(){clearInterval(this.timeMarkerPositionTimer)}updateTimeLineIfComponentAddBack(){this.syncTimeMarkerPosition(this.viewMode)}displayCurrentTimeBlockByDefault(){this.scrollToTargetTimeBlock(this.viewMode)}getTimeMarkerPosition(){const e=new Date;if(this.timezone&&this.timezone!==he())try{const t=new Intl.DateTimeFormat([],{timeZone:this.timezone,hour:"2-digit",minute:"2-digit",hour12:!1}).formatToParts(e),i=t.find((e=>"hour"===e.type)),n=t.find((e=>"minute"===e.type));if(void 0!==i&&void 0!==n){return(60*parseInt(i.value,10)+parseInt(n.value,10))/1440*100+"%"}}catch(e){c.warn("Invalid timezone:",this.timezone)}return(60*e.getHours()+e.getMinutes())/1440*100+"%"}syncTimeMarkerPosition(e){clearInterval(this.timeMarkerPositionTimer),"month"!==e&&(this.timeMarkerPositionTimer=setInterval((()=>{this.timeMarkerRef&&(this.timeMarkerRef.style.top=this.getTimeMarkerPosition())}),6e4))}scrollToTargetTimeBlock(e){"month"!==e&&setTimeout((()=>{const e=this.viewRenderer.getCalendarViewElementRef(),t=Math.max(0,this.getViewCenterPosition());e&&t&&e.scrollTo({top:t})}),16)}getViewCenterPosition(){const e=this.viewRenderer.getCalendarViewElementRef();if(e){const t=e.querySelector(".calendar-view-title-container"),i=t?t.offsetHeight:0,n=Math.max(("number"==typeof e.offsetHeight?e.offsetHeight:0)-i,0)/2,r="number"==typeof e.scrollHeight?e.scrollHeight:0,o=16,a=Number(this.getTimeMarkerPosition().replace("%",""))/100*Math.max(r-o-i,0);if(!isNaN(n)&&a&&a>n)return a-n+o}return 0}}ut([l()],mt.prototype,"viewMode",void 0),ut([l()],mt.prototype,"viewRenderer",void 0),ut([l()],mt.prototype,"timezone",void 0),ut([h("watchViewModeChange")],mt.prototype,"updateTimeLine",null),ut([h("disconnectedCallback")],mt.prototype,"clearTimer",null),ut([h("connectedCallback")],mt.prototype,"updateTimeLineIfComponentAddBack",null),ut([h("componentDidLoad")],mt.prototype,"displayCurrentTimeBlockByDefault",null);var gt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class xt extends d{setPostOperationDate(e){this.postOperationDate=e}setDate(e,t){if(e.current!==this.postOperationDate)if(this.shouldSetCurrentDateToFirstDayOfMonth(e,t)){const t=e.current.toDate();t&&(t.setDate(1),this.setPostOperationDate(me.from(t)))}else this.setPostOperationDate(me.from(e.current.toDate()))}updateAfterTimezoneChange(){this.postOperationDate=me.from(new Date,this.timezone)}shouldSetCurrentDateToFirstDayOfMonth(e,t){return"month"===e.type&&"month"===(null==t?void 0:t.type)&&!e.current.equal(me.from(new Date,this.timezone))}}gt([l({writable:!0})],xt.prototype,"postOperationDate",void 0),gt([l()],xt.prototype,"timezone",void 0),gt([h("watchCurrentPeriodChange")],xt.prototype,"setDate",null),gt([h("watchTimezoneChange")],xt.prototype,"updateAfterTimezoneChange",null);var bt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class yt extends d{constructor(){super(...arguments),this.popoverHideObserver=null}render(e,t,i){return this.enabledEventPreview?this.renderPreviewPopover(e,i,t):this.eventItemRenderer.render(e,i,t)}renderPreviewPopover(t,i,n){return e("vega-popover",{placement:"day"===this.viewMode?"top":"right",alignment:"center",class:{"event-preview-popover":!0,block:!0},padding:"0",size:yt.SINGLE_EVENT_PREVIEW_WIDTH,ref:e=>{this.setPopoverHideObserver(e)}},e("div",{slot:"popover-content",class:"event-preview-popover-content"},this.eventItemRenderer.render(t,i,n)),e("div",{slot:"popover"},e("div",{class:"preview-container",ref:e=>{e?this.eventPreviewPopoverController.setEventPreviewContainerMap(t,n,e):this.eventPreviewPopoverController.deleteEventPreviewContainer(t,n)}})))}setPopoverHideObserver(e){e?(this.popoverHideObserver=new L((()=>!0),(async()=>await e.hide())),A.register(x.getSubject(this.host,T),this.popoverHideObserver)):this.popoverHideObserver&&A.unregister(x.getSubject(this.host,T),this.popoverHideObserver)}}yt.SINGLE_EVENT_PREVIEW_WIDTH=400,bt([l()],yt.prototype,"host",void 0),bt([l()],yt.prototype,"renderer",void 0),bt([l()],yt.prototype,"viewMode",void 0),bt([l()],yt.prototype,"timeFormat",void 0),bt([l()],yt.prototype,"eventItemRenderer",void 0),bt([l()],yt.prototype,"enabledEventPreview",void 0),bt([l()],yt.prototype,"eventPreviewPopoverController",void 0);class kt extends d{constructor(){super(...arguments),this.singleEventPreviewContainerMap=new Map,this.groupEventsPreviewContainerMap=new Map}setEventPreviewContainerMap(e,t,i){(Array.isArray(e)?this.groupEventsPreviewContainerMap:this.singleEventPreviewContainerMap).set(this.generateMapKey(e,t),i)}deleteEventPreviewContainer(e,t){(Array.isArray(e)?this.groupEventsPreviewContainerMap:this.singleEventPreviewContainerMap).delete(this.generateMapKey(e,t))}getEventPreviewContainer(e,t,i){const n=i?this.groupEventsPreviewContainerMap:this.singleEventPreviewContainerMap,r=this.generateMapKey(e,t);if(n.has(r))return n.get(r);{const i=this.getDateString(t),r=Array.from(n.keys()).find((t=>t.includes(e.eventKey)&&t.endsWith(i)));if(r)return n.get(r)}}clearAllPreviewContainers(){this.singleEventPreviewContainerMap.clear(),this.groupEventsPreviewContainerMap.clear()}generateMapKey(e,t){const i=this.getDateString(t);return Array.isArray(e)?e.filter((e=>e)).map((e=>e.eventKey)).join("-")+i:e.eventKey+i}getDateString(e){return`-${e.year}-${e.month}-${e.date}`}}!function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);o>3&&a&&Object.defineProperty(t,i,a)}([h("watchTimezoneChange")],kt.prototype,"clearAllPreviewContainers",null);var Ct=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Rt=class{constructor(e){n(this,e),this.vegaChange=r(this,"vegaChange",7),this.change=r(this,"change",7),this.vegaEventClick=r(this,"vegaEventClick",7),this.eventClick=r(this,"eventClick",7),this.vegaDateDblClick=r(this,"vegaDateDblClick",7),this.dateDblClick=r(this,"dateDblClick",7),this.vegaDateClick=r(this,"vegaDateClick",7),this.dateClick=r(this,"dateClick",7),this.vegaMoreActionClick=r(this,"vegaMoreActionClick",7),this.moreActionClick=r(this,"moreActionClick",7),this.globalSlimmer={},this.translationSlimmer=new _,this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new G,this.switchPanelRenderer=new Q,this.viewRenderer=new te,this.monthViewRenderer=new oe,this.viewWithTimeRenderer=new se,this.timeLineRenderer=new le,this.timeMarkerRenderer=new mt,this.monthEventRenderer=new Te,this.currentPeriodController=new Pe,this.calendarViewController=new Oe,this.postOperationDateController=new xt,this.dayViewFullDayEventRenderer=new Ge,this.eventPreviewPopoverController=new kt,this.dayViewFullDayEventMoreButtonRenderer=new wt,this.dayViewTimedEventRenderer=new lt,this.eventItemRenderer=new Ke,this.dayViewEventLayoutRenderer=new Qe,this.fullDayEventLayoutRenderer=new pt,this.eventPreviewPopoverRenderer=new yt,this.calendarEventController=new Ue,this.eventResponsiveController=new qe,this.changeEventEmitter=z(Rt,m),this.eventClickEmitter=z(Rt,y),this.dateDblClickEmitter=z(Rt,k),this.moreActionClickEmitter=z(Rt,C),this.dateClickEmitter=z(Rt,R),this.changeEventPrevent=new P([m],(()=>this.switchPanelRenderer.getSwitchPanelRef())),this.timeFormatNotifySlimmer=H(Rt,"timeFormat","watchTimeFormat"),this.showEventColorBarNotifySlimmer=H(Rt,"showEventColorBar","watchShowEventColorBar"),this.postOperationDate=this.getInitialPostOperationDate(),this.showAllEventsInDayOrWeekView=!1,this.calendarEvents=[],this.viewMode="month",this.timeFormat="24-hour",this.isDateDisabled=()=>!1,this.showEventColorBar=!0,this.showSwitchView=!0,this.enableDateClick=!1,this.showWeekends=!0,this.enabledEventPreview=!0,this.timezone=he()}watchCurrentPeriodChange(e,t){}watchViewModeChange(e){}watchEventsChange(e){}watchTimeFormat(e){}watchShowEventColorBar(e){}watchShowWeekendsChange(){}watchTimezoneChange(){}render(){return s(e(o,null,this.renderer.render()),this.host)}getInitialPostOperationDate(){return me.from(new Date,this.timezone)}get host(){return a(this)}static get watchers(){return{currentPeriod:["watchCurrentPeriodChange"],viewMode:["watchViewModeChange"],events:["watchEventsChange"],timeFormat:["watchTimeFormat"],showEventColorBar:["watchShowEventColorBar"],showWeekends:["watchShowWeekendsChange"],timezone:["watchTimezoneChange"]}}};Ct([f()],Rt.prototype,"globalSlimmer",void 0),Ct([v()],Rt.prototype,"translationSlimmer",void 0),Ct([v()],Rt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Ct([v()],Rt.prototype,"renderer",void 0),Ct([v()],Rt.prototype,"switchPanelRenderer",void 0),Ct([v()],Rt.prototype,"viewRenderer",void 0),Ct([v()],Rt.prototype,"monthViewRenderer",void 0),Ct([v()],Rt.prototype,"viewWithTimeRenderer",void 0),Ct([v()],Rt.prototype,"timeLineRenderer",void 0),Ct([v()],Rt.prototype,"timeMarkerRenderer",void 0),Ct([v()],Rt.prototype,"monthEventRenderer",void 0),Ct([v()],Rt.prototype,"currentPeriodController",void 0),Ct([v()],Rt.prototype,"calendarViewController",void 0),Ct([v()],Rt.prototype,"postOperationDateController",void 0),Ct([v()],Rt.prototype,"dayViewFullDayEventRenderer",void 0),Ct([v()],Rt.prototype,"eventPreviewPopoverController",void 0),Ct([v()],Rt.prototype,"dayViewFullDayEventMoreButtonRenderer",void 0),Ct([v()],Rt.prototype,"dayViewTimedEventRenderer",void 0),Ct([v()],Rt.prototype,"eventItemRenderer",void 0),Ct([v()],Rt.prototype,"dayViewEventLayoutRenderer",void 0),Ct([v()],Rt.prototype,"fullDayEventLayoutRenderer",void 0),Ct([v()],Rt.prototype,"eventPreviewPopoverRenderer",void 0),Ct([v()],Rt.prototype,"calendarEventController",void 0),Ct([v()],Rt.prototype,"eventResponsiveController",void 0),Ct([v()],Rt.prototype,"changeEventEmitter",void 0),Ct([v()],Rt.prototype,"eventClickEmitter",void 0),Ct([v()],Rt.prototype,"dateDblClickEmitter",void 0),Ct([v()],Rt.prototype,"moreActionClickEmitter",void 0),Ct([v()],Rt.prototype,"dateClickEmitter",void 0),Ct([v()],Rt.prototype,"changeEventPrevent",void 0),Ct([v()],Rt.prototype,"timeFormatNotifySlimmer",void 0),Ct([v()],Rt.prototype,"showEventColorBarNotifySlimmer",void 0),Rt.style='.border-divider-top{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-left-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-top.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.border-divider-left{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-right-width:0px;border-bottom-width:0px}.border-divider-left.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.border-divider-right{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-bottom-width:0px}.border-divider-bottom{border:1px solid rgba(var(--v-border-divider-secondary, 199, 217, 229, 1));border-top-width:0px;border-left-width:0px;border-right-width:0px}:host{display:flex;flex-direction:column;border-radius:12px;border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));overflow:hidden;width:100%;height:100%;box-sizing:border-box;max-height:1966px}.calendar-switch-panel{padding:24px;border-bottom-width:1px;border-top-width:0px;border-left-width:0px;border-right-width:0px;border-style:solid;border-color:rgba(var(--v-border-color-divider, 171, 198, 216, 1));flex-shrink:0;width:100%;box-sizing:border-box}.calendar-switch-panel .calendar-date-switch-container{display:flex;gap:8px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-view-switch-container{display:flex;gap:16px;align-items:center;flex-direction:row}.calendar-switch-panel .calendar-current-date{padding-left:8px}.calendar-view{width:100%;position:relative;flex-grow:1;overflow-y:auto;overflow-x:hidden;--calendar-weekday-columns:7}.calendar-view.calendar-hide-weekends{--calendar-weekday-columns:5}.calendar-view-month .calendar-view-month-container{width:100%;display:grid;min-height:100%;grid-template-rows:43px repeat(6, minmax(64px, 1fr))}.calendar-view-month .calendar-view-title{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));top:0;left:0;z-index:62}.calendar-view-month .calendar-view-title div{padding-top:12px;padding-bottom:12px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-title div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-month .calendar-view-row{position:relative;display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-month .calendar-view-row.calendar-view-title{position:sticky}.calendar-view-month .calendar-view-row:last-child{border-bottom-width:0px}.calendar-view-month .calendar-view-row .row-cell{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between}.calendar-view-month .calendar-view-row .row-cell:last-child{border-right-width:0px}.calendar-view-month .calendar-view-row .row-cell .date{padding-top:4px;padding-bottom:4px;padding-right:12px;padding-left:8px}.calendar-view-month .calendar-view-row .row-cell .date>div{display:inline-block;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .calendar-view-row .row-cell .date>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-month .calendar-view-row .row-cell .date .month-block{margin-right:2px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col{text-align:center;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;cursor:pointer;width:18px;height:18px;line-height:18px}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}.calendar-view-month .calendar-view-row .row-cell .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-month .calendar-view-row .row-cell.current-month-day .date>div{color:rgba(var(--v-text-primary, 32, 54, 69, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled{background-color:rgba(var(--v-bg-secondary, 245, 247, 247, 1))}.calendar-view-month .calendar-view-row .row-cell.disabled .date>div{color:rgba(var(--v-text-disabled, 176, 180, 181, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col{background-color:rgba(var(--v-bg-action, 19, 98, 226, 1));border-top-left-radius:9999px;border-bottom-left-radius:9999px;color:rgba(var(--v-text-on-action, 252, 252, 252, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:hover{background-color:rgba(var(--v-bg-action-hover, 4, 112, 236, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:active{background-color:rgba(var(--v-bg-action-active, 29, 65, 195, 1))}.calendar-view-month .calendar-view-row .row-cell.active .date .grid-col:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:2px}.calendar-view-container{width:100%}.calendar-view-container .calendar-view-title-container{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));position:sticky;top:0;left:0;z-index:62}.calendar-view-container .calendar-view-row{box-sizing:border-box;width:100%;display:flex;flex-direction:row}.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{width:72px;text-align:right;padding-right:8px;box-sizing:border-box;font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-shrink:0}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-row .time-line,.calendar-view-container .calendar-view-row .time-line-empty,.calendar-view-container .calendar-view-row .time-line-all{font-family:"Inter", sans-serif;font-size:14px;font-weight:400;line-height:18px}}.calendar-view-container .calendar-view-title{width:100%}.calendar-view-container .calendar-view-title>div{padding:12px;padding-bottom:8px;color:rgba(var(--v-text-secondary, 107, 116, 125, 1));font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px;text-align:center;display:flex;flex-direction:column;gap:8px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title>div{font-family:"Inter", sans-serif;font-size:14px;font-weight:700;line-height:18px}}.calendar-view-container .calendar-view-title .week-day{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-title .week-day{font-family:"Inter", sans-serif;font-size:20px;font-weight:500;line-height:24px;letter-spacing:0px}}.calendar-view-container .calendar-view-title .active div{color:rgba(var(--v-text-link, 19, 98, 226, 1))}.calendar-view-container .calendar-view-event-all-container{align-items:center}.calendar-view-container .calendar-view-event-all{display:grid;grid-template-rows:1fr;flex-grow:1;min-height:18px}.calendar-view-container .calendar-view-day-container .time-line{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr))}.calendar-view-container .calendar-view-day-container .time-line .time-text{margin-top:-9px}.calendar-view-container .calendar-view-day-container .calendar-view-content{width:100%}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col{display:grid;grid-template-rows:16px repeat(24, minmax(74px, 1fr));grid-template-columns:minmax(64px, 1fr)}.calendar-view-container .calendar-view-day-container .calendar-view-content .grid-col>.border-divider-top:first-child{border-top-width:0px}.calendar-view-container .calendar-view-content-container{width:100%;position:relative}.calendar-view-week .calendar-view-container{min-height:100%}.calendar-view-week .calendar-view-container .calendar-view-title{display:grid;grid-template-rows:1fr;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-event-all{grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .calendar-view-container .calendar-view-day-container .calendar-view-content{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .time-marker-container .time-marker{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-week .day-event-container{display:grid;grid-template-columns:repeat(var(--calendar-weekday-columns), minmax(64px, 1fr))}.calendar-view-day .calendar-view-container{min-height:100%}.time-marker-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.time-marker-container.hidden{display:none}.time-marker-container .time-marker{position:absolute;height:2px;display:grid;min-width:100%;left:0;top:0;z-index:61}.time-marker-container .time-marker div{width:100%;height:2px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));opacity:0.3}.time-marker-container .time-marker div.active{opacity:1;position:relative}.time-marker-container .time-marker div.active::before{content:"";display:block;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;position:absolute;width:8px;height:8px;background-color:rgba(var(--v-bg-status-error, 255, 110, 139, 1));top:-3px;left:-4px}.day-event-container{position:absolute;min-width:100%;left:0;top:16px;height:calc(100% - 16px);pointer-events:none}.day-event-container .day-event-col{height:100%;overflow:hidden}.day-event-container vega-calendar-event{pointer-events:auto;height:100%}.calendar-view-month .month-event-row{position:absolute;width:100%;overflow:hidden;height:calc(100% - 26px);left:0;bottom:0}.calendar-view-month .events-container{width:100%;box-sizing:border-box;overflow:hidden;padding:2px;display:flex;flex-direction:column;gap:2px;justify-content:space-between;flex-grow:1}.calendar-view-month .events-container .event-list{display:flex;flex-direction:column;gap:2px;flex-grow:1}.calendar-view-month .events-container .event-list .month-event-block{box-sizing:border-box;padding-left:2px;padding-right:3px}.calendar-view-month .events-container .month-event-more .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-month .events-container .month-event-more .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-month .events-container .month-event-more .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all{position:relative}.calendar-view-container .calendar-view-event-all .placeholder-block{padding-top:2px;padding-bottom:2px;box-sizing:content-box}.calendar-view-container .calendar-view-event-all .placeholder-block span{display:none}.calendar-view-container .calendar-view-event-all .day-event-block{padding-top:2px;padding-right:2px;box-sizing:border-box;padding-left:3px}.calendar-view-container .calendar-view-event-all .more-button{display:inline-block;height:16px;font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;color:rgba(var(--v-text-link, 19, 98, 226, 1));cursor:pointer;border-radius:2px;margin-left:2px;padding:2px}@media screen and (min-width: 768px) and (max-width: 1023px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){.calendar-view-container .calendar-view-event-all .more-button{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}.calendar-view-container .calendar-view-event-all .more-button:focus-visible{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}.calendar-view-container .calendar-view-event-all .event-all-col{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start}.calendar-view-container .day-event-col{position:relative}.calendar-view-container .day-event-col .time-event-block{box-sizing:border-box;padding-right:8px;padding-bottom:2px;padding-top:3px}.calendar-view-container .day-event-col .time-event-block vega-calendar-event.bg-shadow::part(event-container):not(:focus){outline:2px solid rgba(var(--v-bg-primary, 252, 252, 252, 1))}.calendar-view-container .day-event-col .time-event-block:focus-within{z-index:60 !important}.calendar-event-slot-container{display:none}.event-preview-popover{height:100%}.event-preview-popover.block{display:block}.event-preview-popover .event-preview-popover-content{height:100%}';var jt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Dt extends d{getEventTitleContainerRef(){return this.eventTitleContainerRef}getSlotContainerRef(){return this.slotContainerRef}render(){return e(t,null,this.injectBackgroundColorStyle(),this.calendarEventRender())}calendarEventRender(){return this.calendarEvent.isAllDayEvent||this.calendarEvent.isGroupEvent()?this.renderBackgroundModeEvent():this.renderNormalEvent()}renderBackgroundModeEvent(){const t=this.calendarEvent.disabled;return e("div",{role:"button",tabIndex:0,class:{"slot-container":this.slotMode,"background-color-mode":!0,"event-bg-color":!t,"bg-disabled":t},ref:e=>this.slotContainerRef=e},this.slotMode?this.getSlotElement():this.calendarEvent.title)}renderNormalEvent(){const{variant:t,disabled:i}=this.calendarEvent,n=t||"primary",r=!this.host.classList.contains("day-event"),o={"slot-container":this.slotMode,"event-container":!0,disabled:i,[n]:!0};if(r)return e("div",{role:"button",tabIndex:0,class:o,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),this.slotMode?this.getSlotElement():this.defaultNormalMonthEventContentRender());{const t=this.calendarEvent.getEventMinutes();return e("div",{part:"event-container",class:Object.assign(Object.assign({},o),{vertical:t>30,"duration-half-an-hour":30===t,"event-bg-color":!i,"bg-disabled":i}),role:"button",tabIndex:0,ref:e=>this.slotContainerRef=e},!this.slotMode&&this.renderEventStatus(),e("div",{class:"cover-block"}),this.slotMode?this.getSlotElement():this.defaultNormalTimedEventContentRender(t))}}renderEventStatus(){if(this.showColorBar){const t=this.calendarEvent.disabled;return e("div",{class:{"event-status":!0,"event-bg-color":!t,"bg-disabled":t}},e("span",{class:{stripe:"secondary"===this.calendarEvent.variant}}))}}defaultNormalMonthEventContentRender(){const{startTime:t,title:i}=this.calendarEvent;return e("div",{class:"event-title"},`${t.toString(this.timeFormat)} ${i}`)}defaultNormalTimedEventContentRender(t){const{startTime:i,endTime:n,title:r}=this.calendarEvent;return e("div",{class:"event-content"},e("div",{class:{"event-title":!0,"title-word-wrap":t>30},ref:e=>this.eventTitleContainerRef=e},r),e("div",{class:"event-time"},e("vega-icon",{size:"size-12",icon:j.getIconKey("clock-three")}),e("span",null,`${i.toString(this.timeFormat)} - ${n.toString(this.timeFormat)}`)))}getSlotElement(){if(!this.calendarEvent.isRepeatEvent)return e("slot",null)}injectBackgroundColorStyle(){return e("style",{nonce:Y.nonce},je(this.calendarEvent.color))}}j.register({"clock-three":{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">\x3c!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --\x3e<path fill="currentColor" d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 13.3 10.7 24 24 24H360c13.3 0 24-10.7 24-24s-10.7-24-24-24H280V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"/></svg>'}}),jt([l()],Dt.prototype,"host",void 0),jt([l()],Dt.prototype,"timeFormat",void 0),jt([l()],Dt.prototype,"calendarEvent",void 0),jt([l()],Dt.prototype,"slotMode",void 0),jt([l()],Dt.prototype,"showColorBar",void 0);var Et=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class zt extends K{constructor(){super({parent:()=>this.host["data-calendar-ref"],subStates:[{subStateName:"timeFormat",parentStateName:"timeFormat"},{subStateName:"showColorBar",parentStateName:"showEventColorBar"}]})}}Et([l({writable:!0})],zt.prototype,"timeFormat",void 0),Et([l({writable:!0})],zt.prototype,"showColorBar",void 0);class It extends d{setVerticalTitleMaxHeight(){const e=this.renderer.getEventTitleContainerRef();if(e&&e.classList.contains("title-word-wrap")){const t=window.getComputedStyle(e),i=Z(t.height),n=Z(t.lineHeight),r=Math.max(Math.floor(i/n),1);e.style.maxHeight=r*n+"px"}}}!function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);o>3&&a&&Object.defineProperty(t,i,a)}([l()],It.prototype,"renderer",void 0);var Ot=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Mt extends d{findTheCalendarEventSlot(){if(this.calendarEvent){const{event:e}=this.calendarEvent,t=this.getParentCalendarElement();if(t){const i=t.querySelector(`vega-calendar-event-slot[event-key='${e.key}']`);i&&(this.slotMode=!0,this.matchSlotElement=i)}}}appendTheRepeatEventSlotToContainer(){const e=this.renderer.getSlotContainerRef();if(this.slotMode&&e&&this.matchSlotElement&&(this.calendarEvent.isRepeatEvent||this.isPopoverContent())){const t=this.matchSlotElement.cloneNode(!0);t.removeAttribute("slot"),e.querySelector("vega-calendar-event-slot")||e.appendChild(t)}}getParentCalendarElement(){return this.host["data-calendar-ref"]}isPopoverContent(){return this.host.classList.contains("calendar-event-in-popover")}}Ot([l()],Mt.prototype,"host",void 0),Ot([l()],Mt.prototype,"calendarEvent",void 0),Ot([l({writable:!0})],Mt.prototype,"slotMode",void 0),Ot([l()],Mt.prototype,"renderer",void 0),Ot([h("componentWillLoad")],Mt.prototype,"findTheCalendarEventSlot",null),Ot([h("componentDidLoad")],Mt.prototype,"appendTheRepeatEventSlotToContainer",null);var Pt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const St=class{constructor(e){n(this,e),this.globalSlimmer={},this.pageResizeObserverSlimmer=new W({target:()=>this.host,callback:()=>this.titleMaxHeightController.setVerticalTitleMaxHeight()}),this.vegaComponentUsageRuntimeMetricsSlimmer=new p,this.renderer=new Dt,this.slotController=new Mt,this.subStateController=new zt,this.titleMaxHeightController=new It,this.timeFormat="24-hour",this.slotMode=!1,this.showColorBar=!0}render(){return U(e("slot",null)),s(e(o,null,this.calendarEvent?this.renderer.render():null),this.host)}get host(){return a(this)}};Pt([f()],St.prototype,"globalSlimmer",void 0),Pt([v()],St.prototype,"pageResizeObserverSlimmer",void 0),Pt([v()],St.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Pt([v()],St.prototype,"renderer",void 0),Pt([v()],St.prototype,"slotController",void 0),Pt([v()],St.prototype,"subStateController",void 0),Pt([v()],St.prototype,"titleMaxHeightController",void 0),St.style='.bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host{display:block;box-sizing:border-box;width:100%}:host .background-color-mode{border-radius:2px;color:rgba(var(--v-text-black, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px;cursor:pointer;overflow:hidden;white-space:nowrap}@media screen and (min-width: 768px) and (max-width: 1023px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host .background-color-mode{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host .background-color-mode:not(.slot-container){padding-left:8px;padding-right:8px}:host .background-color-mode:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host .event-container{display:block;width:100%;border-radius:4px;cursor:pointer;box-sizing:border-box;overflow:hidden}:host .background-color-mode.slot-container{height:16px;line-height:16px}:host ::slotted(vega-calendar-event-slot){position:relative;pointer-events:none}:host(.month-event) .event-container{display:flex;flex-direction:row;gap:4px;align-items:center;min-height:16px}:host(.month-event) .event-container:not(.slot-container){padding-left:2px;padding-right:2px}:host(.month-event) .event-container .event-status{width:8px;height:8px;box-sizing:border-box;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;margin-left:2px;flex-shrink:0}:host(.month-event) .event-container .event-status span{display:none;width:100%;height:100%;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px}:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.month-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.month-event) .event-container.secondary .event-status span{display:block;background-size:4px 4px;opacity:0.8}:host(.month-event) .event-container.tertiary .event-status{padding:1px}:host(.month-event) .event-container.tertiary .event-status span{display:block;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1))}:host(.month-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.month-event) .event-container:hover{background-color:rgba(var(--v-bg-action-secondary-hover, 4, 112, 236, 0.1))}:host(.month-event) .event-container:active{background-color:rgba(var(--v-bg-action-secondary-active, 29, 65, 195, 0.1))}:host(.month-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .event-container{position:relative}:host(.day-event) .event-container:not(.slot-container){padding-left:8px;padding-right:8px}:host(.day-event) .event-container .event-status{position:absolute;width:4px;height:100%;left:0;top:0;z-index:1}:host(.day-event) .event-container .event-status span{display:none}:host(.day-event) .event-container .cover-block{position:absolute;height:100%;width:100%;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));border-radius:4px;left:0;top:0;opacity:0.7}:host(.day-event) .event-container .event-content,:host(.day-event) .event-container .event-time{display:flex;flex-direction:row;align-items:center}:host(.day-event) .event-container .event-content{gap:8px;position:relative;height:100%;box-sizing:border-box}:host(.day-event) .event-container .event-time{gap:4px;color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-time{font-family:"Inter", sans-serif;font-size:12px;font-weight:400;line-height:16px}}:host(.day-event) .event-container .event-time vega-icon{flex-shrink:0}:host(.day-event) .event-container .event-time span{white-space:nowrap}:host(.day-event) .event-container .event-title{color:rgba(var(--v-text-primary, 32, 54, 69, 1));font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}@media screen and (min-width: 768px) and (max-width: 1023px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1024px) and (max-width: 1439px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}@media screen and (min-width: 1440px) and (max-width: 9999px){:host(.day-event) .event-container .event-title{font-family:"Inter", sans-serif;font-size:12px;font-weight:700;line-height:16px;letter-spacing:0px}}:host(.day-event) .event-container .event-title.title-word-wrap{overflow:hidden}:host(.day-event) .event-container .event-title:not(.title-word-wrap){white-space:nowrap}:host(.day-event) .event-container.duration-half-an-hour{padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.vertical{height:100%}:host(.day-event) .event-container.vertical .event-content{flex-direction:column;align-items:flex-start;gap:4px;padding-top:8px;padding-bottom:8px}:host(.day-event) .event-container.secondary .event-status span,:host(.day-event) .event-container.tertiary .event-status span{display:block;position:absolute;border-top-left-radius:4px;border-bottom-left-radius:4px}:host(.day-event) .event-container.secondary .cover-block,:host(.day-event) .event-container.tertiary .cover-block{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.secondary .event-status span{width:100%;height:100%;top:0px;left:0px;background-size:4px 4px;opacity:0.8}:host(.day-event) .event-container.secondary .cover-block{opacity:0.9}:host(.day-event) .event-container.tertiary .event-status span{background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));width:2px;height:calc(100% - 2px);top:1px;left:1px}:host(.day-event) .event-container.tertiary .cover-block{opacity:1}:host(.day-event) .event-container.disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container.disabled .event-status{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host(.day-event) .event-container:focus{outline:2px solid rgba(var(--v-border-color-action, 19, 98, 226, 1));outline-offset:0px}:host(.day-event) .slot-container{min-height:16px}:host(.month-event.calendar-event-large-size) .background-color-mode{border-radius:4px}:host(.month-event.calendar-event-large-size) .background-color-mode:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .event-container:not(.slot-container){padding-top:4px;padding-bottom:4px}:host(.month-event.calendar-event-large-size) .slot-container{height:24px;display:flex;align-items:center;line-height:24px}.stripe{background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}';var Tt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class $t extends d{registerEventPreviewUpdateObserver(){w.addUniqueObserverToNode(this.host,V,(e=>{this.previewPayload=e,this.currentEvent=e.event})),w.addUniqueObserverToNode(this.host,$,(()=>{this.currentEvent=null}))}unregisterEventPreviewUpdateObserver(){w.removeUniqueObserverFromNode(this.host,V),w.removeUniqueObserverFromNode(this.host,$)}}Tt([l()],$t.prototype,"host",void 0),Tt([l({writable:!0})],$t.prototype,"currentEvent",void 0),Tt([l({writable:!0})],$t.prototype,"previewPayload",void 0),Tt([h("connectedCallback")],$t.prototype,"registerEventPreviewUpdateObserver",null),Tt([h("disconnectedCallback")],$t.prototype,"unregisterEventPreviewUpdateObserver",null);var Vt=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};class Lt extends d{componentWillLoad(){this.calendarRef=q(this.host,"vega-calendar")}render(){return this.currentEvent&&e("vega-box",{class:"event-preview"},this.injectBackgroundColorStyle(),this.renderActions(),e("vega-box",{class:"preview-content"},e("vega-flex",{gap:"size-16",direction:"col"},this.renderBasicFields(),this.renderDivider(),e("slot",{name:"event-preview-additional-fields"}))))}renderActions(){return e("vega-flex",{justifyContent:"end",class:"preview-actions"},e("vega-button-circle",{icon:j.getIconKey("close"),color:"text-primary",variant:"icon-only",onVegaClick:this.onHidePopover.bind(this)}))}renderBasicFields(){const i=this.currentEvent;return e(t,null,e("vega-flex",{alignItems:"start",gap:"size-16"},this.renderEventTitle()),e("vega-flex",{alignItems:"start",gap:"size-12"},e("vega-icon",{icon:j.getIconKey("clock"),color:"text-secondary"}),e("vega-flex",{direction:"col",gap:"size-4"},e("vega-font",{variant:"font-footnote1-long",color:"text-primary"},i.generateDateTimeString(this.previewPayload.targetCalendarViewDate,this.previewPayload.timeFormat)),i.isRepeatEvent&&e("vega-font",{variant:"font-footnote1-long",color:"text-primary"},i.generateRepeatString()))))}onHidePopover(){this.calendarRef&&A.notify(x.getSubject(this.calendarRef,T),{})}renderEventTitle(){const i=this.currentEvent,n=Ce(i.event.key);return this.host.querySelector(`[slot=${n}]`)?e("slot",{name:n}):e(t,null,e("vega-box",{corners:"rounded-full",class:{"event-bg-color":!0,"event-bg-disabled":i.disabled},flexShrink:0},e("span",{class:{[`event-color-dot-${i.variant}`]:!0}})),e("vega-font",{variant:"font-h5",color:"text-primary"},i.title))}renderDivider(){return this.host.querySelector("[slot=event-preview-additional-fields]")&&e("vega-box",null,e("vega-divider",null))}injectBackgroundColorStyle(){return e("style",{nonce:Y.nonce},je(this.currentEvent.color))}}j.register({close:{icon:'<svg width="17" height="16" viewBox="0 0 17 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_80261_51160)"><path d="M13.9604 1.29376C14.3511 0.903137 14.9854 0.903137 15.3761 1.29376C15.7667 1.68439 15.7667 2.31876 15.3761 2.70939L10.0823 8.00001L15.3729 13.2938C15.7636 13.6844 15.7636 14.3188 15.3729 14.7094C14.9823 15.1 14.3479 15.1 13.9573 14.7094L8.66668 9.41564L3.37293 14.7063C2.98231 15.0969 2.34793 15.0969 1.95731 14.7063C1.56668 14.3156 1.56668 13.6813 1.95731 13.2906L7.25106 8.00001L1.96043 2.70626C1.56981 2.31564 1.56981 1.68439 1.96043 1.29376C2.35106 0.903137 2.98543 0.903137 3.37606 1.29376L8.66668 6.58439L13.9604 1.29376Z" fill="currentColor" fill-opacity="0.95"/></g><defs><clipPath id="clip0_80261_51160"><rect width="14" height="16" fill="currentColor" transform="translate(1.66669)"/></clipPath></defs></svg>'},clock:{icon:'<svg width="17" height="16" viewBox="0 0 17 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_80261_52574)"><path d="M7.91669 3.75C7.91669 3.33437 8.25106 3 8.66669 3C9.08231 3 9.41669 3.33437 9.41669 3.75V7.6L12.0823 9.375C12.4261 9.60625 12.5198 10.0719 12.2636 10.4156C12.0604 10.7594 11.5948 10.8531 11.2511 10.5969L8.25106 8.59688C8.04169 8.48438 7.91669 8.25 7.91669 7.97188V3.75ZM8.66669 0C13.0854 0 16.6667 3.58125 16.6667 8C16.6667 12.4187 13.0854 16 8.66669 16C4.24794 16 0.666687 12.4187 0.666687 8C0.666687 3.58125 4.24794 0 8.66669 0ZM2.16669 8C2.16669 11.5906 5.07606 14.5 8.66669 14.5C12.2573 14.5 15.1667 11.5906 15.1667 8C15.1667 4.40938 12.2573 1.5 8.66669 1.5C5.07606 1.5 2.16669 4.40938 2.16669 8Z" fill="currentColor" fill-opacity="0.64"/></g><defs><clipPath id="clip0_80261_52574"><rect width="16" height="16" fill="currentColor" transform="translate(0.666687)"/></defs></svg>'}}),Vt([l()],Lt.prototype,"host",void 0),Vt([l()],Lt.prototype,"previewPayload",void 0),Vt([l()],Lt.prototype,"currentEvent",void 0),Vt([h("componentWillLoad")],Lt.prototype,"componentWillLoad",null);var At=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Bt=class{constructor(e){n(this,e),this.detailRenderer=new Lt,this.stateController=new $t,this.translationSlimmer=new _,this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(o,null,this.previewPayload&&this.detailRenderer.render()),this.host)}get host(){return a(this)}};At([v()],Bt.prototype,"detailRenderer",void 0),At([v()],Bt.prototype,"stateController",void 0),At([v()],Bt.prototype,"translationSlimmer",void 0),At([f()],Bt.prototype,"globalSlimmer",void 0),At([v()],Bt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Bt.style=":host(.single-event-preview) .event-preview{width:398px;box-sizing:border-box}:host(.single-event-preview) .preview-actions{padding-top:4px;padding-left:4px;padding-right:4px}:host(.single-event-preview) .preview-content{margin-bottom:24px;margin-left:12px;margin-right:12px;padding-left:12px;padding-right:12px}:host(.group-event-preview) .event-preview{width:320px;box-sizing:border-box;height:100%}:host(.group-event-preview) .event-preview{border:1px solid rgba(var(--v-border-divider, 171, 198, 216, 1));border-right-width:0px;border-top-width:0px;border-bottom-width:0px;border-left-width:1px;border-left-style:solid}:host(.group-event-preview) .preview-actions{padding-top:4px;padding-left:4px;padding-right:4px}:host(.group-event-preview) .preview-content{margin-bottom:16px;margin-left:12px;margin-right:12px;padding-left:4px;padding-right:4px}:host .preview-content{max-height:60vh;overflow-y:auto}:host .event-bg-color{width:12px;height:12px;margin-top:8px;position:relative}:host .event-bg-color.event-bg-disabled{background-color:rgba(var(--v-bg-disabled, 176, 180, 181, 1))}:host .event-bg-color span{display:block;position:absolute;top:0px;left:0px;opacity:0.8}:host .event-bg-color span.event-color-dot-secondary{width:100%;height:100%;background-size:4px 4px;background-image:linear-gradient(-45deg, transparent 25%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 25% 50%, transparent 50% 75%, rgba(var(--v-bg-primary, 252, 252, 252, 1)) 75% 100%)}:host .event-bg-color span.event-color-dot-tertiary{width:calc(100% - 2px);height:calc(100% - 2px);top:1px;left:1px;border-top-left-radius:9999px;border-bottom-left-radius:9999px;border-top-right-radius:9999px;border-bottom-right-radius:9999px;background-color:rgba(var(--v-bg-primary, 252, 252, 252, 1));opacity:1}";var Ft=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};const Wt=class{constructor(e){n(this,e),this.globalSlimmer={},this.vegaComponentUsageRuntimeMetricsSlimmer=new p}render(){return s(e(o,{slot:Ce(this.eventKey)},e("slot",null)),this.host)}get host(){return a(this)}};Ft([f()],Wt.prototype,"globalSlimmer",void 0),Ft([v()],Wt.prototype,"vegaComponentUsageRuntimeMetricsSlimmer",void 0),Wt.style=":host{width:100%;height:100%;position:relative}";export{Rt as vega_calendar,St as vega_calendar_event,Bt as vega_calendar_event_preview,Wt as vega_calendar_event_slot}
|