@vmscloud/moz-ui-grid-vue 0.1.41 → 0.2.0
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/README.md +1 -13
- package/dist/chunks/{index-BDQ0HlwR.js → index-2qnzL9Zm.js} +183 -32
- package/dist/chunks/index-BLDAzbGv.cjs +14 -0
- package/dist/compat/MozGridVue.vue.d.ts +1 -1
- package/dist/compat/MozPivotVue.vue.d.ts +1 -1
- package/dist/excel/ClientExcelUploadPopup.d.ts +48 -0
- package/dist/excel/ClientExcelUploadPopup.vue.d.ts +5 -0
- package/dist/excel/icons.d.ts +3 -0
- package/dist/{legacy/composables → excel}/useClientExcelExport.d.ts +2 -2
- package/dist/{legacy/composables → excel}/useClientExcelStore.d.ts +1 -1
- package/dist/index.cjs +76 -25
- package/dist/index.d.ts +27 -9
- package/dist/index.js +684 -89162
- package/dist/locale/index.d.ts +49 -0
- package/dist/{legacy/store → store}/index.d.ts +28 -28
- package/dist/store.cjs +1 -1
- package/dist/store.js +4 -4
- package/dist/{legacy/stories → stories}/_helpers/localDataLoader.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/types/injection-keys.d.ts +2 -5
- package/dist/types/modules.d.ts +87 -0
- package/dist/{legacy/types → types}/pivot-props.d.ts +1 -1
- package/dist/{legacy/types → types}/props.d.ts +1 -1
- package/dist/utils/excel/ExcelImportUtil.cjs +1 -1
- package/dist/utils/excel/ExcelImportUtil.js +1 -1
- package/dist/utils/excel/ExcelQueueManager.cjs +1 -1
- package/dist/utils/excel/ExcelQueueManager.js +1 -1
- package/dist/utils/excel/ExcelTaskRunner.cjs +1 -1
- package/dist/{legacy/utils → utils}/excel/ExcelTaskRunner.d.ts +1 -1
- package/dist/utils/excel/ExcelTaskRunner.js +1 -1
- package/dist/utils/excel/ExcelTimeoutManager.cjs +1 -1
- package/dist/utils/excel/ExcelTimeoutManager.js +2 -4
- package/dist/{legacy/utils → utils}/index.d.ts +1 -1
- package/dist/utils/toast.d.ts +12 -0
- package/docs/manual/reference_vue.md +18 -27
- package/package.json +4 -5
- package/dist/chunks/index-D5KJLBGW.cjs +0 -14
- package/dist/legacy/components/common/Dragging.d.ts +0 -17
- package/dist/legacy/components/common/Dragging.vue.d.ts +0 -49
- package/dist/legacy/components/common/custom-cell/FormulaEngine.d.ts +0 -256
- package/dist/legacy/components/common/custom-cell/FormulaInput.vue.d.ts +0 -33
- package/dist/legacy/components/common/custom-cell/GridCustomCell.vue.d.ts +0 -23
- package/dist/legacy/components/common/custom-cell/useFormulaAutocomplete.d.ts +0 -44
- package/dist/legacy/components/common/excel/ClientExcelUploadPopup.vue.d.ts +0 -201
- package/dist/legacy/components/common/excel/assets/IconDropZone.vue.d.ts +0 -2
- package/dist/legacy/components/common/excel/assets/IconFileUpload.vue.d.ts +0 -2
- package/dist/legacy/components/common/filter/GridFilter.vue.d.ts +0 -23
- package/dist/legacy/components/common/footer/GridFooter.vue.d.ts +0 -29
- package/dist/legacy/components/common/sort/GridSort.vue.d.ts +0 -23
- package/dist/legacy/components/common/toolbar/GridSearchInput.vue.d.ts +0 -33
- package/dist/legacy/components/grid/MozGridVue.vue.d.ts +0 -2041
- package/dist/legacy/components/grid/MozGridVueCore.vue.d.ts +0 -118
- package/dist/legacy/components/grid/bulk-editor/GridBulkEditor.vue.d.ts +0 -10
- package/dist/legacy/components/grid/column-settings/AlignPicker.vue.d.ts +0 -10
- package/dist/legacy/components/grid/column-settings/ColorSwatchPicker.vue.d.ts +0 -11
- package/dist/legacy/components/grid/column-settings/ColumnListItem.vue.d.ts +0 -17
- package/dist/legacy/components/grid/column-settings/ColumnOptionsPanel.vue.d.ts +0 -32
- package/dist/legacy/components/grid/column-settings/FontSizePicker.vue.d.ts +0 -10
- package/dist/legacy/components/grid/column-settings/FontStyleToggles.vue.d.ts +0 -15
- package/dist/legacy/components/grid/column-settings/MaskPresetPicker.vue.d.ts +0 -14
- package/dist/legacy/components/grid/context-menu/GridContextMenu.vue.d.ts +0 -208
- package/dist/legacy/components/grid/group-panel/GroupPanel.vue.d.ts +0 -18
- package/dist/legacy/components/grid/toolbar/ColumnPicker.vue.d.ts +0 -17
- package/dist/legacy/components/grid/toolbar/ColumnSettings.vue.d.ts +0 -30
- package/dist/legacy/components/grid/toolbar/GridOptionModal.vue.d.ts +0 -211
- package/dist/legacy/components/grid/toolbar/GridToolBox.vue.d.ts +0 -69
- package/dist/legacy/components/pivot/MozPivotVue.vue.d.ts +0 -1868
- package/dist/legacy/components/pivot/PivotContextMenu.vue.d.ts +0 -634
- package/dist/legacy/components/pivot/PivotFieldChip.vue.d.ts +0 -16
- package/dist/legacy/components/pivot/PivotFieldDropZone.vue.d.ts +0 -26
- package/dist/legacy/components/pivot/PivotFieldPanel.vue.d.ts +0 -28
- package/dist/legacy/components/pivot/PivotOptionModal.vue.d.ts +0 -534
- package/dist/legacy/components/pivot/PivotToolBox.vue.d.ts +0 -79
- package/dist/legacy/components/pivot/chart/EChart.vue.d.ts +0 -13
- package/dist/legacy/components/pivot/chart/MozPivotChart.types.d.ts +0 -16
- package/dist/legacy/components/pivot/chart/MozPivotChart.vue.d.ts +0 -14
- package/dist/legacy/components/pivot/chart/PivotChartDetail.vue.d.ts +0 -13
- package/dist/legacy/components/pivot/chart/PivotChartMini.vue.d.ts +0 -18
- package/dist/legacy/components/pivot/chart/PivotChartMultiple.vue.d.ts +0 -18
- package/dist/legacy/components/pivot/chart/PivotChartToolbar.vue.d.ts +0 -38
- package/dist/legacy/components/pivot/chart/chartUtils.d.ts +0 -45
- package/dist/legacy/components/pivot/chart/useChartData.d.ts +0 -35
- package/dist/legacy/composables/useCellTooltip.d.ts +0 -8
- package/dist/legacy/composables/useColumnFormatter.d.ts +0 -45
- package/dist/legacy/composables/useColumnSettings.d.ts +0 -35
- package/dist/legacy/composables/useContextMenu.d.ts +0 -71
- package/dist/legacy/composables/useGridBulkEditor.d.ts +0 -36
- package/dist/legacy/composables/useGridChanges.d.ts +0 -28
- package/dist/legacy/composables/useGridColumns.d.ts +0 -37
- package/dist/legacy/composables/useGridCustomCell.d.ts +0 -34
- package/dist/legacy/composables/useGridEvents.d.ts +0 -14
- package/dist/legacy/composables/useGridFilter.d.ts +0 -38
- package/dist/legacy/composables/useGridInstance.d.ts +0 -16
- package/dist/legacy/composables/useGridSelect.d.ts +0 -18
- package/dist/legacy/composables/useGridSelection.d.ts +0 -18
- package/dist/legacy/composables/useGridSort.d.ts +0 -38
- package/dist/legacy/composables/useGridUndoRedo.d.ts +0 -28
- package/dist/legacy/composables/useGridValidation.d.ts +0 -28
- package/dist/legacy/composables/useMaskPresets.d.ts +0 -38
- package/dist/legacy/composables/useSearchHighlight.d.ts +0 -12
- package/dist/legacy/icons/IconAdd.vue.d.ts +0 -11
- package/dist/legacy/icons/IconArrowDownWithTail.vue.d.ts +0 -11
- package/dist/legacy/icons/IconArrowLeft.vue.d.ts +0 -11
- package/dist/legacy/icons/IconArrowLeftWithTail.vue.d.ts +0 -11
- package/dist/legacy/icons/IconArrowRight.vue.d.ts +0 -11
- package/dist/legacy/icons/IconArrowUpCenter.vue.d.ts +0 -11
- package/dist/legacy/icons/IconArrowUpWithTail.vue.d.ts +0 -11
- package/dist/legacy/icons/IconChart.vue.d.ts +0 -11
- package/dist/legacy/icons/IconClose.vue.d.ts +0 -13
- package/dist/legacy/icons/IconColorPicker.vue.d.ts +0 -11
- package/dist/legacy/icons/IconCustomCell.vue.d.ts +0 -11
- package/dist/legacy/icons/IconDecide.vue.d.ts +0 -11
- package/dist/legacy/icons/IconDownload.vue.d.ts +0 -11
- package/dist/legacy/icons/IconDragHandler.vue.d.ts +0 -11
- package/dist/legacy/icons/IconFilter.vue.d.ts +0 -11
- package/dist/legacy/icons/IconInfoFilled.vue.d.ts +0 -11
- package/dist/legacy/icons/IconRedo.vue.d.ts +0 -9
- package/dist/legacy/icons/IconReset.vue.d.ts +0 -9
- package/dist/legacy/icons/IconResetGridToolbar.vue.d.ts +0 -11
- package/dist/legacy/icons/IconSearch.vue.d.ts +0 -11
- package/dist/legacy/icons/IconSetting.vue.d.ts +0 -11
- package/dist/legacy/icons/IconSettingFilled.vue.d.ts +0 -11
- package/dist/legacy/icons/IconSort.vue.d.ts +0 -11
- package/dist/legacy/icons/IconToastWarning.vue.d.ts +0 -11
- package/dist/legacy/icons/IconUndo.vue.d.ts +0 -9
- package/dist/legacy/icons/index.d.ts +0 -25
- package/dist/legacy/index.d.ts +0 -69
- package/dist/legacy/shared/colorPresets.d.ts +0 -36
- package/dist/legacy/stories/Autofit.stories.d.ts +0 -9
- package/dist/legacy/stories/CRUD.stories.d.ts +0 -9
- package/dist/legacy/stories/CellAttributes.stories.d.ts +0 -19
- package/dist/legacy/stories/CellMask.stories.d.ts +0 -19
- package/dist/legacy/stories/ClientExcel.stories.d.ts +0 -8
- package/dist/legacy/stories/Clipboard.stories.d.ts +0 -12
- package/dist/legacy/stories/ColumnVisibility.stories.d.ts +0 -12
- package/dist/legacy/stories/ColumnWidths.stories.d.ts +0 -11
- package/dist/legacy/stories/CustomSortFilter.stories.d.ts +0 -7
- package/dist/legacy/stories/DynamicRowHeight.stories.d.ts +0 -13
- package/dist/legacy/stories/Editors.stories.d.ts +0 -9
- package/dist/legacy/stories/EmptyState.stories.d.ts +0 -10
- package/dist/legacy/stories/FormatRow.stories.d.ts +0 -20
- package/dist/legacy/stories/Grouping.stories.d.ts +0 -14
- package/dist/legacy/stories/HeaderGroup.stories.d.ts +0 -11
- package/dist/legacy/stories/LargeData.stories.d.ts +0 -19
- package/dist/legacy/stories/MasterDetail.stories.d.ts +0 -17
- package/dist/legacy/stories/Merge.stories.d.ts +0 -10
- package/dist/legacy/stories/MultiRow.stories.d.ts +0 -12
- package/dist/legacy/stories/MultiRowCrud.stories.d.ts +0 -11
- package/dist/legacy/stories/MultiRowGroup.stories.d.ts +0 -11
- package/dist/legacy/stories/Pinning.stories.d.ts +0 -44
- package/dist/legacy/stories/Pivot.stories.d.ts +0 -23
- package/dist/legacy/stories/PivotAdvanced.stories.d.ts +0 -20
- package/dist/legacy/stories/PivotChart.stories.d.ts +0 -23
- package/dist/legacy/stories/PivotNonNumeric.stories.d.ts +0 -27
- package/dist/legacy/stories/Preset.stories.d.ts +0 -11
- package/dist/legacy/stories/ReactiveAPI.stories.d.ts +0 -8
- package/dist/legacy/stories/ReactiveSafety.stories.d.ts +0 -28
- package/dist/legacy/stories/Repro.stories.d.ts +0 -36
- package/dist/legacy/stories/RowAPI.stories.d.ts +0 -12
- package/dist/legacy/stories/SelectionModes.stories.d.ts +0 -35
- package/dist/legacy/stories/Streaming.stories.d.ts +0 -12
- package/dist/legacy/stories/Tree.stories.d.ts +0 -13
- package/dist/legacy/stories/WorkerMode.stories.d.ts +0 -15
- package/dist/legacy/utils/dialog/dialog.d.ts +0 -19
- /package/dist/{legacy/store → store}/UploadRefreshRegistry.d.ts +0 -0
- /package/dist/{legacy/store → store}/excelStore.d.ts +0 -0
- /package/dist/{legacy/stores → stores}/index.d.ts +0 -0
- /package/dist/{legacy/stores → stores}/projectInfo/projectInfo.contract.d.ts +0 -0
- /package/dist/{legacy/stories → stories}/_helpers/sampleData.d.ts +0 -0
- /package/dist/{legacy/types → types}/FileParameter.d.ts +0 -0
- /package/dist/{legacy/types → types}/StreamingParameter.d.ts +0 -0
- /package/dist/{legacy/types → types}/excel.types.d.ts +0 -0
- /package/dist/{legacy/types → types}/index.d.ts +0 -0
- /package/dist/{legacy/types → types}/toolbar.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/async/debounce.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/crypto/crypto.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/excel/ExcelGuard.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/excel/ExcelImportUtil.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/excel/ExcelQueueManager.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/excel/ExcelTimeoutManager.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/file.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/http/rest.d.ts +0 -0
- /package/dist/{legacy/utils → utils}/id/generator.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("pinia"),r=require("vue"),o=require("./ExcelGuard.cjs"),i=require("../../chunks/notification.contract-oFkBaE2U.cjs"),a=require("../../chunks/index-
|
|
1
|
+
"use strict";var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("pinia"),r=require("vue"),o=require("./ExcelGuard.cjs"),i=require("../../chunks/notification.contract-oFkBaE2U.cjs"),a=require("../../chunks/index-BLDAzbGv.cjs"),s=require("dayjs"),l=e=>e?btoa(encodeURIComponent(e)):"",u=Symbol.for("MozProjectInfo");function c(){const e=r.inject(u);if(!e)throw new Error("[ProjectInfo] store not provided. make sure provideProjectInfo() is called in root component (e.g., App.vue).");return e}const d=n.defineStore("excelTimeout",()=>{const e=c();return{tenantID:r.computed(()=>{var t;return(null==(t=e.tenantInfo)?void 0:t.tenantID)||""}),userID:r.computed(()=>{var t;return(null==(t=e.userInfo)?void 0:t.id)||""}),timeoutMessage:r.computed(()=>a.getGridVueLocale().requestTimedOut)}}),p=class e{constructor(){t(this,"timers",new Map),t(this,"timeoutMs",3e5)}static getInstance(){return e.instance||(e.instance=new e),e.instance}clear(e){const t=this.timers.get(e);t&&clearTimeout(t),this.timers.delete(e)}start(e,t=this.timeoutMs){if(!e)return;this.clear(e);const n=i.useGridNotificationStore(),r=a.useExcelStore(),s=d(),l=window.setTimeout(()=>{var t,i;if(!n)return;const a=n.eventMessages.find(t=>{var n;return(null==(n=t.prop_value)?void 0:n.session_id)===e});a&&a.prop_value&&(a.prop_value.status="error",a.prop_value.error_message=a.prop_value.error_message||s.timeoutMessage),r.excelFileMap.delete(e);const l=o.getUserLockKey(s.tenantID,s.userID);o.unlock(l),null==(t=x.removeDownloadByClientId)||t.call(x,e),null==(i=x.tryStartNext)||i.call(x),o.removeSession(s.tenantID,s.userID),this.clear(e)},t);this.timers.set(e,l)}};t(p,"instance");let v=p;const m=v.getInstance(),_=n.defineStore("excelTask",()=>{const e=c(),t=r.computed(()=>e.currentProjectID),n=r.computed(()=>{var t;return(null==(t=e.tenantInfo)?void 0:t.tenantID)||""}),u=r.computed(()=>{var t;return(null==(t=e.tenantInfo)?void 0:t.tenantName)||""}),d=r.computed(()=>{var t;return(null==(t=e.userInfo)?void 0:t.id)||""}),p=r.computed(()=>{var t;return(null==(t=e.userInfo)?void 0:t.name)||""}),v=r.computed(()=>{var t;return(null==(t=e.currentProject)?void 0:t.projectNM)||""});return{startDownloadTask:async e=>{const r=a.useExcelStore(),c=i.useGridNotificationStore();if(!c){const e=o.getUserLockKey(n.value,d.value);return o.unlock(e),null}const _={...e||{}};_.project_id=_.project_id||t.value,_.api_key&&(_.data_path=`/api/aps/backend/${t.value}/${_.api_key}`,delete _.api_key),_.column_source&&(_.column_map=r.createColumnMapForExport(_.column_source),delete _.column_source),_.field_source&&(_.column_map=r.createFieldMapForExport(_.field_source),delete _.field_source),_.client_id||(_.client_id=a.generateGUID());const f=o.getUserLockKey(n.value,d.value),h=localStorage.getItem(f);if(h)try{const e=JSON.parse(h);if((null==e?void 0:e.sessionId)&&e.sessionId!==_.client_id)return null}catch{o.lock(f,_.client_id)}else o.lock(f,_.client_id);o.setSession(n.value,d.value,_.client_id,_.file_name||""),_.file_format||(_.file_format="excel"),r.excelFileMap.set(_.client_id,_.file_name),m.start(_.client_id);const g={noti_type:"progress",header_key:"text-file_download",noti_datetime:s().format("YYYY-MM-DD HH:mm:ss"),noti_sender_id:"",prop_value:{session_id:_.client_id,file_name:`${_.file_name||""}_${s().format("YYYYMMDD")}`,status:"in_progress",progress_per:0,operation_type:"download",remain_time:-1}};c.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===_.client_id})||c.eventMessages.unshift(g);try{await r.requestGenerateExcel(_,{headers:{"tenant-id":l(n.value),"tenant-name":l(u.value),"project-name":l(v.value),"user-name":l(p.value)}}).then(e=>{const t=e.data.data.file_name,i=_.client_id;r.excelFileMap.set(i,t),o.updateSessionFileName(n.value,d.value,i,t);const a=c.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===i});a&&a.prop_value&&(a.prop_value.file_name=t)}).catch(e=>{r.excelFileMap.delete(_.client_id);const t=c.eventMessages.find(e=>{var t;return(null==(t=e.prop_value)?void 0:t.session_id)===_.client_id});t&&t.prop_value&&(t.prop_value.status="error"),m.clear(_.client_id),o.unlock(f)})}catch(y){r.excelFileMap.delete(_.client_id),m.clear(_.client_id),o.unlock(f)}return{sessionId:_.client_id}},cancelExcelTask:async(e,t,r)=>{var a,s;if("upload"===t)return;const l=i.useGridNotificationStore();l&&l.markSessionCanceled(e),r&&await r(e);const u=o.getUserLockKey(n.value,d.value);o.unlock(u),null==(a=x.removeDownloadByClientId)||a.call(x,e),o.removeSession(n.value,d.value),null==(s=x.tryStartNext)||s.call(x)}}}),f=async e=>_().startDownloadTask(e),h=n.defineStore("excelQueue",()=>{const e=c();return{tenantID:r.computed(()=>{var t;return(null==(t=e.tenantInfo)?void 0:t.tenantID)||""}),userID:r.computed(()=>{var t;return(null==(t=e.userInfo)?void 0:t.id)||""})}}),g=class e{constructor(){t(this,"inMemoryUploadQueue",[]),t(this,"inMemoryDownloadQueue",[]),t(this,"initialized",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}initSubscriptions(){this.initialized||(this.initialized=!0,o.initExcelGuard())}loadQueue(){return this.inMemoryDownloadQueue.slice()}saveQueue(e){this.inMemoryDownloadQueue=e}enqueueDownload(e){this.initSubscriptions();const t=this.loadQueue(),n={id:a.generateGUID(),type:"download",payload:{...e},meta:{fileName:null==e?void 0:e.file_name,createdAt:Date.now()}};return t.push(n),this.saveQueue(t),this.tryStartNext(),this.getTotalQueueLength()}getQueueLength(){return this.loadQueue().length}getUploadQueueLength(){return this.inMemoryUploadQueue.length}getTotalQueueLength(){return this.getQueueLength()+this.getUploadQueueLength()}enqueueUpload(e,t){this.initSubscriptions();const n={id:a.generateGUID(),type:"upload",start:e,meta:{fileName:t,createdAt:Date.now()}};return this.inMemoryUploadQueue.push(n),this.tryStartNext(),this.getTotalQueueLength()}removeDownloadByClientId(e){if(!e)return;const t=this.loadQueue(),n=t.findIndex(t=>{var n;return"download"===t.type&&(null==(n=t.payload)?void 0:n.client_id)===e});-1!==n&&(t.splice(n,1),this.saveQueue(t))}async tryStartNext(){this.initSubscriptions();const e=h(),t=o.getUserLockKey(e.tenantID,e.userID);if(o.isLocked(t))return;const n=this.loadQueue(),r=n.length>0?n[0]:null,i=this.inMemoryUploadQueue.length>0?this.inMemoryUploadQueue[0]:null;if(!r&&!i)return;if((()=>{var e,t;if(r&&i){return((null==(e=r.meta)?void 0:e.createdAt)??0)<=((null==(t=i.meta)?void 0:t.createdAt)??0)}return!!r})()&&"download"===(null==r?void 0:r.type)){const e={...r.payload};e.client_id||(e.client_id=a.generateGUID()),o.lock(t,e.client_id),n.shift(),this.saveQueue(n);try{await f(e)}catch(s){o.unlock(t)}return}if(i){const e=this.inMemoryUploadQueue.shift();try{await Promise.resolve(e.start())}catch(s){}return}}};t(g,"instance");let y=g;const x=y.getInstance();exports.ExcelQueueManager=y,exports.cancelExcelTask=async(e,t,n)=>_().cancelExcelTask(e,t,n),exports.default=v,exports.excelTimeoutManager=m,exports.queue=x,exports.startDownloadTask=f,exports.useExcelQueueStore=h,exports.useExcelTaskStore=_,exports.useExcelTimeoutStore=d;
|
|
@@ -5,9 +5,8 @@ import { defineStore } from "pinia";
|
|
|
5
5
|
import { inject, computed } from "vue";
|
|
6
6
|
import { getUserLockKey, unlock, removeSession, lock, setSession, updateSessionFileName, isLocked, initExcelGuard } from "./ExcelGuard.js";
|
|
7
7
|
import { u as useGridNotificationStore } from "../../chunks/notification.contract-BTOch6ed.js";
|
|
8
|
-
import {
|
|
8
|
+
import { g as getGridVueLocale, c as useExcelStore, f as generateGUID } from "../../chunks/index-2qnzL9Zm.js";
|
|
9
9
|
import dayjs from "dayjs";
|
|
10
|
-
import { useMozLocale } from "@vmscloud/moz-ui-components";
|
|
11
10
|
const encodeUnescapeBtoa = (text) => {
|
|
12
11
|
if (!text) return "";
|
|
13
12
|
return btoa(encodeURIComponent(text));
|
|
@@ -24,7 +23,6 @@ function useProjectInfo() {
|
|
|
24
23
|
}
|
|
25
24
|
const useExcelTimeoutStore = defineStore("excelTimeout", () => {
|
|
26
25
|
const projectInfo = useProjectInfo();
|
|
27
|
-
const locale = useMozLocale();
|
|
28
26
|
const tenantID = computed(() => {
|
|
29
27
|
var _a;
|
|
30
28
|
return ((_a = projectInfo.tenantInfo) == null ? void 0 : _a.tenantID) || "";
|
|
@@ -33,7 +31,7 @@ const useExcelTimeoutStore = defineStore("excelTimeout", () => {
|
|
|
33
31
|
var _a;
|
|
34
32
|
return ((_a = projectInfo.userInfo) == null ? void 0 : _a.id) || "";
|
|
35
33
|
});
|
|
36
|
-
const timeoutMessage = computed(() =>
|
|
34
|
+
const timeoutMessage = computed(() => getGridVueLocale().requestTimedOut);
|
|
37
35
|
return {
|
|
38
36
|
tenantID,
|
|
39
37
|
userID,
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
export { generateGUID, generateUUID } from './id/generator';
|
|
7
7
|
export { encodeUnescapeBtoa, decodeEscapeAtob } from './crypto/crypto';
|
|
8
8
|
export { request, requestStream, responseStream } from './http/rest';
|
|
9
|
-
export { showMessage
|
|
9
|
+
export { showMessage } from './toast';
|
|
10
10
|
export { debounce } from './async/debounce';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type ToastType = 'error' | 'warning' | 'success' | 'info';
|
|
2
|
+
export interface ToastOptions {
|
|
3
|
+
/** 자동 제거까지의 시간(ms). 기본 3000 */
|
|
4
|
+
duration?: number;
|
|
5
|
+
}
|
|
6
|
+
/** 토스트 하나를 즉시 띄운다. 제거 함수를 돌려준다. */
|
|
7
|
+
export declare function openToast(message: string, type?: ToastType, options?: ToastOptions): () => void;
|
|
8
|
+
/**
|
|
9
|
+
* 결과 메시지 토스트 (옛 `dialog.ts#showMessage` 와 같은 시그니처).
|
|
10
|
+
* `result` 가 boolean 이면 true=success / false=error, 문자열이면 그 타입.
|
|
11
|
+
*/
|
|
12
|
+
export declare const showMessage: (message: unknown, result: boolean | ToastType, options?: ToastOptions) => void;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
- [Notification Contract](#notification-contract)
|
|
37
37
|
- [User Layout Contract](#user-layout-contract)
|
|
38
38
|
- [compat 래퍼 (MozGridVue / MozPivotVue)](#compat-래퍼-mozgridvue--mozpivotvue)
|
|
39
|
-
- [
|
|
39
|
+
- [추가 익스포트 (엑셀·locale·타입·Injection 키)](#추가-익스포트-엑셀locale타입injection-키)
|
|
40
40
|
- [관련 문서](#관련-문서)
|
|
41
41
|
|
|
42
42
|
---
|
|
@@ -74,25 +74,14 @@ npm install @vmscloud/moz-ui-grid-vue
|
|
|
74
74
|
npmjs에 공개 패키지로 게시됩니다. 레지스트리 매핑이나 토큰 없이 설치되며,
|
|
75
75
|
예전에 `.npmrc`에 넣어 둔 `@vmscloud:registry=https://npm.pkg.github.com` 매핑은 제거하세요.
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
npm view @vmscloud/moz-ui-components@<version> dist.tarball --@vmscloud:registry=https://npm.pkg.github.com
|
|
82
|
-
pnpm add "@vmscloud/moz-ui-components@<위에서 얻은 tarball URL>"
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
```ini
|
|
86
|
-
# .npmrc — 인증은 호스트별로만 남깁니다
|
|
87
|
-
//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_TOKEN}
|
|
88
|
-
```
|
|
77
|
+
의존하는 `@vmscloud/moz-ui-grid-core`·`@vmscloud/moz-ui-grid-wrapper` 도 npmjs 에 있으므로 GitHub Packages 인증이 필요 없습니다.
|
|
78
|
+
예전에 GitHub Packages 에서 따로 받아야 하던 레거시 UI 컴포넌트 패키지는 0.2.0 부터 쓰지 않습니다(엑셀 가져오기 팝업·토스트·문자열을 이 패키지 안에 내장).
|
|
89
79
|
|
|
90
80
|
### peerDependencies
|
|
91
81
|
|
|
92
82
|
| 의존성 | 버전 | 필수 여부 |
|
|
93
83
|
|--------|------|-----------|
|
|
94
84
|
| `vue` | `>=3.4.0` | **필수** |
|
|
95
|
-
| `@vmscloud/moz-ui-components` | `workspace:^` | **필수** |
|
|
96
85
|
| `pinia` | `>=2.1.0` | 선택 (`peerDependenciesMeta`) |
|
|
97
86
|
| `axios` | `>=1.6.0` | 선택 |
|
|
98
87
|
| `file-saver` | `>=2.0.0` | 선택 (Excel 기능 사용 시) |
|
|
@@ -672,7 +661,7 @@ provideGridNotification(myNotificationStore); // GridNotificationContract 구현
|
|
|
672
661
|
|
|
673
662
|
## compat 래퍼 (MozGridVue / MozPivotVue)
|
|
674
663
|
|
|
675
|
-
> ⛔ **DEPRECATED.** `MozGridVue`/`MozPivotVue`(compat)는 레거시 컴포넌트의 정확한 공개 표면(props/emits/slots/defineExpose)을 보존하는 **얇은 하위 호환 어댑터**입니다. 신규 코드는 `MozGrid`(피벗은 `mode="pivot"`)를 사용하세요.
|
|
664
|
+
> ⛔ **DEPRECATED.** `MozGridVue`/`MozPivotVue`(compat)는 레거시 컴포넌트의 정확한 공개 표면(props/emits/slots/defineExpose)을 보존하는 **얇은 하위 호환 어댑터**입니다. 신규 코드는 `MozGrid`(피벗은 `mode="pivot"`)를 사용하세요. 두 컴포넌트는 `src/compat/` 에 있으며 옛 `legacy` 배럴은 0.2.0 에서 제거되었습니다.
|
|
676
665
|
|
|
677
666
|
두 compat 파일은 그리드 로직을 소유하지 않고 `<MozGrid>`를 얇게 감쌉니다. props를 `coreConfig` computed(WRAPPER_EXTRA_KEYS + name + locale 분리)와 `wrapperConfig` computed(WRAPPER_EXTRA_KEYS + locale만)로 분리하여 `coreConfig` + `v-bind="wrapperConfig"` + `:name`을 `MozGrid`에 바인딩합니다.
|
|
678
667
|
|
|
@@ -685,21 +674,23 @@ provideGridNotification(myNotificationStore); // GridNotificationContract 구현
|
|
|
685
674
|
|
|
686
675
|
---
|
|
687
676
|
|
|
688
|
-
##
|
|
677
|
+
## 추가 익스포트 (엑셀·locale·타입·Injection 키)
|
|
689
678
|
|
|
690
|
-
|
|
679
|
+
0.2.0 에서 옛 `legacy` 배럴(pre-`MozGrid` Vue 컴포넌트 21종, `useGrid*` composable 17종, 아이콘 20종)을 **제거**했습니다. 같은 기능은 `MozGrid` 가 GridChrome(`@vmscloud/moz-ui-grid-wrapper`)으로 제공합니다. 아래는 패키지 엔트리(`src/index.ts`)가 `MozGrid`·템플릿·compat·계약 외에 추가로 내보내는 표면입니다. 패키지 엔트리는 코어 CSS(`default.css`)를 side-effect 로 import 합니다.
|
|
691
680
|
|
|
692
|
-
| 분류 | 익스포트
|
|
693
|
-
|
|
694
|
-
|
|
|
695
|
-
|
|
|
696
|
-
|
|
|
697
|
-
|
|
|
698
|
-
|
|
|
699
|
-
|
|
|
700
|
-
|
|
|
681
|
+
| 분류 | 익스포트 |
|
|
682
|
+
|------|----------|
|
|
683
|
+
| 엑셀 (서버사이드 스토어) | `useExcelStore`, `useExcelDownloadStore`, `useExcelUploadStore` (서브패스 `@vmscloud/moz-ui-grid-vue/store` 와 동일), `ExcelDataType`, `FileParameter`, `StreamingParameter`, 타입 `IExcelInfo`, `IExcelAPI`, `AdditionalColumn`, `SystemType` |
|
|
684
|
+
| 엑셀 (클라이언트사이드 grid.io) | `ClientExcelUploadPopup`(Vue, `MozGrid` 가 내부에서 사용), `ClientExcelUploadController`(wrapper Popup 기반 컨트롤러), `useClientExcelStore`, `runClientExport`, `exportCsv`, `generateSessionId`, `pickFile`, `downloadBlob`, 타입 `ClientExcelExportConfig`, `ClientExcelImportMode`, `ClientExcelConflictStrategy`, `ClientExcelImportOptions` |
|
|
685
|
+
| 서브패스 | `./store`, `./utils/excel/ExcelGuard`, `./utils/excel/ExcelQueueManager`, `./utils/excel/ExcelTaskRunner`, `./utils/excel/ExcelTimeoutManager`, `./utils/excel/ExcelImportUtil`, `./style.css` |
|
|
686
|
+
| 토스트 | `showMessage(message, result)`, `openToast(message, type, options)`, 타입 `ToastType`, `ToastOptions` — body 에 `.mzc-toast` 로 표시, 같은 메시지는 300ms debounce |
|
|
687
|
+
| locale | `setGridVueLocale(code)`, `getGridVueLocale()`, `getGridVueLocaleCode()`, `normalizeGridVueLocale()`, 사전 `koKR`/`enUS`/`jaJP`/`zhCN`, 타입 `GridVueLocaleCode`, `GridVueLocaleMessages` — 엑셀 팝업·토스트 문자열. `MozGrid` 의 `locale` prop 이 자동으로 설정하며 기본은 ko |
|
|
688
|
+
| Bridge | `VueRenderer`, `UndoStack`, `getRowHeaderCell`, `getCornerCell`, `ROW_HEADER_COLUMN_ID` |
|
|
689
|
+
| 타입 | `MozGridVueCoreProps`, `MozGridVueProps`, `MozGridVueEmits`, `CellSlotProps`, `HeaderSlotProps`, `EditorSlotProps`, `DetailSlotProps`, `GroupSlotProps`, `TemplateRegistry`, `TemplateEntry`, `ComparisonOperator`, `LogicalOperator`, `IFilterDef`, `ISortDef`, `ICustomCellDef`, `ICustomCellRuleSet`, `ICustomCellConfig`, `IContextMenuItem`, `IContextMenuConfig`, `IContextMenuExcelEventArgs`, `AggregateType`, `IAggregateValues`, `IColumnCellFormat`, `IColumnHeaderFormat`, `IColumnFormatConfig`, `PivotGridProps`, `PivotFieldItem`, `AvailableField`, `PivotFieldPanelConfig`, `PivotGridSettings`, `UseGridFilterReturn`, `UseGridSortReturn`, `UseGridCustomCellReturn`(모듈 계약 — 옛 useGrid* 반환 타입을 독립 인터페이스로 유지), `GridModuleContract` |
|
|
690
|
+
| Injection 키 (7/8) | `GRID_INSTANCE_KEY`, `GRID_RENDERER_KEY`, `GRID_TEMPLATE_REGISTRY_KEY`, `GRID_FILTER_MODULE_KEY`, `GRID_SORT_MODULE_KEY`, `GRID_CUSTOM_CELL_MODULE_KEY`, `GRID_BULK_EDITOR_MODULE_KEY` (`GRID_CONTAINER_KEY` 제외). 필터·정렬·조건부 스타일 키의 값 타입은 각각 `UseGridFilterReturn`/`UseGridSortReturn`/`UseGridCustomCellReturn`, 일괄 편집 키는 `GridModuleContract`(호스트 임의 모듈) |
|
|
691
|
+
| 코어 타입 재-export | `PureSheetConfig`, `FieldDef`, `SortState`, `FilterState`, `Row`, `ColumnDef`, `GroupConfig`, `TreeConfig`, `MasterDetailConfig`, `PivotConfig`, `PivotRowField`, `PivotColumnField`, `PivotValueField`, `PivotResult`, `IPivotAPI`, `IRowsAPI` 외 다수(편의 패스스루), `FormatHeaderRowCallback`/`FormatHeaderRowContext`(구명 alias) → 의미는 [reference.md](reference.md) |
|
|
701
692
|
|
|
702
|
-
> Injection 키 8종은 모두 `Symbol('moz-grid-…')`(번들 로컬, `Symbol.for` 아님)로 생성됩니다. `MozGrid`는 그중 4개(`GRID_INSTANCE_KEY`/`GRID_RENDERER_KEY`/`GRID_TEMPLATE_REGISTRY_KEY`/`GRID_CONTAINER_KEY`)를 provide
|
|
693
|
+
> Injection 키 8종은 모두 `Symbol('moz-grid-…')`(번들 로컬, `Symbol.for` 아님)로 생성됩니다. `MozGrid`는 그중 4개(`GRID_INSTANCE_KEY`/`GRID_RENDERER_KEY`/`GRID_TEMPLATE_REGISTRY_KEY`/`GRID_CONTAINER_KEY`)를 provide합니다.
|
|
703
694
|
|
|
704
695
|
---
|
|
705
696
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vmscloud/moz-ui-grid-vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MozGrid - Vue 3 wrapping library for @vmscloud/moz-ui-grid-core",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"crypto-js": "^4.2.0",
|
|
69
69
|
"echarts": "^5.5.0",
|
|
70
70
|
"es-toolkit": "^1.0.0",
|
|
71
|
+
"lit-html": "^3.2.0",
|
|
71
72
|
"@vmscloud/moz-ui-grid-core": "^0.1.42",
|
|
72
73
|
"@vmscloud/moz-ui-grid-wrapper": "^0.1.13"
|
|
73
74
|
},
|
|
@@ -76,8 +77,7 @@
|
|
|
76
77
|
"pinia": ">=2.1.0",
|
|
77
78
|
"axios": ">=1.6.0",
|
|
78
79
|
"file-saver": ">=2.0.0",
|
|
79
|
-
"dayjs": ">=1.11.0"
|
|
80
|
-
"@vmscloud/moz-ui-components": "^1.2.22"
|
|
80
|
+
"dayjs": ">=1.11.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependenciesMeta": {
|
|
83
83
|
"pinia": {
|
|
@@ -111,8 +111,7 @@
|
|
|
111
111
|
"pinia": "^2.3.0",
|
|
112
112
|
"axios": "^1.6.0",
|
|
113
113
|
"file-saver": "^2.0.5",
|
|
114
|
-
"dayjs": "^1.11.0"
|
|
115
|
-
"@vmscloud/moz-ui-components": "^1.2.22"
|
|
114
|
+
"dayjs": "^1.11.0"
|
|
116
115
|
},
|
|
117
116
|
"scripts": {
|
|
118
117
|
"build": "vue-tsc --noEmit && vite build --config vite.config.lib.ts",
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty,e=(e,i,r)=>((e,i,r)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r)(e,"symbol"!=typeof i?i+"":i,r);const i=require("pinia"),r=require("file-saver"),n=require("@vmscloud/moz-ui-components"),s=require("vue"),o=require("axios"),f=1,h=2,a=3,l=4;class u{constructor(t,i){e(this,"sessionId"),e(this,"name",""),e(this,"path",""),e(this,"saveDir",""),e(this,"size",0),e(this,"file"),e(this,"info"),e(this,"type","Upload"),e(this,"offset",0),e(this,"isComplete",!1),e(this,"isCancelable",!1),e(this,"isCanceled",!1),e(this,"blobInfo"),e(this,"onCompleted"),e(this,"onCancelClick"),this.type=t,this.sessionId=i}get ipcObject(){return{sessionId:this.sessionId,name:this.name,path:this.path,saveDir:this.saveDir,size:this.size,info:this.info}}get totalSize(){var t,e;return"Upload"===this.type?+((null==(t=this.file)?void 0:t.size)||this.size):+((null==(e=this.info)?void 0:e.length)||0)}get percent(){return 0===this.offset||0===this.totalSize?0:Math.round(this.offset/this.totalSize*100)}get progressValue(){return+this.offset}get status(){return`${this.percent}% (${this.formatSizeUnits(this.offset)}/${this.formatSizeUnits(this.totalSize)})`}completed(t){this.isCancelable=!1,this.isComplete=!0,this.blobInfo=t,this.onCompleted&&this.onCompleted(this)}formatSizeUnits(t){let e="";return e=t>=1073741824?(t/1073741824).toFixed(2)+" GB":t>=1048576?(t/1048576).toFixed(2)+" MB":t>=1024?(t/1024).toFixed(2)+" KB":t>1?`${t} bytes`:1===t?`${t} byte`:"0 bytes",e}}const g=()=>{const t=()=>(65536*(1+Math.random())|0).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`.toUpperCase()};function v(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c,d,w,b,y,p={exports:{}},m={exports:{}},E=m.exports;const I=v((d||(d=1,
|
|
2
|
-
/**
|
|
3
|
-
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
|
|
4
|
-
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
|
|
5
|
-
* Released under the Apache License, Version 2.0
|
|
6
|
-
* see: https://github.com/dcodeIO/bytebuffer.js for details
|
|
7
|
-
*/
|
|
8
|
-
b=p.exports,y=function(t){var e=function(t,i,n){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===i&&(i=e.DEFAULT_ENDIAN),void 0===n&&(n=e.DEFAULT_NOASSERT),!n){if((t|=0)<0)throw RangeError("Illegal capacity");i=!!i,n=!!n}this.buffer=0===t?r:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=i,this.noAssert=n};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var i=e.prototype;i.__isByteBuffer__,Object.defineProperty(i,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var r=new ArrayBuffer(0),n=String.fromCharCode;function s(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function o(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+n.apply(String,t);t.length+arguments.length>1024&&(e.push(n.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function f(t,e,i,r,n){var s,o,f=8*n-r-1,h=(1<<f)-1,a=h>>1,l=-7,u=i?n-1:0,g=i?-1:1,v=t[e+u];for(u+=g,s=v&(1<<-l)-1,v>>=-l,l+=f;l>0;s=256*s+t[e+u],u+=g,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+t[e+u],u+=g,l-=8);if(0===s)s=1-a;else{if(s===h)return o?NaN:1/0*(v?-1:1);o+=Math.pow(2,r),s-=a}return(v?-1:1)*o*Math.pow(2,s-r)}function h(t,e,i,r,n,s){var o,f,h,a=8*s-n-1,l=(1<<a)-1,u=l>>1,g=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:s-1,c=r?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-o))<1&&(o--,h*=2),(e+=o+u>=1?g/h:g*Math.pow(2,1-u))*h>=2&&(o++,h/=2),o+u>=l?(f=0,o=l):o+u>=1?(f=(e*h-1)*Math.pow(2,n),o+=u):(f=e*Math.pow(2,u-1)*Math.pow(2,n),o=0));n>=8;t[i+v]=255&f,v+=c,f/=256,n-=8);for(o=o<<n|f,a+=n;a>0;t[i+v]=255&o,v+=c,o/=256,a-=8);t[i+v-c]|=128*d}e.accessor=function(){return Uint8Array},e.allocate=function(t,i,r){return new e(t,i,r)},e.concat=function(t,i,r,n){"boolean"!=typeof i&&"string"==typeof i||(n=r,r=i,i=void 0);for(var s,o=0,f=0,h=t.length;f<h;++f)e.isByteBuffer(t[f])||(t[f]=e.wrap(t[f],i)),(s=t[f].limit-t[f].offset)>0&&(o+=s);if(0===o)return new e(0,r,n);var a,l=new e(o,r,n);for(f=0;f<h;)(s=(a=t[f++]).limit-a.offset)<=0||(l.view.set(a.view.subarray(a.offset,a.limit),l.offset),l.offset+=s);return l.limit=l.offset,l.offset=0,l},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,r,n,s){if("string"!=typeof r&&(s=n,n=r,r=void 0),"string"==typeof t)switch(void 0===r&&(r="utf8"),r){case"base64":return e.fromBase64(t,n);case"hex":return e.fromHex(t,n);case"binary":return e.fromBinary(t,n);case"utf8":return e.fromUTF8(t,n);case"debug":return e.fromDebug(t,n);default:throw Error("Unsupported encoding: "+r)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var o;if(e.isByteBuffer(t))return(o=i.clone.call(t)).markedOffset=-1,o;if(t instanceof Uint8Array)o=new e(0,n,s),t.length>0&&(o.buffer=t.buffer,o.offset=t.byteOffset,o.limit=t.byteOffset+t.byteLength,o.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)o=new e(0,n,s),t.byteLength>0&&(o.buffer=t,o.offset=0,o.limit=t.byteLength,o.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(o=new e(t.length,n,s)).limit=t.length;for(var f=0;f<t.length;++f)o.view[f]=t[f]}return o},i.writeBitSet=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=e,s=t.length,o=s>>3,f=0;for(e+=this.writeVarint32(s,e);o--;)r=1&!!t[f++]|(1&!!t[f++])<<1|(1&!!t[f++])<<2|(1&!!t[f++])<<3|(1&!!t[f++])<<4|(1&!!t[f++])<<5|(1&!!t[f++])<<6|(1&!!t[f++])<<7,this.writeByte(r,e++);if(f<s){var h=0;for(r=0;f<s;)r|=(1&!!t[f++])<<h++;this.writeByte(r,e++)}return i?(this.offset=e,this):e-n},i.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var i,r=this.readVarint32(t),n=r.value,s=n>>3,o=0,f=[];for(t+=r.length;s--;)i=this.readByte(t++),f[o++]=!!(1&i),f[o++]=!!(2&i),f[o++]=!!(4&i),f[o++]=!!(8&i),f[o++]=!!(16&i),f[o++]=!!(32&i),f[o++]=!!(64&i),f[o++]=!!(128&i);if(o<n){var h=0;for(i=this.readByte(t++);o<n;)f[o++]=!!(i>>h++&1)}return e&&(this.offset=t),f},i.readBytes=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var r=this.slice(e,e+t);return i&&(this.offset+=t),r},i.writeBytes=i.append,i.writeInt8=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},i.writeByte=i.writeInt8,i.readInt8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return 128&~i||(i=-(255-i+1)),e&&(this.offset+=1),i},i.readByte=i.readInt8,i.writeUint8=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=1,this.view[e]=t,i&&(this.offset+=1),this},i.writeUInt8=i.writeUint8,i.readUint8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i=this.view[t];return e&&(this.offset+=1),i},i.readUInt8=i.readUint8,i.writeInt16=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},i.writeShort=i.writeInt16,i.readInt16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),32768&~i||(i=-(65535-i+1)),e&&(this.offset+=2),i},i.readShort=i.readInt16,i.writeUint16=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),i&&(this.offset+=2),this},i.writeUInt16=i.writeUint16,i.readUint16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t],i|=this.view[t+1]<<8):(i=this.view[t]<<8,i|=this.view[t+1]),e&&(this.offset+=2),i},i.readUInt16=i.readUint16,i.writeInt32=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},i.writeInt=i.writeInt32,i.readInt32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),i|=0,e&&(this.offset+=4),i},i.readInt=i.readInt32,i.writeUint32=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),i&&(this.offset+=4),this},i.writeUInt32=i.writeUint32,i.readUint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=0;return this.littleEndian?(i=this.view[t+2]<<16,i|=this.view[t+1]<<8,i|=this.view[t],i+=this.view[t+3]<<24>>>0):(i=this.view[t+1]<<16,i|=this.view[t+2]<<8,i|=this.view[t+3],i+=this.view[t]<<24>>>0),e&&(this.offset+=4),i},i.readUInt32=i.readUint32,t&&(i.writeInt64=function(e,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,o=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=o>>>24&255,this.view[i+2]=o>>>16&255,this.view[i+1]=o>>>8&255,this.view[i]=255&o):(this.view[i]=o>>>24&255,this.view[i+1]=o>>>16&255,this.view[i+2]=o>>>8&255,this.view[i+3]=255&o,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},i.writeLong=i.writeInt64,i.readInt64=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!1);return i&&(this.offset+=8),s},i.readLong=i.readInt64,i.writeUint64=function(e,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),i+=8;var n=this.buffer.byteLength;i>n&&this.resize((n*=2)>i?n:i),i-=8;var s=e.low,o=e.high;return this.littleEndian?(this.view[i+3]=s>>>24&255,this.view[i+2]=s>>>16&255,this.view[i+1]=s>>>8&255,this.view[i]=255&s,i+=4,this.view[i+3]=o>>>24&255,this.view[i+2]=o>>>16&255,this.view[i+1]=o>>>8&255,this.view[i]=255&o):(this.view[i]=o>>>24&255,this.view[i+1]=o>>>16&255,this.view[i+2]=o>>>8&255,this.view[i+3]=255&o,i+=4,this.view[i]=s>>>24&255,this.view[i+1]=s>>>16&255,this.view[i+2]=s>>>8&255,this.view[i+3]=255&s),r&&(this.offset+=8),this},i.writeUInt64=i.writeUint64,i.readUint64=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var r=0,n=0;this.littleEndian?(r=this.view[e+2]<<16,r|=this.view[e+1]<<8,r|=this.view[e],r+=this.view[e+3]<<24>>>0,e+=4,n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0):(n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0,e+=4,r=this.view[e+1]<<16,r|=this.view[e+2]<<8,r|=this.view[e+3],r+=this.view[e]<<24>>>0);var s=new t(r,n,!0);return i&&(this.offset+=8),s},i.readUInt64=i.readUint64),i.writeFloat32=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=4,h(this.view,t,e,this.littleEndian,23,4),i&&(this.offset+=4),this},i.writeFloat=i.writeFloat32,i.readFloat32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var i=f(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),i},i.readFloat=i.readFloat32,i.writeFloat64=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var r=this.buffer.byteLength;return e>r&&this.resize((r*=2)>e?r:e),e-=8,h(this.view,t,e,this.littleEndian,52,8),i&&(this.offset+=8),this},i.writeDouble=i.writeFloat64,i.readFloat64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var i=f(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),i},i.readDouble=i.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)},i.writeVarint32=function(t,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,s=e.calculateVarint32(t);i+=s;var o=this.buffer.byteLength;for(i>o&&this.resize((o*=2)>i?o:i),i-=s,t>>>=0;t>=128;)n=127&t|128,this.view[i++]=n,t>>>=7;return this.view[i++]=t,r?(this.offset=i,this):s},i.writeVarint32ZigZag=function(t,i){return this.writeVarint32(e.zigZagEncode32(t),i)},i.readVarint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i,r=0,n=0;do{if(!this.noAssert&&t>this.limit){var s=Error("Truncated");throw s.truncated=!0,s}i=this.view[t++],r<5&&(n|=(127&i)<<7*r),++r}while(128&i);return n|=0,e?(this.offset=t,n):{value:n,length:r}},i.readVarint32ZigZag=function(t){var i=this.readVarint32(t);return"object"==typeof i?i.value=e.zigZagDecode32(i.value):i=e.zigZagDecode32(i),i},t&&(e.MAX_VARINT64_BYTES=10,e.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var i=e.toInt()>>>0,r=e.shiftRightUnsigned(28).toInt()>>>0,n=e.shiftRightUnsigned(56).toInt()>>>0;return 0==n?0==r?i<16384?i<128?1:2:i<1<<21?3:4:r<16384?r<128?5:6:r<1<<21?7:8:n<128?9:10},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},i.writeVarint64=function(i,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof i)i=t.fromNumber(i);else if("string"==typeof i)i=t.fromString(i);else if(!(i&&i instanceof t))throw TypeError("Illegal value: "+i+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof i?i=t.fromNumber(i,!1):"string"==typeof i?i=t.fromString(i,!1):!1!==i.unsigned&&(i=i.toSigned());var s=e.calculateVarint64(i),o=i.toInt()>>>0,f=i.shiftRightUnsigned(28).toInt()>>>0,h=i.shiftRightUnsigned(56).toInt()>>>0;r+=s;var a=this.buffer.byteLength;switch(r>a&&this.resize((a*=2)>r?a:r),r-=s,s){case 10:this.view[r+9]=h>>>7&1;case 9:this.view[r+8]=9!==s?128|h:127&h;case 8:this.view[r+7]=8!==s?f>>>21|128:f>>>21&127;case 7:this.view[r+6]=7!==s?f>>>14|128:f>>>14&127;case 6:this.view[r+5]=6!==s?f>>>7|128:f>>>7&127;case 5:this.view[r+4]=5!==s?128|f:127&f;case 4:this.view[r+3]=4!==s?o>>>21|128:o>>>21&127;case 3:this.view[r+2]=3!==s?o>>>14|128:o>>>14&127;case 2:this.view[r+1]=2!==s?o>>>7|128:o>>>7&127;case 1:this.view[r]=1!==s?128|o:127&o}return n?(this.offset+=s,this):s},i.writeVarint64ZigZag=function(t,i){return this.writeVarint64(e.zigZagEncode64(t),i)},i.readVarint64=function(e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var r=e,n=0,s=0,o=0,f=0;if(n=127&(f=this.view[e++]),128&f&&(n|=(127&(f=this.view[e++]))<<7,(128&f||this.noAssert&&void 0===f)&&(n|=(127&(f=this.view[e++]))<<14,(128&f||this.noAssert&&void 0===f)&&(n|=(127&(f=this.view[e++]))<<21,(128&f||this.noAssert&&void 0===f)&&(s=127&(f=this.view[e++]),(128&f||this.noAssert&&void 0===f)&&(s|=(127&(f=this.view[e++]))<<7,(128&f||this.noAssert&&void 0===f)&&(s|=(127&(f=this.view[e++]))<<14,(128&f||this.noAssert&&void 0===f)&&(s|=(127&(f=this.view[e++]))<<21,(128&f||this.noAssert&&void 0===f)&&(o=127&(f=this.view[e++]),(128&f||this.noAssert&&void 0===f)&&(o|=(127&(f=this.view[e++]))<<7,128&f||this.noAssert&&void 0===f))))))))))throw Error("Buffer overrun");var h=t.fromBits(n|s<<28,s>>>4|o<<24,!1);return i?(this.offset=e,h):{value:h,length:e-r}},i.readVarint64ZigZag=function(i){var r=this.readVarint64(i);return r&&r.value instanceof t?r.value=e.zigZagDecode64(r.value):r=e.zigZagDecode64(r),r}),i.writeCString=function(t,e){var i=void 0===e;i&&(e=this.offset);var r,n=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(r=0;r<n;++r)if(0===t.charCodeAt(r))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}n=u.calculateUTF16asUTF8(s(t))[1],e+=n+1;var o=this.buffer.byteLength;return e>o&&this.resize((o*=2)>e?o:e),e-=n+1,u.encodeUTF16toUTF8(s(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,i?(this.offset=e,this):n},i.readCString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var i,r=t,n=-1;return u.decodeUTF8toUTF16(function(){if(0===n)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(n=this.view[t++])?null:n}.bind(this),i=o(),!0),e?(this.offset=t,i()):{string:i(),length:t-r}},i.writeIString=function(t,e){var i=void 0===e;if(i&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var r,n=e;r=u.calculateUTF16asUTF8(s(t),this.noAssert)[1],e+=4+r;var o=this.buffer.byteLength;if(e>o&&this.resize((o*=2)>e?o:e),e-=4+r,this.littleEndian?(this.view[e+3]=r>>>24&255,this.view[e+2]=r>>>16&255,this.view[e+1]=r>>>8&255,this.view[e]=255&r):(this.view[e]=r>>>24&255,this.view[e+1]=r>>>16&255,this.view[e+2]=r>>>8&255,this.view[e+3]=255&r),e+=4,u.encodeUTF16toUTF8(s(t),function(t){this.view[e++]=t}.bind(this)),e!==n+4+r)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+r));return i?(this.offset=e,this):e-n},i.readIString=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=t,n=this.readUint32(t),s=this.readUTF8String(n,e.METRICS_BYTES,t+=4);return t+=s.length,i?(this.offset=t,s.string):{string:s.string,length:t-r}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",i.writeUTF8String=function(t,e){var i,r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n=e;i=u.calculateUTF16asUTF8(s(t))[1],e+=i;var o=this.buffer.byteLength;return e>o&&this.resize((o*=2)>e?o:e),e-=i,u.encodeUTF16toUTF8(s(t),function(t){this.view[e++]=t}.bind(this)),r?(this.offset=e,this):e-n},i.writeString=i.writeUTF8String,e.calculateUTF8Chars=function(t){return u.calculateUTF16asUTF8(s(t))[0]},e.calculateUTF8Bytes=function(t){return u.calculateUTF16asUTF8(s(t))[1]},e.calculateString=e.calculateUTF8Bytes,i.readUTF8String=function(t,i,r){"number"==typeof i&&(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),void 0===i&&(i=e.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var s,f=0,h=r;if(i===e.METRICS_CHARS){if(s=o(),u.decodeUTF8(function(){return f<t&&r<this.limit?this.view[r++]:null}.bind(this),function(t){++f,u.UTF8toUTF16(t,s)}),f!==t)throw RangeError("Illegal range: Truncated data, "+f+" == "+t);return n?(this.offset=r,s()):{string:s(),length:r-h}}if(i===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+"+t+") <= "+this.buffer.byteLength)}var a=r+t;if(u.decodeUTF8toUTF16(function(){return r<a?this.view[r++]:null}.bind(this),s=o(),this.noAssert),r!==a)throw RangeError("Illegal range: Truncated data, "+r+" == "+a);return n?(this.offset=r,s()):{string:s(),length:r-h}}throw TypeError("Unsupported metrics: "+i)},i.readString=i.readUTF8String,i.writeVString=function(t,i){var r=void 0===i;if(r&&(i=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof i||i%1!=0)throw TypeError("Illegal offset: "+i+" (not an integer)");if((i>>>=0)<0||i+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+i+" (+0) <= "+this.buffer.byteLength)}var n,o,f=i;n=u.calculateUTF16asUTF8(s(t),this.noAssert)[1],o=e.calculateVarint32(n),i+=o+n;var h=this.buffer.byteLength;if(i>h&&this.resize((h*=2)>i?h:i),i-=o+n,i+=this.writeVarint32(n,i),u.encodeUTF16toUTF8(s(t),function(t){this.view[i++]=t}.bind(this)),i!==f+n+o)throw RangeError("Illegal range: Truncated data, "+i+" == "+(i+n+o));return r?(this.offset=i,this):i-f},i.readVString=function(t){var i=void 0===t;if(i&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=t,n=this.readVarint32(t),s=this.readUTF8String(n.value,e.METRICS_BYTES,t+=n.length);return t+=s.length,i?(this.offset=t,s.string):{string:s.string,length:t-r}},i.append=function(t,i,r){"number"!=typeof i&&"string"==typeof i||(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,i));var s=t.limit-t.offset;if(s<=0)return this;r+=s;var o=this.buffer.byteLength;return r>o&&this.resize((o*=2)>r?o:r),r-=s,this.view.set(t.view.subarray(t.offset,t.limit),r),t.offset+=s,n&&(this.offset+=s),this},i.appendTo=function(t,e){return t.append(this,e),this},i.assert=function(t){return this.noAssert=!t,this},i.capacity=function(){return this.buffer.byteLength},i.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},i.clone=function(t){var i=new e(0,this.littleEndian,this.noAssert);return t?(i.buffer=new ArrayBuffer(this.buffer.byteLength),i.view=new Uint8Array(i.buffer)):(i.buffer=this.buffer,i.view=this.view),i.offset=this.offset,i.markedOffset=this.markedOffset,i.limit=this.limit,i},i.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var i=e-t;if(0===i)return this.buffer=r,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var n=new ArrayBuffer(i),s=new Uint8Array(n);return s.set(this.view.subarray(t,e)),this.buffer=n,this.view=s,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=i,this},i.copy=function(t,i){if(void 0===t&&(t=this.offset),void 0===i&&(i=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,t<0||t>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+i+" <= "+this.buffer.byteLength)}if(t===i)return new e(0,this.littleEndian,this.noAssert);var r=i-t,n=new e(r,this.littleEndian,this.noAssert);return n.offset=0,n.limit=r,n.markedOffset>=0&&(n.markedOffset-=t),this.copyTo(n,0,t,i),n},i.copyTo=function(t,i,r,n){var s,o;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(i=(o=void 0===i)?t.offset:0|i,r=(s=void 0===r)?this.offset:0|r,n=void 0===n?this.limit:0|n,i<0||i>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+i+" <= "+t.buffer.byteLength);if(r<0||n>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+r+" <= "+this.buffer.byteLength);var f=n-r;return 0===f?t:(t.ensureCapacity(i+f),t.view.set(this.view.subarray(r,n),i),s&&(this.offset+=f),o&&(t.offset+=f),this)},i.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},i.fill=function(t,e,i){var r=void 0===e;if(r&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===i&&(i=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal end: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(e>=i)return this;for(;e<i;)this.view[e++]=t;return r&&(this.offset=e),this},i.flip=function(){return this.limit=this.offset,this.offset=0,this},i.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},i.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},i.LE=function(t){return this.littleEndian=void 0===t||!!t,this},i.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},i.prepend=function(t,i,r){"number"!=typeof i&&"string"==typeof i||(r=i,i=void 0);var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,i));var s=t.limit-t.offset;if(s<=0)return this;var o=s-r;if(o>0){var f=new ArrayBuffer(this.buffer.byteLength+o),h=new Uint8Array(f);h.set(this.view.subarray(r,this.buffer.byteLength),s),this.buffer=f,this.view=h,this.offset+=o,this.markedOffset>=0&&(this.markedOffset+=o),this.limit+=o,r+=o}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),r-s),t.offset=t.limit,n&&(this.offset-=s),this},i.prependTo=function(t,e){return t.prepend(this,e),this},i.printDebug=function(t){"function"!=typeof t&&(t=function(){}.bind()),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},i.remaining=function(){return this.limit-this.offset},i.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},i.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),i=new Uint8Array(e);i.set(this.view),this.buffer=e,this.view=i}return this},i.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e||Array.prototype.reverse.call(this.view.subarray(t,e)),this},i.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},i.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var i=this.clone();return i.offset=t,i.limit=e,i},i.toBuffer=function(t){var e=this.offset,i=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof i||i%1!=0)throw TypeError("Illegal limit: Not an integer");if(i>>>=0,e<0||e>i||i>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+i+" <= "+this.buffer.byteLength)}if(!t&&0===e&&i===this.buffer.byteLength)return this.buffer;if(e===i)return r;var n=new ArrayBuffer(i-e);return new Uint8Array(n).set(new Uint8Array(this.buffer).subarray(e,i),0),n},i.toArrayBuffer=i.toBuffer,i.toString=function(t,e,i){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(i=e=t="utf8"),t){case"utf8":return this.toUTF8(e,i);case"base64":return this.toBase64(e,i);case"hex":return this.toHex(e,i);case"binary":return this.toBinary(e,i);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var a=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],i=[],r=0,n=e.length;r<n;++r)i[e[r]]=r;return t.encode=function(t,i){for(var r,n;null!==(r=t());)i(e[r>>2&63]),n=(3&r)<<4,null!==(r=t())?(i(e[63&((n|=r>>4&15)|r>>4&15)]),n=(15&r)<<2,null!==(r=t())?(i(e[63&(n|r>>6&3)]),i(e[63&r])):(i(e[63&n]),i(61))):(i(e[63&n]),i(61),i(61))},t.decode=function(t,e){var r,n,s;function o(t){throw Error("Illegal character code: "+t)}for(;null!==(r=t());)if(void 0===(n=i[r])&&o(r),null!==(r=t())&&(void 0===(s=i[r])&&o(r),e(n<<2>>>0|(48&s)>>4),null!==(r=t()))){if(void 0===(n=i[r])){if(61===r)break;o(r)}if(e((15&s)<<4>>>0|(60&n)>>2),null!==(r=t())){if(void 0===(s=i[r])){if(61===r)break;o(r)}e((3&n)<<6>>>0|s)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();i.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var i;return a.encode(function(){return t<e?this.view[t++]:null}.bind(this),i=o()),i()},e.fromBase64=function(t,i){if("string"!=typeof t)throw TypeError("str");var r=new e(t.length/4*3,i),n=0;return a.decode(s(t),function(t){r.view[n++]=t}),r.limit=n,r},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},i.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var i=[],r=[];t<e;)i.push(this.view[t++]),i.length>=1024&&(r.push(String.fromCharCode.apply(String,i)),i=[]);return r.join("")+String.fromCharCode.apply(String,i)},e.fromBinary=function(t,i){if("string"!=typeof t)throw TypeError("str");for(var r,n=0,s=t.length,o=new e(s,i);n<s;){if((r=t.charCodeAt(n))>255)throw RangeError("illegal char code: "+r);o.view[n++]=r}return o.limit=s,o},i.toDebug=function(t){for(var e,i=-1,r=this.buffer.byteLength,n="",s="",o="";i<r;){if(-1!==i&&(n+=(e=this.view[i])<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(s+=e>32&&e<127?String.fromCharCode(e):".")),++i,t&&i>0&&i%16==0&&i!==r){for(;n.length<51;)n+=" ";o+=n+s+"\n",n=s=""}i===this.offset&&i===this.limit?n+=i===this.markedOffset?"!":"|":i===this.offset?n+=i===this.markedOffset?"[":"<":i===this.limit?n+=i===this.markedOffset?"]":">":n+=i===this.markedOffset?"'":t||0!==i&&i!==r?" ":""}if(t&&" "!==n){for(;n.length<51;)n+=" ";o+=n+s+"\n"}return t?o:n},e.fromDebug=function(t,i,r){for(var n,s,o=t.length,f=new e((o+1)/3|0,i,r),h=0,a=0,l=!1,u=!1,g=!1,v=!1,c=!1;h<o;){switch(n=t.charAt(h++)){case"!":if(!r){if(u||g||v){c=!0;break}u=g=v=!0}f.offset=f.markedOffset=f.limit=a,l=!1;break;case"|":if(!r){if(u||v){c=!0;break}u=v=!0}f.offset=f.limit=a,l=!1;break;case"[":if(!r){if(u||g){c=!0;break}u=g=!0}f.offset=f.markedOffset=a,l=!1;break;case"<":if(!r){if(u){c=!0;break}u=!0}f.offset=a,l=!1;break;case"]":if(!r){if(v||g){c=!0;break}v=g=!0}f.limit=f.markedOffset=a,l=!1;break;case">":if(!r){if(v){c=!0;break}v=!0}f.limit=a,l=!1;break;case"'":if(!r){if(g){c=!0;break}g=!0}f.markedOffset=a,l=!1;break;case" ":l=!1;break;default:if(!r&&l){c=!0;break}if(s=parseInt(n+t.charAt(h++),16),!r&&(isNaN(s)||s<0||s>255))throw TypeError("Illegal str: Not a debug encoded string");f.view[a++]=s,l=!0}if(c)throw TypeError("Illegal str: Invalid symbol at "+h)}if(!r){if(!u||!v)throw TypeError("Illegal str: Missing offset or limit");if(a<f.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+a+" < "+o)}return f},i.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var i,r=new Array(e-t);t<e;)(i=this.view[t++])<16?r.push("0",i.toString(16)):r.push(i.toString(16));return r.join("")},e.fromHex=function(t,i,r){if(!r){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var n,s=t.length,o=new e(s/2|0,i),f=0,h=0;f<s;f+=2){if(n=parseInt(t.substring(f,f+2),16),!r&&(!isFinite(n)||n<0||n>255))throw TypeError("Illegal str: Contains non-hex characters");o.view[h++]=n}return o.limit=h,o};var l,u=l={MAX_CODEPOINT:1114111,encodeUTF8:function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<128?e(127&i):i<2048?(e(i>>6&31|192),e(63&i|128)):i<65536?(e(i>>12&15|224),e(i>>6&63|128),e(63&i|128)):(e(i>>18&7|240),e(i>>12&63|128),e(i>>6&63|128),e(63&i|128)),i=null},decodeUTF8:function(t,e){for(var i,r,n,s,o=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(i=t());)if(128&i)if(192==(224&i))null===(r=t())&&o([i,r]),e((31&i)<<6|63&r);else if(224==(240&i))(null===(r=t())||null===(n=t()))&&o([i,r,n]),e((15&i)<<12|(63&r)<<6|63&n);else{if(240!=(248&i))throw RangeError("Illegal starting byte: "+i);(null===(r=t())||null===(n=t())||null===(s=t()))&&o([i,r,n,s]),e((7&i)<<18|(63&r)<<12|(63&n)<<6|63&s)}else e(i)},UTF16toUTF8:function(t,e){for(var i,r=null;null!==(i=null!==r?r:t());)i>=55296&&i<=57343&&null!==(r=t())&&r>=56320&&r<=57343?(e(1024*(i-55296)+r-56320+65536),r=null):e(i);null!==r&&e(r)},UTF8toUTF16:function(t,e){var i=null;for("number"==typeof t&&(i=t,t=function(){return null});null!==i||null!==(i=t());)i<=65535?e(i):(e(55296+((i-=65536)>>10)),e(i%1024+56320)),i=null},encodeUTF16toUTF8:function(t,e){l.UTF16toUTF8(t,function(t){l.encodeUTF8(t,e)})},decodeUTF8toUTF16:function(t,e){l.decodeUTF8(t,function(t){l.UTF8toUTF16(t,e)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,i=0;null!==(e=t());)i+=e<128?1:e<2048?2:e<65536?3:4;return i},calculateUTF16asUTF8:function(t){var e=0,i=0;return l.UTF16toUTF8(t,function(t){++e,i+=t<128?1:t<2048?2:t<65536?3:4}),[e,i]}};return i.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var i;try{u.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),i=o())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return i()},e.fromUTF8=function(t,i,r){if(!r&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var n=new e(u.calculateUTF16asUTF8(s(t),!0)[1],i,r),o=0;return u.encodeUTF16toUTF8(s(t),function(t){n.view[o++]=t}),n.limit=o,n},e},(w=p)&&w.exports?w.exports=function(){var t;try{t=function(){return c||(c=1,
|
|
9
|
-
/**
|
|
10
|
-
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
11
|
-
* Released under the Apache License, Version 2.0
|
|
12
|
-
* see: https://github.com/dcodeIO/long.js for details
|
|
13
|
-
*/
|
|
14
|
-
e=E,i=function(){function t(t,e,i){this.low=0|t,this.high=0|e,this.unsigned=!!i}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var i={},r={};function n(t,e){var n,s,f;return e?(f=0<=(t>>>=0)&&t<256)&&(s=r[t])?s:(n=o(t,(0|t)<0?-1:0,!0),f&&(r[t]=n),n):(f=-128<=(t|=0)&&t<128)&&(s=i[t])?s:(n=o(t,t<0?-1:0,!1),f&&(i[t]=n),n)}function s(t,e){if(isNaN(t)||!isFinite(t))return e?d:c;if(e){if(t<0)return d;if(t>=u)return m}else{if(t<=-g)return E;if(t+1>=g)return p}return t<0?s(-t,e).neg():o(t%l|0,t/l|0,e)}function o(e,i,r){return new t(e,i,r)}t.fromInt=n,t.fromNumber=s,t.fromBits=o;var f=Math.pow;function h(t,e,i){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return c;if("number"==typeof e?(i=e,e=!1):e=!!e,(i=i||10)<2||36<i)throw RangeError("radix");var r;if((r=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return h(t.substring(1),e,i).neg();for(var n=s(f(i,8)),o=c,a=0;a<t.length;a+=8){var l=Math.min(8,t.length-a),u=parseInt(t.substring(a,a+l),i);if(l<8){var g=s(f(i,l));o=o.mul(g).add(s(u))}else o=(o=o.mul(n)).add(s(u))}return o.unsigned=e,o}function a(e){return e instanceof t?e:"number"==typeof e?s(e):"string"==typeof e?h(e):o(e.low,e.high,e.unsigned)}t.fromString=h,t.fromValue=a;var l=4294967296,u=l*l,g=u/2,v=n(1<<24),c=n(0);t.ZERO=c;var d=n(0,!0);t.UZERO=d;var w=n(1);t.ONE=w;var b=n(1,!0);t.UONE=b;var y=n(-1);t.NEG_ONE=y;var p=o(-1,2147483647,!1);t.MAX_VALUE=p;var m=o(-1,-1,!0);t.MAX_UNSIGNED_VALUE=m;var E=o(0,-2147483648,!1);t.MIN_VALUE=E;var I=t.prototype;return I.toInt=function(){return this.unsigned?this.low>>>0:this.low},I.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},I.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(E)){var e=s(t),i=this.div(e),r=i.mul(e).sub(this);return i.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var n=s(f(t,6),this.unsigned),o=this,h="";;){var a=o.div(n),l=(o.sub(a.mul(n)).toInt()>>>0).toString(t);if((o=a).isZero())return l+h;for(;l.length<6;)l="0"+l;h=""+l+h}},I.getHighBits=function(){return this.high},I.getHighBitsUnsigned=function(){return this.high>>>0},I.getLowBits=function(){return this.low},I.getLowBitsUnsigned=function(){return this.low>>>0},I.getNumBitsAbs=function(){if(this.isNegative())return this.eq(E)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return 0!=this.high?e+33:e+1},I.isZero=function(){return 0===this.high&&0===this.low},I.isNegative=function(){return!this.unsigned&&this.high<0},I.isPositive=function(){return this.unsigned||this.high>=0},I.isOdd=function(){return!(1&~this.low)},I.isEven=function(){return!(1&this.low)},I.equals=function(t){return e(t)||(t=a(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},I.eq=I.equals,I.notEquals=function(t){return!this.eq(t)},I.neq=I.notEquals,I.lessThan=function(t){return this.comp(t)<0},I.lt=I.lessThan,I.lessThanOrEqual=function(t){return this.comp(t)<=0},I.lte=I.lessThanOrEqual,I.greaterThan=function(t){return this.comp(t)>0},I.gt=I.greaterThan,I.greaterThanOrEqual=function(t){return this.comp(t)>=0},I.gte=I.greaterThanOrEqual,I.compare=function(t){if(e(t)||(t=a(t)),this.eq(t))return 0;var i=this.isNegative(),r=t.isNegative();return i&&!r?-1:!i&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},I.comp=I.compare,I.negate=function(){return!this.unsigned&&this.eq(E)?E:this.not().add(w)},I.neg=I.negate,I.add=function(t){e(t)||(t=a(t));var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,s=65535&this.low,f=t.high>>>16,h=65535&t.high,l=t.low>>>16,u=0,g=0,v=0,c=0;return v+=(c+=s+(65535&t.low))>>>16,g+=(v+=n+l)>>>16,u+=(g+=r+h)>>>16,u+=i+f,o((v&=65535)<<16|(c&=65535),(u&=65535)<<16|(g&=65535),this.unsigned)},I.subtract=function(t){return e(t)||(t=a(t)),this.add(t.neg())},I.sub=I.subtract,I.multiply=function(t){if(this.isZero())return c;if(e(t)||(t=a(t)),t.isZero())return c;if(this.eq(E))return t.isOdd()?E:c;if(t.eq(E))return this.isOdd()?E:c;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))return s(this.toNumber()*t.toNumber(),this.unsigned);var i=this.high>>>16,r=65535&this.high,n=this.low>>>16,f=65535&this.low,h=t.high>>>16,l=65535&t.high,u=t.low>>>16,g=65535&t.low,d=0,w=0,b=0,y=0;return b+=(y+=f*g)>>>16,w+=(b+=n*g)>>>16,b&=65535,w+=(b+=f*u)>>>16,d+=(w+=r*g)>>>16,w&=65535,d+=(w+=n*u)>>>16,w&=65535,d+=(w+=f*l)>>>16,d+=i*g+r*u+n*l+f*h,o((b&=65535)<<16|(y&=65535),(d&=65535)<<16|(w&=65535),this.unsigned)},I.mul=I.multiply,I.divide=function(t){if(e(t)||(t=a(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?d:c;var i,r,n;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return d;if(t.gt(this.shru(1)))return b;n=d}else{if(this.eq(E))return t.eq(w)||t.eq(y)?E:t.eq(E)?w:(i=this.shr(1).div(t).shl(1)).eq(c)?t.isNegative()?w:y:(r=this.sub(t.mul(i)),n=i.add(r.div(t)));if(t.eq(E))return this.unsigned?d:c;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();n=c}for(r=this;r.gte(t);){i=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(i)/Math.LN2),h=o<=48?1:f(2,o-48),l=s(i),u=l.mul(t);u.isNegative()||u.gt(r);)u=(l=s(i-=h,this.unsigned)).mul(t);l.isZero()&&(l=w),n=n.add(l),r=r.sub(u)}return n},I.div=I.divide,I.modulo=function(t){return e(t)||(t=a(t)),this.sub(this.div(t).mul(t))},I.mod=I.modulo,I.not=function(){return o(~this.low,~this.high,this.unsigned)},I.and=function(t){return e(t)||(t=a(t)),o(this.low&t.low,this.high&t.high,this.unsigned)},I.or=function(t){return e(t)||(t=a(t)),o(this.low|t.low,this.high|t.high,this.unsigned)},I.xor=function(t){return e(t)||(t=a(t)),o(this.low^t.low,this.high^t.high,this.unsigned)},I.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?o(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):o(0,this.low<<t-32,this.unsigned)},I.shl=I.shiftLeft,I.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?o(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):o(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},I.shr=I.shiftRight,I.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0==(t&=63))return this;var i=this.high;return t<32?o(this.low>>>t|i<<32-t,i>>>t,this.unsigned):o(32===t?i:i>>>t-32,0,this.unsigned)},I.shru=I.shiftRightUnsigned,I.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},I.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},I.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},I.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},I.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t},(t=m)&&t.exports?t.exports=i():(e.dcodeIO=e.dcodeIO||{}).Long=i()),m.exports;var t,e,i}()}catch(e){}return y(t)}():(b.dcodeIO=b.dcodeIO||{}).ByteBuffer=y(b.dcodeIO.Long)),p.exports));async function T(t,e="get",i,r){try{const n="get"===e.toLowerCase()?"params":"data",s={"Content-Type":"application/json",...null==r?void 0:r.headers},f=await o({method:e,url:t,headers:s,[n]:i,...r});if(200!==f.status)throw f;return f}catch(n){return o.isCancel(n)||process.env.NODE_ENV,Promise.reject(n)}}const L={},U=(t,e,i={})=>{var r,s,o;r=t.toString(),s=()=>{let r;r="boolean"==typeof e?e?"success":"error":e,n.useToast().open(Object.assign({},{message:t,type:r},i))},o=300,L[r]&&clearTimeout(L[r]),L[r]=window.setTimeout(()=>{s(),delete L[r]},o)},A=s.reactive(new Map),S=s.reactive(new Map),N=(t,e)=>{t&&e&&A.set(t,e)},R=t=>{t&&A.delete(t)},F=(t,e)=>{t&&e&&S.set(t,e)},B=t=>{t&&S.delete(t)},_=["_RID","createDatetime","createUser","updateDatetime","updateUser"],C=()=>({currentValue:s.ref(0),totalValue:s.ref(0),progressTime:s.ref(0),remainTime:s.ref(0)}),O=t=>{switch(t){case f:return"System.String";case h:return"System.Decimal";case a:return"System.Boolean";case l:return"System.DateTime";default:return"System.String"}},k=t=>decodeURIComponent(t).replace(/\+/g," "),x=i.defineStore("excelPopup",()=>{const t=n.useMozLocale(),i=s.ref(!1),o=s.ref(!1),v=s.ref(void 0),c=s.ref("excel"),d=s.ref({keyColumns:[],columnLayout:"",columnMap:{},apiKey:"",apiParams:{},targetTable:"",refreshKey:"",useDataPreclear:!1,disableMasterProperty:!1,targetStorage:"postgresql"}),w=s.ref({onUpload:t=>{},onAdd:t=>{},onTruncate:()=>{},onValidation:(t,e,i)=>{},onRefresh:()=>{},onDownload:()=>{},onNotify:t=>{}}),b=s.ref(null),y=s.reactive(new Map),p=s.ref("init"),m=s.ref(null),E=async(e={})=>{if(b.value)return U(t.value.Grid.alreadyExcelProgress,!1);const i=g();b.value=new u("Download",i),m.value={current:0,total:100,remainTime:-1,sessionID:i,fileName:""},e.session_id=i;try{const t="/excel/download/"+(e.sample_data?"sample":"fetch");await async function(t,e,i={}){const r=new AbortController,{signal:n}=r,s=await fetch(t,{method:"post",signal:n,headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.body)return;const o=s.body.getReader(),f=new I,h=decodeURI(s.headers.get("content-disposition").split("=")[1]).replaceAll("+"," "),a=new ReadableStream({start(t){!function i(){o.read().then(({done:r,value:n})=>{if(r){f.flip();const i=new Blob([f.toArrayBuffer()]);return t.close(),void e.completed(i?{fileName:h,blob:i}:void 0)}n&&(t.enqueue(n),f.append(n),e.offset+=n.byteLength,i())})}()},cancel(t){f.clear(),r.abort()}});e.isCancelable=!0,e.onCancelClick=async()=>{e.isCanceled=!0,a.cancel(""),e.completed()}}(t,b.value,e),b.value.onCompleted=L,b.value.onCancelClick=C}catch{return b.value=null,U(t.value.Grid.downloadFail,!1)}},L=t=>{t.blobInfo&&(r.saveAs(t.blobInfo.blob,t.blobInfo.fileName),b.value=null,m.value=null)},C=t=>{b.value=null,m.value=null},x=t=>{const e=null==t?void 0:t.columns;if(!e)return[];if("function"==typeof e.getAll){const t={number:h,boolean:a,date:l,string:f};return e.getAll().map(e=>({binding:e.id,header:e.header??e.label??e.id,dataType:t[e.type]??f,visible:!1!==e.visible,format:void 0,isRequired:e.required??!1}))}return"function"==typeof e.filter?Array.from(e):[]},D=(t,e)=>{const i={};return t?(x(t).filter(t=>!_.includes(t.binding)).forEach(t=>{t.header&&t.binding&&(i[t.header]={column_name:t.binding,column_type:O(t.dataType||f),is_required:t.isRequired,is_key:!!t.binding&&(null==e?void 0:e.includes(t.binding))})}),i):i},M=(t,e)=>{const i={};if(!t)return i;const{visibleOnly:r=!1}=e??{};return x(t).filter(t=>!_.includes(t.binding)).filter(t=>!r||!1!==t.visible).forEach(t=>{t.binding&&(i[t.binding]={column_name:t.header,column_type:O(t.dataType||f),column_format:t.format})}),i};class z{constructor(t,i){e(this,"keyColumns"),e(this,"columnLayout"),e(this,"columnMap"),this.keyColumns=t,this.columnLayout=i.columnLayout,this.columnMap=D(i,t)}}return{showPopup:i,isOverwrite:o,exportFormat:c,excelInfo:d,excelAPI:w,file:b,excelFileMap:y,downloadInfo:m,initialize:(t={},e={})=>{d.value={...d.value,...t},w.value={...w.value,...e},p.value="init"},setInfo:t=>{d.value={...d.value,...t}},newExcelInfo:(t,e)=>new z(t,e),setAPI:t=>{w.value={...w.value,...t}},newExcelApi:(e,r,n,s,o,f,h)=>(F(e,o),{onUpload:t=>f(t),onAdd:async t=>{try{return p.value="success",await h({url:e,param:t,method:"POST"})}catch(i){p.value="error"}},onTruncate:async()=>{try{return p.value="success",await h({url:e,param:[],method:"DELETE"})}catch(t){p.value="error"}},onDownload:()=>E({sample_data:n,file_name:s,column_map:M(r)}),onRefresh:()=>{switch(F(e,o),p.value){case"init":break;case"success":U(t.value.Grid.toastSaveSuccess,!0);break;case"error":U(t.value.Grid.toastSaveError,!1)}p.value="init",o()},onNotify:t=>{i.value&&U(t.message,t.type)}}),setExportFormat:t=>{c.value=t},setUploadSuccess:t=>{p.value=t},show:(t=!0)=>{o.value=t,i.value=!0},hide:()=>{i.value=!1},download:E,createColumnMapForImport:D,createColumnMapForExport:M,createFieldMapForExport:t=>{const e={};return t?(t.engine.fields.filter(t=>!_.includes(t.binding)).forEach(t=>{t.binding&&(e[t.binding]={column_name:t.header,column_type:O(t.dataType||f)})}),e):e},updateDownloadStatus:t=>{var e;null!=m.value&&(null==(e=m.value)?void 0:e.sessionID)===t.sessionID&&(m.value.current=t.current,m.value.total=t.total,m.value.remainTime=t.remainTime,m.value.notiDatetime=t.notiDatetime,m.value.isDone=t.isDone)},downloadFromS3:t=>{if(t)try{const e=document.createElement("a");e.setAttribute("href",t),document.body.appendChild(e),e.click(),document.body.removeChild(e),m.value=null}catch(e){throw e}},requestGenerateExcel:async(t={},e={})=>{const i=`/api/module/data-transfer/${t.project_id??"none"}/excel/generate-download-url`,r=await T(i,"post",t,e),n=t.client_id,s=r.data.data.file_name,o=k(s);return y.set(n,o),r},targetTable:v,registerUploadOwner:N,clearUploadOwner:R,registerRefresh:F,unregisterRefresh:B,triggerRefreshBySession:t=>{var e,i;const r=(t=>{const e=A.get(t);return e?S.get(e):void 0})(t);return!!r&&(r(),null==(i=(e=w.value).onRefresh)||i.call(e),!0)}}}),D=i.defineStore("excelDownload",C),M=i.defineStore("excelUpload",C);exports.dataTypeToString=O,exports.generateGUID=g,exports.useExcelDownloadStore=D,exports.useExcelStore=x,exports.useExcelUploadStore=M;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type DragEventData = {
|
|
2
|
-
name: string;
|
|
3
|
-
sourceComponentId: string;
|
|
4
|
-
itemKey: string;
|
|
5
|
-
item: any;
|
|
6
|
-
};
|
|
7
|
-
type EventCallback = (data: DragEventData) => void;
|
|
8
|
-
declare class DraggingEventBus {
|
|
9
|
-
private static instance;
|
|
10
|
-
private listeners;
|
|
11
|
-
private constructor();
|
|
12
|
-
static getInstance(): DraggingEventBus;
|
|
13
|
-
subscribe(groupName: string, eventName: string, callback: EventCallback): () => void;
|
|
14
|
-
emit(eventName: string, data: DragEventData): void;
|
|
15
|
-
}
|
|
16
|
-
export declare const draggingEventBus: DraggingEventBus;
|
|
17
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
name: string;
|
|
3
|
-
copy?: boolean;
|
|
4
|
-
sortable?: boolean;
|
|
5
|
-
itemKey: string;
|
|
6
|
-
direction?: 'vertical' | 'horizontal';
|
|
7
|
-
/** CSS 셀렉터 — 지정 시 해당 요소에서만 드래그 시작 (나머지 영역은 텍스트 선택 가능) */
|
|
8
|
-
dragHandle?: string;
|
|
9
|
-
onBeforeItemDrop?: (item: any) => boolean;
|
|
10
|
-
onItemDrop?: (item: any) => any;
|
|
11
|
-
}
|
|
12
|
-
type __VLS_Props = Props;
|
|
13
|
-
type __VLS_PublicProps = {
|
|
14
|
-
modelValue: any[];
|
|
15
|
-
} & __VLS_Props;
|
|
16
|
-
declare function __VLS_template(): {
|
|
17
|
-
attrs: Partial<{}>;
|
|
18
|
-
slots: {
|
|
19
|
-
default?(_: {
|
|
20
|
-
item: any;
|
|
21
|
-
index: number;
|
|
22
|
-
}): any;
|
|
23
|
-
};
|
|
24
|
-
refs: {};
|
|
25
|
-
rootEl: any;
|
|
26
|
-
};
|
|
27
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
28
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
-
drag: (...args: any[]) => void;
|
|
30
|
-
"update:modelValue": (value: any[]) => void;
|
|
31
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
|
-
onDrag?: ((...args: any[]) => any) | undefined;
|
|
33
|
-
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
34
|
-
}>, {
|
|
35
|
-
copy: boolean;
|
|
36
|
-
direction: "vertical" | "horizontal";
|
|
37
|
-
sortable: boolean;
|
|
38
|
-
itemKey: string;
|
|
39
|
-
dragHandle: string;
|
|
40
|
-
onBeforeItemDrop: (item: any) => boolean;
|
|
41
|
-
onItemDrop: (item: any) => any;
|
|
42
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
44
|
-
export default _default;
|
|
45
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
-
new (): {
|
|
47
|
-
$slots: S;
|
|
48
|
-
};
|
|
49
|
-
};
|