@gct-paas/core 0.1.4-dev.10 → 0.1.4-dev.11
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/index.esm.min.mjs +13345 -3124
- package/dist/index.min.cjs +22 -15
- package/dist/index.system.min.js +22 -15
- package/es/constants/default-date-type/default-date-type.d.ts +70 -0
- package/es/constants/default-date-type/default-date-type.mjs +22 -0
- package/es/constants/expression-type/BuiltOperators.mjs +2 -0
- package/es/constants/index.d.ts +2 -1
- package/es/constants/page-designer/model.d.ts +4 -0
- package/es/constants/page-designer/model.mjs +7 -0
- package/es/enums/globalEnum.d.ts +15 -0
- package/es/enums/globalEnum.mjs +13 -1
- package/es/enums/page-designer/widget.d.ts +5 -0
- package/es/enums/page-designer/widget.mjs +6 -1
- package/es/global/gct/gct.d.ts +9 -3
- package/es/global/gct/gct.mjs +11 -6
- package/es/hooks/index.d.ts +0 -2
- package/es/index.d.ts +1 -3
- package/es/index.mjs +15 -35
- package/es/interface/i-dictionary/i-dictionary-item.d.ts +6 -0
- package/es/interface/i-global-register/i-global-register.d.ts +8 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +4 -0
- package/es/interface/i-pinia-getter/i-global-getters.d.ts +2 -0
- package/es/interface/i-pinia-state/i-global-state.d.ts +12 -1
- package/es/interface/index.d.ts +3 -6
- package/es/interface/model-desginer/entity.d.ts +110 -0
- package/es/interface/provider/index.d.ts +0 -2
- package/es/modules/mqtt/constants/mqtt.const.d.ts +33 -0
- package/es/modules/mqtt/constants/mqtt.const.mjs +27 -0
- package/es/modules/mqtt/enums/mqtt-status.enum.d.ts +20 -0
- package/es/modules/mqtt/enums/mqtt-status.enum.mjs +10 -0
- package/es/modules/mqtt/index.d.ts +5 -0
- package/es/modules/mqtt/interfaces/i-mqtt.d.ts +139 -0
- package/es/modules/mqtt/mqtt-client.d.ts +117 -0
- package/es/modules/mqtt/mqtt-client.mjs +262 -0
- package/es/modules/mqtt/mqtt-manager.d.ts +87 -0
- package/es/modules/mqtt/mqtt-manager.mjs +78 -0
- package/es/modules/platform-config/enums/platform.enum.d.ts +0 -15
- package/es/modules/platform-config/enums/platform.enum.mjs +1 -13
- package/es/modules/platform-config/interfaces/index.d.ts +0 -1
- package/es/modules/platform-config/store.mjs +4 -1
- package/es/modules/user-stores/store/user.store.d.ts +74 -0
- package/es/modules/user-stores/store/user.store.mjs +16 -1
- package/es/modules/user-stores/types/user.d.ts +1 -0
- package/es/setup-app.mjs +11 -0
- package/es/state/global-pinia-state/global-pinia-state.d.ts +15 -1
- package/es/state/global-pinia-state/global-pinia-state.mjs +14 -0
- package/es/state/index.d.ts +0 -9
- package/es/store/global-store.mjs +14 -0
- package/es/utils/design/design.d.ts +11 -0
- package/es/utils/design/design.mjs +15 -0
- package/es/utils/file/base64Conver.d.ts +9 -0
- package/es/utils/file/base64Conver.mjs +35 -0
- package/es/utils/file/download.d.ts +44 -0
- package/es/utils/file/download.mjs +107 -0
- package/es/utils/index.d.ts +6 -2
- package/es/utils/permission.d.ts +19 -0
- package/es/utils/permission.mjs +38 -0
- package/es/utils/uploader/uploader.d.ts +20 -0
- package/es/utils/uploader/uploader.mjs +120 -0
- package/es/utils/validate.d.ts +5 -0
- package/es/utils/validate.mjs +25 -0
- package/package.json +5 -4
- package/es/constants/editor-type/editor-type.d.ts +0 -244
- package/es/constants/editor-type/editor-type.mjs +0 -63
- package/es/controller/edit-form/edit-form.controller.d.ts +0 -28
- package/es/controller/edit-form/edit-form.controller.mjs +0 -47
- package/es/controller/editor/color-editor.controller.d.ts +0 -13
- package/es/controller/editor/color-editor.controller.mjs +0 -6
- package/es/controller/editor/length-unit-editor.controller.d.ts +0 -13
- package/es/controller/editor/length-unit-editor.controller.mjs +0 -6
- package/es/controller/editor-item/editor-item.controller.d.ts +0 -14
- package/es/controller/editor-item/editor-item.controller.mjs +0 -8
- package/es/controller/form/form.controller.d.ts +0 -76
- package/es/controller/form/form.controller.mjs +0 -147
- package/es/controller/form-collapse/form-collapse.controller.d.ts +0 -18
- package/es/controller/form-collapse/form-collapse.controller.mjs +0 -14
- package/es/controller/form-collapse-pane/form-collapse-pane.controller.d.ts +0 -18
- package/es/controller/form-collapse-pane/form-collapse-pane.controller.mjs +0 -14
- package/es/controller/form-edit-item/form-edit-item.controller.d.ts +0 -27
- package/es/controller/form-edit-item/form-edit-item.controller.mjs +0 -74
- package/es/controller/form-group/form-group.controller.d.ts +0 -18
- package/es/controller/form-group/form-group.controller.mjs +0 -14
- package/es/controller/form-item/form-item.controller.d.ts +0 -21
- package/es/controller/form-item/form-item.controller.mjs +0 -43
- package/es/controller/form-item-basic/form-item-basic.controller.d.ts +0 -57
- package/es/controller/form-item-basic/form-item-basic.controller.mjs +0 -49
- package/es/controller/form-item-hidden/form-item-hidden.controller.d.ts +0 -17
- package/es/controller/form-item-hidden/form-item-hidden.controller.mjs +0 -7
- package/es/controller/form-tab/form-tab.controller.d.ts +0 -18
- package/es/controller/form-tab/form-tab.controller.mjs +0 -14
- package/es/controller/form-tab-pane/form-tab-pane.controller.d.ts +0 -18
- package/es/controller/form-tab-pane/form-tab-pane.controller.mjs +0 -14
- package/es/controller/gct-form/gct-form.controller.d.ts +0 -101
- package/es/controller/gct-form/gct-form.controller.mjs +0 -214
- package/es/controller/index.d.ts +0 -15
- package/es/hooks/use-form/use-form.d.ts +0 -10
- package/es/hooks/use-form/use-form.mjs +0 -8
- package/es/hooks/use-gct-form-value/use-gct-form-value.d.ts +0 -22
- package/es/hooks/use-gct-form-value/use-gct-form-value.mjs +0 -89
- package/es/hooks/use-overlay-scrollbars/use-overlay-scrollbars.d.ts +0 -11
- package/es/interface/controller/edit-form/edit-form.controller.d.ts +0 -26
- package/es/interface/controller/editor/i-color-editor.controller.d.ts +0 -11
- package/es/interface/controller/editor/i-length-unit-editor.controller.d.ts +0 -11
- package/es/interface/controller/editor-item/editor-item.controller.d.ts +0 -19
- package/es/interface/controller/form/form.controller.d.ts +0 -121
- package/es/interface/controller/form-collapse/form-collapse.controller.d.ts +0 -23
- package/es/interface/controller/form-collapse-pane/form-collapse-pane.controller.d.ts +0 -23
- package/es/interface/controller/form-edit-item/form-edit-item.controller.d.ts +0 -59
- package/es/interface/controller/form-group/form-group.controller.d.ts +0 -24
- package/es/interface/controller/form-hidden-item/form-hidden-item.controller.d.ts +0 -24
- package/es/interface/controller/form-item/form-item.controller.d.ts +0 -40
- package/es/interface/controller/form-item-basic/form-item-basic.controller.d.ts +0 -51
- package/es/interface/controller/form-tab/form-tab.controller.d.ts +0 -23
- package/es/interface/controller/form-tab-pane/form-tab-pane.controller.d.ts +0 -23
- package/es/interface/controller/index.d.ts +0 -14
- package/es/interface/events/form/i-form.event.d.ts +0 -11
- package/es/interface/events/index.d.ts +0 -1
- package/es/interface/form/i-editor/i-check-switch.d.ts +0 -29
- package/es/interface/form/i-editor/i-checkbox-editor.d.ts +0 -9
- package/es/interface/form/i-editor/i-color-editor.d.ts +0 -13
- package/es/interface/form/i-editor/i-editor-basic.d.ts +0 -87
- package/es/interface/form/i-editor/i-icon-select-editor.d.ts +0 -21
- package/es/interface/form/i-editor/i-info-editor.d.ts +0 -21
- package/es/interface/form/i-editor/i-length-unit-editor.d.ts +0 -13
- package/es/interface/form/i-editor/i-model-field-select-editor.d.ts +0 -18
- package/es/interface/form/i-editor/i-number-editor.d.ts +0 -21
- package/es/interface/form/i-editor/i-picker-editor.d.ts +0 -30
- package/es/interface/form/i-editor/i-radio-editor.d.ts +0 -21
- package/es/interface/form/i-editor/i-select-editor.d.ts +0 -14
- package/es/interface/form/i-editor/i-span-editor.d.ts +0 -30
- package/es/interface/form/i-editor/i-switch-editor.d.ts +0 -14
- package/es/interface/form/i-editor/i-text-editor.d.ts +0 -46
- package/es/interface/form/i-editor/i-textarea-editor.d.ts +0 -25
- package/es/interface/form/i-form/i-edit-form.d.ts +0 -48
- package/es/interface/form/i-form/i-form-collapse-pane.d.ts +0 -30
- package/es/interface/form/i-form/i-form-collapse.d.ts +0 -35
- package/es/interface/form/i-form/i-form-container.d.ts +0 -53
- package/es/interface/form/i-form/i-form-edit-item.d.ts +0 -140
- package/es/interface/form/i-form/i-form-group-container.d.ts +0 -24
- package/es/interface/form/i-form/i-form-group.d.ts +0 -35
- package/es/interface/form/i-form/i-form-hidden-item.d.ts +0 -11
- package/es/interface/form/i-form/i-form-item-basic.d.ts +0 -126
- package/es/interface/form/i-form/i-form-item.d.ts +0 -11
- package/es/interface/form/i-form/i-form-tab-pane.d.ts +0 -23
- package/es/interface/form/i-form/i-form-tab.d.ts +0 -21
- package/es/interface/form/i-form/i-form.d.ts +0 -79
- package/es/interface/form/index.d.ts +0 -29
- package/es/interface/layout/i-flex-layout/i-flex-container.d.ts +0 -75
- package/es/interface/layout/i-flex-layout/i-flex-item.d.ts +0 -51
- package/es/interface/layout/i-grid-layout/i-grid-container.d.ts +0 -29
- package/es/interface/layout/i-grid-layout/i-grid-item-span.d.ts +0 -54
- package/es/interface/layout/i-grid-layout/i-grid-item.d.ts +0 -37
- package/es/interface/layout/i-layout-basis/i-layout-container-basis.d.ts +0 -11
- package/es/interface/layout/index.d.ts +0 -6
- package/es/interface/provider/i-editor-provider/i-editor-provider.d.ts +0 -24
- package/es/interface/provider/i-form-item-provider/i-form-item-provider.d.ts +0 -44
- package/es/interface/state/form/form.state.d.ts +0 -53
- package/es/interface/state/form-collapse/form-collapse.state.d.ts +0 -11
- package/es/interface/state/form-collapse-pane/form-collapse-pane.state.d.ts +0 -11
- package/es/interface/state/form-edit-item/form-edit-item.state.d.ts +0 -38
- package/es/interface/state/form-group/form-group.state.d.ts +0 -21
- package/es/interface/state/form-hidden-item/form-hidden-item.state.d.ts +0 -5
- package/es/interface/state/form-item/form-item.state.d.ts +0 -20
- package/es/interface/state/form-item-basic/form-item-basic.state.d.ts +0 -63
- package/es/interface/state/form-tab/form-tab.state.d.ts +0 -19
- package/es/interface/state/form-tab-pane/form-tab-pane.state.d.ts +0 -11
- package/es/interface/state/index.d.ts +0 -10
- package/es/modules/platform-config/interfaces/global-setting.interface.d.ts +0 -7
- package/es/register/editor-register/editor-register.d.ts +0 -49
- package/es/register/editor-register/editor-register.mjs +0 -57
- package/es/register/form-item-register/form-item-register.d.ts +0 -36
- package/es/register/form-item-register/form-item-register.mjs +0 -42
- package/es/register/index.d.ts +0 -14
- package/es/state/form/form.state.d.ts +0 -24
- package/es/state/form/form.state.mjs +0 -16
- package/es/state/form-collapse/form-collapse.state.d.ts +0 -14
- package/es/state/form-collapse/form-collapse.state.mjs +0 -6
- package/es/state/form-collapse-pane/form-collapse-pane.state.d.ts +0 -14
- package/es/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -6
- package/es/state/form-edit-item/form-edit-item.state.d.ts +0 -17
- package/es/state/form-edit-item/form-edit-item.state.mjs +0 -10
- package/es/state/form-group/form-group.state.d.ts +0 -21
- package/es/state/form-group/form-group.state.mjs +0 -14
- package/es/state/form-item/form-item.state.d.ts +0 -14
- package/es/state/form-item/form-item.state.mjs +0 -6
- package/es/state/form-item-basic/form-item-basic.state.d.ts +0 -17
- package/es/state/form-item-basic/form-item-basic.state.mjs +0 -9
- package/es/state/form-tab/form-tab.state.d.ts +0 -15
- package/es/state/form-tab/form-tab.state.mjs +0 -7
- package/es/state/form-tab-pane/form-tab-pane.state.d.ts +0 -14
- package/es/state/form-tab-pane/form-tab-pane.state.mjs +0 -6
- package/es/utils/props/gct-form-item/gct-form-item.props.d.ts +0 -63
- package/es/utils/props/gct-form-item/gct-form-item.props.mjs +0 -66
- package/es/utils/props/index.d.ts +0 -1
- package/es/utils/width-install/width-install.d.ts +0 -17
- package/es/utils/width-install/width-install.mjs +0 -23
package/dist/index.system.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
System.register(["pinia","qs","lodash-es","vue","axios","vue-i18n","vue-router","@gct-paas/api"],(function(o,Kl){"use strict";var Q,ft,ht,ue,pe,Y,ve,gt,Et,De,fe,D,mt,Tt,At,j,M,C,ae,he,Me,ge,ye,Rt,bt,St,It,Nt,Ot,Lt,Ce;return{setters:[R=>{Q=R.defineStore,ft=R.createPinia,ht=R.setActivePinia},R=>{ue=R.default},R=>{pe=R.isEmpty,Y=R.cloneDeep,ve=R.mergeWith,gt=R.unionWith,Et=R.isEqual,De=R.omit,fe=R.has},R=>{D=R.reactive,mt=R.createApp,Tt=R.h,At=R.nextTick,j=R.isRef,M=R.computed,C=R.ref,ae=R.watch,he=R.unref,Me=R.onUnmounted,ge=R.inject,ye=R.getCurrentInstance,Rt=R.shallowRef,bt=R.onMounted},R=>{St=R.AxiosHeaders},R=>{It=R.createI18n},R=>{Nt=R.createRouter,Ot=R.createWebHashHistory},R=>{Lt=R.HttpUtil,Ce=R.api}],execute:(function(){o({afterFieldSet:os,afterValueSet:ss,buildItemRules:Da,buildShortUUID:as,buildUUID:rs,cacheFnReturn:us,computedEx:ds,copyTextToClipboard:Kn,createAppVue:Bl,deepMerge:ns,emitFieldSet:cs,gctFormItemEditorProps:qa,genUrl:Un,getDeviceFingerprint:Qe,getPageIdentification:Cn,getTenant:zt,getTimezone:Qt,getToken:me,interceptors:tn,isDef:jn,isSortFiled:Mc,openWindow:Dc,parseMatrixParams:qt,parseValueUnit:ls,setTenant:es,setToken:xt,setupApp:kl,setupErrorHandler:Zn,setupI18n:Hn,stringifyMatrixParams:is,useAppInst:tl,useCopyToClipboard:cl,useEditFormController:Xc,useForm:Yn,useFormController:Yc,useFormItemController:jc,useGctFormValue:nl,useGctFormValueByText:il,useIFrameProps:al,useModal:rl,useNamespace:Ha,useUUid:yc,useWuJieBus:ol,useWuJieProps:sl,widthEditorInstall:fs});const R=o("SIDE_BAR_MINI_WIDTH",48),$l=o("SIDE_BAR_SHOW_TIT_MINI_WIDTH",80);var qn=o("ContentEnum",(e=>(e.FULL="full",e.FIXED="fixed",e))(qn||{})),ei=o("ThemeEnum",(e=>(e.DARK="dark",e.LIGHT="light",e))(ei||{})),ti=o("SettingButtonPositionEnum",(e=>(e.AUTO="auto",e.HEADER="header",e.FIXED="fixed",e))(ti||{})),ni=o("SessionTimeoutProcessingEnum",(e=>(e[e.ROUTE_JUMP=0]="ROUTE_JUMP",e[e.PAGE_COVERAGE=1]="PAGE_COVERAGE",e))(ni||{})),ii=o("PermissionModeEnum",(e=>(e.ROLE="ROLE",e.BACK="BACK",e.ROUTE_MAPPING="ROUTE_MAPPING",e.PLATFORM_ROLE="PLATFORM_ROLE",e))(ii||{})),ri=o("RouterTransitionEnum",(e=>(e.ZOOM_FADE="zoom-fade",e.ZOOM_OUT="zoom-out",e.FADE_SIDE="fade-slide",e.FADE="fade",e.FADE_BOTTOM="fade-bottom",e.FADE_SCALE="fade-scale",e))(ri||{})),_t=o("ProjectName",(e=>(e.PORTAL="portal",e.BACKEND_MANAGEMENT="backend-management",e.DEVELOPER_CENTER="developer-center",e.TENANT_CENTER="tenant-center",e.APP_DESIGNER="app-designer",e.PAGE_DESIGNER="page-designer",e.WEB_RENDER="web-render",e.MOBILE_RENDER="mobile-render",e))(_t||{})),ai=o("FIELD_TYPE_CATEGORY",(e=>(e.ALL="field_type_all",e.BASIC="field_type_basic",e.LOGIC="field_type_logic",e.TRACE="field_type_trace",e))(ai||{})),h=o("FIELD_TYPE",(e=>(e.PRIMARY_KEY="primary_key",e.ASSOCIATED_PRIMARY_KEY="associated_primary_key",e.TEXT="text",e.LONG_TEXT="long_text",e.INTEGER="integer",e.LONG="long",e.DOUBLE="double",e.DECIMAL="decimal",e.BOOLEAN="boolean",e.DATE="date",e.TIME="time",e.DATE_TIME="date_time",e.IMAGE="image",e.ATTACHMENT="attachment",e.SERIAL="serial_number",e.MASTERSLAVE="master_slave",e.USER="user",e.USER_MULTI="user_multi",e.ORG="org",e.ORG_MULTI="org_multi",e.ENUM="enum",e.ENUM_MULTI="enum_multi",e.OPTION="option",e.OPTION_MULTI="option_multi",e.REF="ref",e.REF_MULTI="ref_multi",e.RDO_REF="rdo_ref",e.EXPRESSION="expression",e.EXPRESSION_CONDITION="expression_condition",e.AGG="agg",e.ESOP="esop",e.TRANSACTION="transaction",e.LABEL_TEMPLATE="label_template",e.LABEL_TEMPLATE_REF="label_template_ref",e.DOCUMENT_TEMPLATE="document_template",e.SERIALRULE="serial_number_rule",e.PRINTER="printer",e.MESSAGE_TMPL="message_tmpl",e.RANGE_USER="range_user",e.SIGNATURE="electronic_signature",e.ONLINE_FORM_TEMPLATE="online_form_tmpl",e.E_DHR_TEMPLATE="edhr_tmpl",e.ONLINE_FORM="online_form",e.DATA_TABLE_FORMULA="data_table_formula",e.READONLYCMP="readonlycmp",e.MATERIAL_NO="material_no",e.PRODUCT="product",e.DEVICE="device",e.Biz_Process="biz_process",e.TENANT="tenant",e))(h||{})),si=o("FIELD_TYPE_BASIC",(e=>(e.TEXT="text",e.LONG_TEXT="long_text",e.INTEGER="integer",e.LONG="long",e.DOUBLE="double",e.DECIMAL="decimal",e.BOOLEAN="boolean",e.DATE="date",e.TIME="time",e.DATE_TIME="date_time",e))(si||{})),oi=o("FIELD_TYPE_LOGIC",(e=>(e.IMAGE="image",e.ATTACHMENT="attachment",e.SERIAL="serial_number",e.MASTERSLAVE="master_slave",e.USER="user",e.USER_MULTI="user_multi",e.ORG="org",e.ORG_MULTI="org_multi",e.ENUM="enum",e.ENUM_MULTI="enum_multi",e.OPTION="option",e.OPTION_MULTI="option_multi",e.REF="ref",e.REF_MULTI="ref_multi",e.RDO_REF="rdo_ref",e.EXPRESSION="expression",e.EXPRESSION_CONDITION="expression_condition",e.AGG="agg",e.ESOP="esop",e.TRANSACTION="transaction",e.LABEL_TEMPLATE="label_template",e.LABEL_TEMPLATE_REF="label_template_ref",e.DOCUMENT_TEMPLATE="document_template",e.SERIALRULE="serial_number_rule",e.PRINTER="printer",e.MESSAGE_TMPL="message_tmpl",e.RANGE_USER="range_user",e.SIGNATURE="electronic_signature",e.ONLINE_FORM_TEMPLATE="online_form_tmpl",e.E_DHR_TEMPLATE="edhr_tmpl",e.ONLINE_FORM="online_form",e.Biz_Process="biz_process",e))(oi||{})),ci=o("FIELD_TYPE_TRACE",(e=>(e.MATERIAL_NO="material_no",e.PRODUCT="product",e.DEVICE="device",e))(ci||{}));const Zl=o("FieldTypeToJs",{attachment:"string",boolean:"boolean",date:"string",date_time:"string",decimal:"number",double:"number",enum:"string",enum_multi:"string",image:"string",integer:"number",long:"number",long_text:"string",master_slave:"string",org:"string",org_multi:"string",rdo_ref:"string",ref:"string",ref_multi:"string",serial_number:"string",text:"string",time:"string",user:"string",user_multi:"string",expression:"string",expression_condition:"string",agg:"number",esop:"string",serial_number_rule:"string",label_template:"string",label_template_ref:"string",document_template:"string",transaction:"string",printer:"string",message_tmpl:"string",range_user:"string",primary_key:"string",associated_primary_key:"string",readonlycmp:"string",material_no:"string",product:"string",device:"string",option:"string",option_multi:"string",electronic_signature:"string",online_form_tmpl:"string",edhr_tmpl:"string",online_form:"string",data_table_formula:"string",biz_process:"string",tenant:"string"});var li=o("CreateType",(e=>(e.SYSTEM="SYSTEM",e.USER_DEFINED="USER_DEFINED",e.BUILTIN="BUILTIN",e.CUSTOM="CUSTOM",e.PROCESS="PROCESS",e))(li||{})),di=o("MenuType",(e=>(e.CATALOG="CATALOG",e.STANDARD="STANDARD",e.LINK="LINK",e))(di||{})),ui=o("OpenMode",(e=>(e.PRESENT="PRESENT",e.IFRAME="IFRAME",e.NEW="NEW",e))(ui||{})),fi=o("MaterialEnum",(e=>(e.MaterialFormField="formField",e.MaterialTableField="tableField",e.MaterialEmbedTableField="embedTableField",e.MaterialSubTableField="subTableField",e.MaterialSubTableModalField="subTableModalField",e.cardListFormField="cardList",e.MaterialTableSelectField="tableSelectField",e.DescriptionsFormField="descriptions",e))(fi||{}));const Jl=o("FieldIconMap",{primary_key:"icon-id",text:"icon-wenben1",long_text:"icon-changwenben",integer:"icon-zhengshu",long:"icon-changzhengshu",decimal:"icon-jingduxiaoshu1",double:"icon-xiaoshu",boolean:"icon-buer",date:"icon-riqi1",time:"icon-shijian1",date_time:"icon-riqishijian",user:"icon-renyuanguanlian",org:"icon-bumenguanlian",user_multi:"icon-renyuanduoxuan",org_multi:"icon-bumenduoxuan",image:"icon-tupian1",attachment:"icon-fujian1",serial_number:"icon-xuliehao",master_slave:"icon-zhuziguanlian",enum:"icon-meijuguanlian",ref:"icon-moxingguanlian",rdo_ref:"icon-RDOmoxingguanlian",enum_multi:"icon-meijuguanlianduoxuan",option:"icon-meijuguanlian",option_multi:"icon-meijuguanlianduoxuan",ref_multi:"icon-moxingduoxuan",expression:"icon-gongshiziduan",expression_condition:"icon-gongshiziduan",agg:"icon-huizong",esop:"icon-E-SOP",transaction:"icon-ziduan1",serial_number_rule:"icon-ziduan1",printer:"icon-dayinanniu",message_tmpl:"icon-xiaoximoban",range_user:"icon-fanweirenyuan",label_template:"icon-biaoqianmoban",label_template_ref:"icon-biaoqianmoban",document_template:"icon-danjumoban",electronic_signature:"icon-qianming1",online_form_tmpl:"icon-zaixianbiaodanmoban",edhr_tmpl:"icon-edhr",online_form:"icon-zaixianbiaodan",data_table_formula:"icon-gongshiziduan",readonlycmp:"icon-wenben1",tenant:"icon-id",associated_primary_key:"icon-id",material_no:"icon-field-material-no",product:"icon-field-product",device:"icon-field-device",biz_process:"icon-jichengzhongxin1"});var hi=o("AggTypes",(e=>(e.COUNT="COUNT",e.SUM="SUM",e.MAX="MAX",e.MIN="MIN",e.AVG="AVG",e))(hi||{})),gi=o("NodesConfigTypeEnum",(e=>(e.SPEC="spec",e.SUB_WORKFLOW="sub_workflow",e))(gi||{})),Ei=o("selectionTypeEnums",(e=>(e.None="none",e.SingleChoice="gct_radio",e.MultipleChoice="checkbox",e))(Ei||{})),mi=o("UniqueConstraintType",(e=>(e.NONE="NONE",e.GLOBAL="GLOBAL",e.LEVEL="LEVEL",e.LOGIC="LOGIC",e))(mi||{}));const xl=o("MessageType",{ALL:"all",UNREAD:"unread"}),zl=o("WorkbenchType",{TEST:"myTestApp",QUICK:"quickAccess",MY:"myApp"});var Ti=o("PersonalCenterType",(e=>(e.PROFILE="profile",e.GENDER="gender",e.ENTERPRISE="enterprise",e))(Ti||{})),Ai=o("GENDER_TYPE",(e=>(e.FEMALE="female",e.MALE="male",e.PRIVARY="privary",e))(Ai||{})),Ri=o("TODO_TYPE",(e=>(e.TODO="todo",e.APPLICATION="application",e.DONE="done",e.DELEGATE="delegate",e))(Ri||{})),bi=o("CARD_TRIGGER_ENUM",(e=>(e.HOVER="hover",e.CLICK="click",e))(bi||{}));const Ql=o("SHOW_FIELDTYPES",[h.TEXT,h.LONG_TEXT,h.LONG,h.INTEGER,h.DECIMAL,h.DOUBLE,h.SERIAL]);var Si=o("UserServiceType",(e=>(e.SCRIPT_SERVICE="SCRIPT_SERVICE",e.SQL_SERVICE="SQL_SERVICE",e.SO_SERVICE="SO_SERVICE",e.BUILTIN_SERVICE="SYS_BUILTIN",e))(Si||{})),pt=o("EntityModelCategoryEnum",(e=>(e.ENTITY="entity",e.DATA="data",e.VIEW="view",e.FORM="form",e.DATA_SET="dataSet",e))(pt||{})),Ii=o("EntityModelTypeEnum",(e=>(e.BASE="BASE",e.NDO="NDO",e.RDO="RDO",e.TREE="TREE",e.DYNAMIC_FORM="DYNAMIC_FORM",e.WORKFLOW="WORKFLOW",e.TRANSACTION="TRANSACTION",e))(Ii||{})),Ni=o("FieldDefaultValueTypeEnum",(e=>(e.NONE="NONE",e.FIXED="FIXED",e.SYS_VAR="SYS_VAR",e))(Ni||{})),Oi=o("FieldSysVarDefaultValueEnum",(e=>(e.NULL="",e.SYS_DATE="SYS_DATE",e.SYS_TIME="SYS_TIME",e.SYS_DATE_TIME="SYS_DATE_TIME",e.CURRENT_USER="CURRENT_USER",e.CURRENT_ORG="CURRENT_ORG",e))(Oi||{})),Li=o("scriptTypeEnum",(e=>(e.EVENT="event",e.BUSINESSSERVICE="businessService",e.TIMER="timer",e))(Li||{})),_i=o("pageLayoutModeEnum",(e=>(e.SHOW_BOX_SCROLL="showBoxScroll",e.SHOW_ALL_DATA="showAllData",e))(_i||{})),pi=o("PanelEnum",(e=>(e.PAGE="page",e.HISTORY="history",e.GLOBAL="global",e.WIDGET="widget",e.CHANGE_DESIGN="changeDesign",e))(pi||{})),vi=o("Postion",(e=>(e.STATIC="static",e.RELATIVE="relative",e.ABSOLUTE="absolute",e.FIXED="fixed",e.STICKY="sticky",e))(vi||{})),Di=o("BorderStyle",(e=>(e.NONE="none",e.SOLID="solid",e.DOTTED="dotted",e.DASHED="dashed",e.DOUBLE="double",e))(Di||{})),Mi=o("TextAlign",(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.JUSTIFY="justify",e))(Mi||{})),yi=o("TextDecoration",(e=>(e.LINETHROUGH="line-through",e.UNDERLINE="underline",e.NONE="none",e))(yi||{})),Ci=o("EventCategory",(e=>(e.INNER="inner",e.JS="js",e))(Ci||{})),Ui=o("PropGroup",(e=>(e.BASIC="basic",e.ADVANCED="advance",e.DISPLAY="display",e.LABEL="label",e.FIELD="field",e.DATA="data",e.OTHER="other",e.LIST="list",e.Table="table",e.SUBMIT_RULE="submitRule",e.LISTDATA="listdata",e.SHOW="show",e.FIELD_CONFIG="fieldConfig",e.FORM_CONFIG="formConfig",e.FIELD_LAYOUT="FieldLayout",e.LEFT_RIGHT_COLUMNS="leftRightColumns",e.TABLESELECT_CONFIG="tableSelect",e.GENRADIO="genRadio",e.GENCHECKBOX="genCheckbox",e.GENSWITCH="genSwitch",e.OPTIONS="options",e.COLLAPSE="collapse",e.SPACE_OCCUPATION="spaceOccupation",e.DIVIDER="divider",e.IFRAME="iframe",e.FILECOLLECT="fileCollect",e.CARDLIST="cardList",e.BUTTON="button",e.Button="Button",e.ButtonShow="ButtonShow",e.ButtonStyle="ButtonStyle",e.LISTBUTTON="listButton",e.MODAL="modal",e.MODALWIDTH="modalWidth",e.MODALHEIGHT="modalHeight",e.MODALTITLECONFIG="modalTitleConfig",e.SEARCH="search",e.QUERY="query",e.INPUT_CONFIG="inputConfig",e.DATALINKAGE="dataLinkage",e.PERMISSION="permission",e.DATASOURCE="dataSource",e.VALIDATERULE="validaterule",e.TEXT="text",e.GRID_CONFIG="gridConfig",e.COL_CONFIG="colConfig",e.COMPONENTDEPENDENCY="componentDependency",e.GENIMAGE="genImage",e.DATARANGE="dataRange",e.OPERATOR_CONFIG="operatorConfig",e.BUSINESS_CONFIG="businessConfig",e.Vue3="Vue3",e.TREE_CONFIG="treeConfig",e.CARDDISPLAY="cardDisplay",e))(Ui||{})),Pi=o("StyleGroup",(e=>(e.LAYOUT="layout",e.STYLE="style",e.BACKGROUND="background",e.MARGIN="margin",e.BORDER="border",e.HEADER="header",e.SHOW_PROP="showProp",e))(Pi||{})),wi=o("tagEnum",(e=>(e.TAG="tag",e.PROGRESS="progress",e))(wi||{})),Fi=o("TagTypeEnum",(e=>(e.RADIUS="radius",e.LINEAR_RADIUS="linear_radius",e.BIG_RADIUS="big_radius",e.LINEAR_BIG_RADIUS="linear_big_radius",e.DASHED_RADIUS="dashed_radius",e.STATUS="status",e))(Fi||{})),Gi=o("DisplayTagTypeEnum",(e=>(e.RADIUS="radius",e.BIG_RADIUS="big_radius",e.STATUS="status",e.SURFACE_RADIUS="surface_radius",e.SURFACE_BIG_RADIUS="surface_big_radius",e.SURFACE_STATUS="surface_status",e.LINE_RADIUS="line_radius",e.LINE_BIG_RADIUS="line_big_radius",e.LINE_DASHED_RADIUS="line_dashed_radius",e.LINE_STATUS="line_status",e))(Gi||{})),Bi=o("ProgressTypeEnum",(e=>(e.CIRCLE="circle",e.LINE="line",e))(Bi||{})),ki=o("DisplayType",(e=>(e.RULE="rule",e.CONFIG="config",e))(ki||{})),Hi=o("GLOBAL_VAR_TYPE",(e=>(e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.OBJECT="object",e.ARRAY="array",e.NULL="NULL",e.DATE="date",e.DATETIME="datetime",e.TIME="time",e.VAR="var",e))(Hi||{})),Wi=o("GLOBAL_TYPE",(e=>(e.MODAL="modal",e.EVENT="event",e.VAR="var",e))(Wi||{})),Vi=o("COLUMNS_TYPE",(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(Vi||{})),Xi=o("INNER_EVENT",(e=>(e.CLOSE_MODAL="__CLOSEMODAL__",e.OPEN_MODAL="__OPENMODAL__",e.REFRESH_TABLE="__REFRESHTABLE__",e))(Xi||{})),Yi=o("SUB_TABLE_EDIT_MODE",(e=>(e.INLINE="inline",e.MODAL="modal",e))(Yi||{})),ji=o("SUB_TABLE_OPE_EVENT_TYPE_INLINE",(e=>(e.DELETE="delete",e.COPY="copy",e))(ji||{})),Ki=o("SUB_TABLE_OPE_EVENT_TYPE",(e=>(e.DELETE="delete",e.EDIT="edit",e.COPY="copy",e))(Ki||{})),$i=o("VERIFICATIONCONDITIONS_TYPE",(e=>(e.JS="js",e))($i||{})),Zi=o("ASSIGNMENTSTRATEGY_ENUM",(e=>(e.alwaysCover="alwaysCover",e.notCovered="notCovered",e))(Zi||{})),Ji=o("Dependency_ENUM",(e=>(e.HIDDEN="hidden",e.READONLY="readonly",e.DISABLED="disabled",e.REQUIRED="required",e.ASSIGNMENT="assignment",e))(Ji||{})),xi=o("ToolkitEnum",(e=>(e.OUTLINE="OUTLINE",e.WIDGETS="WIDGETS",e.FIELD="FIELD",e.MODAL="MODAL",e.JS="JS",e.CSS="CSS",e.TEMPLATE="TEMPLATE",e.LO="LO",e))(xi||{})),zi=o("CategoryTypeEnum",(e=>(e.FORM="form",e.LAYOUT="layout",e.ADVANCED="advanced",e.DATA="data",e.BUTTON="button",e.RDO="rdo",e.KIT="kit",e.PROCESS="process",e))(zi||{})),vt=o("Platform",(e=>(e.WEB="web",e.MOBILE="mobile",e.PAD="pad",e))(vt||{})),Qi=o("BuiltinType",(e=>(e.MODAL="modal",e.MODAL_BODY="modalBody",e.MODAL_FOOTER="modalFooter",e.BottomButtonContainer="bottom-button-container",e))(Qi||{})),qi=o("DateRangeEnums",(e=>(e.WEEK_NOW="sys.pageDesigner.dateRange.weekNow",e.MONTH_NOW="sys.pageDesigner.dateRange.monthNow",e.QUARTER_NOW="sys.pageDesigner.dateRange.quarterNow",e.YEAR_NOW="sys.pageDesigner.dateRange.yearNow",e.WEEk_BEFORE="sys.pageDesigner.dateRange.weekBefore",e.MONTH_BEFORE="sys.pageDesigner.dateRange.monthBefore",e.QUARTER_BEFORE="sys.pageDesigner.dateRange.quarterBefore",e.YEAR_BEFORE="sys.pageDesigner.dateRange.yearBefore",e.DATE_BEFORE="sys.pageDesigner.dateRange.dateBefore",e.DATE_AFTER="sys.pageDesigner.dateRange.dateAfter",e))(qi||{})),er=o("SelectPickerEnums",(e=>(e.DROPDOWN_SELECTION="dropdownSelection",e.TREE_SELECTION="treeSelection",e.MODAL_BOX_SELECTION="modalBoxSelection",e))(er||{})),tr=o("CURRENCY_ENUM",(e=>(e["¥"]="¥",e.$="$",e.S$="S$",e))(tr||{})),nr=o("TIMETYPE_ENUM",(e=>(e.d="d",e["d:h"]="d:h",e["d:h:m"]="d:h:m",e["d:h:m:s"]="d:h:m:s",e.h="h",e["h:m"]="h:m",e["h:m:s"]="h:m:s",e.m="m",e["m:s"]="m:s",e.s="s",e))(nr||{})),ir=o("TIMETYPE_LANG_ENUM",(e=>(e.d="days",e["d:h"]="dayhour",e["d:h:m"]="dayhourminute",e["d:h:m:s"]="dayhourminutesecond",e.h="hour",e["h:m"]="hourminute",e["h:m:s"]="hourminutesecond",e.m="minute",e["m:s"]="minutesecond",e.s="seconds",e))(ir||{})),rr=o("CURRENCY_LANG_ENUM",(e=>(e["¥"]="chMoney",e.$="usMoney",e.S$="sgpMoney",e))(rr||{})),ar=o("RowSelectionTypeEnums",(e=>(e.SingleChoice="radio",e.MultipleChoice="checkbox",e))(ar||{})),sr=o("StatisticalMethodEnums",(e=>(e.Current="current",e.Whole="whole",e))(sr||{})),or=o("PrintModeEnums",(e=>(e.Local="local",e.Server="server",e.PREVIEW_PRINT="PreviewPrint",e.DIRECT_PRINTING="DirectPrinting",e))(or||{})),cr=o("openWindowEnums",(e=>(e.OPEN="open",e.APPROVE="linkApprove",e))(cr||{})),lr=o("KeyMode",(e=>(e.SYSTEM="system",e.TRANSACTION="transaction",e))(lr||{})),dr=o("TransactionMode",(e=>(e.CURRENT="current",e.REFERENCE="reference",e))(dr||{})),ur=o("DisplayEnums",(e=>(e.BLOCK="block",e.INLINE_BLOCK="inline-block",e))(ur||{})),fr=o("ButtonColorType",(e=>(e.DEFAULT="default",e.LINK="link",e))(fr||{})),hr=o("ButtonColorTheme",(e=>(e.DEFAULT="default",e.PRIMARY="primary",e.ERROR="error",e.WARNING="warning",e.SUCCESS="success",e))(hr||{})),gr=o("ButtonStyle",(e=>(e.ORDINARY="ordinary",e.SQUARE="square",e))(gr||{})),Er=o("ButtonSize",(e=>(e.SMALL="small",e.DEFAULT="middle",e.LARGE="large",e))(Er||{})),mr=o("ButtonTypeGroup",(e=>(e.TEXT="TEXT",e.ICON_TEXT="ICON_TEXT",e.ICON="ICON",e))(mr||{})),Tr=o("ButtonType",(e=>(e.PRIMARY="primary",e.DEFAULT="default",e.DASHED="dashed",e.LINK="link",e))(Tr||{})),Ar=o("ButtonType_vant",(e=>(e.PRIMARY="primary",e.DANGER="danger",e.DEFAULT="default",e))(Ar||{}));const ql=o("ButtonGroupType",{TEXT:[{type:"primary",label:"sys.pageDesigner.button_primary",hasText:!0},{type:"default",label:"sys.pageDesigner.button_default",hasText:!0},{type:"primary",danger:!0,label:"sys.pageDesigner.button_primary_danger",hasText:!0},{type:"default",danger:!0,label:"sys.pageDesigner.button_danger",hasText:!0},{type:"dashed",label:"sys.pageDesigner.button_dashed",hasText:!0},{type:"link",label:"sys.pageDesigner.button_text",hasText:!0}],ICON_TEXT:[{type:"primary",label:"sys.pageDesigner.button_primary",hasText:!0,hasIcon:!0},{type:"default",label:"sys.pageDesigner.button_default",hasText:!0,hasIcon:!0},{type:"primary",danger:!0,label:"sys.pageDesigner.button_primary_danger",hasText:!0,hasIcon:!0},{type:"default",danger:!0,label:"sys.pageDesigner.button_danger",hasText:!0,hasIcon:!0},{type:"dashed",label:"sys.pageDesigner.button_dashed",hasText:!0,hasIcon:!0},{type:"link",label:"sys.pageDesigner.button_text",hasText:!0,hasIcon:!0}],ICON:[{type:"primary",hasIcon:!0},{type:"default",hasIcon:!0},{type:"primary",danger:!0,hasIcon:!0},{type:"default",danger:!0,hasIcon:!0},{type:"dashed",hasIcon:!0},{type:"link",hasIcon:!0}]});var Rr=o("operateSysEnums",(e=>(e.COLUMNDELETE="columnDelete",e.COLUMNLINK="columnLink",e.COPY="copy",e.VERSION_COPY="version_copy",e.VERSION_CREATE="version_create",e.DETAILS="details",e.EDIT="edit",e.USAGEINFORMATION="usageInformation",e.MODELINGTRACEABILITY="modelingTraceability",e.IMPORT="import",e.EXPORT="export",e.BATCHDELETE="batchDelete",e.SUBMIT="submit",e.RESET="reset",e.EXCUTE="excute",e.LABEL_PRINT="label_print",e.DOCUMENT_PRINT="document_print",e.EXAMINE_AND_APPROVE="examineAndApprove",e))(Rr||{})),br=o("TableSearchTypeEnum",(e=>(e.NONE="none",e.EMBEDDED="embedded",e.EXTERNAL="external",e))(br||{})),Sr=o("TableTypeEnum",(e=>(e.DEFAULT="default",e.EMBED="embed",e.SUB="sub",e))(Sr||{})),Ir=o("TableEditingMethodEnum",(e=>(e.DEFAULTEDITING="defaultEditing",e.CLICKTOENTEREDITING="clickToEnterEditing",e))(Ir||{})),Nr=o("WidgetInScopeEnum",(e=>(e.GCT="gct",e.GCT_MODAL="gct-modal",e.GCT_SUB_TABLE_MODAL="gct-sub-table-modal",e))(Nr||{})),Or=o("ListTreeSearchTypeEnum",(e=>(e.ALL="ALL",e.SEARCH="SEARCH",e.SEARCHALL="SEARCHALL",e.LEVEL="LEVEL",e.CHILDREN="CHILDREN",e))(Or||{})),Lr=o("DatasourceTypeEnum",(e=>(e.REALTIMEDATASOURCE="realTimeDataSource",e.SERVICEDATASOURCE="serviceDataSource",e))(Lr||{})),_r=o("SignatureTypeEnum",(e=>(e.SIGNATURE_ONLY="signature_only",e.SIGNATURE_DATE="signature_date",e.SIGNATURE_DATETIME="signature_datetime",e))(_r||{})),pr=o("ResetRuleType",(e=>(e.WIPE_DATA="wipe_data",e.REFRESHDATA="refresh_data",e))(pr||{})),vr=o("SCOPE",(e=>(e.PAGE="page",e.MODAL="modal",e))(vr||{})),Dr=o("FormComponents",(e=>(e.RdoInput="rdo-input",e.Input="input",e.ElectronicSignature="electronic-signature",e.UseinfoButton="useinfo-button",e.ModelingButton="modeling-button",e.ImportButton="gc-import-button",e.ExportButton="gc-export-button",e.DocumentPrintButton="document-print-button",e.SubmitButton="submit-button",e.BatchDeleteButton="batchdelete-button",e.CustomButton="custom-button",e.TableLinkButton="table-link-button",e.TableInfoButton="table-info-button",e.TableApproveButton="table-approve-button",e.OpeButton="ope-button",e.ResetButton="reset-button",e.RdoSaveButton="rdo-save-button",e.LabelPrintButton="labelprint-button",e.ProcessButton="process-button",e.ProcessApproveButton="process-approve-button",e.CreateButton="create-button",e.DeleteButton="delete-button",e.CopyButton="copy-button",e.RefreshButton="refresh-button",e.CreateVersionButton="create-version-button",e.CopyVersionButton="copy-version-button",e.Checkbox="checkbox",e.DataTable="data-table",e.DataVTable="data-v-table",e.TreeTable="tree-table",e.DataTableColumn="data-table-column",e.RefDataTable="ref-data-table",e.DataList="data-list",e.RdoDataList="rdo-data-list",e.DataTableOpe="data-table-ope",e.DataTableFormula="data-table-formula",e.Datepicker="datepicker",e.DateTimepicker="datetimepicker",e.Department="department",e.Form="form",e.RdoForm="rdo-form",e.RdoTable="rdo-table",e.MedProRdoForm="medprordo-form",e.MedProRdoTable="medprordo-table",e.FormProcess="form-process",e.Inputmoney="inputmoney",e.Inputnumber="inputnumber",e.InputDouble="inputdouble",e.Radio="radio",e.Select="select",e.RdoSelect="rdo-select",e.Switch="switch",e.Textarea="textarea",e.Timepicker="timepicker",e.Userpicker="userpicker",e.Search="search",e.SelectSearch="select-search",e.QuickSearch="quick-search",e.LayoutContainer="layout-container",e.ButtonContainer="button-container",e.ButtonProcessContainer="button-process-container",e.BottomButtonContainer="bottom-button-container",e.Grid="grid",e.GridCol="grid-col",e.Tabs="tabs",e.TabPane="tab-pane",e.LeftRightColumns="left-right-columns",e.TopBottomColumns="top-bottom-columns",e.LeftLayoutThree="left-layout-three",e.TopLayoutThree="top-layout-three",e.UploadFile="upload-file",e.UploadImage="upload-image",e.SubTable="sub-table",e.SubTableOpe="sub-table-ope",e.SubTableAddBtn="sub-table-add-button",e.SubTableCopyBtn="sub-table-copy-button",e.SubTableEditBtn="sub-table-edit-button",e.SubTableDeleteBtn="sub-table-delete-button",e.LinkPageBtn="link-page-button",e.Collapse="collapse",e.SpaceOccupation="space-occupation",e.Divider="divider",e.CardList="card-list",e.CardHeaderLeft="card-header-left",e.CardHeaderRight="card-header-right",e.CardContent="card-content",e.CardOpeBtn="card-ope-btn",e.BaseButton="base-button",e.ReadonlyCmp="readonlycmp",e.TableSelect="table-select",e.GenCheckbox="gen-checkbox",e.GenRadio="gen-radio",e.GenSwitch="gen-switch",e.WorkflowNodes="workflow-nodes",e.WorkflowNodeModal="workflow-node-modal",e.ESOP="e-sop",e.EXPRESSION="expression",e.ExpressionCondition="expression-condition",e.AGG="agg",e.DynamicFormType="dynamic-form-type",e.DynamicFormValue="dynamic-form-value",e.DynamicFormOpts="dynamic-form-options",e.DynamicFormShowType="dynamic-form-show-type",e.DynamicTable="dynamic-table",e.Transaction="transaction",e.SerialRule="serial-rule",e.LabelTemplate="label-template",e.LabelTemplateRef="label-template-ref",e.DocumentTemplate="document-template",e.Wacom="wacom",e.Text="text",e.CustomField="custom-field",e.Printer="printer",e.Descriptions="descriptions",e.RangeUser="range-user",e.GenImage="gen-image",e.TestButton="test-button",e.Iframe="iframe",e.ExcuteButton="medproexcute-button",e.SubDataTable="sub-data-table",e.Signature="signature",e.OnlineForm="online-form",e.TmplTreeSelect="tmpl-tree-select",e.Boolean="boolean",e.BizProcess="biz-process",e.ApprovalHistory="approval-history",e.FlowDiagram="flow-diagram",e.CustomCode="custom-code",e.ApprovalProcess="approval-process",e))(Dr||{})),Mr=o("SearchComponents",(e=>(e.SearchInput="SearchInput",e.SearchNumberInput="SearchNumberInput",e.SearchStringNumberInput="SearchStringNumberInput",e.SearchSwitch="SearchSwitch",e.SearchDate="SearchDate",e.SearchDateTime="SearchDateTime",e.SearchTime="SearchTime",e.SearchSelect="SearchSelect",e.SearchUserSelect="SearchUserSelect",e.SearchRdoSelect="SearchRdoSelect",e.SearchTransaction="SearchTransaction",e.SearchTmplTreeSelect="SearchTmplTreeSelect",e.SearchPrinter="SearchPrinter",e.SearchBizProcess="SearchBizProcess",e.SearchSelectRangUser="SearchSelectRangUser",e.SearchSelectDepartment="SearchSelectDepartment",e))(Mr||{})),yr=o("tableColumnWidthEnum",(e=>(e.AUTO_PARENT_BOX="AutoParentBox",e.ATUO="selfAdaption",e.ENUMERATION="fixed",e.PERCENTAGE="percentage",e))(yr||{})),Cr=o("controlConfigEnum",(e=>(e.NULL="NULL",e.STRING="空字符串",e.ZERO="0",e))(Cr||{})),Ur=o("statisticalMethodEnum",(e=>(e.TOTAL="total",e.AVERAGE="average",e))(Ur||{})),Pr=o("fixedAlignENUM",(e=>(e.RIGHT="right",e.NONE="",e.LEFT="left",e))(Pr||{})),wr=o("tableColumnTypeEnum",(e=>(e.COLUMN_TEXT="COLUMN_TEXT",e.COLUMN_NUMBER="COLUMN_NUMBER",e.COLUMNTEXT_DATA="COLUMNTEXT_DATA",e.COLUMNTEXT_REF="COLUMNTEXT_REF",e.COLUMNTEXT_ENUM="COLUMNTEXT_ENUM",e.COLUMNTEXT_ORG="COLUMNTEXT_ORG",e.COLUMNTEXT_USER="COLUMNTEXT_USER",e.COLUMNTEXT_BOOLEAN="COLUMNTEXT_BOOLEAN",e.COLUMNTEXT_IMAGE="COLUMNTEXT_IMAGE",e))(wr||{})),Fr=o("tabsTypeENUM",(e=>(e.LINE="line",e.CARD="card",e.TEXt="text",e.CAPSULE="capsule",e.CUSTOM="custom",e))(Fr||{})),Gr=o("sortTypeEnum",(e=>(e.ASC="asc",e.DESC="desc",e))(Gr||{})),Br=o("BindCmpStyleEnum",(e=>(e.CMP_TEXT="TEXT",e.CMP_TEXTAREA="TEXTAREA",e.CMP_ELECTRONICSIGNATURE="ELECTRONICSIGNATURE",e.CMP_BOOLEAN="BOOLEAN",e.CMP_SELECT_LIST="SELECT_LIST",e.CMP_RADIO="RADIO",e.CMP_CHECKBOX="CHECKBOX",e.CMP_DROPDOWN_SELECT="dropdownSelection",e.CMP_MODAL="modalBoxSelection",e.CMP_TREE_SELECTION="treeSelection",e.CMP_NUMBER="NUMBER",e.CMP_CURRENCY="CURRENCY",e.CMP_TIME="TIME",e))(Br||{}));const ed=o("Ch_BindCmpStyleEnum",{TEXT:"sys.pageDesigner.bindCmpStyle.bindText",TEXTAREA:"sys.pageDesigner.bindCmpStyle.bindTextarea",ELECTRONICSIGNATURE:"sys.pageDesigner.bindCmpStyle.electronicSignature",BOOLEAN:"sys.pageDesigner.bindCmpStyle.bindBoolean",SELECT_LIST:"sys.pageDesigner.bindCmpStyle.bindSelectList",RADIO:"sys.pageDesigner.bindCmpStyle.bindRadio",CHECKBOX:"sys.pageDesigner.bindCmpStyle.bindCheckbox",dropdownSelection:"sys.pageDesigner.bindCmpStyle.bindDropdownSelect",modalBoxSelection:"sys.pageDesigner.bindCmpStyle.bindModal",treeSelection:"sys.pageDesigner.bindCmpStyle.bindTreeSelection",NUMBER:"sys.pageDesigner.bindCmpStyle.bindNumber",CURRENCY:"sys.pageDesigner.bindCmpStyle.bindCurrency",TIME:"sys.pageDesigner.bindCmpStyle.bindTime"});var kr=o("BindCmpStyleTypeEnum",(e=>(e.BindText="bindText",e.BindLongText="BindLongText",e.BindBool="bindBool",e.BindPerson="bindPerson",e.BindDept="bindDept",e.BindLink="bindLink",e.BindMulti="bindMulti",e.BindNum="bindNum",e.BindDecimal="bindDecimal",e))(kr||{}));const td=o("transformBindCmp2CmpType",{TEXT:"input",TEXTAREA:"textarea",ELECTRONICSIGNATURE:"electronic-signature",SELECT_LIST:"select",RADIO:"radio",CHECKBOX:"checkbox"}),nd=o("bindCmpStyleMap",{bindText:["TEXT","TEXTAREA"],BindLongText:["TEXT","TEXTAREA","ELECTRONICSIGNATURE"],bindBool:["BOOLEAN","SELECT_LIST","RADIO","CHECKBOX"],bindPerson:["dropdownSelection","modalBoxSelection"],bindDept:["treeSelection","modalBoxSelection"],bindLink:["SELECT_LIST","RADIO"],bindMulti:["SELECT_LIST","CHECKBOX"],bindNum:["NUMBER","CURRENCY","TIME"],bindDecimal:["NUMBER","CURRENCY"]});var Hr=o("buttonShowType",(e=>(e.FOLD_ALL="foldAll",e.FOLD_PART="foldPart",e))(Hr||{}));const id=o("searchListByFieldType",[h.BOOLEAN,h.DATE,h.DATE_TIME,h.DECIMAL,h.DOUBLE,h.ENUM,h.ENUM_MULTI,h.INTEGER,h.LONG,h.LONG_TEXT,h.TEXT,h.USER_MULTI,h.USER,h.TIME,h.REF_MULTI,h.REF,h.RDO_REF,h.ORG_MULTI,h.ORG,h.SERIAL,h.ONLINE_FORM_TEMPLATE,h.E_DHR_TEMPLATE,h.PRINTER,h.LABEL_TEMPLATE_REF,h.Biz_Process,h.DOCUMENT_TEMPLATE,h.TRANSACTION,h.RANGE_USER,h.MESSAGE_TMPL]),rd=o("mobileSearchListByFieldType",[h.BOOLEAN,h.DATE,h.DATE_TIME,h.DECIMAL,h.DOUBLE,h.ENUM,h.ENUM_MULTI,h.INTEGER,h.LONG,h.LONG_TEXT,h.TEXT,h.USER_MULTI,h.USER,h.TIME,h.REF_MULTI,h.REF,h.RDO_REF,h.ORG_MULTI,h.ORG,h.SERIAL,h.ONLINE_FORM_TEMPLATE,h.E_DHR_TEMPLATE,h.PRINTER,h.LABEL_TEMPLATE_REF,h.Biz_Process,h.DOCUMENT_TEMPLATE,h.TRANSACTION,h.MESSAGE_TMPL]),ad=o("padSearchListByFieldType",[h.BOOLEAN,h.DATE,h.DATE_TIME,h.DECIMAL,h.DOUBLE,h.ENUM,h.ENUM_MULTI,h.INTEGER,h.LONG,h.LONG_TEXT,h.TEXT,h.USER_MULTI,h.USER,h.TIME,h.REF_MULTI,h.REF,h.RDO_REF,h.ORG_MULTI,h.ORG,h.SERIAL,h.PRINTER,h.LABEL_TEMPLATE_REF,h.TRANSACTION]);var Wr=o("SCOPEINFO",(e=>(e.FIELD_LIST="fieldList",e.FIELD_FORM="fieldForm",e))(Wr||{})),Vr=o("PrintResourceEnum",(e=>(e.CLIENT_PRINT="CLIENT_PRINT",e.INTERNET_PRINT="INTERNET_PRINT",e))(Vr||{})),Xr=o("AppPublishStateEnum",(e=>(e.SUCCESS="SUCCESS",e.FAILURE="FAILURE",e.PREPARING="PREPARING",e.EVENTING="EVENTING",e.PROCESSIING="PROCESSIING",e.DEPLOYING="DEPLOYING",e))(Xr||{})),Yr=o("BasicAction",(e=>(e.Insert="Insert",e.Update="Update",e.Delete="Delete",e.Import="Import",e.Export="Export",e.Setting="Setting",e.Download="Download",e.Test="Test",e.Design="Design",e.Add="Add",e))(Yr||{})),jr=o("CustomAction",(e=>(e.ResetPassword="ResetPassword",e.PermissionSetting="PermissionSetting",e.RemoveAndHandover="RemoveAndHandover",e.CategoryManagement="CategoryManagement",e.BaiscSetting="BaiscSetting",e.WatermarkSetting="WatermarkSetting",e.SecuritySetting="SecuritySetting",e.LoginSetting="LoginSetting",e.ThemeSetting="ThemeSetting",e.OrganizationSetting="OrganizationSetting",e.ApkSetting="ApkSetting",e.DevelopIconManagement="DevelopIconManagement",e.DevelopImageManagement="DevelopImageManagement",e.Reprint="Reprint",e.ViewTask="ViewTask",e.ManualTrigger="ManualTrigger",e.Setting="Setting",e.Terminate="Terminate",e.Reassign="Reassign",e.Log="Log",e.Moving="Moving",e.EnableDisable="EnableDisable",e))(jr||{}));const sd=o("DefaultActions",["Insert","Update","Delete"]),od=o("PlatformSettingActions",["BaiscSetting","WatermarkSetting","SecuritySetting","LoginSetting","ThemeSetting","OrganizationSetting","ApkSetting"]);var Kr=o("sizeEnum",(e=>(e.XS="XS",e.SM="SM",e.MD="MD",e.LG="LG",e.XL="XL",e.XXL="XXL",e))(Kr||{})),$r=o("screenEnum",(e=>(e[e.XS=480]="XS",e[e.SM=576]="SM",e[e.MD=768]="MD",e[e.LG=992]="LG",e[e.XL=1200]="XL",e[e.XXL=1600]="XXL",e))($r||{}));const q=o("screenMap",new Map);q.set("XS",480),q.set("SM",576),q.set("MD",768),q.set("LG",992),q.set("XL",1200),q.set("XXL",1600);const Zr=o("TIMEZONE_KEY","TIMEZONE__"),cd=o("TENANT_KEY","TENANT__"),ld=o("TOKEN_KEY","TOKEN__"),dd=o("LOCALE_KEY","LOCALE__"),ud=o("LOCALE_LIST_KEY","LOCALE__LIST"),fd=o("LOCAL_I18N_TRANSLATE","LOCAL_I18N_TRANSLATE"),hd=o("USER_INFO_KEY","USER__INFO__"),gd=o("ROLES_KEY","ROLES__KEY__"),Ed=o("PROJ_CFG_KEY","PROJ__CFG__KEY__"),md=o("LOCK_INFO_KEY","LOCK__INFO__KEY__"),Td=o("MULTIPLE_TABS_KEY","MULTIPLE_TABS__KEY__"),Ad=o("APP_DARK_MODE_KEY_","__APP__DARK__MODE__"),Rd=o("APP_LOCAL_CACHE_KEY","COMMON__LOCAL__KEY__"),bd=o("APP_SESSION_CACHE_KEY","COMMON__SESSION__KEY__"),Sd=o("DESIGNER_SESSION_CACHE_KEY","DESIGNER_SESSION_CACHE_KEY");var Jr=o("CacheTypeEnum",(e=>(e[e.SESSION=0]="SESSION",e[e.LOCAL=1]="LOCAL",e))(Jr||{})),xr=o("SEARCH_SERVICE",(e=>(e.EQ="eq",e.IEQ="iEq",e.NE="ne",e.INE="ine",e.GT="gt",e.GE="ge",e.LT="lt",e.LE="le",e.ISNULL="isNull",e.ISNOTNULL="isNotNull",e.LIKE="like",e.ILIKE="iLike",e.NOTLIKE="notLike",e.NOTILIKE="iNotLike",e.LEFTLIKE="leftLike",e.ILEFTLIKE="iLeftLike",e.RIGHTLIKE="rightLike",e.IRIGHTLIKE="iRightLike",e.IN="in",e.NOTIN="notIn",e.CONTAINANY="containAny",e.CONTAINALL="containAll",e.RANGE="range",e.ORANGE="oRange",e.LORANGE="loRange",e.RORANGE="roRange",e.VERSIONIN="versionIn",e.VERSIONNOTIN="versionNotIn",e.VERSIONEQ="versionEq",e.VERSIONNE="versionNe",e))(xr||{}));const Id=o("notSingleArr",["in","notIn","containAny","containAll","versionIn"]);var zr=o("AGLINE_ENUMS",(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.BETWEEN="between",e))(zr||{}));const Nd=o("presetColor",["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"]);var Qr=o("ButtonOpeEnum",(e=>(e[e.SINGLELINE=0]="SINGLELINE",e[e.HEAD=1]="HEAD",e[e.BATCH=2]="BATCH",e[e.SINGLELINE_RDO=3]="SINGLELINE_RDO",e))(Qr||{})),qr=o("RdoButtonOpeEnum",(e=>(e[e.parentVersion=0]="parentVersion",e[e.childVersion=1]="childVersion",e))(qr||{})),ea=o("ExceptionEnum",(e=>(e[e.PAGE_NOT_ACCESS=403]="PAGE_NOT_ACCESS",e[e.PAGE_NOT_FOUND=404]="PAGE_NOT_FOUND",e[e.ERROR=500]="ERROR",e[e.NET_WORK_ERROR=1e4]="NET_WORK_ERROR",e[e.PAGE_NOT_DATA=10100]="PAGE_NOT_DATA",e))(ea||{})),k=o("ErrorTypeEnum",(e=>(e.VUE="vue",e.SCRIPT="script",e.RESOURCE="resource",e.AJAX="ajax",e.PROMISE="promise",e))(k||{})),ta=o("ResultEnum",(e=>(e[e.SUCCESS=200]="SUCCESS",e[e.ERROR=-1]="ERROR",e[e.TIMEOUT=401]="TIMEOUT",e.TYPE="success",e))(ta||{})),na=o("RequestEnum",(e=>(e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e))(na||{})),ia=o("ContentTypeEnum",(e=>(e.JSON="application/json;charset=UTF-8",e.FORM_URLENCODED="application/x-www-form-urlencoded;charset=UTF-8",e.FORM_DATA="multipart/form-data;charset=UTF-8",e))(ia||{})),ra=o("BizServiceEnum",(e=>(e.submit="post",e.listByIds="get",e.getone="post",e.listAll="post",e.listByPage="post",e.listTree="post",e.save="post",e.saveOrUpdate="post",e.saveBatch="post",e.importData="post",e.exportData="post",e.remove="post",e.removeById="delete",e.removeByIds="delete",e.update="put",e.updateById="put",e.updateByIds="put",e.rdoSave="post",e.rdoListAll="post",e.rdoListByPage="post",e.rdoListVersionById="get",e.rdoSaveVersion="post",e.rdoSaveBatch="post",e.rdoUpdateVersionById="put",e.rdoRemoveVersionById="delete",e.rdoRemoveById="delete",e.rdoGetVersionById="get",e.getOne="post",e.rdoGetVersionByRefId="post",e.getById="get",e.rdoListAllVersion="post",e.rdoRefListByPage="post",e.export="post",e.import="post",e.rdoExport="post",e.rdoImport="post",e.biz_search="post",e))(ra||{})),aa=o("PlatformType",(e=>(e.WEB="web",e.PDA="pda",e.PAD="pad",e))(aa||{})),sa=o("nullDisplayEnum",(e=>(e["--"]="--",e.empty="(空)",e.null="null",e["N/A"]="N/A",e.noDisplay="",e))(sa||{})),oa=o("DeviceParamsTypeEnum",(e=>(e.STRING="String",e.INTEGER="Integer",e.LONG="Long",e.FLOAT="Float",e.BOOLEAN="Boolean",e.DATE="Date",e))(oa||{})),ca=o("MenuTypeEnum",(e=>(e.SIDEBAR="sidebar",e.MIX_SIDEBAR="mix-sidebar",e.MIX="mix",e.TOP_MENU="top-menu",e))(ca||{})),la=o("TriggerEnum",(e=>(e.NONE="NONE",e.FOOTER="FOOTER",e.HEADER="HEADER",e))(la||{})),da=o("MenuModeEnum",(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.VERTICAL_RIGHT="vertical-right",e.INLINE="inline",e))(da||{})),ua=o("MenuSplitTyeEnum",(e=>(e[e.NONE=0]="NONE",e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e))(ua||{})),fa=o("TopMenuAlignEnum",(e=>(e.CENTER="center",e.START="start",e.END="end",e))(fa||{})),ha=o("MixSidebarTriggerEnum",(e=>(e.HOVER="hover",e.CLICK="click",e))(ha||{})),ga=o("PageEnum",(e=>(e.BASE_LOGIN="/login",e.BASE_TENANT="/tenant",e.BASE_HOME="/home",e.USER_CENTER="/user-center",e.PROCESS_CENTER="/process",e.MESSAGE_CENTER="/message",e.ERROR_PAGE="/exception",e.ERROR_LOG_PAGE="/error-log/list",e.USER_CENTER_PWD="/user-center/password",e))(ga||{})),Ea=o("RoleEnum",(e=>(e.SUPER="super",e.TEST="test",e))(Ea||{})),ma=o("SizeEnum",(e=>(e.DEFAULT="default",e.SMALL="small",e.LARGE="large",e))(ma||{})),Ta=o("ProcessStatusEnum",(e=>(e.APPROVING="APPROVING",e.COMPLETED="COMPLETED",e.REFUSED="REFUSED",e.REJECTED="REJECTED",e.TERMINATED="TERMINATED",e.WITHDRAWN="WITHDRAWN",e))(Ta||{}));const Od=o("ch_ProcessStatusMap",{APPROVING:"sys.process.status.approving",COMPLETED:"sys.process.status.completed",REFUSED:"sys.process.status.refused",REJECTED:"sys.process.status.rejected",TERMINATED:"sys.process.status.terminated",WITHDRAWN:"sys.process.status.withdrawn"});var Aa=o("ExamineAndApproveStateEnum",(e=>(e.MY_APPLICATION="myApplication",e.MY_AGENT="myAgent",e.MY_DONE="myDone",e.MY_CUSTOM="myCustom",e.MY_CUSTOM_Modal="myCustomModal",e))(Aa||{})),Ra=o("ButtonTypeEnum",(e=>(e.Resubmit="Resubmit",e.End="Terminate",e.Withdraw="Withdraw",e.Approve="Approve",e.Refuse="Refuse",e.Reassign="Reassign",e.Countersign="Countersign",e.Reject="Reject",e))(Ra||{})),ba=o("OpinionTypeEnum",(e=>(e.Required="Required",e.Optional="Optional",e.ApproveRequired="ApproveRequired",e.RefuseRequired="RefuseRequired",e.ReassignRequired="ReassignRequired",e.RejectRequired="RejectRequired",e.CountersignRequired="CountersignRequired",e))(ba||{})),Sa=o("BpmnNodeTypeEnum",(e=>(e.BpmnStart="bpmnStart",e.BpmnSubmit="bpmnSubmit",e.BpmnApproval="bpmnApproval",e.BpmnEnd="bpmnEnd",e.BpmnExclusive="bpmnExclusive",e.BpmnJs="bpmnJs",e.BpmnMessage="bpmnMessage",e.BpmnParallel="bpmnParallel",e.BpmnJoin="bpmnJoin",e.BpmnForm="bpmnForm",e.BpmnBusiness="bpmnBusiness",e))(Sa||{})),Ia=o("PluginModeEnum",(e=>(e.DESIGN="design",e.WEB="web",e.MOBILE="mobile",e))(Ia||{})),b=o("ExpressionModeEnum",(e=>(e[e.SEARCH=0]="SEARCH",e[e.FIELD_DISPLAY=1]="FIELD_DISPLAY",e[e.EXPORT_TEMPLATE=2]="EXPORT_TEMPLATE",e[e.DISPLAY_RULE=3]="DISPLAY_RULE",e[e.PROCESS_TITLE=4]="PROCESS_TITLE",e[e.GATEWAY_RULE=5]="GATEWAY_RULE",e[e.CREATE_FIELD=6]="CREATE_FIELD",e[e.PAAS_CREATE_FIELD=7]="PAAS_CREATE_FIELD",e[e.ENTITY_FORMULA=8]="ENTITY_FORMULA",e[e.IPAAS_BACK=9]="IPAAS_BACK",e[e.LABEL_PRINT=10]="LABEL_PRINT",e[e.NOCODE_BPMN_RULE=11]="NOCODE_BPMN_RULE",e[e.PAAS_BPMN_RULE=12]="PAAS_BPMN_RULE",e[e.ONLINE_FORM_FIELD_FORMULA=13]="ONLINE_FORM_FIELD_FORMULA",e[e.MEDPRO_BUSINESSFLOW=14]="MEDPRO_BUSINESSFLOW",e[e.RUN_FORMULA=15]="RUN_FORMULA",e[e.BI_FORMULA=16]="BI_FORMULA",e[e.DATA_SET_FORMULA=17]="DATA_SET_FORMULA",e))(b||{})),g=o("ExpressionTabEnum",(e=>(e.FUNCTION="function",e.FORM="form",e.FIELD="field",e.VARIABLE="variable",e.NODE="node",e.OPERATOR="operator",e))(g||{})),L=o("OperatorTypeEnum",(e=>(e.ARITHMETIC="arithmetic",e.RELATIONSHIP="relationship",e.LOGIC="logic",e.OTHER="other",e))(L||{})),Na=o("VarTypeEnum",(e=>(e.INNER_VAR="INNER_VAR",e.SYSTEM_VAR="SYSTEM_VAR",e.GLOBAL_VAR="GLOBAL_VAR",e.PAGE_VAR="PAGE_VAR",e))(Na||{})),Dt=o("ReturnTypeEnum",(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e))(Dt||{})),Mt=o("DataSetReturnTypeEnum",(e=>(e.String="string",e.Double="number",e))(Mt||{})),Ee=o("EntityFormulaReturnTypeEnum",(e=>(e.Text="text",e.LongText="long_text",e.Int="integer",e.Long="long",e.Double="decimal",e.Boolen="boolean",e))(Ee||{})),Oa=o("IdentifierAddon",(e=>(e.Prefix="",e))(Oa||{}));const Ld=o("zeroWidthSpace","");var La=o("GctMqttTopsEnum",(e=>(e.EDHR_FORM_INST_MULTI_PERSON_EDIT_BREAK="FORM_INST_MULTI_PERSON_EDIT_BREAK",e.EDHR_FORM_INST_MULTI_PERSON_EDIT_UNLOCK="FORM_INST_MULTI_PERSON_EDIT_UNLOCK",e))(La||{})),_a=o("GlobalParamEnum",(e=>(e.SELECT_ID="$VAR_GCT_SELECT_ID",e))(_a||{}));class yt{context={aid:"",bid:"",pid:"",platform:vt.WEB};appInfo={};projectName=_t.PORTAL;lang="zh-CN"}o("GlobalPiniaState",yt);class Ue{loaded=!1;isNew=!0;loading=!1;destroyed=!1;data={}}o("FormState",Ue);class W{disabled=!1;readonly=!1;visible=!0;keepalive=!1;destroyed=!1}o("FormItemBasicState",W);class Ct extends W{}o("FormCollapsePaneState",Ct);class Ut extends W{}o("FormCollapseState",Ut);class Pt extends W{activePane=""}o("FormTabState",Pt);class wt extends W{}o("FormTabPaneState",wt);class Pe extends W{label="";value=null;options=[]}o("FormEditItemState",Pe);class Ft extends W{expand=!0}o("FormGroupState",Ft);class Gt extends Pe{}o("FormItemState",Gt);const _d=o("gctMemoizeAsync",(...e)=>pa.bind(null,...e));function pa(e,...t){const i=typeof t=="object"?ue.stringify(t):t;let a=we.get(i);return a||(a=(async()=>{try{return await e(...t)}catch(r){throw we.delete(i),r}})(),we.set(i,a,3e5),a)}class we{static cachedata={};static set(t,n,i){this.cachedata[t]={maxAge:i||0,value:n,now:Date.now()}}static get(t){this.reset();const n=this.cachedata[t];return n?n.value:null}static delete(t){return delete this.cachedata[t]}static clear(){this.cachedata={}}static reset(){for(const t in this.cachedata){const n=this.cachedata[t];n&&Date.now()-n.now>n.maxAge&&this.delete(t)}}}class Bt{configs=new Map;cache=new Map;getConfig(t){return this.configs.get(t)}register(t){this.configs.set(t.tag,t),t.items&&this.cache.set(t.tag,t.items)}unregister(t){this.configs.delete(t),this.cache.delete(t)}get(t){return this.cache.get(t)||[]}async asyncGet(t,n){const i=this.configs.get(t);return i?i.mode==="static"?this.getByConfig(i):i.mode==="async"?this.cache.has(t)?this.cache.get(t)||[]:this.asyncGetByConfig(i,n):[]:[]}getByConfig(t){return t.items||[]}async asyncGetByConfig(t,n={}){if(t.fetch){const i=await t.fetch(n||{});if(i){const[a,r]=t.keys||["name","id"];return this.deepFormat(i,a,r)}}return[]}deepFormat(t,n,i){return t.map(a=>{const r={label:a[n],value:a[i]};return a.children&&a.children.length>0&&(r.options=this.deepFormat(a.children,n,i)),r})}}o("DictionaryUtil",Bt);const Fe=o("t",(...e)=>_gct.i18n.global.t(...e));class Ge{data;next;prev;constructor(t,n=null,i=null){this.data=t,this.next=n,this.prev=i}clear(){this.data=null,this.next=null,this.prev=null}}o("LinkedNode",Ge);class va{active=null;add(t){if(!this.active)this.active=new Ge(t);else{if(this.active.next){let i=this.active.next;for(;i;)i=i.next,i&&i.clear()}const n=new Ge(t,null,this.active);this.active.next=n,this.active=n}}delete(t){const{prev:n,next:i}=t;n&&(n.next=i),i&&(i.prev=n),t.clear()}prev(){this.active&&this.active.prev&&(this.active=this.active.prev)}next(){this.active&&this.active.next&&(this.active=this.active.next)}clearAll(){if(this.active){let t=this.active.prev,n=this.active.next;for(;t;)t.clear(),t=t.prev;for(;n;)n.clear(),n=n.next;this.active.clear()}}canUndo(){return!!this.active&&!!this.active.prev}canRedo(){return!!this.active&&!!this.active.next}}o("LinkedList",va);const pd=o("insertCustomCssToHead",function(e,t=""){const n=document.getElementsByTagName("head")[0],i=document.getElementById("gct-custom-css"+t);i&&n.removeChild(i);const a=document.createElement("style");a.id="gct-custom-css"+t,a.type="text/css",pe(t)?a.innerHTML=e:a.innerHTML=`#${t}{${e}}`,n.appendChild(a)});function Da(e){const t=[];if(e.required&&t.push({required:!0,message:Fe("sys.notNull")}),e.reg){const{reg:i,regHint:a}=e,r=new RegExp(i),s=c=>r.test(c);t.push({validator:s,message:a??Fe("sys.regError")})}const n=e.validateFn;return n&&t.push({validator:n}),t}function Ma(e){return{all:e=e||new Map,on:function(t,n){var i=e.get(t);i?i.push(n):e.set(t,[n])},off:function(t,n){var i=e.get(t);i&&(n?i.splice(i.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var i=e.get(t);i&&i.slice().map(function(a){a(n)}),(i=e.get("*"))&&i.slice().map(function(a){a(t,n)})}}}const vd=o("mitt",Ma());class ya{CACHE_EXPIRATION_TIME=600*1e3;modelCache=new Map;modelLoadingCache=new Map;modelsLoadingCache=new Map;enumCache=new Map;enumLoadingCache=new Map;queryRefDataCache=new Map;queryRefDataLoadingCache=new Map;isExpired(t){return Date.now()>t.expiresAt}createCacheEntry(t){return{data:t,expiresAt:Date.now()+this.CACHE_EXPIRATION_TIME}}async loadModel(t){if(this.modelCache.has(t)){const i=this.modelCache.get(t);if(!this.isExpired(i))return i.data;this.modelCache.delete(t)}if(this.modelLoadingCache.has(t))return this.modelLoadingCache.get(t);const n=(async()=>{try{const i=await _api.apaas.modelMeta.getDetail({modelKey:t});return i?(this.modelCache.set(t,this.createCacheEntry(i)),i):{}}finally{this.modelLoadingCache.delete(t)}})();return this.modelLoadingCache.set(t,n),n}async loadModels(t){const n=t.join(",");if(t.every(r=>{const s=this.modelCache.get(r);return s&&!this.isExpired(s)}))return t.map(r=>this.modelCache.get(r).data);if(t.forEach(r=>{const s=this.modelCache.get(r);s&&this.isExpired(s)&&this.modelCache.delete(r)}),this.modelsLoadingCache.has(n))return this.modelsLoadingCache.get(n);const a=(async()=>{try{const r=t.filter(s=>!this.modelCache.has(s));if(r.length>0){const s=await _api.apaas.modelMeta.getByKeys({modelKeys:r.join(",")});s&&s.length>0&&s.forEach(c=>{this.modelCache.set(c.key,this.createCacheEntry(c)),c.fieldMetaList=c.fieldMetas||[]})}return t.map(s=>this.modelCache.get(s).data)}finally{this.modelsLoadingCache.delete(n)}})();return this.modelsLoadingCache.set(n,a),a}async loadField(t,n){const i=await this.loadModel(t);if(i?.fieldMetaList)return i.fieldMetaList.find(a=>a.key===n)}async loadFieldPaths(t,n,i){if(!i)return[];const a=[],r=!!i.bindFieldKey,s=r?i.modelLink||[i.belongModelKey,i.bindModelKey]:[i.modelKey],c=await this.loadModels(s);if(r)a.push(...c.map(f=>f.name));else{const f=await this.loadModel(i.modelKey);f&&a.push(f.name)}const u=await this.loadModel(t);if(u?.fieldMetaList){const f=u.fieldMetaList.find(l=>l.key===n);f&&a.push(f.name)}return a}async loadEnumList(t,n,i=pt.ENTITY){const a=`${i}:${t}:${n}`;if(this.enumCache.has(a)){const s=this.enumCache.get(a);if(!this.isExpired(s))return Y(s.data);this.enumCache.delete(a),this.enumLoadingCache.delete(a)}if(this.enumLoadingCache.has(a))return this.enumLoadingCache.get(a);const r=(async()=>{try{return[]}finally{this.enumLoadingCache.delete(a)}})();return this.enumLoadingCache.set(a,r),r}async loadQueryRefData(t){if(!t||!t.modelKey)throw new Error("queryRefData 参数缺失");const n=JSON.stringify(t);if(this.queryRefDataCache.has(n)){const a=this.queryRefDataCache.get(n);if(!this.isExpired(a))return Y(a.data);this.queryRefDataCache.delete(n),this.queryRefDataLoadingCache.delete(n)}if(this.queryRefDataLoadingCache.has(n))return this.queryRefDataLoadingCache.get(n);const i=(async()=>{try{const a=await _api.apaas.modelData.postQueryRefData(t);return a?(this.queryRefDataCache.set(n,this.createCacheEntry(a)),Y(a)):{}}finally{this.queryRefDataLoadingCache.delete(n)}})();return this.queryRefDataLoadingCache.set(n,i),i}getCachedModel(t){const n=this.modelCache.get(t);if(n&&!this.isExpired(n))return n.data;n&&this.isExpired(n)&&this.modelCache.delete(t)}clear(t){this.modelCache.delete(t),this.modelLoadingCache.delete(t);const n=[];this.modelsLoadingCache.forEach((r,s)=>{s.includes(t)&&n.push(s)}),n.forEach(r=>{this.modelsLoadingCache.delete(r)});const i=[];this.enumCache.forEach((r,s)=>{s.includes(t)&&i.push(s)}),i.forEach(r=>{this.enumCache.delete(r),this.enumLoadingCache.delete(r)});const a=[];this.queryRefDataCache.forEach((r,s)=>{s.includes(`"modelKey":"${t}"`)&&a.push(s)}),a.forEach(r=>{this.queryRefDataCache.delete(r),this.queryRefDataLoadingCache.delete(r)})}clearAll(){this.modelCache.clear(),this.modelLoadingCache.clear(),this.modelsLoadingCache.clear(),this.enumCache.clear(),this.enumLoadingCache.clear(),this.queryRefDataCache.clear(),this.queryRefDataLoadingCache.clear()}keys(){return Array.from(this.modelCache.keys())}}const Dd=o("modelLoader",new ya),Md=o("ModeFnMap",{[b.EXPORT_TEMPLATE]:["CONCAT"],[b.PROCESS_TITLE]:["CONCAT"],[b.SEARCH]:["AND","OR"],[b.GATEWAY_RULE]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT"],[b.NOCODE_BPMN_RULE]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT","ISNULL","ISEMPTY"],[b.PAAS_BPMN_RULE]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT"],[b.MEDPRO_BUSINESSFLOW]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT"],[b.ENTITY_FORMULA]:["IF","ISEMPTY","ISNULL","AND","OR","EQ","NE","LE","LT","GE","GT","PARSENUMBER","CONCAT","SPLIT","SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","YEAR","MONTH","DAY","HOUR","MINUTE","TUPLE","SEQMAP","SUMSQ"],[b.LABEL_PRINT]:["IF","ISEMPTY","ISNULL","AND","OR","EQ","NE","LE","LT","GE","GT","PARSENUMBER","CONCAT","SPLIT","SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","DATEFORMAT","YEAR","MONTH","DAY","HOUR","MINUTE","TUPLE","SEQMAP","SUMSQ"]}),yd=o("ModeTabMap",{[b.EXPORT_TEMPLATE]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.PROCESS_TITLE]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.GATEWAY_RULE]:[g.FIELD,g.FUNCTION,g.OPERATOR],[b.NOCODE_BPMN_RULE]:[g.FIELD,g.FUNCTION,g.NODE,g.VARIABLE,g.OPERATOR],[b.PAAS_BPMN_RULE]:[g.FIELD,g.FUNCTION,g.OPERATOR],[b.SEARCH]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.FIELD_DISPLAY]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.DISPLAY_RULE]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.CREATE_FIELD]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.DATA_SET_FORMULA]:[g.FIELD,g.FUNCTION,g.OPERATOR],[b.PAAS_CREATE_FIELD]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.ENTITY_FORMULA]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.IPAAS_BACK]:[g.FUNCTION,g.OPERATOR],[b.LABEL_PRINT]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.ONLINE_FORM_FIELD_FORMULA]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.MEDPRO_BUSINESSFLOW]:[g.FIELD,g.FUNCTION,g.OPERATOR],[b.RUN_FORMULA]:[g.FIELD,g.FUNCTION,g.VARIABLE,g.OPERATOR],[b.BI_FORMULA]:[g.FIELD,g.FUNCTION,g.OPERATOR]}),Cd=o("ReturnTypeMaps",{[b.CREATE_FIELD]:Dt,[b.DATA_SET_FORMULA]:Mt,[b.PAAS_CREATE_FIELD]:Ee,[b.ENTITY_FORMULA]:Ee,[b.RUN_FORMULA]:Ee}),Ud=o("ModeTabDict",{[g.FUNCTION]:{icon:"iconfont icon-hanshu1"},[g.FIELD]:{icon:"iconfont icon-ziduan2"},[g.VARIABLE]:{icon:"iconfont icon-bianliang"},[g.NODE]:{icon:"iconfont icon-hanshu1"},[g.OPERATOR]:{icon:"iconfont icon-a-yunsuanfu1"}}),kt=o("BuiltOperators",{"+":{title:"加法: a+b",description:"a,b: 整数,数字",group:L.ARITHMETIC},"-":{title:"减法: a-b",description:"a,b: 整数,数字",group:L.ARITHMETIC},"*":{title:"乘法: a*b",description:"a,b: 整数,数字",group:L.ARITHMETIC},"/":{title:"除法: a/b",description:"a,b: 整数,数字",group:L.ARITHMETIC},"%":{title:"求余: a%b",description:"a,b: 整数,数字",group:L.ARITHMETIC},">":{title:"大于: a>b",description:"a,b: 整数,数字",group:L.RELATIONSHIP},">=":{title:"大于等于: a>=b",description:"a,b: 整数,数字",group:L.RELATIONSHIP},"<":{title:"小于: a<b",description:"a,b: 整数,数字",group:L.RELATIONSHIP},"<=":{title:"小于等于: a<=b",description:"a,b: 整数,数字",group:L.RELATIONSHIP},"==":{title:"等于: a==b",description:"a,b: 整数,数字,布尔,字符串",group:L.RELATIONSHIP},"!=":{title:"不等于: a!=b",description:"a,b: 整数,数字,布尔,字符串",group:L.RELATIONSHIP},"&&":{title:"与: a&&b",description:"a,b: 布尔",group:L.LOGIC},"||":{title:"或: a||b",description:"a,b: 布尔",group:L.LOGIC},"!":{title:"非: !a",description:"a: 布尔",group:L.LOGIC},"?":{title:"判断: a?b:c",description:"若a的值为true,则执行b否则执行c",group:L.OTHER,label:"?:",output:"?:"},"(":{title:"左括号: c-(a+b)",description:"优先运算 () 中的内容",group:L.OTHER},")":{title:"右括号: c-(a+b)",description:"优先运算 () 中的内容",group:L.OTHER}}),Pd=o("numberOperator",["+","-","*","/","%",">",">=","<","<="]),wd=o("booleanOperator",["&&","||","!"]),Fd=o("allOperator",["==","!=","?",":"]),Gd=o("returnBolOperator",["&&","||","!","==","!=",">",">=","<","<="]),Bd=o("getOperatorList",()=>{const e=Object.keys(kt).map(t=>{const{title:n,description:i,group:a,label:r,output:s}=kt[t];return{name:r??t,group:a,desc:`${n}
|
|
2
|
-
${
|
|
1
|
+
System.register(["pinia","qs","lodash-es","vue","axios","dayjs","vue-i18n","vue-router","@gct-paas/api"],(function(N,ev){"use strict";var sr,ks,Us,Vr,Hn,ar,Vn,xs,Bs,Fs,$n,$r,ut,js,Ws,Gs,qt,gt,st,Sr,qr,qn,Hs,Vs,$s,qs,Ys,Ks,Xs,zs,Qs,Yn;return{setters:[Pe=>{sr=Pe.defineStore,ks=Pe.createPinia,Us=Pe.setActivePinia},Pe=>{Vr=Pe.default},Pe=>{Hn=Pe.isEmpty,ar=Pe.cloneDeep,Vn=Pe.mergeWith,xs=Pe.unionWith,Bs=Pe.isEqual,Fs=Pe.intersection,$n=Pe.omit,$r=Pe.has},Pe=>{ut=Pe.reactive,js=Pe.createApp,Ws=Pe.h,Gs=Pe.nextTick,qt=Pe.isRef,gt=Pe.computed,st=Pe.ref,Sr=Pe.watch,qr=Pe.unref,qn=Pe.inject,Hs=Pe.shallowRef,Vs=Pe.onMounted,$s=Pe.onUnmounted},Pe=>{qs=Pe.AxiosHeaders},Pe=>{Ys=Pe.default},Pe=>{Ks=Pe.createI18n},Pe=>{Xs=Pe.createRouter,zs=Pe.createWebHashHistory},Pe=>{Qs=Pe.HttpUtil,Yn=Pe.api}],execute:(function(){N({afterFieldSet:yp,afterValueSet:mp,buildItemRules:Fd,buildShortUUID:bp,buildUUID:gp,cacheFnReturn:wp,computedEx:Ep,copyTextToClipboard:Hc,createAppVue:Q0,dataURLtoBlob:el,deepMerge:dp,downloadByBase64:rl,downloadByData:nl,downloadByOnlineUrl:$b,downloadByUrl:Yb,emitFieldSet:vp,genUrl:Qa,getDeviceFingerprint:ui,getPageIdentification:za,getTenant:ba,getTimezone:ma,getToken:Tr,interceptors:_a,isDef:Gc,isMultipleOperator:Kb,isSortFiled:Bb,openWindow:Ja,parseMatrixParams:ya,parseValueUnit:_p,setTenant:fp,setToken:ga,setupApp:J0,setupErrorHandler:$c,setupI18n:jc,stringifyMatrixParams:pp,uploaderFiles:qb,urlToBase64:tl,useAppInst:g0,useCopyToClipboard:_0,useIFrameProps:m0,useModal:b0,useNamespace:zd,useUUid:Fb,useWuJieBus:v0,useWuJieProps:y0});const Pe=N("SIDE_BAR_MINI_WIDTH",48),tv=N("SIDE_BAR_SHOW_TIT_MINI_WIDTH",80);var af=N("ContentEnum",(e=>(e.FULL="full",e.FIXED="fixed",e))(af||{})),lf=N("ThemeEnum",(e=>(e.DARK="dark",e.LIGHT="light",e))(lf||{})),uf=N("SettingButtonPositionEnum",(e=>(e.AUTO="auto",e.HEADER="header",e.FIXED="fixed",e))(uf||{})),cf=N("SessionTimeoutProcessingEnum",(e=>(e[e.ROUTE_JUMP=0]="ROUTE_JUMP",e[e.PAGE_COVERAGE=1]="PAGE_COVERAGE",e))(cf||{})),ff=N("PermissionModeEnum",(e=>(e.ROLE="ROLE",e.BACK="BACK",e.ROUTE_MAPPING="ROUTE_MAPPING",e.PLATFORM_ROLE="PLATFORM_ROLE",e))(ff||{})),hf=N("RouterTransitionEnum",(e=>(e.ZOOM_FADE="zoom-fade",e.ZOOM_OUT="zoom-out",e.FADE_SIDE="fade-slide",e.FADE="fade",e.FADE_BOTTOM="fade-bottom",e.FADE_SCALE="fade-scale",e))(hf||{})),Js=N("ProjectName",(e=>(e.PORTAL="portal",e.BACKEND_MANAGEMENT="backend-management",e.DEVELOPER_CENTER="developer-center",e.TENANT_CENTER="tenant-center",e.APP_DESIGNER="app-designer",e.PAGE_DESIGNER="page-designer",e.WEB_RENDER="web-render",e.MOBILE_RENDER="mobile-render",e))(Js||{})),df=N("FIELD_TYPE_CATEGORY",(e=>(e.ALL="field_type_all",e.BASIC="field_type_basic",e.LOGIC="field_type_logic",e.TRACE="field_type_trace",e))(df||{})),me=N("FIELD_TYPE",(e=>(e.PRIMARY_KEY="primary_key",e.ASSOCIATED_PRIMARY_KEY="associated_primary_key",e.TEXT="text",e.LONG_TEXT="long_text",e.INTEGER="integer",e.LONG="long",e.DOUBLE="double",e.DECIMAL="decimal",e.BOOLEAN="boolean",e.DATE="date",e.TIME="time",e.DATE_TIME="date_time",e.IMAGE="image",e.ATTACHMENT="attachment",e.SERIAL="serial_number",e.MASTERSLAVE="master_slave",e.USER="user",e.USER_MULTI="user_multi",e.ORG="org",e.ORG_MULTI="org_multi",e.ENUM="enum",e.ENUM_MULTI="enum_multi",e.OPTION="option",e.OPTION_MULTI="option_multi",e.REF="ref",e.REF_MULTI="ref_multi",e.RDO_REF="rdo_ref",e.EXPRESSION="expression",e.EXPRESSION_CONDITION="expression_condition",e.AGG="agg",e.ESOP="esop",e.TRANSACTION="transaction",e.LABEL_TEMPLATE="label_template",e.LABEL_TEMPLATE_REF="label_template_ref",e.DOCUMENT_TEMPLATE="document_template",e.SERIALRULE="serial_number_rule",e.PRINTER="printer",e.MESSAGE_TMPL="message_tmpl",e.RANGE_USER="range_user",e.SIGNATURE="electronic_signature",e.ONLINE_FORM_TEMPLATE="online_form_tmpl",e.E_DHR_TEMPLATE="edhr_tmpl",e.ONLINE_FORM="online_form",e.DATA_TABLE_FORMULA="data_table_formula",e.READONLYCMP="readonlycmp",e.MATERIAL_NO="material_no",e.PRODUCT="product",e.DEVICE="device",e.Biz_Process="biz_process",e.TENANT="tenant",e))(me||{})),pf=N("FIELD_TYPE_BASIC",(e=>(e.TEXT="text",e.LONG_TEXT="long_text",e.INTEGER="integer",e.LONG="long",e.DOUBLE="double",e.DECIMAL="decimal",e.BOOLEAN="boolean",e.DATE="date",e.TIME="time",e.DATE_TIME="date_time",e))(pf||{})),gf=N("FIELD_TYPE_LOGIC",(e=>(e.IMAGE="image",e.ATTACHMENT="attachment",e.SERIAL="serial_number",e.MASTERSLAVE="master_slave",e.USER="user",e.USER_MULTI="user_multi",e.ORG="org",e.ORG_MULTI="org_multi",e.ENUM="enum",e.ENUM_MULTI="enum_multi",e.OPTION="option",e.OPTION_MULTI="option_multi",e.REF="ref",e.REF_MULTI="ref_multi",e.RDO_REF="rdo_ref",e.EXPRESSION="expression",e.EXPRESSION_CONDITION="expression_condition",e.AGG="agg",e.ESOP="esop",e.TRANSACTION="transaction",e.LABEL_TEMPLATE="label_template",e.LABEL_TEMPLATE_REF="label_template_ref",e.DOCUMENT_TEMPLATE="document_template",e.SERIALRULE="serial_number_rule",e.PRINTER="printer",e.MESSAGE_TMPL="message_tmpl",e.RANGE_USER="range_user",e.SIGNATURE="electronic_signature",e.ONLINE_FORM_TEMPLATE="online_form_tmpl",e.E_DHR_TEMPLATE="edhr_tmpl",e.ONLINE_FORM="online_form",e.Biz_Process="biz_process",e))(gf||{})),bf=N("FIELD_TYPE_TRACE",(e=>(e.MATERIAL_NO="material_no",e.PRODUCT="product",e.DEVICE="device",e))(bf||{}));const rv=N("FieldTypeToJs",{attachment:"string",boolean:"boolean",date:"string",date_time:"string",decimal:"number",double:"number",enum:"string",enum_multi:"string",image:"string",integer:"number",long:"number",long_text:"string",master_slave:"string",org:"string",org_multi:"string",rdo_ref:"string",ref:"string",ref_multi:"string",serial_number:"string",text:"string",time:"string",user:"string",user_multi:"string",expression:"string",expression_condition:"string",agg:"number",esop:"string",serial_number_rule:"string",label_template:"string",label_template_ref:"string",document_template:"string",transaction:"string",printer:"string",message_tmpl:"string",range_user:"string",primary_key:"string",associated_primary_key:"string",readonlycmp:"string",material_no:"string",product:"string",device:"string",option:"string",option_multi:"string",electronic_signature:"string",online_form_tmpl:"string",edhr_tmpl:"string",online_form:"string",data_table_formula:"string",biz_process:"string",tenant:"string"});var mf=N("CreateType",(e=>(e.SYSTEM="SYSTEM",e.USER_DEFINED="USER_DEFINED",e.BUILTIN="BUILTIN",e.CUSTOM="CUSTOM",e.PROCESS="PROCESS",e))(mf||{})),yf=N("MenuType",(e=>(e.CATALOG="CATALOG",e.STANDARD="STANDARD",e.LINK="LINK",e))(yf||{})),vf=N("OpenMode",(e=>(e.PRESENT="PRESENT",e.IFRAME="IFRAME",e.NEW="NEW",e))(vf||{})),_f=N("MaterialEnum",(e=>(e.MaterialFormField="formField",e.MaterialTableField="tableField",e.MaterialEmbedTableField="embedTableField",e.MaterialSubTableField="subTableField",e.MaterialSubTableModalField="subTableModalField",e.cardListFormField="cardList",e.MaterialTableSelectField="tableSelectField",e.DescriptionsFormField="descriptions",e))(_f||{}));const nv=N("FieldIconMap",{primary_key:"icon-id",text:"icon-wenben1",long_text:"icon-changwenben",integer:"icon-zhengshu",long:"icon-changzhengshu",decimal:"icon-jingduxiaoshu1",double:"icon-xiaoshu",boolean:"icon-buer",date:"icon-riqi1",time:"icon-shijian1",date_time:"icon-riqishijian",user:"icon-renyuanguanlian",org:"icon-bumenguanlian",user_multi:"icon-renyuanduoxuan",org_multi:"icon-bumenduoxuan",image:"icon-tupian1",attachment:"icon-fujian1",serial_number:"icon-xuliehao",master_slave:"icon-zhuziguanlian",enum:"icon-meijuguanlian",ref:"icon-moxingguanlian",rdo_ref:"icon-RDOmoxingguanlian",enum_multi:"icon-meijuguanlianduoxuan",option:"icon-meijuguanlian",option_multi:"icon-meijuguanlianduoxuan",ref_multi:"icon-moxingduoxuan",expression:"icon-gongshiziduan",expression_condition:"icon-gongshiziduan",agg:"icon-huizong",esop:"icon-E-SOP",transaction:"icon-ziduan1",serial_number_rule:"icon-ziduan1",printer:"icon-dayinanniu",message_tmpl:"icon-xiaoximoban",range_user:"icon-fanweirenyuan",label_template:"icon-biaoqianmoban",label_template_ref:"icon-biaoqianmoban",document_template:"icon-danjumoban",electronic_signature:"icon-qianming1",online_form_tmpl:"icon-zaixianbiaodanmoban",edhr_tmpl:"icon-edhr",online_form:"icon-zaixianbiaodan",data_table_formula:"icon-gongshiziduan",readonlycmp:"icon-wenben1",tenant:"icon-id",associated_primary_key:"icon-id",material_no:"icon-field-material-no",product:"icon-field-product",device:"icon-field-device",biz_process:"icon-jichengzhongxin1"});var Ef=N("AggTypes",(e=>(e.COUNT="COUNT",e.SUM="SUM",e.MAX="MAX",e.MIN="MIN",e.AVG="AVG",e))(Ef||{})),wf=N("NodesConfigTypeEnum",(e=>(e.SPEC="spec",e.SUB_WORKFLOW="sub_workflow",e))(wf||{})),Sf=N("selectionTypeEnums",(e=>(e.None="none",e.SingleChoice="gct_radio",e.MultipleChoice="checkbox",e))(Sf||{})),Af=N("UniqueConstraintType",(e=>(e.NONE="NONE",e.GLOBAL="GLOBAL",e.LEVEL="LEVEL",e.LOGIC="LOGIC",e))(Af||{}));const iv=N("MessageType",{ALL:"all",UNREAD:"unread"}),ov=N("WorkbenchType",{TEST:"myTestApp",QUICK:"quickAccess",MY:"myApp"});var Tf=N("PersonalCenterType",(e=>(e.PROFILE="profile",e.GENDER="gender",e.ENTERPRISE="enterprise",e))(Tf||{})),If=N("GENDER_TYPE",(e=>(e.FEMALE="female",e.MALE="male",e.PRIVARY="privary",e))(If||{})),Rf=N("TODO_TYPE",(e=>(e.TODO="todo",e.APPLICATION="application",e.DONE="done",e.DELEGATE="delegate",e))(Rf||{})),Of=N("CARD_TRIGGER_ENUM",(e=>(e.HOVER="hover",e.CLICK="click",e))(Of||{}));const sv=N("SHOW_FIELDTYPES",[me.TEXT,me.LONG_TEXT,me.LONG,me.INTEGER,me.DECIMAL,me.DOUBLE,me.SERIAL]);var Nf=N("UserServiceType",(e=>(e.SCRIPT_SERVICE="SCRIPT_SERVICE",e.SQL_SERVICE="SQL_SERVICE",e.SO_SERVICE="SO_SERVICE",e.BUILTIN_SERVICE="SYS_BUILTIN",e))(Nf||{})),Zs=N("EntityModelCategoryEnum",(e=>(e.ENTITY="entity",e.DATA="data",e.VIEW="view",e.FORM="form",e.DATA_SET="dataSet",e))(Zs||{})),Lf=N("EntityModelTypeEnum",(e=>(e.BASE="BASE",e.NDO="NDO",e.RDO="RDO",e.TREE="TREE",e.DYNAMIC_FORM="DYNAMIC_FORM",e.WORKFLOW="WORKFLOW",e.TRANSACTION="TRANSACTION",e))(Lf||{})),Mf=N("FieldDefaultValueTypeEnum",(e=>(e.NONE="NONE",e.FIXED="FIXED",e.SYS_VAR="SYS_VAR",e))(Mf||{})),Pf=N("FieldSysVarDefaultValueEnum",(e=>(e.NULL="",e.SYS_DATE="SYS_DATE",e.SYS_TIME="SYS_TIME",e.SYS_DATE_TIME="SYS_DATE_TIME",e.CURRENT_USER="CURRENT_USER",e.CURRENT_ORG="CURRENT_ORG",e))(Pf||{})),Cf=N("scriptTypeEnum",(e=>(e.EVENT="event",e.BUSINESSSERVICE="businessService",e.TIMER="timer",e))(Cf||{})),Df=N("pageLayoutModeEnum",(e=>(e.SHOW_BOX_SCROLL="showBoxScroll",e.SHOW_ALL_DATA="showAllData",e))(Df||{})),kf=N("PanelEnum",(e=>(e.PAGE="page",e.HISTORY="history",e.GLOBAL="global",e.WIDGET="widget",e.CHANGE_DESIGN="changeDesign",e))(kf||{})),Uf=N("Postion",(e=>(e.STATIC="static",e.RELATIVE="relative",e.ABSOLUTE="absolute",e.FIXED="fixed",e.STICKY="sticky",e))(Uf||{})),xf=N("BorderStyle",(e=>(e.NONE="none",e.SOLID="solid",e.DOTTED="dotted",e.DASHED="dashed",e.DOUBLE="double",e))(xf||{})),Bf=N("TextAlign",(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.JUSTIFY="justify",e))(Bf||{})),Ff=N("TextDecoration",(e=>(e.LINETHROUGH="line-through",e.UNDERLINE="underline",e.NONE="none",e))(Ff||{})),jf=N("EventCategory",(e=>(e.INNER="inner",e.JS="js",e))(jf||{})),Wf=N("PropGroup",(e=>(e.BASIC="basic",e.ADVANCED="advance",e.DISPLAY="display",e.LABEL="label",e.FIELD="field",e.DATA="data",e.OTHER="other",e.LIST="list",e.Table="table",e.SUBMIT_RULE="submitRule",e.LISTDATA="listdata",e.SHOW="show",e.FIELD_CONFIG="fieldConfig",e.FORM_CONFIG="formConfig",e.FIELD_LAYOUT="FieldLayout",e.LEFT_RIGHT_COLUMNS="leftRightColumns",e.TABLESELECT_CONFIG="tableSelect",e.GENRADIO="genRadio",e.GENCHECKBOX="genCheckbox",e.GENSWITCH="genSwitch",e.OPTIONS="options",e.COLLAPSE="collapse",e.SPACE_OCCUPATION="spaceOccupation",e.DIVIDER="divider",e.IFRAME="iframe",e.FILECOLLECT="fileCollect",e.CARDLIST="cardList",e.BUTTON="button",e.Button="Button",e.ButtonShow="ButtonShow",e.ButtonStyle="ButtonStyle",e.LISTBUTTON="listButton",e.MODAL="modal",e.MODALWIDTH="modalWidth",e.MODALHEIGHT="modalHeight",e.MODALTITLECONFIG="modalTitleConfig",e.SEARCH="search",e.QUERY="query",e.INPUT_CONFIG="inputConfig",e.DATALINKAGE="dataLinkage",e.PERMISSION="permission",e.DATASOURCE="dataSource",e.VALIDATERULE="validaterule",e.TEXT="text",e.GRID_CONFIG="gridConfig",e.COL_CONFIG="colConfig",e.COMPONENTDEPENDENCY="componentDependency",e.GENIMAGE="genImage",e.DATARANGE="dataRange",e.OPERATOR_CONFIG="operatorConfig",e.BUSINESS_CONFIG="businessConfig",e.Vue3="Vue3",e.TREE_CONFIG="treeConfig",e.CARDDISPLAY="cardDisplay",e))(Wf||{})),Gf=N("StyleGroup",(e=>(e.LAYOUT="layout",e.STYLE="style",e.BACKGROUND="background",e.MARGIN="margin",e.BORDER="border",e.HEADER="header",e.SHOW_PROP="showProp",e))(Gf||{})),Hf=N("tagEnum",(e=>(e.TAG="tag",e.PROGRESS="progress",e))(Hf||{})),Vf=N("TagTypeEnum",(e=>(e.RADIUS="radius",e.LINEAR_RADIUS="linear_radius",e.BIG_RADIUS="big_radius",e.LINEAR_BIG_RADIUS="linear_big_radius",e.DASHED_RADIUS="dashed_radius",e.STATUS="status",e))(Vf||{})),$f=N("DisplayTagTypeEnum",(e=>(e.RADIUS="radius",e.BIG_RADIUS="big_radius",e.STATUS="status",e.SURFACE_RADIUS="surface_radius",e.SURFACE_BIG_RADIUS="surface_big_radius",e.SURFACE_STATUS="surface_status",e.LINE_RADIUS="line_radius",e.LINE_BIG_RADIUS="line_big_radius",e.LINE_DASHED_RADIUS="line_dashed_radius",e.LINE_STATUS="line_status",e))($f||{})),qf=N("ProgressTypeEnum",(e=>(e.CIRCLE="circle",e.LINE="line",e))(qf||{})),Yf=N("DisplayType",(e=>(e.RULE="rule",e.CONFIG="config",e))(Yf||{})),Kf=N("GLOBAL_VAR_TYPE",(e=>(e.STRING="string",e.NUMBER="number",e.BOOLEAN="boolean",e.OBJECT="object",e.ARRAY="array",e.NULL="NULL",e.DATE="date",e.DATETIME="datetime",e.TIME="time",e.VAR="var",e))(Kf||{})),Xf=N("GLOBAL_TYPE",(e=>(e.MODAL="modal",e.EVENT="event",e.VAR="var",e))(Xf||{})),zf=N("COLUMNS_TYPE",(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(zf||{})),Qf=N("INNER_EVENT",(e=>(e.CLOSE_MODAL="__CLOSEMODAL__",e.OPEN_MODAL="__OPENMODAL__",e.REFRESH_TABLE="__REFRESHTABLE__",e))(Qf||{})),Jf=N("SUB_TABLE_EDIT_MODE",(e=>(e.INLINE="inline",e.MODAL="modal",e))(Jf||{})),Zf=N("SUB_TABLE_OPE_EVENT_TYPE_INLINE",(e=>(e.DELETE="delete",e.COPY="copy",e))(Zf||{})),eh=N("SUB_TABLE_OPE_EVENT_TYPE",(e=>(e.DELETE="delete",e.EDIT="edit",e.COPY="copy",e))(eh||{})),th=N("VERIFICATIONCONDITIONS_TYPE",(e=>(e.JS="js",e))(th||{})),rh=N("ASSIGNMENTSTRATEGY_ENUM",(e=>(e.alwaysCover="alwaysCover",e.notCovered="notCovered",e))(rh||{})),nh=N("Dependency_ENUM",(e=>(e.HIDDEN="hidden",e.READONLY="readonly",e.DISABLED="disabled",e.REQUIRED="required",e.ASSIGNMENT="assignment",e))(nh||{})),ih=N("ToolkitEnum",(e=>(e.OUTLINE="OUTLINE",e.WIDGETS="WIDGETS",e.FIELD="FIELD",e.MODAL="MODAL",e.JS="JS",e.CSS="CSS",e.TEMPLATE="TEMPLATE",e.LO="LO",e))(ih||{})),oh=N("CategoryTypeEnum",(e=>(e.FORM="form",e.LAYOUT="layout",e.ADVANCED="advanced",e.DATA="data",e.BUTTON="button",e.RDO="rdo",e.KIT="kit",e.PROCESS="process",e))(oh||{})),ea=N("Platform",(e=>(e.WEB="web",e.MOBILE="mobile",e.PAD="pad",e))(ea||{})),sh=N("BuiltinType",(e=>(e.MODAL="modal",e.MODAL_BODY="modalBody",e.MODAL_FOOTER="modalFooter",e.BottomButtonContainer="bottom-button-container",e))(sh||{})),ah=N("DateRangeEnums",(e=>(e.WEEK_NOW="sys.pageDesigner.dateRange.weekNow",e.MONTH_NOW="sys.pageDesigner.dateRange.monthNow",e.QUARTER_NOW="sys.pageDesigner.dateRange.quarterNow",e.YEAR_NOW="sys.pageDesigner.dateRange.yearNow",e.WEEk_BEFORE="sys.pageDesigner.dateRange.weekBefore",e.MONTH_BEFORE="sys.pageDesigner.dateRange.monthBefore",e.QUARTER_BEFORE="sys.pageDesigner.dateRange.quarterBefore",e.YEAR_BEFORE="sys.pageDesigner.dateRange.yearBefore",e.DATE_BEFORE="sys.pageDesigner.dateRange.dateBefore",e.DATE_AFTER="sys.pageDesigner.dateRange.dateAfter",e))(ah||{})),lh=N("SelectPickerEnums",(e=>(e.DROPDOWN_SELECTION="dropdownSelection",e.TREE_SELECTION="treeSelection",e.MODAL_BOX_SELECTION="modalBoxSelection",e))(lh||{})),uh=N("CURRENCY_ENUM",(e=>(e["¥"]="¥",e.$="$",e.S$="S$",e))(uh||{})),ch=N("TIMETYPE_ENUM",(e=>(e.d="d",e["d:h"]="d:h",e["d:h:m"]="d:h:m",e["d:h:m:s"]="d:h:m:s",e.h="h",e["h:m"]="h:m",e["h:m:s"]="h:m:s",e.m="m",e["m:s"]="m:s",e.s="s",e))(ch||{})),fh=N("TIMETYPE_LANG_ENUM",(e=>(e.d="days",e["d:h"]="dayhour",e["d:h:m"]="dayhourminute",e["d:h:m:s"]="dayhourminutesecond",e.h="hour",e["h:m"]="hourminute",e["h:m:s"]="hourminutesecond",e.m="minute",e["m:s"]="minutesecond",e.s="seconds",e))(fh||{})),hh=N("CURRENCY_LANG_ENUM",(e=>(e["¥"]="chMoney",e.$="usMoney",e.S$="sgpMoney",e))(hh||{})),dh=N("RowSelectionTypeEnums",(e=>(e.SingleChoice="radio",e.MultipleChoice="checkbox",e))(dh||{})),ph=N("StatisticalMethodEnums",(e=>(e.Current="current",e.Whole="whole",e))(ph||{})),gh=N("PrintModeEnums",(e=>(e.Local="local",e.Server="server",e.PREVIEW_PRINT="PreviewPrint",e.DIRECT_PRINTING="DirectPrinting",e))(gh||{})),bh=N("openWindowEnums",(e=>(e.OPEN="open",e.APPROVE="linkApprove",e))(bh||{})),mh=N("KeyMode",(e=>(e.SYSTEM="system",e.TRANSACTION="transaction",e))(mh||{})),yh=N("TransactionMode",(e=>(e.CURRENT="current",e.REFERENCE="reference",e))(yh||{})),vh=N("DisplayEnums",(e=>(e.BLOCK="block",e.INLINE_BLOCK="inline-block",e))(vh||{})),_h=N("ButtonColorType",(e=>(e.DEFAULT="default",e.LINK="link",e))(_h||{})),Eh=N("ButtonColorTheme",(e=>(e.DEFAULT="default",e.PRIMARY="primary",e.ERROR="error",e.WARNING="warning",e.SUCCESS="success",e))(Eh||{})),wh=N("ButtonStyle",(e=>(e.ORDINARY="ordinary",e.SQUARE="square",e))(wh||{})),Sh=N("ButtonSize",(e=>(e.SMALL="small",e.DEFAULT="middle",e.LARGE="large",e))(Sh||{})),Ah=N("ButtonTypeGroup",(e=>(e.TEXT="TEXT",e.ICON_TEXT="ICON_TEXT",e.ICON="ICON",e))(Ah||{})),Th=N("ButtonType",(e=>(e.PRIMARY="primary",e.DEFAULT="default",e.DASHED="dashed",e.LINK="link",e))(Th||{})),Ih=N("ButtonType_vant",(e=>(e.PRIMARY="primary",e.DANGER="danger",e.DEFAULT="default",e))(Ih||{}));const av=N("ButtonGroupType",{TEXT:[{type:"primary",label:"sys.pageDesigner.button_primary",hasText:!0},{type:"default",label:"sys.pageDesigner.button_default",hasText:!0},{type:"primary",danger:!0,label:"sys.pageDesigner.button_primary_danger",hasText:!0},{type:"default",danger:!0,label:"sys.pageDesigner.button_danger",hasText:!0},{type:"dashed",label:"sys.pageDesigner.button_dashed",hasText:!0},{type:"link",label:"sys.pageDesigner.button_text",hasText:!0}],ICON_TEXT:[{type:"primary",label:"sys.pageDesigner.button_primary",hasText:!0,hasIcon:!0},{type:"default",label:"sys.pageDesigner.button_default",hasText:!0,hasIcon:!0},{type:"primary",danger:!0,label:"sys.pageDesigner.button_primary_danger",hasText:!0,hasIcon:!0},{type:"default",danger:!0,label:"sys.pageDesigner.button_danger",hasText:!0,hasIcon:!0},{type:"dashed",label:"sys.pageDesigner.button_dashed",hasText:!0,hasIcon:!0},{type:"link",label:"sys.pageDesigner.button_text",hasText:!0,hasIcon:!0}],ICON:[{type:"primary",hasIcon:!0},{type:"default",hasIcon:!0},{type:"primary",danger:!0,hasIcon:!0},{type:"default",danger:!0,hasIcon:!0},{type:"dashed",hasIcon:!0},{type:"link",hasIcon:!0}]});var Rh=N("operateSysEnums",(e=>(e.COLUMNDELETE="columnDelete",e.COLUMNLINK="columnLink",e.COPY="copy",e.VERSION_COPY="version_copy",e.VERSION_CREATE="version_create",e.DETAILS="details",e.EDIT="edit",e.USAGEINFORMATION="usageInformation",e.MODELINGTRACEABILITY="modelingTraceability",e.IMPORT="import",e.EXPORT="export",e.BATCHDELETE="batchDelete",e.SUBMIT="submit",e.RESET="reset",e.EXCUTE="excute",e.LABEL_PRINT="label_print",e.DOCUMENT_PRINT="document_print",e.EXAMINE_AND_APPROVE="examineAndApprove",e))(Rh||{})),Oh=N("TableSearchTypeEnum",(e=>(e.NONE="none",e.EMBEDDED="embedded",e.EXTERNAL="external",e))(Oh||{})),Nh=N("TableTypeEnum",(e=>(e.DEFAULT="default",e.EMBED="embed",e.SUB="sub",e))(Nh||{})),Lh=N("TableEditingMethodEnum",(e=>(e.DEFAULTEDITING="defaultEditing",e.CLICKTOENTEREDITING="clickToEnterEditing",e))(Lh||{})),Mh=N("WidgetInScopeEnum",(e=>(e.GCT="gct",e.GCT_MODAL="gct-modal",e.GCT_SUB_TABLE_MODAL="gct-sub-table-modal",e))(Mh||{})),Ph=N("ListTreeSearchTypeEnum",(e=>(e.ALL="ALL",e.SEARCH="SEARCH",e.SEARCHALL="SEARCHALL",e.LEVEL="LEVEL",e.CHILDREN="CHILDREN",e))(Ph||{})),Ch=N("DatasourceTypeEnum",(e=>(e.REALTIMEDATASOURCE="realTimeDataSource",e.SERVICEDATASOURCE="serviceDataSource",e))(Ch||{})),Dh=N("SignatureTypeEnum",(e=>(e.SIGNATURE_ONLY="signature_only",e.SIGNATURE_DATE="signature_date",e.SIGNATURE_DATETIME="signature_datetime",e))(Dh||{})),kh=N("SignatureStyleEnum",(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(kh||{})),Uh=N("ResetRuleType",(e=>(e.WIPE_DATA="wipe_data",e.REFRESHDATA="refresh_data",e))(Uh||{})),xh=N("SCOPE",(e=>(e.PAGE="page",e.MODAL="modal",e))(xh||{})),Bh=N("FormComponents",(e=>(e.RdoInput="rdo-input",e.Input="input",e.ElectronicSignature="electronic-signature",e.UseinfoButton="useinfo-button",e.ModelingButton="modeling-button",e.ImportButton="gc-import-button",e.ExportButton="gc-export-button",e.DocumentPrintButton="document-print-button",e.SubmitButton="submit-button",e.BatchDeleteButton="batchdelete-button",e.CustomButton="custom-button",e.TableLinkButton="table-link-button",e.TableInfoButton="table-info-button",e.TableApproveButton="table-approve-button",e.OpeButton="ope-button",e.ResetButton="reset-button",e.RdoSaveButton="rdo-save-button",e.LabelPrintButton="labelprint-button",e.ProcessButton="process-button",e.ProcessApproveButton="process-approve-button",e.CreateButton="create-button",e.DeleteButton="delete-button",e.CopyButton="copy-button",e.RefreshButton="refresh-button",e.CreateVersionButton="create-version-button",e.CopyVersionButton="copy-version-button",e.Checkbox="checkbox",e.DataTable="data-table",e.DataVTable="data-v-table",e.TreeTable="tree-table",e.DataTableColumn="data-table-column",e.RefDataTable="ref-data-table",e.DataList="data-list",e.RdoDataList="rdo-data-list",e.DataTableOpe="data-table-ope",e.DataTableFormula="data-table-formula",e.Datepicker="datepicker",e.DateTimepicker="datetimepicker",e.Department="department",e.Form="form",e.RdoForm="rdo-form",e.RdoTable="rdo-table",e.MedProRdoForm="medprordo-form",e.MedProRdoTable="medprordo-table",e.FormProcess="form-process",e.Inputmoney="inputmoney",e.Inputnumber="inputnumber",e.InputDouble="inputdouble",e.Radio="radio",e.Select="select",e.RdoSelect="rdo-select",e.Switch="switch",e.Textarea="textarea",e.Timepicker="timepicker",e.Userpicker="userpicker",e.Search="search",e.SelectSearch="select-search",e.QuickSearch="quick-search",e.LayoutContainer="layout-container",e.ButtonContainer="button-container",e.ButtonProcessContainer="button-process-container",e.BottomButtonContainer="bottom-button-container",e.Grid="grid",e.GridCol="grid-col",e.Tabs="tabs",e.TabPane="tab-pane",e.LeftRightColumns="left-right-columns",e.TopBottomColumns="top-bottom-columns",e.LeftLayoutThree="left-layout-three",e.TopLayoutThree="top-layout-three",e.UploadFile="upload-file",e.UploadImage="upload-image",e.SubTable="sub-table",e.SubTableOpe="sub-table-ope",e.SubTableAddBtn="sub-table-add-button",e.SubTableCopyBtn="sub-table-copy-button",e.SubTableEditBtn="sub-table-edit-button",e.SubTableDeleteBtn="sub-table-delete-button",e.LinkPageBtn="link-page-button",e.Collapse="collapse",e.SpaceOccupation="space-occupation",e.Divider="divider",e.CardList="card-list",e.CardHeaderLeft="card-header-left",e.CardHeaderRight="card-header-right",e.CardContent="card-content",e.CardOpeBtn="card-ope-btn",e.BaseButton="base-button",e.ReadonlyCmp="readonlycmp",e.TableSelect="table-select",e.GenCheckbox="gen-checkbox",e.GenRadio="gen-radio",e.GenSwitch="gen-switch",e.WorkflowNodes="workflow-nodes",e.WorkflowNodeModal="workflow-node-modal",e.ESOP="e-sop",e.EXPRESSION="expression",e.ExpressionCondition="expression-condition",e.AGG="agg",e.DynamicFormType="dynamic-form-type",e.DynamicFormValue="dynamic-form-value",e.DynamicFormOpts="dynamic-form-options",e.DynamicFormShowType="dynamic-form-show-type",e.DynamicTable="dynamic-table",e.Transaction="transaction",e.SerialRule="serial-rule",e.LabelTemplate="label-template",e.LabelTemplateRef="label-template-ref",e.DocumentTemplate="document-template",e.Wacom="wacom",e.Text="text",e.CustomField="custom-field",e.Printer="printer",e.Descriptions="descriptions",e.RangeUser="range-user",e.GenImage="gen-image",e.TestButton="test-button",e.Iframe="iframe",e.ExcuteButton="medproexcute-button",e.SubDataTable="sub-data-table",e.Signature="signature",e.OnlineForm="online-form",e.TmplTreeSelect="tmpl-tree-select",e.Boolean="boolean",e.BizProcess="biz-process",e.ApprovalHistory="approval-history",e.FlowDiagram="flow-diagram",e.CustomCode="custom-code",e.ApprovalProcess="approval-process",e))(Bh||{})),Fh=N("SearchComponents",(e=>(e.SearchInput="SearchInput",e.SearchNumberInput="SearchNumberInput",e.SearchStringNumberInput="SearchStringNumberInput",e.SearchSwitch="SearchSwitch",e.SearchDate="SearchDate",e.SearchDateTime="SearchDateTime",e.SearchTime="SearchTime",e.SearchSelect="SearchSelect",e.SearchUserSelect="SearchUserSelect",e.SearchRdoSelect="SearchRdoSelect",e.SearchTransaction="SearchTransaction",e.SearchTmplTreeSelect="SearchTmplTreeSelect",e.SearchPrinter="SearchPrinter",e.SearchBizProcess="SearchBizProcess",e.SearchSelectRangUser="SearchSelectRangUser",e.SearchSelectDepartment="SearchSelectDepartment",e))(Fh||{})),jh=N("tableColumnWidthEnum",(e=>(e.AUTO_PARENT_BOX="AutoParentBox",e.ATUO="selfAdaption",e.ENUMERATION="fixed",e.PERCENTAGE="percentage",e))(jh||{})),Wh=N("controlConfigEnum",(e=>(e.NULL="NULL",e.STRING="空字符串",e.ZERO="0",e))(Wh||{})),Gh=N("statisticalMethodEnum",(e=>(e.TOTAL="total",e.AVERAGE="average",e))(Gh||{})),Hh=N("fixedAlignENUM",(e=>(e.RIGHT="right",e.NONE="",e.LEFT="left",e))(Hh||{})),Vh=N("tableColumnTypeEnum",(e=>(e.COLUMN_TEXT="COLUMN_TEXT",e.COLUMN_NUMBER="COLUMN_NUMBER",e.COLUMNTEXT_DATA="COLUMNTEXT_DATA",e.COLUMNTEXT_REF="COLUMNTEXT_REF",e.COLUMNTEXT_ENUM="COLUMNTEXT_ENUM",e.COLUMNTEXT_ORG="COLUMNTEXT_ORG",e.COLUMNTEXT_USER="COLUMNTEXT_USER",e.COLUMNTEXT_BOOLEAN="COLUMNTEXT_BOOLEAN",e.COLUMNTEXT_IMAGE="COLUMNTEXT_IMAGE",e))(Vh||{})),$h=N("tabsTypeENUM",(e=>(e.LINE="line",e.CARD="card",e.TEXt="text",e.CAPSULE="capsule",e.CUSTOM="custom",e))($h||{})),qh=N("sortTypeEnum",(e=>(e.ASC="asc",e.DESC="desc",e))(qh||{})),Yh=N("BindCmpStyleEnum",(e=>(e.CMP_TEXT="TEXT",e.CMP_TEXTAREA="TEXTAREA",e.CMP_ELECTRONICSIGNATURE="ELECTRONICSIGNATURE",e.CMP_BOOLEAN="BOOLEAN",e.CMP_SELECT_LIST="SELECT_LIST",e.CMP_RADIO="RADIO",e.CMP_CHECKBOX="CHECKBOX",e.CMP_DROPDOWN_SELECT="dropdownSelection",e.CMP_MODAL="modalBoxSelection",e.CMP_TREE_SELECTION="treeSelection",e.CMP_NUMBER="NUMBER",e.CMP_CURRENCY="CURRENCY",e.CMP_TIME="TIME",e))(Yh||{}));const lv=N("Ch_BindCmpStyleEnum",{TEXT:"sys.pageDesigner.bindCmpStyle.bindText",TEXTAREA:"sys.pageDesigner.bindCmpStyle.bindTextarea",ELECTRONICSIGNATURE:"sys.pageDesigner.bindCmpStyle.electronicSignature",BOOLEAN:"sys.pageDesigner.bindCmpStyle.bindBoolean",SELECT_LIST:"sys.pageDesigner.bindCmpStyle.bindSelectList",RADIO:"sys.pageDesigner.bindCmpStyle.bindRadio",CHECKBOX:"sys.pageDesigner.bindCmpStyle.bindCheckbox",dropdownSelection:"sys.pageDesigner.bindCmpStyle.bindDropdownSelect",modalBoxSelection:"sys.pageDesigner.bindCmpStyle.bindModal",treeSelection:"sys.pageDesigner.bindCmpStyle.bindTreeSelection",NUMBER:"sys.pageDesigner.bindCmpStyle.bindNumber",CURRENCY:"sys.pageDesigner.bindCmpStyle.bindCurrency",TIME:"sys.pageDesigner.bindCmpStyle.bindTime"});var Kh=N("BindCmpStyleTypeEnum",(e=>(e.BindText="bindText",e.BindLongText="BindLongText",e.BindBool="bindBool",e.BindPerson="bindPerson",e.BindDept="bindDept",e.BindLink="bindLink",e.BindMulti="bindMulti",e.BindNum="bindNum",e.BindDecimal="bindDecimal",e))(Kh||{}));const uv=N("transformBindCmp2CmpType",{TEXT:"input",TEXTAREA:"textarea",ELECTRONICSIGNATURE:"electronic-signature",SELECT_LIST:"select",RADIO:"radio",CHECKBOX:"checkbox"}),cv=N("bindCmpStyleMap",{bindText:["TEXT","TEXTAREA"],BindLongText:["TEXT","TEXTAREA","ELECTRONICSIGNATURE"],bindBool:["BOOLEAN","SELECT_LIST","RADIO","CHECKBOX"],bindPerson:["dropdownSelection","modalBoxSelection"],bindDept:["treeSelection","modalBoxSelection"],bindLink:["SELECT_LIST","RADIO"],bindMulti:["SELECT_LIST","CHECKBOX"],bindNum:["NUMBER","CURRENCY","TIME"],bindDecimal:["NUMBER","CURRENCY"]});var Xh=N("buttonShowType",(e=>(e.FOLD_ALL="foldAll",e.FOLD_PART="foldPart",e))(Xh||{}));const fv=N("searchListByFieldType",[me.BOOLEAN,me.DATE,me.DATE_TIME,me.DECIMAL,me.DOUBLE,me.ENUM,me.ENUM_MULTI,me.INTEGER,me.LONG,me.LONG_TEXT,me.TEXT,me.USER_MULTI,me.USER,me.TIME,me.REF_MULTI,me.REF,me.RDO_REF,me.ORG_MULTI,me.ORG,me.SERIAL,me.ONLINE_FORM_TEMPLATE,me.E_DHR_TEMPLATE,me.PRINTER,me.LABEL_TEMPLATE_REF,me.Biz_Process,me.DOCUMENT_TEMPLATE,me.TRANSACTION,me.RANGE_USER,me.MESSAGE_TMPL]),hv=N("mobileSearchListByFieldType",[me.BOOLEAN,me.DATE,me.DATE_TIME,me.DECIMAL,me.DOUBLE,me.ENUM,me.ENUM_MULTI,me.INTEGER,me.LONG,me.LONG_TEXT,me.TEXT,me.USER_MULTI,me.USER,me.TIME,me.REF_MULTI,me.REF,me.RDO_REF,me.ORG_MULTI,me.ORG,me.SERIAL,me.ONLINE_FORM_TEMPLATE,me.E_DHR_TEMPLATE,me.PRINTER,me.LABEL_TEMPLATE_REF,me.Biz_Process,me.DOCUMENT_TEMPLATE,me.TRANSACTION,me.MESSAGE_TMPL]),dv=N("padSearchListByFieldType",[me.BOOLEAN,me.DATE,me.DATE_TIME,me.DECIMAL,me.DOUBLE,me.ENUM,me.ENUM_MULTI,me.INTEGER,me.LONG,me.LONG_TEXT,me.TEXT,me.USER_MULTI,me.USER,me.TIME,me.REF_MULTI,me.REF,me.RDO_REF,me.ORG_MULTI,me.ORG,me.SERIAL,me.PRINTER,me.LABEL_TEMPLATE_REF,me.TRANSACTION]);var zh=N("SCOPEINFO",(e=>(e.FIELD_LIST="fieldList",e.FIELD_FORM="fieldForm",e))(zh||{})),Qh=N("PrintResourceEnum",(e=>(e.CLIENT_PRINT="CLIENT_PRINT",e.INTERNET_PRINT="INTERNET_PRINT",e))(Qh||{})),Jh=N("AppPublishStateEnum",(e=>(e.SUCCESS="SUCCESS",e.FAILURE="FAILURE",e.PREPARING="PREPARING",e.EVENTING="EVENTING",e.PROCESSIING="PROCESSIING",e.DEPLOYING="DEPLOYING",e))(Jh||{})),Zh=N("BasicAction",(e=>(e.Insert="Insert",e.Update="Update",e.Delete="Delete",e.Import="Import",e.Export="Export",e.Setting="Setting",e.Download="Download",e.Test="Test",e.Design="Design",e.Add="Add",e))(Zh||{})),ed=N("CustomAction",(e=>(e.ResetPassword="ResetPassword",e.PermissionSetting="PermissionSetting",e.RemoveAndHandover="RemoveAndHandover",e.CategoryManagement="CategoryManagement",e.BaiscSetting="BaiscSetting",e.WatermarkSetting="WatermarkSetting",e.SecuritySetting="SecuritySetting",e.LoginSetting="LoginSetting",e.ThemeSetting="ThemeSetting",e.OrganizationSetting="OrganizationSetting",e.ApkSetting="ApkSetting",e.DevelopIconManagement="DevelopIconManagement",e.DevelopImageManagement="DevelopImageManagement",e.Reprint="Reprint",e.ViewTask="ViewTask",e.ManualTrigger="ManualTrigger",e.Setting="Setting",e.Terminate="Terminate",e.Reassign="Reassign",e.Log="Log",e.Moving="Moving",e.EnableDisable="EnableDisable",e))(ed||{}));const pv=N("DefaultActions",["Insert","Update","Delete"]),gv=N("PlatformSettingActions",["BaiscSetting","WatermarkSetting","SecuritySetting","LoginSetting","ThemeSetting","OrganizationSetting","ApkSetting"]);var td=N("sizeEnum",(e=>(e.XS="XS",e.SM="SM",e.MD="MD",e.LG="LG",e.XL="XL",e.XXL="XXL",e))(td||{})),rd=N("screenEnum",(e=>(e[e.XS=480]="XS",e[e.SM=576]="SM",e[e.MD=768]="MD",e[e.LG=992]="LG",e[e.XL=1200]="XL",e[e.XXL=1600]="XXL",e))(rd||{}));const lr=N("screenMap",new Map);lr.set("XS",480),lr.set("SM",576),lr.set("MD",768),lr.set("LG",992),lr.set("XL",1200),lr.set("XXL",1600);const nd=N("TIMEZONE_KEY","TIMEZONE__"),bv=N("TENANT_KEY","TENANT__"),mv=N("TOKEN_KEY","TOKEN__"),yv=N("LOCALE_KEY","LOCALE__"),vv=N("LOCALE_LIST_KEY","LOCALE__LIST"),_v=N("LOCAL_I18N_TRANSLATE","LOCAL_I18N_TRANSLATE"),Ev=N("USER_INFO_KEY","USER__INFO__"),wv=N("ROLES_KEY","ROLES__KEY__"),Sv=N("PROJ_CFG_KEY","PROJ__CFG__KEY__"),Av=N("LOCK_INFO_KEY","LOCK__INFO__KEY__"),Tv=N("MULTIPLE_TABS_KEY","MULTIPLE_TABS__KEY__"),Iv=N("APP_DARK_MODE_KEY_","__APP__DARK__MODE__"),Rv=N("APP_LOCAL_CACHE_KEY","COMMON__LOCAL__KEY__"),Ov=N("APP_SESSION_CACHE_KEY","COMMON__SESSION__KEY__"),Nv=N("DESIGNER_SESSION_CACHE_KEY","DESIGNER_SESSION_CACHE_KEY");var id=N("CacheTypeEnum",(e=>(e[e.SESSION=0]="SESSION",e[e.LOCAL=1]="LOCAL",e))(id||{})),od=N("SEARCH_SERVICE",(e=>(e.EQ="eq",e.IEQ="iEq",e.NE="ne",e.INE="ine",e.GT="gt",e.GE="ge",e.LT="lt",e.LE="le",e.ISNULL="isNull",e.ISNOTNULL="isNotNull",e.LIKE="like",e.ILIKE="iLike",e.NOTLIKE="notLike",e.NOTILIKE="iNotLike",e.LEFTLIKE="leftLike",e.ILEFTLIKE="iLeftLike",e.RIGHTLIKE="rightLike",e.IRIGHTLIKE="iRightLike",e.IN="in",e.NOTIN="notIn",e.CONTAINANY="containAny",e.CONTAINALL="containAll",e.RANGE="range",e.ORANGE="oRange",e.LORANGE="loRange",e.RORANGE="roRange",e.VERSIONIN="versionIn",e.VERSIONNOTIN="versionNotIn",e.VERSIONEQ="versionEq",e.VERSIONNE="versionNe",e))(od||{}));const sd=N("notSingleArr",["in","notIn","containAny","containAll","versionIn"]);var ad=N("AGLINE_ENUMS",(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e.BETWEEN="between",e))(ad||{}));const Lv=N("presetColor",["#DBDBDB","#FFE4E4","#D1D1D1","#838383","#838383","#FFEECB","#D8E3FF","#FF8888","#FF8888","#0DAA9C","#3370FF"]);var ld=N("ButtonOpeEnum",(e=>(e[e.SINGLELINE=0]="SINGLELINE",e[e.HEAD=1]="HEAD",e[e.BATCH=2]="BATCH",e[e.SINGLELINE_RDO=3]="SINGLELINE_RDO",e))(ld||{})),ud=N("RdoButtonOpeEnum",(e=>(e[e.parentVersion=0]="parentVersion",e[e.childVersion=1]="childVersion",e))(ud||{})),cd=N("ExceptionEnum",(e=>(e[e.PAGE_NOT_ACCESS=403]="PAGE_NOT_ACCESS",e[e.PAGE_NOT_FOUND=404]="PAGE_NOT_FOUND",e[e.ERROR=500]="ERROR",e[e.NET_WORK_ERROR=1e4]="NET_WORK_ERROR",e[e.PAGE_NOT_DATA=10100]="PAGE_NOT_DATA",e))(cd||{})),bt=N("ErrorTypeEnum",(e=>(e.VUE="vue",e.SCRIPT="script",e.RESOURCE="resource",e.AJAX="ajax",e.PROMISE="promise",e))(bt||{})),fd=N("ResultEnum",(e=>(e[e.SUCCESS=200]="SUCCESS",e[e.ERROR=-1]="ERROR",e[e.TIMEOUT=401]="TIMEOUT",e.TYPE="success",e))(fd||{})),hd=N("RequestEnum",(e=>(e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e))(hd||{})),dd=N("ContentTypeEnum",(e=>(e.JSON="application/json;charset=UTF-8",e.FORM_URLENCODED="application/x-www-form-urlencoded;charset=UTF-8",e.FORM_DATA="multipart/form-data;charset=UTF-8",e))(dd||{})),pd=N("BizServiceEnum",(e=>(e.submit="post",e.listByIds="get",e.getone="post",e.listAll="post",e.listByPage="post",e.listTree="post",e.save="post",e.saveOrUpdate="post",e.saveBatch="post",e.importData="post",e.exportData="post",e.remove="post",e.removeById="delete",e.removeByIds="delete",e.update="put",e.updateById="put",e.updateByIds="put",e.rdoSave="post",e.rdoListAll="post",e.rdoListByPage="post",e.rdoListVersionById="get",e.rdoSaveVersion="post",e.rdoSaveBatch="post",e.rdoUpdateVersionById="put",e.rdoRemoveVersionById="delete",e.rdoRemoveById="delete",e.rdoGetVersionById="get",e.getOne="post",e.rdoGetVersionByRefId="post",e.getById="get",e.rdoListAllVersion="post",e.rdoRefListByPage="post",e.export="post",e.import="post",e.rdoExport="post",e.rdoImport="post",e.biz_search="post",e))(pd||{})),gd=N("PlatformType",(e=>(e.WEB="web",e.PDA="pda",e.PAD="pad",e))(gd||{})),ta=N("nullDisplayEnum",(e=>(e["--"]="--",e.empty="(空)",e.null="null",e["N/A"]="N/A",e.noDisplay="",e))(ta||{})),bd=N("DeviceParamsTypeEnum",(e=>(e.STRING="String",e.INTEGER="Integer",e.LONG="Long",e.FLOAT="Float",e.BOOLEAN="Boolean",e.DATE="Date",e))(bd||{})),qe=N("PlatformSettingEnum",(e=>(e.BASIC="BASE_CFG",e.WATERMARK="MARK_CFG",e.SECURITY="SECURITY_CFG",e.LOGIN="LOGIN_CFG",e.THEME="THEME_CFG",e.ORGANIZATION="ORG_CFG",e.APK="APK_CFG",e.DEPLOY="DEPLOY_CFG",e.GLOBAL="GLOBAL_CFG",e))(qe||{})),md=N("MenuTypeEnum",(e=>(e.SIDEBAR="sidebar",e.MIX_SIDEBAR="mix-sidebar",e.MIX="mix",e.TOP_MENU="top-menu",e))(md||{})),yd=N("TriggerEnum",(e=>(e.NONE="NONE",e.FOOTER="FOOTER",e.HEADER="HEADER",e))(yd||{})),vd=N("MenuModeEnum",(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.VERTICAL_RIGHT="vertical-right",e.INLINE="inline",e))(vd||{})),_d=N("MenuSplitTyeEnum",(e=>(e[e.NONE=0]="NONE",e[e.TOP=1]="TOP",e[e.LEFT=2]="LEFT",e))(_d||{})),Ed=N("TopMenuAlignEnum",(e=>(e.CENTER="center",e.START="start",e.END="end",e))(Ed||{})),wd=N("MixSidebarTriggerEnum",(e=>(e.HOVER="hover",e.CLICK="click",e))(wd||{})),Sd=N("PageEnum",(e=>(e.BASE_LOGIN="/login",e.BASE_TENANT="/tenant",e.BASE_HOME="/home",e.USER_CENTER="/user-center",e.PROCESS_CENTER="/process",e.MESSAGE_CENTER="/message",e.ERROR_PAGE="/exception",e.ERROR_LOG_PAGE="/error-log/list",e.USER_CENTER_PWD="/user-center/password",e))(Sd||{})),Ad=N("RoleEnum",(e=>(e.SUPER="super",e.TEST="test",e))(Ad||{})),Td=N("SizeEnum",(e=>(e.DEFAULT="default",e.SMALL="small",e.LARGE="large",e))(Td||{})),Id=N("ProcessStatusEnum",(e=>(e.APPROVING="APPROVING",e.COMPLETED="COMPLETED",e.REFUSED="REFUSED",e.REJECTED="REJECTED",e.TERMINATED="TERMINATED",e.WITHDRAWN="WITHDRAWN",e))(Id||{}));const Mv=N("ch_ProcessStatusMap",{APPROVING:"sys.process.status.approving",COMPLETED:"sys.process.status.completed",REFUSED:"sys.process.status.refused",REJECTED:"sys.process.status.rejected",TERMINATED:"sys.process.status.terminated",WITHDRAWN:"sys.process.status.withdrawn"});var Rd=N("ExamineAndApproveStateEnum",(e=>(e.MY_APPLICATION="myApplication",e.MY_AGENT="myAgent",e.MY_DONE="myDone",e.MY_CUSTOM="myCustom",e.MY_CUSTOM_Modal="myCustomModal",e))(Rd||{})),Od=N("ButtonTypeEnum",(e=>(e.Resubmit="Resubmit",e.End="Terminate",e.Withdraw="Withdraw",e.Approve="Approve",e.Refuse="Refuse",e.Reassign="Reassign",e.Countersign="Countersign",e.Reject="Reject",e))(Od||{})),Nd=N("OpinionTypeEnum",(e=>(e.Required="Required",e.Optional="Optional",e.ApproveRequired="ApproveRequired",e.RefuseRequired="RefuseRequired",e.ReassignRequired="ReassignRequired",e.RejectRequired="RejectRequired",e.CountersignRequired="CountersignRequired",e))(Nd||{})),Ld=N("BpmnNodeTypeEnum",(e=>(e.BpmnStart="bpmnStart",e.BpmnSubmit="bpmnSubmit",e.BpmnApproval="bpmnApproval",e.BpmnEnd="bpmnEnd",e.BpmnExclusive="bpmnExclusive",e.BpmnJs="bpmnJs",e.BpmnMessage="bpmnMessage",e.BpmnParallel="bpmnParallel",e.BpmnJoin="bpmnJoin",e.BpmnForm="bpmnForm",e.BpmnBusiness="bpmnBusiness",e))(Ld||{})),Md=N("PluginModeEnum",(e=>(e.DESIGN="design",e.WEB="web",e.MOBILE="mobile",e))(Md||{})),De=N("ExpressionModeEnum",(e=>(e[e.SEARCH=0]="SEARCH",e[e.FIELD_DISPLAY=1]="FIELD_DISPLAY",e[e.EXPORT_TEMPLATE=2]="EXPORT_TEMPLATE",e[e.DISPLAY_RULE=3]="DISPLAY_RULE",e[e.PROCESS_TITLE=4]="PROCESS_TITLE",e[e.GATEWAY_RULE=5]="GATEWAY_RULE",e[e.CREATE_FIELD=6]="CREATE_FIELD",e[e.PAAS_CREATE_FIELD=7]="PAAS_CREATE_FIELD",e[e.ENTITY_FORMULA=8]="ENTITY_FORMULA",e[e.IPAAS_BACK=9]="IPAAS_BACK",e[e.LABEL_PRINT=10]="LABEL_PRINT",e[e.NOCODE_BPMN_RULE=11]="NOCODE_BPMN_RULE",e[e.PAAS_BPMN_RULE=12]="PAAS_BPMN_RULE",e[e.ONLINE_FORM_FIELD_FORMULA=13]="ONLINE_FORM_FIELD_FORMULA",e[e.MEDPRO_BUSINESSFLOW=14]="MEDPRO_BUSINESSFLOW",e[e.RUN_FORMULA=15]="RUN_FORMULA",e[e.BI_FORMULA=16]="BI_FORMULA",e[e.DATA_SET_FORMULA=17]="DATA_SET_FORMULA",e))(De||{})),Ie=N("ExpressionTabEnum",(e=>(e.FUNCTION="function",e.FORM="form",e.FIELD="field",e.VARIABLE="variable",e.NODE="node",e.OPERATOR="operator",e))(Ie||{})),Ge=N("OperatorTypeEnum",(e=>(e.ARITHMETIC="arithmetic",e.RELATIONSHIP="relationship",e.LOGIC="logic",e.OTHER="other",e))(Ge||{})),Pd=N("VarTypeEnum",(e=>(e.INNER_VAR="INNER_VAR",e.SYSTEM_VAR="SYSTEM_VAR",e.GLOBAL_VAR="GLOBAL_VAR",e.PAGE_VAR="PAGE_VAR",e))(Pd||{})),ra=N("ReturnTypeEnum",(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e))(ra||{})),na=N("DataSetReturnTypeEnum",(e=>(e.String="string",e.Double="number",e))(na||{})),Yr=N("EntityFormulaReturnTypeEnum",(e=>(e.Text="text",e.LongText="long_text",e.Int="integer",e.Long="long",e.Double="decimal",e.Boolen="boolean",e))(Yr||{})),Cd=N("IdentifierAddon",(e=>(e.Prefix="",e))(Cd||{}));const Pv=N("zeroWidthSpace","");var Dd=N("GctMqttTopsEnum",(e=>(e.EDHR_FORM_INST_MULTI_PERSON_EDIT_BREAK="FORM_INST_MULTI_PERSON_EDIT_BREAK",e.EDHR_FORM_INST_MULTI_PERSON_EDIT_UNLOCK="FORM_INST_MULTI_PERSON_EDIT_UNLOCK",e))(Dd||{})),kd=N("GlobalParamEnum",(e=>(e.SELECT_ID="$VAR_GCT_SELECT_ID",e))(kd||{}));class Ud{context={aid:"",bid:"",pid:"",platform:ea.WEB};globalSetting={emptyDisplay:"--"};appInfo={};userInfo={};projectName=Js.PORTAL;lang="zh-CN"}const Cv=N("gctMemoizeAsync",(...e)=>xd.bind(null,...e));function xd(e,...t){const o=typeof t=="object"?Vr.stringify(t):t;let u=Kn.get(o);return u||(u=(async()=>{try{return await e(...t)}catch(n){throw Kn.delete(o),n}})(),Kn.set(o,u,3e5),u)}class Kn{static cachedata={};static set(t,r,o){this.cachedata[t]={maxAge:o||0,value:r,now:Date.now()}}static get(t){this.reset();const r=this.cachedata[t];return r?r.value:null}static delete(t){return delete this.cachedata[t]}static clear(){this.cachedata={}}static reset(){for(const t in this.cachedata){const r=this.cachedata[t];r&&Date.now()-r.now>r.maxAge&&this.delete(t)}}}class ia{configs=new Map;cache=new Map;getConfig(t){return this.configs.get(t)}register(t){this.configs.set(t.tag,t),t.items&&this.cache.set(t.tag,t.items)}unregister(t){this.configs.delete(t),this.cache.delete(t)}get(t){return this.cache.get(t)||[]}async asyncGet(t,r){const o=this.configs.get(t);return o?o.mode==="static"?this.getByConfig(o):o.mode==="async"?this.cache.has(t)?this.cache.get(t)||[]:this.asyncGetByConfig(o,r):[]:[]}getByConfig(t){return t.items||[]}async asyncGetByConfig(t,r={}){if(t.fetch){const o=await t.fetch(r||{});if(o){const[u,n]=t.keys||["name","id"];return this.deepFormat(o,u,n)}}return[]}deepFormat(t,r,o){return t.map(u=>{const n={label:u[r],value:u[o]};return u.children&&u.children.length>0&&(n.options=this.deepFormat(u.children,r,o)),n})}}N("DictionaryUtil",ia);const Ar=N("t",(...e)=>_gct.i18n.global.t(...e));class Xn{data;next;prev;constructor(t,r=null,o=null){this.data=t,this.next=r,this.prev=o}clear(){this.data=null,this.next=null,this.prev=null}}N("LinkedNode",Xn);class Bd{active=null;add(t){if(!this.active)this.active=new Xn(t);else{if(this.active.next){let o=this.active.next;for(;o;)o=o.next,o&&o.clear()}const r=new Xn(t,null,this.active);this.active.next=r,this.active=r}}delete(t){const{prev:r,next:o}=t;r&&(r.next=o),o&&(o.prev=r),t.clear()}prev(){this.active&&this.active.prev&&(this.active=this.active.prev)}next(){this.active&&this.active.next&&(this.active=this.active.next)}clearAll(){if(this.active){let t=this.active.prev,r=this.active.next;for(;t;)t.clear(),t=t.prev;for(;r;)r.clear(),r=r.next;this.active.clear()}}canUndo(){return!!this.active&&!!this.active.prev}canRedo(){return!!this.active&&!!this.active.next}}N("LinkedList",Bd);const Dv=N("insertCustomCssToHead",function(e,t=""){const r=document.getElementsByTagName("head")[0],o=document.getElementById("gct-custom-css"+t);o&&r.removeChild(o);const u=document.createElement("style");u.id="gct-custom-css"+t,u.type="text/css",Hn(t)?u.innerHTML=e:u.innerHTML=`#${t}{${e}}`,r.appendChild(u)});function Fd(e){const t=[];if(e.required&&t.push({required:!0,message:Ar("sys.notNull")}),e.reg){const{reg:o,regHint:u}=e,n=new RegExp(o),i=s=>n.test(s);t.push({validator:i,message:u??Ar("sys.regError")})}const r=e.validateFn;return r&&t.push({validator:r}),t}function jd(e){return{all:e=e||new Map,on:function(t,r){var o=e.get(t);o?o.push(r):e.set(t,[r])},off:function(t,r){var o=e.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var o=e.get(t);o&&o.slice().map(function(u){u(r)}),(o=e.get("*"))&&o.slice().map(function(u){u(t,r)})}}}const kv=N("mitt",jd());class Wd{CACHE_EXPIRATION_TIME=600*1e3;modelCache=new Map;modelLoadingCache=new Map;modelsLoadingCache=new Map;enumCache=new Map;enumLoadingCache=new Map;queryRefDataCache=new Map;queryRefDataLoadingCache=new Map;isExpired(t){return Date.now()>t.expiresAt}createCacheEntry(t){return{data:t,expiresAt:Date.now()+this.CACHE_EXPIRATION_TIME}}async loadModel(t){if(this.modelCache.has(t)){const o=this.modelCache.get(t);if(!this.isExpired(o))return o.data;this.modelCache.delete(t)}if(this.modelLoadingCache.has(t))return this.modelLoadingCache.get(t);const r=(async()=>{try{const o=await _api.apaas.modelMeta.getDetail({modelKey:t});return o?(this.modelCache.set(t,this.createCacheEntry(o)),o):{}}finally{this.modelLoadingCache.delete(t)}})();return this.modelLoadingCache.set(t,r),r}async loadModels(t){const r=t.join(",");if(t.every(n=>{const i=this.modelCache.get(n);return i&&!this.isExpired(i)}))return t.map(n=>this.modelCache.get(n).data);if(t.forEach(n=>{const i=this.modelCache.get(n);i&&this.isExpired(i)&&this.modelCache.delete(n)}),this.modelsLoadingCache.has(r))return this.modelsLoadingCache.get(r);const u=(async()=>{try{const n=t.filter(i=>!this.modelCache.has(i));if(n.length>0){const i=await _api.apaas.modelMeta.getByKeys({modelKeys:n.join(",")});i&&i.length>0&&i.forEach(s=>{this.modelCache.set(s.key,this.createCacheEntry(s)),s.fieldMetaList=s.fieldMetas||[]})}return t.map(i=>this.modelCache.get(i).data)}finally{this.modelsLoadingCache.delete(r)}})();return this.modelsLoadingCache.set(r,u),u}async loadField(t,r){const o=await this.loadModel(t);if(o?.fieldMetaList)return o.fieldMetaList.find(u=>u.key===r)}async loadFieldPaths(t,r,o){if(!o)return[];const u=[],n=!!o.bindFieldKey,i=n?o.modelLink||[o.belongModelKey,o.bindModelKey]:[o.modelKey],s=await this.loadModels(i);if(n)u.push(...s.map(l=>l.name));else{const l=await this.loadModel(o.modelKey);l&&u.push(l.name)}const a=await this.loadModel(t);if(a?.fieldMetaList){const l=a.fieldMetaList.find(c=>c.key===r);l&&u.push(l.name)}return u}async loadEnumList(t,r,o=Zs.ENTITY){const u=`${o}:${t}:${r}`;if(this.enumCache.has(u)){const i=this.enumCache.get(u);if(!this.isExpired(i))return ar(i.data);this.enumCache.delete(u),this.enumLoadingCache.delete(u)}if(this.enumLoadingCache.has(u))return this.enumLoadingCache.get(u);const n=(async()=>{try{return[]}finally{this.enumLoadingCache.delete(u)}})();return this.enumLoadingCache.set(u,n),n}async loadQueryRefData(t){if(!t||!t.modelKey)throw new Error("queryRefData 参数缺失");const r=JSON.stringify(t);if(this.queryRefDataCache.has(r)){const u=this.queryRefDataCache.get(r);if(!this.isExpired(u))return ar(u.data);this.queryRefDataCache.delete(r),this.queryRefDataLoadingCache.delete(r)}if(this.queryRefDataLoadingCache.has(r))return this.queryRefDataLoadingCache.get(r);const o=(async()=>{try{const u=await _api.apaas.modelData.postQueryRefData(t);return u?(this.queryRefDataCache.set(r,this.createCacheEntry(u)),ar(u)):{}}finally{this.queryRefDataLoadingCache.delete(r)}})();return this.queryRefDataLoadingCache.set(r,o),o}getCachedModel(t){const r=this.modelCache.get(t);if(r&&!this.isExpired(r))return r.data;r&&this.isExpired(r)&&this.modelCache.delete(t)}clear(t){this.modelCache.delete(t),this.modelLoadingCache.delete(t);const r=[];this.modelsLoadingCache.forEach((n,i)=>{i.includes(t)&&r.push(i)}),r.forEach(n=>{this.modelsLoadingCache.delete(n)});const o=[];this.enumCache.forEach((n,i)=>{i.includes(t)&&o.push(i)}),o.forEach(n=>{this.enumCache.delete(n),this.enumLoadingCache.delete(n)});const u=[];this.queryRefDataCache.forEach((n,i)=>{i.includes(`"modelKey":"${t}"`)&&u.push(i)}),u.forEach(n=>{this.queryRefDataCache.delete(n),this.queryRefDataLoadingCache.delete(n)})}clearAll(){this.modelCache.clear(),this.modelLoadingCache.clear(),this.modelsLoadingCache.clear(),this.enumCache.clear(),this.enumLoadingCache.clear(),this.queryRefDataCache.clear(),this.queryRefDataLoadingCache.clear()}keys(){return Array.from(this.modelCache.keys())}}const Uv=N("modelLoader",new Wd),xv=N("ModeFnMap",{[De.EXPORT_TEMPLATE]:["CONCAT"],[De.PROCESS_TITLE]:["CONCAT"],[De.SEARCH]:["AND","OR"],[De.GATEWAY_RULE]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT"],[De.NOCODE_BPMN_RULE]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT","ISNULL","ISEMPTY"],[De.PAAS_BPMN_RULE]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT"],[De.MEDPRO_BUSINESSFLOW]:["IF","AND","OR","EQ","NE","LE","LT","GE","GT"],[De.ENTITY_FORMULA]:["IF","ISEMPTY","ISNULL","AND","OR","EQ","NE","LE","LT","GE","GT","PARSENUMBER","CONCAT","SPLIT","SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","YEAR","MONTH","DAY","HOUR","MINUTE","TUPLE","SEQMAP","SUMSQ"],[De.LABEL_PRINT]:["IF","ISEMPTY","ISNULL","AND","OR","EQ","NE","LE","LT","GE","GT","PARSENUMBER","CONCAT","SPLIT","SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","DATEFORMAT","YEAR","MONTH","DAY","HOUR","MINUTE","TUPLE","SEQMAP","SUMSQ"]}),Bv=N("ModeTabMap",{[De.EXPORT_TEMPLATE]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.PROCESS_TITLE]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.GATEWAY_RULE]:[Ie.FIELD,Ie.FUNCTION,Ie.OPERATOR],[De.NOCODE_BPMN_RULE]:[Ie.FIELD,Ie.FUNCTION,Ie.NODE,Ie.VARIABLE,Ie.OPERATOR],[De.PAAS_BPMN_RULE]:[Ie.FIELD,Ie.FUNCTION,Ie.OPERATOR],[De.SEARCH]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.FIELD_DISPLAY]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.DISPLAY_RULE]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.CREATE_FIELD]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.DATA_SET_FORMULA]:[Ie.FIELD,Ie.FUNCTION,Ie.OPERATOR],[De.PAAS_CREATE_FIELD]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.ENTITY_FORMULA]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.IPAAS_BACK]:[Ie.FUNCTION,Ie.OPERATOR],[De.LABEL_PRINT]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.ONLINE_FORM_FIELD_FORMULA]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.MEDPRO_BUSINESSFLOW]:[Ie.FIELD,Ie.FUNCTION,Ie.OPERATOR],[De.RUN_FORMULA]:[Ie.FIELD,Ie.FUNCTION,Ie.VARIABLE,Ie.OPERATOR],[De.BI_FORMULA]:[Ie.FIELD,Ie.FUNCTION,Ie.OPERATOR]}),Fv=N("ReturnTypeMaps",{[De.CREATE_FIELD]:ra,[De.DATA_SET_FORMULA]:na,[De.PAAS_CREATE_FIELD]:Yr,[De.ENTITY_FORMULA]:Yr,[De.RUN_FORMULA]:Yr}),jv=N("ModeTabDict",{[Ie.FUNCTION]:{icon:"iconfont icon-hanshu1"},[Ie.FIELD]:{icon:"iconfont icon-ziduan2"},[Ie.VARIABLE]:{icon:"iconfont icon-bianliang"},[Ie.NODE]:{icon:"iconfont icon-hanshu1"},[Ie.OPERATOR]:{icon:"iconfont icon-a-yunsuanfu1"}}),oa=N("BuiltOperators",{"+":{title:"加法: a+b",description:"a,b: 整数,数字",group:Ge.ARITHMETIC},"-":{title:"减法: a-b",description:"a,b: 整数,数字",group:Ge.ARITHMETIC},"*":{title:"乘法: a*b",description:"a,b: 整数,数字",group:Ge.ARITHMETIC},"/":{title:"除法: a/b",description:"a,b: 整数,数字",group:Ge.ARITHMETIC},"%":{title:"求余: a%b",description:"a,b: 整数,数字",group:Ge.ARITHMETIC},">":{title:"大于: a>b",description:"a,b: 整数,数字",group:Ge.RELATIONSHIP},">=":{title:"大于等于: a>=b",description:"a,b: 整数,数字",group:Ge.RELATIONSHIP},"<":{title:"小于: a<b",description:"a,b: 整数,数字",group:Ge.RELATIONSHIP},"<=":{title:"小于等于: a<=b",description:"a,b: 整数,数字",group:Ge.RELATIONSHIP},"==":{title:"等于: a==b",description:"a,b: 整数,数字,布尔,字符串",group:Ge.RELATIONSHIP},"!=":{title:"不等于: a!=b",description:"a,b: 整数,数字,布尔,字符串",group:Ge.RELATIONSHIP},"&&":{title:"与: a&&b",description:"a,b: 布尔",group:Ge.LOGIC},"||":{title:"或: a||b",description:"a,b: 布尔",group:Ge.LOGIC},"!":{title:"非: !a",description:"a: 布尔",group:Ge.LOGIC},"?":{title:"判断: a?b:c",description:"若a的值为true,则执行b否则执行c",group:Ge.OTHER,label:"?:",output:"?:"},"(":{title:"左括号: c-(a+b)",description:"优先运算 () 中的内容",group:Ge.OTHER},")":{title:"右括号: c-(a+b)",description:"优先运算 () 中的内容",group:Ge.OTHER}}),Wv=N("numberOperator",["+","-","*","/","%",">",">=","<","<="]),Gv=N("booleanOperator",["&&","||","!"]),Hv=N("allOperator",["==","!=","?",":"]),Vv=N("returnBolOperator",["&&","||","!","==","!=",">",">=","<","<="]),$v=N("getOperatorList",()=>{const e=Object.keys(oa).map(t=>{const{title:r,description:o,group:u,label:n,output:i}=oa[t];return{name:n??t,group:u,desc:`${r}
|
|
2
|
+
${o}`,id:i??t}});return[Ge.ARITHMETIC,Ge.RELATIONSHIP,Ge.LOGIC,Ge.OTHER].map(t=>({id:t,name:Ar(`sys.expression.${t}`),children:e.filter(r=>r.group===t),idToChildren:!1}))}),qv=N("CUSTOM_LANGUAGE","custom-expression"),Yv=N("CUSTOM_THEME","custom-expression-theme"),sa=N("functionGroup",[{id:"LOGIC",name:"逻辑",children:[{desc:`IF(expr, a, b)
|
|
3
3
|
根据条件表达式,返回不同的值, 当expr执行为true,返回a, 否则返回b。
|
|
4
4
|
参数 expr: 条件表达式 a: 值 b: 另一个值 返回值 a|b
|
|
5
5
|
示例
|
|
@@ -263,7 +263,7 @@ ISDATERANGE(NOW(), WEEKRANGE()) 返回 true`,definition:"declare function ISDAT
|
|
|
263
263
|
判断参数dt是否在给定的区间范围内,如果在则返回true,反之返回false
|
|
264
264
|
参数dt、startTime、endTime为时间字符串,如果startTime大于endTime则跨天
|
|
265
265
|
ISTIMERANGE(DATEFORMAT(NOW(), HH:mm), ['06:00', '12:00']) 返回 true
|
|
266
|
-
ISTIMERANGE(DATEFORMAT(NOW(), HH:mm), ['13:00', '07:00']) 返回 true `,definition:"declare function ISTIMERANGE(v: string, r: [string, string]): Promise<boolean>;"}]}].map(e=>(e.children=(e.children??[]).map(t=>{const
|
|
266
|
+
ISTIMERANGE(DATEFORMAT(NOW(), HH:mm), ['13:00', '07:00']) 返回 true `,definition:"declare function ISTIMERANGE(v: string, r: [string, string]): Promise<boolean>;"}]}].map(e=>(e.children=(e.children??[]).map(t=>{const o=t.definition.match(new RegExp("(?<=declare function )([A-Z0-9]+)","g"))?.[0]??"UNKNOWN",u=(t.definition.match(/([a-z]:)+/g)||[]).length;return Object.assign(t,{id:o,name:o,idToChildren:!1,_args_:u}),t}),e))),Kv=N("functionMap",sa.reduce((e,t)=>(t.children.forEach(r=>{e[r.id]=r}),e),{})),Xv=N("ipaasBackFunctionGroup",[{id:"INNER",name:"内置",children:[{desc:`MD5(str) 计算输入字符串的MD5值
|
|
267
267
|
示例: MD5('abc')
|
|
268
268
|
返回 900150983cd24fb0d6963f7d28e17f72
|
|
269
269
|
`,definition:"declare function MD5(str: string): string;"},{desc:`SHA1(str) 计算输入字符串的HASH值
|
|
@@ -285,7 +285,7 @@ format为时间格式,可选值参考'yyyy-MM-dd','yyyy-MM-dd HH:mm:ss','HH:mm:s
|
|
|
285
285
|
返回10位的时间戳
|
|
286
286
|
UNIX10() 返回 1677811200`,definition:"declare function UNIX10(): number;"},{desc:`UNIX13()
|
|
287
287
|
返回13位的时间戳
|
|
288
|
-
UNIX13() 返回 1677811200000`,definition:"declare function UNIX13(): number;"}]}].map(e=>(e.children=e.children.map(t=>{const
|
|
288
|
+
UNIX13() 返回 1677811200000`,definition:"declare function UNIX13(): number;"}]}].map(e=>(e.children=e.children.map(t=>{const r=t.definition.match(new RegExp("(?<=declare function )([A-Z0-9]+)","g"))[0],o=(t.definition.match(/([a-z]:)+/g)||[]).length;return Object.assign(t,{id:r,name:r,idToChildren:!1,_args_:o}),t}),e))),zv=N("ipaasBackFunctionMap",sa.reduce((e,t)=>(t.children.forEach(r=>{e[r.id]=r}),e),{})),Gd=N("biBackFunctionGroup",[{id:"COMMON",name:"常用",children:[{desc:`将多个字段合并成一个字符串
|
|
289
289
|
示例: CONCAT('a', '-', 'b') = 'a-b'
|
|
290
290
|
`,definition:"declare function CONCAT( ...any: string[]): string;"},{desc:`返回日期的指定中加上指定的数字 后的日期
|
|
291
291
|
示例: DATEADD('2020-09-29', 100, days) = 2021-01-07
|
|
@@ -370,17 +370,24 @@ TOSTR(123) = '123'
|
|
|
370
370
|
`,definition:"declare function MIN(expression: number): number;"},{desc:`求和
|
|
371
371
|
示例: SUM([订单金额])
|
|
372
372
|
根据图表中使用的维度进行聚合,求订单金额的总和
|
|
373
|
-
`,definition:"declare function SUM(number: number): number;"}]}].map(e=>(e.children=e.children.map(t=>{const n=t.definition.match(new RegExp("(?<=declare function )([A-Z0-9_]+)","g"))[0],i=(t.definition.match(/([a-z]:)+/g)||[]).length;return Object.assign(t,{id:n,name:n,idToChildren:!1,_args_:i}),t}),e))),Yd=o("biBackFunctionMap",Ca.reduce((e,t)=>(t.children.forEach(n=>{e[n.id]=n}),e),{})),jd=o("FUNC_KEYS",["IF","ISEMPTY","ISNULL","ISUNDEFINED","AND","OR","EQ","NE","LE","LT","GE","GT","LEN","CONCAT","SUBSTRING","SUBSTR","UPPER","LOWER","TRIM","LTRIM","RTRIM","REPEAT","REPLACE","FINDSTR","SEARCHSTR","PARSENUMBER","SPLIT","SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","SUMSQ","STDEV","TUPLE","SEQMAP","GET","PUT","PUSH","HEADPUSH","COUNT","TIMESTAMP2DATE","DATE2TIMESTAMP","DATEFORMAT","NOW","TODAY","YEAR","MONTH","DAY","HOUR","MINUTE","WEEKRANGE","LASTWEEKRANGE","MONTHRANGE","LASTMONTHRANGE","YEARRANGE","LASTYEARRANGE","QUARTER","LASTQUARTER","ISDATERANGE","ISTIMERANGE"]),Kd=o("SYSTEM_VAR_PREFIX","$SYSTEM_VAR_"),Ua=o("innerVarList",[{id:"$USERID",name:"$USERID",valueType:"string",desc:"当前登录人id"},{id:"$USERNAME",name:"$USERNAME",valueType:"string",desc:"当前登录人姓名"},{id:"$USERDEPARTMENTID",name:"$USERDEPARTMENTID",valueType:"string",desc:"当前登录人主部门"},{id:"$USERDEPARTMENTNAME",name:"$USERDEPARTMENTNAME",valueType:"string",desc:"当前登录人主部门名称"}]),$d=o("innerVarIds",Ua.map(e=>e.id)),Zd=o("numberTypes",[h.INTEGER,h.LONG,h.DOUBLE,h.DECIMAL]),Jd=o("booleanTypes",[h.BOOLEAN]),xd=o("NUMBER_TYPE","number"),zd=o("STRING_TYPE","string"),Qd=o("BOOLEAN_TYPE","boolean"),qd=o("OBJECT_TYPE","object"),eu=o("ARRAY_TYPE","array"),tu=o("FUN_NUM_TYPE",["SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","LEN","DATE2TIMESTAMP","SUMSQ","STDEV","COUNT","TOINT","FIND","YEAR","WEEK","DAY","MONTH","QUARTER","TODOUBLE","DATEDIFF","AVG","GREATEST","LEAST","COUNTD","MEDIAN"]),nu=o("FUN_STR_TYPE",["CONCAT","SUBSTRING","SUBSTR","UPPER","LOWER","TRIM","LTRIM","RTRIM","REPEAT","REPLACE","FINDSTR","SEARCHSTR","PARSENUMBER","SPLIT"]),iu=o("FUN_BOL_TYPE",["IF","ISEMPTY","ISNULL","ISUNDEFINED","AND","OR","EQ","NE","LE","LT","GE","GT","CONTAINS"]),ru=o("FUN_OBJ_OR_ARR_TYPE",["TUPLE","SEQMAP","GET","PUT","PUSH","HEADPUSH"]),au=o("RETURN_TYPE_MAP",{string:"字符串",number:"数值",boolean:"布尔",date:"日期",time:"时间",datetime:"日期时间",array:"数组",object:"对象",null:"空值",unknown:"未知",text:"文本",long_text:"长文本",integer:"整数",long:"长整数",decimal:"小数"});var Pa=o("WinMsgTypeEnum",(e=>(e.EXPRESSION="expression-language-service",e))(Pa||{}));const su=o("operator2FuncMap",{"+":"ADD","-":"REDUCE","*":"MULTIPLICATION","/":"DIVISION","%":"MOD"});var Wt=o("EditorRegisterConst",(e=>(e.PREFIX="EDITOR___",e))(Wt||{})),wa=o("EditorType",(e=>(e.LENGTH_UNIT="length-unit",e.COLOR="color",e.SPAN="span",e.TEXT="text",e.NUMBER="number",e.INFO="info",e.MSG="msg",e.SELECT="select",e.SELECT_GROUP="select-group",e.RADIO="radio",e.PICKER="picker",e.MULTIPLE_CHOICE="multiple-choice",e.I18N="i18n",e.TEXTAREA="textarea",e.DATE_RANGE="date-range",e.SWITCH="switch",e.CHECK_SWITCH="check-switch",e.ICON_SELECT="icon-select",e.CHECKBOX="checkbox",e.DATE="date",e.MODEL_SELECT="model-select",e.ACTION="action",e.TABLE="table",e.SELECT_TABLE="select-table",e.EMPTY="empty",e.FORM_MODEL_FIELD_SELECT="form-model-field-select",e.PIXEL_CONFIG="pixel-config",e.FIELD_INFO="field-info",e.DATE_FORMAT_SELECT="date-format-select",e.FORMULA="formula",e))(wa||{})),Fa=o("EditorTypeOld",(e=>(e.LENGTH_UNIT="length-unit-editor",e.COLOR="color-editor",e.SPAN="span-editor",e.TEXT="text-editor",e.NUMBER="number-editor",e.INFO="info-editor",e.SELECT="select-editor",e.MODEL_SELECT="model-editor",e.Field_SELECT="field-editor",e.RADIO="radio-editor",e.PICKER="picker-editor",e.I18N="i18n-editor",e.TEXTAREA="textarea-editor",e.DATE_RANGE="date-range-editor",e.SWITCH="switch-editor",e.CHECK_SWITCH="check-switch-editor",e.ICON_SELECT="icon-select-editor",e.CHECKBOX="checkbox-editor",e.BORDER="border-editor",e.BORDER_RADIUS="border-radius-editor",e.ALIGN="align-editor",e.FONT_STYLE="font-style-editor",e.POSITION="position-editor",e.SPACING="spacing-editor",e.MARGIN="margin-editor",e))(Fa||{})),Ga=o("FormContainerType",(e=>(e.FORM_TITLE_GROUP="form-title-group",e))(Ga||{}));const ee=o("CoreConst",{TOKEN:"gct-token",TENANT:"gct-tenant"}),Ba=o("STYLE_NAMESPACE_TAG","gct"),ou=o("PLUGIN_BASE_URL","/minio"),cu=o("VITE_MINIO_PATH","/minio"),Vt=o("APP_INST","app_inst"),ka="is-";function K(e,t,n,i,a){let r=`${e}-${t}`;return n&&(r+=`-${n}`),i&&(r+=`__${i}`),a&&(r+=`--${a}`),r}class Xt{constructor(t,n){this.block=t,this.namespace=n||Ba}namespace;b(t=""){return K(this.namespace,this.block,t,"","")}e(t){return t?K(this.namespace,this.block,"",t,""):""}m(t){return t?K(this.namespace,this.block,"","",t):""}be(t,n){return t&&n?K(this.namespace,this.block,t,n,""):""}em(t,n){return t&&n?K(this.namespace,this.block,"",t,n):""}bm(t,n){return t&&n?K(this.namespace,this.block,t,"",n):""}bem(t,n,i){return t&&n&&i?K(this.namespace,this.block,t,n,i):""}is(t,n){return t&&n?`${ka}${t}`:""}cssVar(t){const n={};for(const i in t)t[i]&&(n[this.cssVarName(i)]=t[i]);return n}cssVarBlock(t){const n={};for(const i in t)t[i]&&(n[this.cssVarBlockName(i)]=t[i]);return n}cssVarName(t){return`--${this.namespace}-${t}`}cssVarBlockName(t){return`--${this.namespace}-${this.block}-${t}`}}o("Namespace",Xt);function Ha(e){return new Xt(e)}function Wa(e){if(e instanceof Array)e&&e.length>0&&e.splice(0,e.length);else if(e instanceof Object&&e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&delete e[t]}class Va{constructor(){this.map=new Map,this.maxListeners=100}setMaxListeners(t){this.maxListeners=t}getSize(t){return this.map.has(t)?this.map.get(t).length:0}addListener(t,n){if(n instanceof Function){this.map.has(t)||this.map.set(t,[]);const i=this.map.get(t);if(i.length<this.maxListeners)i.push(n);else throw new Error(`事件监听已达最大上限[${this.maxListeners}],无法新增监听!`)}}removeListener(t,n){if(this.map.has(t)){const i=this.map.get(t);if(i.length>0){for(let a=0;a<i.length;a++)if(i[a]===n){i.splice(a,1);break}}}}emit(t,...n){this.map.has(t)&&this.map.get(t).forEach(a=>{a(...n)})}async asyncEmit(t,...n){if(this.map.has(t)){const a=this.map.get(t).map(r=>r(...n));return Promise.all(a)}return[]}reset(){this.map.forEach(t=>{Wa(t)}),this.map.clear()}}class Be{constructor(t){this.e=new Va,this.e.setMaxListeners(t||300)}getSize(t){return this.e.getSize(t)}on(t,n){this.e.addListener(t,n)}off(t,n){this.e.removeListener(t,n)}emit(t,...n){this.e.emit(t,...n)}asyncEmit(t,...n){return this.e.asyncEmit(t,...n)}reset(){this.e.reset()}}const{toString:ke}=Object.prototype;function Yt(e){return Ka(e)==="function"}function Xa(e){return ke.call(e)==="[object AsyncFunction]"}function Ya(e){return ke.call(e)==="[object Promise]"}const ja={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object","[object Set]":"set","[object Map]":"map","[object WeakMap]":"weakmap"};function Ka(e){return ja[ke.call(e)]}function He(e,t,n=0,i=!1,a="/"){let r="";if(i&&!/^(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)$/.test(location.hostname)){const c=location.hostname;c.indexOf(".")!==c.lastIndexOf(".")&&(r=`;domain=${c.substring(c.indexOf("."),c.length)}`)}if(n!==0){const s=n*24*60*60*1e3,c=new Date(new Date().getTime()+s);document.cookie=`${e}=${escape(t)};path=${a};expires=${c.toUTCString()}${r}`}else document.cookie=`${e}=${escape(t)};path=${a}${r}`}function jt(e,t){He(e,"",-1,t)}function Kt(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n&&n.length>1?unescape(n[2]):null}class $a{constructor(){this.items=[]}get size(){return this.items.length}callSync(t,...n){const i=t||Object.create({});let a;for(let r=0;r<this.items.length;r++){const s=this.items[r];if(s.fn&&(a=s.fn(i,...n)),a===null){console.warn(`因${s.fn?s.fn.name:null}方法返回值为「null」,钩子中断执行。`,s);break}}return i}tap(t){if(t&&Yt(t)){const n={mode:"sync"};n.fn=t,this.items.push(n)}}removeTap(t){if(t)for(let n=0;n<this.items.length;n++){const i=this.items[n];t===i.fn&&this.items.splice(n,1)}}clear(){this.items=[]}}class $t extends $a{async call(t,...n){const i=t||Object.create({});let a;for(let r=0;r<this.items.length;r++){const s=this.items[r];if(s.fn&&(s.mode==="promise"?(a=s.fn(i,...n),Ya(a)&&(a=await a)):a=s.fn(i,...n)),a===null){console.warn(`因${s.fn?s.fn.name:null}方法返回值为「null」,钩子中断执行。`,s);break}}return i}tapPromise(t){if(t&&(Yt(t)||Xa(t))){const n={mode:"promise"};n.fn=t,this.items.push(n)}}removeTapPromise(t){this.removeTap(t)}}class Za{ignoreDismissCheck=!1;state=D({okDisabled:!1,cancelDisabled:!1});hooks={shouldDismiss:new $t,beforeDismiss:new $t};ok;setOptions;constructor(t){t.dismiss&&(this._dismiss=t.dismiss),t.setOptions&&(this.setOptions=t.setOptions)}cancel;callback(t,n){t&&(this.ok=t),n&&(this.cancel=n)}_dismiss=t=>{console.warn("外部关闭能力未注册",t)};injectDismiss(t){this._dismiss=t}async dismiss(t={ok:!1,data:[]}){const n={};return this.ignoreDismissCheck!==!0&&await this.hooks.shouldDismiss.call(n),n.allowClose===!1?(console.warn("shouldDismiss结果为false,关闭中断。"),!1):(await this.hooks.beforeDismiss.call(t),this._dismiss(t),this.destroy(),!0)}destroy(){this.hooks.shouldDismiss.clear(),this.hooks.beforeDismiss.clear()}}o("Modal",Za);class We{constructor(t,n,i){this.component=t,this.render=n,this.opts=i,this._initPromise=this.init()}vm;modal;result;evt=new Be;_initPromise;static async createVueApp(t,n){return console.error("没有注入createVueApp方法"),mt(t,n)}async init(){const t=this,{render:n,opts:i}=this,a=document.createElement("div");document.body.appendChild(a);const r=await We.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(a),t.evt.emit("dismiss",t.result)},render(){return Tt(t.component,{ref:"root",opts:i,onDismiss(s){t.result=s,r.unmount()}},{default:n})}});r.mount(a),this.vm=r}async present(){return await this._initPromise,await At(),this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const n=i=>{t(i),this.evt.off("dismiss",n)};this.evt.on("dismiss",n)})}}o("OverlayContainer",We);function Ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ve,Zt;function xa(){if(Zt)return Ve;Zt=1;function e(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function t(a,r){for(var s="",c=0,u=-1,f=0,l,d=0;d<=a.length;++d){if(d<a.length)l=a.charCodeAt(d);else{if(l===47)break;l=47}if(l===47){if(!(u===d-1||f===1))if(u!==d-1&&f===2){if(s.length<2||c!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var E=s.lastIndexOf("/");if(E!==s.length-1){E===-1?(s="",c=0):(s=s.slice(0,E),c=s.length-1-s.lastIndexOf("/")),u=d,f=0;continue}}else if(s.length===2||s.length===1){s="",c=0,u=d,f=0;continue}}r&&(s.length>0?s+="/..":s="..",c=2)}else s.length>0?s+="/"+a.slice(u+1,d):s=a.slice(u+1,d),c=d-u-1;u=d,f=0}else l===46&&f!==-1?++f:f=-1}return s}function n(a,r){var s=r.dir||r.root,c=r.base||(r.name||"")+(r.ext||"");return s?s===r.root?s+c:s+a+c:c}var i={resolve:function(){for(var r="",s=!1,c,u=arguments.length-1;u>=-1&&!s;u--){var f;u>=0?f=arguments[u]:(c===void 0&&(c=process.cwd()),f=c),e(f),f.length!==0&&(r=f+"/"+r,s=f.charCodeAt(0)===47)}return r=t(r,!s),s?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(r){if(e(r),r.length===0)return".";var s=r.charCodeAt(0)===47,c=r.charCodeAt(r.length-1)===47;return r=t(r,!s),r.length===0&&!s&&(r="."),r.length>0&&c&&(r+="/"),s?"/"+r:r},isAbsolute:function(r){return e(r),r.length>0&&r.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var r,s=0;s<arguments.length;++s){var c=arguments[s];e(c),c.length>0&&(r===void 0?r=c:r+="/"+c)}return r===void 0?".":i.normalize(r)},relative:function(r,s){if(e(r),e(s),r===s||(r=i.resolve(r),s=i.resolve(s),r===s))return"";for(var c=1;c<r.length&&r.charCodeAt(c)===47;++c);for(var u=r.length,f=u-c,l=1;l<s.length&&s.charCodeAt(l)===47;++l);for(var d=s.length,E=d-l,m=f<E?f:E,T=-1,A=0;A<=m;++A){if(A===m){if(E>m){if(s.charCodeAt(l+A)===47)return s.slice(l+A+1);if(A===0)return s.slice(l+A)}else f>m&&(r.charCodeAt(c+A)===47?T=A:A===0&&(T=0));break}var X=r.charCodeAt(c+A),ut=s.charCodeAt(l+A);if(X!==ut)break;X===47&&(T=A)}var z="";for(A=c+T+1;A<=u;++A)(A===u||r.charCodeAt(A)===47)&&(z.length===0?z+="..":z+="/..");return z.length>0?z+s.slice(l+T):(l+=T,s.charCodeAt(l)===47&&++l,s.slice(l))},_makeLong:function(r){return r},dirname:function(r){if(e(r),r.length===0)return".";for(var s=r.charCodeAt(0),c=s===47,u=-1,f=!0,l=r.length-1;l>=1;--l)if(s=r.charCodeAt(l),s===47){if(!f){u=l;break}}else f=!1;return u===-1?c?"/":".":c&&u===1?"//":r.slice(0,u)},basename:function(r,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');e(r);var c=0,u=-1,f=!0,l;if(s!==void 0&&s.length>0&&s.length<=r.length){if(s.length===r.length&&s===r)return"";var d=s.length-1,E=-1;for(l=r.length-1;l>=0;--l){var m=r.charCodeAt(l);if(m===47){if(!f){c=l+1;break}}else E===-1&&(f=!1,E=l+1),d>=0&&(m===s.charCodeAt(d)?--d===-1&&(u=l):(d=-1,u=E))}return c===u?u=E:u===-1&&(u=r.length),r.slice(c,u)}else{for(l=r.length-1;l>=0;--l)if(r.charCodeAt(l)===47){if(!f){c=l+1;break}}else u===-1&&(f=!1,u=l+1);return u===-1?"":r.slice(c,u)}},extname:function(r){e(r);for(var s=-1,c=0,u=-1,f=!0,l=0,d=r.length-1;d>=0;--d){var E=r.charCodeAt(d);if(E===47){if(!f){c=d+1;break}continue}u===-1&&(f=!1,u=d+1),E===46?s===-1?s=d:l!==1&&(l=1):s!==-1&&(l=-1)}return s===-1||u===-1||l===0||l===1&&s===u-1&&s===c+1?"":r.slice(s,u)},format:function(r){if(r===null||typeof r!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof r);return n("/",r)},parse:function(r){e(r);var s={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return s;var c=r.charCodeAt(0),u=c===47,f;u?(s.root="/",f=1):f=0;for(var l=-1,d=0,E=-1,m=!0,T=r.length-1,A=0;T>=f;--T){if(c=r.charCodeAt(T),c===47){if(!m){d=T+1;break}continue}E===-1&&(m=!1,E=T+1),c===46?l===-1?l=T:A!==1&&(A=1):l!==-1&&(A=-1)}return l===-1||E===-1||A===0||A===1&&l===E-1&&l===d+1?E!==-1&&(d===0&&u?s.base=s.name=r.slice(1,E):s.base=s.name=r.slice(d,E)):(d===0&&u?(s.name=r.slice(1,l),s.base=r.slice(1,E)):(s.name=r.slice(d,l),s.base=r.slice(d,E)),s.ext=r.slice(l,E)),d>0?s.dir=r.slice(0,d-1):u&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};return i.posix=i,Ve=i,Ve}var za=xa();const Jt=Ja(za);class Qa{constructor(t,n=!1){this.isDev=n,this.url=new URL(t),this.baseDir=Jt.dirname(this.url.pathname)}baseDir;url;dir(t){return this.isDev===!0?t:this.url.origin+Jt.resolve(this.baseDir,t)}}o("PluginStaticResource",Qa);function qa(){return{context:{type:Object,default:()=>({})},value:{type:Object},model:{type:Object,required:!0},c:{type:Object,required:!0},itemModel:{type:Object},data:{type:Object},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},keepalive:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},size:{type:String},count:{type:Number,default:0},isEmptyText:{type:Boolean,default:!1}}}function me(){return Kt(ee.TOKEN)}function xt(e){e?He(ee.TOKEN,e,7,!0):jt(ee.TOKEN,!0)}function zt(){return Kt(ee.TENANT)}function es(e){e?He(ee.TENANT,e,7,!0):jt(ee.TENANT,!0)}const ts=o("isMobile",(()=>{const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/,n=window.innerWidth<=768,i="ontouchstart"in window||navigator.maxTouchPoints>0;return t.test(e)||n&&i})());function Qt(){return localStorage.getItem(Zr)||"UTC+08:00"}function ns(e,t){return ve(Y(e),t,(n,i)=>{if(typeof n=="object"&&typeof i=="object")return ve(Y(n),i,(a,r)=>Array.isArray(a)?gt(a,r,Et):void 0)})}function is(e){const t=ue.stringify(e,{encode:!0,delimiter:";"});return t?`;${t}`:""}function qt(e){return e.indexOf(";")===-1?{}:ue.parse(e,{delimiter:";"})}const Xe=[];for(let e=0;e<=15;e++)Xe[e]=e.toString(16);function rs(){let e="";for(let t=1;t<=36;t++)t===9||t===14||t===19||t===24?e+="-":t===15?e+=4:t===20?e+=Xe[Math.random()*4|8]:e+=Xe[Math.random()*16|0];return e.replace(/-/g,"")}let en=0;function as(e=""){e=e.replaceAll("-","");const t=Math.floor(Math.random()*1e9);return en++,e+"_"+t+en}const lu=o("uuid2",(e,t)=>{const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),i=[];let a;if(t=t||n.length,e)for(a=0;a<e;a++)i[a]=n[0|Math.random()*t];else{let r;for(i[8]=i[13]=i[18]=i[23]="-",i[14]="4",a=0;a<36;a++)i[a]||(r=0|Math.random()*16,i[a]=n[a==19?r&3|8:r])}return i.join("")});function ss(e,t){return M({get:()=>e.value,set:i=>{e.value=i,t(i)}})}function os(e,t){const n=Object.keys(j(e)?e.value:e),i={};return n.forEach(a=>{i[a]=M({get:()=>(j(e)?e.value:e)[a],set(r){(j(e)?e.value:e)[a]=r,t(a,r)}})}),i}function cs(e,t){const n=Object.keys(j(e)?e.value:e),i={};let a={};return n.forEach(r=>{i[r]=M({get:()=>(a={},(j(e)?e.value:e)[r]),set(s){const c=j(e)?e.value:e;a[r]=s;const u={...c,...a};t(r,s,u)}})}),i}function ls(e){if(e==="nullpx")return{value:0,unit:"px"};const t=/^(\d+\.?\d*)([a-zA-Z%]+)$/,n=e.match(t);if(n)return{value:parseFloat(n[1]),unit:n[2]};throw new Error("Invalid value")}function ds(e){const t=C();let n;const i=()=>{e.deep&&(n=ae(()=>t.value,a=>{console.info("computedEx:属性或者值修改",a),e.set(a)},{deep:!0}))};return ae(()=>e.get(),a=>{n&&n(),console.info("computedEx:获取新值,重新监听",a),t.value=a,i()},{immediate:!0}),t}function us(e){const t=new Map;return function(...n){const i=JSON.stringify(n);if(t.has(i))return t.get(i);const a=e(...n);return t.set(i,a),a}}function fs(e,t,n,i){return{install(a){e&&t&&_gct.register.editor.register(Wt.PREFIX+e,t),n&&a.component(i??n.name,n)}}}function tn(e){e.interceptors.request.use(t=>(t.headers||(t.headers=new St),Object.assign(t.headers,{Token:me(),Source:ts?502:501,Lang:_gct.store.lang,"Tenant-Id":zt(),Timezone:Qt()}),t))}var nn="5.1.0";function Te(e,t){return new Promise(n=>setTimeout(n,e,t))}function hs(){return new Promise(e=>{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(null)})}function gs(e,t=1/0){const{requestIdleCallback:n}=window;return n?new Promise(i=>n.call(window,()=>i(),{timeout:t})):Te(Math.min(e,t))}function rn(e){return!!e&&typeof e.then=="function"}function an(e,t){try{const n=e();rn(n)?n.then(i=>t(!0,i),i=>t(!1,i)):t(!0,n)}catch(n){t(!1,n)}}async function sn(e,t,n=16){const i=Array(e.length);let a=Date.now();for(let r=0;r<e.length;++r){i[r]=t(e[r],r);const s=Date.now();s>=a+n&&(a=s,await hs())}return i}function se(e){return e.then(void 0,()=>{}),e}function Es(e,t){for(let n=0,i=e.length;n<i;++n)if(e[n]===t)return!0;return!1}function ms(e,t){return!Es(e,t)}function Ye(e){return parseInt(e)}function w(e){return parseFloat(e)}function H(e,t){return typeof e=="number"&&isNaN(e)?t:e}function _(e){return e.reduce((t,n)=>t+(n?1:0),0)}function on(e,t=1){if(Math.abs(t)>=1)return Math.round(e/t)*t;{const n=1/t;return Math.round(e*n)/n}}function Ts(e){var t,n;const i=`Unexpected syntax '${e}'`,a=/^\s*([a-z-]*)(.*)$/i.exec(e),r=a[1]||void 0,s={},c=/([.:#][\w-]+|\[.+?\])/gi,u=(f,l)=>{s[f]=s[f]||[],s[f].push(l)};for(;;){const f=c.exec(a[2]);if(!f)break;const l=f[0];switch(l[0]){case".":u("class",l.slice(1));break;case"#":u("id",l.slice(1));break;case"[":{const d=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(l);if(d)u(d[1],(n=(t=d[4])!==null&&t!==void 0?t:d[5])!==null&&n!==void 0?n:"");else throw new Error(i);break}default:throw new Error(i)}}return[r,s]}function As(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(i>127)return new TextEncoder().encode(e);t[n]=i}return t}function V(e,t){const n=e[0]>>>16,i=e[0]&65535,a=e[1]>>>16,r=e[1]&65535,s=t[0]>>>16,c=t[0]&65535,u=t[1]>>>16,f=t[1]&65535;let l=0,d=0,E=0,m=0;m+=r+f,E+=m>>>16,m&=65535,E+=a+u,d+=E>>>16,E&=65535,d+=i+c,l+=d>>>16,d&=65535,l+=n+s,l&=65535,e[0]=l<<16|d,e[1]=E<<16|m}function U(e,t){const n=e[0]>>>16,i=e[0]&65535,a=e[1]>>>16,r=e[1]&65535,s=t[0]>>>16,c=t[0]&65535,u=t[1]>>>16,f=t[1]&65535;let l=0,d=0,E=0,m=0;m+=r*f,E+=m>>>16,m&=65535,E+=a*f,d+=E>>>16,E&=65535,E+=r*u,d+=E>>>16,E&=65535,d+=i*f,l+=d>>>16,d&=65535,d+=a*u,l+=d>>>16,d&=65535,d+=r*c,l+=d>>>16,d&=65535,l+=n*f+i*u+a*c+r*s,l&=65535,e[0]=l<<16|d,e[1]=E<<16|m}function te(e,t){const n=e[0];t%=64,t===32?(e[0]=e[1],e[1]=n):t<32?(e[0]=n<<t|e[1]>>>32-t,e[1]=e[1]<<t|n>>>32-t):(t-=32,e[0]=e[1]<<t|n>>>32-t,e[1]=n<<t|e[1]>>>32-t)}function y(e,t){t%=64,t!==0&&(t<32?(e[0]=e[1]>>>32-t,e[1]=e[1]<<t):(e[0]=e[1]<<t-32,e[1]=0))}function O(e,t){e[0]^=t[0],e[1]^=t[1]}const Rs=[4283543511,3981806797],bs=[3301882366,444984403];function cn(e){const t=[0,e[0]>>>1];O(e,t),U(e,Rs),t[1]=e[0]>>>1,O(e,t),U(e,bs),t[1]=e[0]>>>1,O(e,t)}const Ae=[2277735313,289559509],Re=[1291169091,658871167],ln=[0,5],Ss=[0,1390208809],Is=[0,944331445];function Ns(e,t){const n=As(e);t=t||0;const i=[0,n.length],a=i[1]%16,r=i[1]-a,s=[0,t],c=[0,t],u=[0,0],f=[0,0];let l;for(l=0;l<r;l=l+16)u[0]=n[l+4]|n[l+5]<<8|n[l+6]<<16|n[l+7]<<24,u[1]=n[l]|n[l+1]<<8|n[l+2]<<16|n[l+3]<<24,f[0]=n[l+12]|n[l+13]<<8|n[l+14]<<16|n[l+15]<<24,f[1]=n[l+8]|n[l+9]<<8|n[l+10]<<16|n[l+11]<<24,U(u,Ae),te(u,31),U(u,Re),O(s,u),te(s,27),V(s,c),U(s,ln),V(s,Ss),U(f,Re),te(f,33),U(f,Ae),O(c,f),te(c,31),V(c,s),U(c,ln),V(c,Is);u[0]=0,u[1]=0,f[0]=0,f[1]=0;const d=[0,0];switch(a){case 15:d[1]=n[l+14],y(d,48),O(f,d);case 14:d[1]=n[l+13],y(d,40),O(f,d);case 13:d[1]=n[l+12],y(d,32),O(f,d);case 12:d[1]=n[l+11],y(d,24),O(f,d);case 11:d[1]=n[l+10],y(d,16),O(f,d);case 10:d[1]=n[l+9],y(d,8),O(f,d);case 9:d[1]=n[l+8],O(f,d),U(f,Re),te(f,33),U(f,Ae),O(c,f);case 8:d[1]=n[l+7],y(d,56),O(u,d);case 7:d[1]=n[l+6],y(d,48),O(u,d);case 6:d[1]=n[l+5],y(d,40),O(u,d);case 5:d[1]=n[l+4],y(d,32),O(u,d);case 4:d[1]=n[l+3],y(d,24),O(u,d);case 3:d[1]=n[l+2],y(d,16),O(u,d);case 2:d[1]=n[l+1],y(d,8),O(u,d);case 1:d[1]=n[l],O(u,d),U(u,Ae),te(u,31),U(u,Re),O(s,u)}return O(s,i),O(c,i),V(s,c),V(c,s),cn(s),cn(c),V(s,c),V(c,s),("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)+("00000000"+(c[0]>>>0).toString(16)).slice(-8)+("00000000"+(c[1]>>>0).toString(16)).slice(-8)}function Os(e){var t;return{name:e.name,message:e.message,stack:(t=e.stack)===null||t===void 0?void 0:t.split(`
|
|
374
|
-
`),...e}}function Ls(e){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))}function _s(e){return typeof e!="function"}function ps(e,t){const n=se(new Promise(i=>{const a=Date.now();an(e.bind(null,t),(...r)=>{const s=Date.now()-a;if(!r[0])return i(()=>({error:r[1],duration:s}));const c=r[1];if(_s(c))return i(()=>({value:c,duration:s}));i(()=>new Promise(u=>{const f=Date.now();an(c,(...l)=>{const d=s+Date.now()-f;if(!l[0])return u({error:l[1],duration:d});u({value:l[1],duration:d})})}))})}));return function(){return n.then(a=>a())}}function vs(e,t,n,i){const a=Object.keys(e).filter(s=>ms(n,s)),r=se(sn(a,s=>ps(e[s],t),i));return async function(){const c=await r,u=await sn(c,d=>se(d()),i),f=await Promise.all(u),l={};for(let d=0;d<a.length;++d)l[a[d]]=f[d];return l}}function dn(){const e=window,t=navigator;return _(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function Ds(){const e=window,t=navigator;return _(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!dn()}function oe(){const e=window,t=navigator;return _(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,(t.vendor||"").indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function F(){const e=window,t=navigator;return _(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,t.vendor.indexOf("Apple")===0,"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function je(){const e=window,{HTMLElement:t,Document:n}=e;return _(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),n&&"pointerLockElement"in n.prototype])>=4}function ce(){const e=window;return Ls(e.print)&&String(e.browser)==="[object WebPageNamespace]"}function le(){var e,t;const n=window;return _(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in n,"mozInnerScreenX"in n,"CSSMozDocumentRule"in n,"CanvasCaptureMediaStream"in n])>=4}function Ms(){const e=window,t=navigator,{CSS:n}=e;return _(["userActivation"in t,n.supports("color","light-dark(#000, #fff)"),n.supports("height","1lh"),"globalPrivacyControl"in t])>=3}function un(){const{CSS:e}=window;return _([e.supports("selector(::details-content)"),e.supports("selector(::before::marker)"),e.supports("selector(::after::marker)"),!("locale"in CompositionEvent.prototype)])>=3}function ys(){const e=window;return _([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3}function Cs(){const e=window,{URLPattern:t}=e;return _(["union"in Set.prototype,"Iterator"in e,t&&"hasRegExpGroups"in t.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}function Us(){const e=window;return _(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}function de(){const e=window,t=navigator,{CSS:n,HTMLButtonElement:i}=e;return _([!("getStorageUpdates"in t),i&&"popover"in i.prototype,"CSSCounterStyleRule"in e,n.supports("font-size-adjust: ex-height 0.5"),n.supports("text-transform: full-width")])>=4}function Ps(){if(navigator.platform==="iPad")return!0;const e=screen,t=e.width/e.height;return _(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}function ws(){const e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function Fs(){const e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function Ke(){const e=oe(),t=le(),n=window,i=navigator,a="connection";return e?_([!("SharedWorker"in n),i[a]&&"ontypechange"in i[a],!("sinkId"in new Audio)])>=2:t?_(["onorientationchange"in n,"orientation"in n,/android/i.test(i.appVersion)])>=2:!1}function Gs(){const e=navigator,t=window,n=Audio.prototype,{visualViewport:i}=t;return _(["srLatency"in n,"srChannelCount"in n,"devicePosture"in e,i&&"segments"in i,"getTextInformation"in Image.prototype])>=3}function Bs(){return Ws()?-4:ks()}function ks(){const e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(Hs())return-1;const n=4500,i=5e3,a=new t(1,i,44100),r=a.createOscillator();r.type="triangle",r.frequency.value=1e4;const s=a.createDynamicsCompressor();s.threshold.value=-50,s.knee.value=40,s.ratio.value=12,s.attack.value=0,s.release.value=.25,r.connect(s),s.connect(a.destination),r.start(0);const[c,u]=Vs(a),f=se(c.then(l=>Xs(l.getChannelData(0).subarray(n)),l=>{if(l.name==="timeout"||l.name==="suspended")return-3;throw l}));return()=>(u(),f)}function Hs(){return F()&&!je()&&!Us()}function Ws(){return F()&&de()&&ce()||oe()&&Gs()&&Cs()}function Vs(e){let r=()=>{};return[new Promise((c,u)=>{let f=!1,l=0,d=0;e.oncomplete=T=>c(T.renderedBuffer);const E=()=>{setTimeout(()=>u(fn("timeout")),Math.min(500,d+5e3-Date.now()))},m=()=>{try{const T=e.startRendering();switch(rn(T)&&se(T),e.state){case"running":d=Date.now(),f&&E();break;case"suspended":document.hidden||l++,f&&l>=3?u(fn("suspended")):setTimeout(m,500);break}}catch(T){u(T)}};m(),r=()=>{f||(f=!0,d>0&&E())}}),r]}function Xs(e){let t=0;for(let n=0;n<e.length;++n)t+=Math.abs(e[n]);return t}function fn(e){const t=new Error(e);return t.name=e,t}async function hn(e,t,n=50){var i,a,r;const s=document;for(;!s.body;)await Te(n);const c=s.createElement("iframe");try{for(await new Promise((u,f)=>{let l=!1;const d=()=>{l=!0,u()},E=A=>{l=!0,f(A)};c.onload=d,c.onerror=E;const{style:m}=c;m.setProperty("display","block","important"),m.position="absolute",m.top="0",m.left="0",m.visibility="hidden",t&&"srcdoc"in c?c.srcdoc=t:c.src="about:blank",s.body.appendChild(c);const T=()=>{var A,X;l||(((X=(A=c.contentWindow)===null||A===void 0?void 0:A.document)===null||X===void 0?void 0:X.readyState)==="complete"?d():setTimeout(T,10))};T()});!(!((a=(i=c.contentWindow)===null||i===void 0?void 0:i.document)===null||a===void 0)&&a.body);)await Te(n);return await e(c,c.contentWindow)}finally{(r=c.parentNode)===null||r===void 0||r.removeChild(c)}}function Ys(e){const[t,n]=Ts(e),i=document.createElement(t??"div");for(const a of Object.keys(n)){const r=n[a].join(" ");a==="style"?js(i.style,r):i.setAttribute(a,r)}return i}function js(e,t){for(const n of t.split(";")){const i=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(n);if(i){const[,a,r,,s]=i;e.setProperty(a,r,s||"")}}}function Ks(){let e=window;for(;;){const t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(n){if(n instanceof Error&&n.name==="SecurityError")return!0;throw n}e=t}}const $s="mmMwWLliI0O&1",Zs="48px",ne=["monospace","sans-serif","serif"],gn=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function Js(){return hn(async(e,{document:t})=>{const n=t.body;n.style.fontSize=Zs;const i=t.createElement("div");i.style.setProperty("visibility","hidden","important");const a={},r={},s=m=>{const T=t.createElement("span"),{style:A}=T;return A.position="absolute",A.top="0",A.left="0",A.fontFamily=m,T.textContent=$s,i.appendChild(T),T},c=(m,T)=>s(`'${m}',${T}`),u=()=>ne.map(s),f=()=>{const m={};for(const T of gn)m[T]=ne.map(A=>c(T,A));return m},l=m=>ne.some((T,A)=>m[A].offsetWidth!==a[T]||m[A].offsetHeight!==r[T]),d=u(),E=f();n.appendChild(i);for(let m=0;m<ne.length;m++)a[ne[m]]=d[m].offsetWidth,r[ne[m]]=d[m].offsetHeight;return gn.filter(m=>l(E[m]))})}function xs(){const e=navigator.plugins;if(!e)return;const t=[];for(let n=0;n<e.length;++n){const i=e[n];if(!i)continue;const a=[];for(let r=0;r<i.length;++r){const s=i[r];a.push({type:s.type,suffixes:s.suffixes})}t.push({name:i.name,description:i.description,mimeTypes:a})}return t}function zs(){return Qs(ao())}function Qs(e){let t=!1,n,i;const[a,r]=qs();return eo(a,r)?(t=to(r),e?n=i="skipped":[n,i]=no(a,r)):n=i="unsupported",{winding:t,geometry:n,text:i}}function qs(){const e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}function eo(e,t){return!!(t&&e.toDataURL)}function to(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}function no(e,t){io(e,t);const n=$e(e),i=$e(e);return n!==i?["unstable","unstable"]:(ro(e,t),[$e(e),n])}function io(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';const n="Cwm fjordbank gly 😃";t.fillText(n,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(n,4,45)}function ro(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(const[n,i,a]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])t.fillStyle=n,t.beginPath(),t.arc(i,a,40,0,Math.PI*2,!0),t.closePath(),t.fill();t.fillStyle="#f9c",t.arc(60,60,60,0,Math.PI*2,!0),t.arc(60,60,20,0,Math.PI*2,!0),t.fill("evenodd")}function $e(e){return e.toDataURL()}function ao(){const e=F()&&de()&&ce(),t=le()&&Ms();return e||t}function so(){const e=navigator;let t=0,n;e.maxTouchPoints!==void 0?t=Ye(e.maxTouchPoints):e.msMaxTouchPoints!==void 0&&(t=e.msMaxTouchPoints);try{document.createEvent("TouchEvent"),n=!0}catch{n=!1}const i="ontouchstart"in window;return{maxTouchPoints:t,touchEvent:n,touchStart:i}}function oo(){return navigator.oscpu}function co(){const e=navigator,t=[],n=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(n!==void 0&&t.push([n]),Array.isArray(e.languages))oe()&&ys()||t.push(e.languages);else if(typeof e.languages=="string"){const i=e.languages;i&&t.push(i.split(","))}return t}function lo(){return window.screen.colorDepth}function uo(){return H(w(navigator.deviceMemory),void 0)}function fo(){if(!(F()&&de()&&ce()))return ho()}function ho(){const e=screen,t=i=>H(Ye(i),null),n=[t(e.width),t(e.height)];return n.sort().reverse(),n}const go=2500,Eo=10;let be,Ze;function mo(){if(Ze!==void 0)return;const e=()=>{const t=Je();xe(t)?Ze=setTimeout(e,go):(be=t,Ze=void 0)};e()}function To(){return mo(),async()=>{let e=Je();if(xe(e)){if(be)return[...be];ws()&&(await Fs(),e=Je())}return xe(e)||(be=e),e}}function Ao(){const e=F()&&de()&&ce(),t=le()&&un();if(e||t)return()=>Promise.resolve(void 0);const n=To();return async()=>{const i=await n(),a=r=>r===null?null:on(r,Eo);return[a(i[0]),a(i[1]),a(i[2]),a(i[3])]}}function Je(){const e=screen;return[H(w(e.availTop),null),H(w(e.width)-w(e.availWidth)-H(w(e.availLeft),0),null),H(w(e.height)-w(e.availHeight)-H(w(e.availTop),0),null),H(w(e.availLeft),null)]}function xe(e){for(let t=0;t<4;++t)if(e[t])return!1;return!0}function Ro(){const e=bo();return e!==void 0&&le()&&un()?e>=8?8:4:e}function bo(){return H(Ye(navigator.hardwareConcurrency),void 0)}function So(){var e;const t=(e=window.Intl)===null||e===void 0?void 0:e.DateTimeFormat;if(t){const i=new t().resolvedOptions().timeZone;if(i)return i}const n=-Io();return`UTC${n>=0?"+":""}${n}`}function Io(){const e=new Date().getFullYear();return Math.max(w(new Date(e,0,1).getTimezoneOffset()),w(new Date(e,6,1).getTimezoneOffset()))}function No(){try{return!!window.sessionStorage}catch{return!0}}function Oo(){try{return!!window.localStorage}catch{return!0}}function Lo(){if(!(dn()||Ds()))try{return!!window.indexedDB}catch{return!0}}function _o(){return!!window.openDatabase}function po(){return navigator.cpuClass}function vo(){const{platform:e}=navigator;return e==="MacIntel"&&F()&&!je()?Ps()?"iPad":"iPhone":e}function Do(){return navigator.vendor||""}function Mo(){const e=[];for(const t of["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"]){const n=window[t];n&&typeof n=="object"&&e.push(t)}return e.sort()}function yo(){const e=document;try{e.cookie="cookietest=1; SameSite=Strict;";const t=e.cookie.indexOf("cookietest=")!==-1;return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch{return!1}}function Co(){const e=atob;return{abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',e("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",e("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",e("LnNwb25zb3JpdA=="),".ylamainos",e("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",e("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",e("LmhlYWRlci1ibG9ja2VkLWFk"),e("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",e("I2FkXzMwMFgyNTA="),e("I2Jhbm5lcmZsb2F0MjI="),e("I2NhbXBhaWduLWJhbm5lcg=="),e("I0FkLUNvbnRlbnQ=")],adGuardChinese:[e("LlppX2FkX2FfSA=="),e("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",e("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),e("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",e("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",e("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",e("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),e("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),e("LmFkZ29vZ2xl"),e("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[e("YW1wLWF1dG8tYWRz"),e("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",e("I2FkX2ludmlld19hcmVh")],adGuardRussian:[e("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),e("LnJlY2xhbWE="),'div[id^="smi2adblock"]',e("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[e("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),e("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",e("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),e("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),e("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",e("I3Jla2xhbWk="),e("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),e("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),e("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[e("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",e("LndpZGdldF9wb19hZHNfd2lkZ2V0"),e("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",e("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[e("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),e("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",e("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",e("I3Jla2xhbW5pLWJveA=="),e("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",e("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[e("I2FkdmVydGVudGll"),e("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",e("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",e("LnNwb25zb3JsaW5rZ3J1ZW4="),e("I3dlcmJ1bmdza3k="),e("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),e("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[e("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",e("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[e("LnJla2xhbW9zX3RhcnBhcw=="),e("LnJla2xhbW9zX251b3JvZG9z"),e("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),e("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),e("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[e("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[e("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),e("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",e("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[e("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),e("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),e("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",e("LmFkX19tYWlu"),e("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[e("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[e("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),e("I2xpdmVyZUFkV3JhcHBlcg=="),e("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),e("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[e("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",e("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),e("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),e("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[e("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),e("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),e("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",e("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),e("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),e("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),e("ZGl2I3NrYXBpZWNfYWQ=")],ro:[e("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),e("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),e("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[e("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),e("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),e("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",e("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),e("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",e("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]}}async function Uo({debug:e}={}){if(!Po())return;const t=Co(),n=Object.keys(t),i=[].concat(...n.map(s=>t[s])),a=await wo(i);e&&Fo(t,a);const r=n.filter(s=>{const c=t[s];return _(c.map(f=>a[f]))>c.length*.6});return r.sort(),r}function Po(){return F()||Ke()}async function wo(e){var t;const n=document,i=n.createElement("div"),a=new Array(e.length),r={};En(i);for(let s=0;s<e.length;++s){const c=Ys(e[s]);c.tagName==="DIALOG"&&c.show();const u=n.createElement("div");En(u),u.appendChild(c),i.appendChild(u),a[s]=c}for(;!n.body;)await Te(50);n.body.appendChild(i);try{for(let s=0;s<e.length;++s)a[s].offsetParent||(r[e[s]]=!0)}finally{(t=i.parentNode)===null||t===void 0||t.removeChild(i)}return r}function En(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function Fo(e,t){let n="DOM blockers debug:\n```";for(const i of Object.keys(e)){n+=`
|
|
375
|
-
${
|
|
376
|
-
${t[
|
|
377
|
-
\`\`\``)}function
|
|
373
|
+
`,definition:"declare function SUM(number: number): number;"}]}].map(e=>(e.children=e.children.map(t=>{const r=t.definition.match(new RegExp("(?<=declare function )([A-Z0-9_]+)","g"))[0],o=(t.definition.match(/([a-z]:)+/g)||[]).length;return Object.assign(t,{id:r,name:r,idToChildren:!1,_args_:o}),t}),e))),Qv=N("biBackFunctionMap",Gd.reduce((e,t)=>(t.children.forEach(r=>{e[r.id]=r}),e),{})),Jv=N("FUNC_KEYS",["IF","ISEMPTY","ISNULL","ISUNDEFINED","AND","OR","EQ","NE","LE","LT","GE","GT","LEN","CONCAT","SUBSTRING","SUBSTR","UPPER","LOWER","TRIM","LTRIM","RTRIM","REPEAT","REPLACE","FINDSTR","SEARCHSTR","PARSENUMBER","SPLIT","SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","SUMSQ","STDEV","TUPLE","SEQMAP","GET","PUT","PUSH","HEADPUSH","COUNT","TIMESTAMP2DATE","DATE2TIMESTAMP","DATEFORMAT","NOW","TODAY","YEAR","MONTH","DAY","HOUR","MINUTE","WEEKRANGE","LASTWEEKRANGE","MONTHRANGE","LASTMONTHRANGE","YEARRANGE","LASTYEARRANGE","QUARTER","LASTQUARTER","ISDATERANGE","ISTIMERANGE"]),Zv=N("SYSTEM_VAR_PREFIX","$SYSTEM_VAR_"),Hd=N("innerVarList",[{id:"$USERID",name:"$USERID",valueType:"string",desc:"当前登录人id"},{id:"$USERNAME",name:"$USERNAME",valueType:"string",desc:"当前登录人姓名"},{id:"$USERDEPARTMENTID",name:"$USERDEPARTMENTID",valueType:"string",desc:"当前登录人主部门"},{id:"$USERDEPARTMENTNAME",name:"$USERDEPARTMENTNAME",valueType:"string",desc:"当前登录人主部门名称"}]),e_=N("innerVarIds",Hd.map(e=>e.id)),t_=N("numberTypes",[me.INTEGER,me.LONG,me.DOUBLE,me.DECIMAL]),r_=N("booleanTypes",[me.BOOLEAN]),n_=N("NUMBER_TYPE","number"),i_=N("STRING_TYPE","string"),o_=N("BOOLEAN_TYPE","boolean"),s_=N("OBJECT_TYPE","object"),a_=N("ARRAY_TYPE","array"),l_=N("FUN_NUM_TYPE",["SUM","REDUCE","MULTIPLICATION","DIVISION","FIXED","ROUND","ROUNDUP","MAX","LARGE","MIN","SMALL","AVERAGE","ABS","MOD","POWER","SQRT","LEN","DATE2TIMESTAMP","SUMSQ","STDEV","COUNT","TOINT","FIND","YEAR","WEEK","DAY","MONTH","QUARTER","TODOUBLE","DATEDIFF","AVG","GREATEST","LEAST","COUNTD","MEDIAN"]),u_=N("FUN_STR_TYPE",["CONCAT","SUBSTRING","SUBSTR","UPPER","LOWER","TRIM","LTRIM","RTRIM","REPEAT","REPLACE","FINDSTR","SEARCHSTR","PARSENUMBER","SPLIT"]),c_=N("FUN_BOL_TYPE",["IF","ISEMPTY","ISNULL","ISUNDEFINED","AND","OR","EQ","NE","LE","LT","GE","GT","CONTAINS"]),f_=N("FUN_OBJ_OR_ARR_TYPE",["TUPLE","SEQMAP","GET","PUT","PUSH","HEADPUSH"]),h_=N("RETURN_TYPE_MAP",{string:"字符串",number:"数值",boolean:"布尔",date:"日期",time:"时间",datetime:"日期时间",array:"数组",object:"对象",null:"空值",unknown:"未知",text:"文本",long_text:"长文本",integer:"整数",long:"长整数",decimal:"小数"});var Vd=N("WinMsgTypeEnum",(e=>(e.EXPRESSION="expression-language-service",e))(Vd||{}));const d_=N("operator2FuncMap",{"+":"ADD","-":"REDUCE","*":"MULTIPLICATION","/":"DIVISION","%":"MOD"});var $d=N("EditorRegisterConst",(e=>(e.PREFIX="EDITOR___",e))($d||{})),qd=N("FormContainerType",(e=>(e.FORM_TITLE_GROUP="form-title-group",e))(qd||{})),Yd=N("DefaultDateTypeConst",(e=>(e.SystemDate="system-date",e.Yesterday="yesterday",e.Past7Days="past-7-days",e.Past30Days="past-30-days",e.PastDays="past-days",e.ThisWeek="this-week",e.LastWeek="last-week",e.PastWeeks="past-weeks",e.ThisMonth="this-month",e.LastMonth="last-month",e.PastMonths="past-months",e.ThisQuarter="this-quarter",e.LastQuarter="last-quarter",e.PastQuarters="past-quarters",e.ThisYear="this-year",e.LastYear="last-year",e.PastYears="past-years",e))(Yd||{}));const ur=N("CoreConst",{TOKEN:"gct-token",TENANT:"gct-tenant"}),p_=N("ModelTypeOptions",[{value:"entity",label:"sys.pageDesigner.entity"},{value:"data",label:"sys.pageDesigner.data"},{value:"view",label:"sys.pageDesigner.view"}]),Kd=N("STYLE_NAMESPACE_TAG","gct"),g_=N("PLUGIN_BASE_URL","/minio"),b_=N("VITE_MINIO_PATH","/minio"),aa=N("APP_INST","app_inst"),Xd="is-";function Yt(e,t,r,o,u){let n=`${e}-${t}`;return r&&(n+=`-${r}`),o&&(n+=`__${o}`),u&&(n+=`--${u}`),n}class la{constructor(t,r){this.block=t,this.namespace=r||Kd}namespace;b(t=""){return Yt(this.namespace,this.block,t,"","")}e(t){return t?Yt(this.namespace,this.block,"",t,""):""}m(t){return t?Yt(this.namespace,this.block,"","",t):""}be(t,r){return t&&r?Yt(this.namespace,this.block,t,r,""):""}em(t,r){return t&&r?Yt(this.namespace,this.block,"",t,r):""}bm(t,r){return t&&r?Yt(this.namespace,this.block,t,"",r):""}bem(t,r,o){return t&&r&&o?Yt(this.namespace,this.block,t,r,o):""}is(t,r){return t&&r?`${Xd}${t}`:""}cssVar(t){const r={};for(const o in t)t[o]&&(r[this.cssVarName(o)]=t[o]);return r}cssVarBlock(t){const r={};for(const o in t)t[o]&&(r[this.cssVarBlockName(o)]=t[o]);return r}cssVarName(t){return`--${this.namespace}-${t}`}cssVarBlockName(t){return`--${this.namespace}-${this.block}-${t}`}}N("Namespace",la);function zd(e){return new la(e)}function Qd(e){if(e instanceof Array)e&&e.length>0&&e.splice(0,e.length);else if(e instanceof Object&&e)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&delete e[t]}class Jd{constructor(){this.map=new Map,this.maxListeners=100}setMaxListeners(t){this.maxListeners=t}getSize(t){return this.map.has(t)?this.map.get(t).length:0}addListener(t,r){if(r instanceof Function){this.map.has(t)||this.map.set(t,[]);const o=this.map.get(t);if(o.length<this.maxListeners)o.push(r);else throw new Error(`事件监听已达最大上限[${this.maxListeners}],无法新增监听!`)}}removeListener(t,r){if(this.map.has(t)){const o=this.map.get(t);if(o.length>0){for(let u=0;u<o.length;u++)if(o[u]===r){o.splice(u,1);break}}}}emit(t,...r){this.map.has(t)&&this.map.get(t).forEach(u=>{u(...r)})}async asyncEmit(t,...r){if(this.map.has(t)){const u=this.map.get(t).map(n=>n(...r));return Promise.all(u)}return[]}reset(){this.map.forEach(t=>{Qd(t)}),this.map.clear()}}class Zd{constructor(t){this.e=new Jd,this.e.setMaxListeners(t||300)}getSize(t){return this.e.getSize(t)}on(t,r){this.e.addListener(t,r)}off(t,r){this.e.removeListener(t,r)}emit(t,...r){this.e.emit(t,...r)}asyncEmit(t,...r){return this.e.asyncEmit(t,...r)}reset(){this.e.reset()}}const{toString:zn}=Object.prototype;function ua(e){return np(e)==="function"}function ep(e){return zn.call(e)==="[object AsyncFunction]"}function tp(e){return zn.call(e)==="[object Promise]"}const rp={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object","[object Set]":"set","[object Map]":"map","[object WeakMap]":"weakmap"};function np(e){return rp[zn.call(e)]}function Ut(){return((1+Math.random())*65536|0).toString(16).substring(1)}function ip(){return`${Ut()+Ut()}-${Ut()}-${Ut()}-${Ut()}-${Ut()}${Ut()}${Ut()}`}function Qn(e,t,r=0,o=!1,u="/"){let n="";if(o&&!/^(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)\.(25[0-5]|2[0-4]\d|[0-1]\d{2}|[1-9]?\d)$/.test(location.hostname)){const s=location.hostname;s.indexOf(".")!==s.lastIndexOf(".")&&(n=`;domain=${s.substring(s.indexOf("."),s.length)}`)}if(r!==0){const i=r*24*60*60*1e3,s=new Date(new Date().getTime()+i);document.cookie=`${e}=${escape(t)};path=${u};expires=${s.toUTCString()}${n}`}else document.cookie=`${e}=${escape(t)};path=${u}${n}`}function ca(e,t){Qn(e,"",-1,t)}function fa(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),r=document.cookie.match(t);return r&&r.length>1?unescape(r[2]):null}class op{constructor(){this.items=[]}get size(){return this.items.length}callSync(t,...r){const o=t||Object.create({});let u;for(let n=0;n<this.items.length;n++){const i=this.items[n];if(i.fn&&(u=i.fn(o,...r)),u===null){console.warn(`因${i.fn?i.fn.name:null}方法返回值为「null」,钩子中断执行。`,i);break}}return o}tap(t){if(t&&ua(t)){const r={mode:"sync"};r.fn=t,this.items.push(r)}}removeTap(t){if(t)for(let r=0;r<this.items.length;r++){const o=this.items[r];t===o.fn&&this.items.splice(r,1)}}clear(){this.items=[]}}class ha extends op{async call(t,...r){const o=t||Object.create({});let u;for(let n=0;n<this.items.length;n++){const i=this.items[n];if(i.fn&&(i.mode==="promise"?(u=i.fn(o,...r),tp(u)&&(u=await u)):u=i.fn(o,...r)),u===null){console.warn(`因${i.fn?i.fn.name:null}方法返回值为「null」,钩子中断执行。`,i);break}}return o}tapPromise(t){if(t&&(ua(t)||ep(t))){const r={mode:"promise"};r.fn=t,this.items.push(r)}}removeTapPromise(t){this.removeTap(t)}}class sp{ignoreDismissCheck=!1;state=ut({okDisabled:!1,cancelDisabled:!1});hooks={shouldDismiss:new ha,beforeDismiss:new ha};ok;setOptions;constructor(t){t.dismiss&&(this._dismiss=t.dismiss),t.setOptions&&(this.setOptions=t.setOptions)}cancel;callback(t,r){t&&(this.ok=t),r&&(this.cancel=r)}_dismiss=t=>{console.warn("外部关闭能力未注册",t)};injectDismiss(t){this._dismiss=t}async dismiss(t={ok:!1,data:[]}){const r={};return this.ignoreDismissCheck!==!0&&await this.hooks.shouldDismiss.call(r),r.allowClose===!1?(console.warn("shouldDismiss结果为false,关闭中断。"),!1):(await this.hooks.beforeDismiss.call(t),this._dismiss(t),this.destroy(),!0)}destroy(){this.hooks.shouldDismiss.clear(),this.hooks.beforeDismiss.clear()}}N("Modal",sp);class Jn{constructor(t,r,o){this.component=t,this.render=r,this.opts=o,this._initPromise=this.init()}vm;modal;result;evt=new Zd;_initPromise;static async createVueApp(t,r){return console.error("没有注入createVueApp方法"),js(t,r)}async init(){const t=this,{render:r,opts:o}=this,u=document.createElement("div");document.body.appendChild(u);const n=await Jn.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(u),t.evt.emit("dismiss",t.result)},render(){return Ws(t.component,{ref:"root",opts:o,onDismiss(i){t.result=i,n.unmount()}},{default:r})}});n.mount(u),this.vm=n}async present(){return await this._initPromise,await Gs(),this.modal.present()}async dismiss(t){await this.modal.dismiss(t)}async onWillDismiss(){return new Promise(t=>{const r=o=>{t(o),this.evt.off("dismiss",r)};this.evt.on("dismiss",r)})}}N("OverlayContainer",Jn);function ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zn,da;function lp(){if(da)return Zn;da=1;function e(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function t(u,n){for(var i="",s=0,a=-1,l=0,c,f=0;f<=u.length;++f){if(f<u.length)c=u.charCodeAt(f);else{if(c===47)break;c=47}if(c===47){if(!(a===f-1||l===1))if(a!==f-1&&l===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==46||i.charCodeAt(i.length-2)!==46){if(i.length>2){var p=i.lastIndexOf("/");if(p!==i.length-1){p===-1?(i="",s=0):(i=i.slice(0,p),s=i.length-1-i.lastIndexOf("/")),a=f,l=0;continue}}else if(i.length===2||i.length===1){i="",s=0,a=f,l=0;continue}}n&&(i.length>0?i+="/..":i="..",s=2)}else i.length>0?i+="/"+u.slice(a+1,f):i=u.slice(a+1,f),s=f-a-1;a=f,l=0}else c===46&&l!==-1?++l:l=-1}return i}function r(u,n){var i=n.dir||n.root,s=n.base||(n.name||"")+(n.ext||"");return i?i===n.root?i+s:i+u+s:s}var o={resolve:function(){for(var n="",i=!1,s,a=arguments.length-1;a>=-1&&!i;a--){var l;a>=0?l=arguments[a]:(s===void 0&&(s=process.cwd()),l=s),e(l),l.length!==0&&(n=l+"/"+n,i=l.charCodeAt(0)===47)}return n=t(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(e(n),n.length===0)return".";var i=n.charCodeAt(0)===47,s=n.charCodeAt(n.length-1)===47;return n=t(n,!i),n.length===0&&!i&&(n="."),n.length>0&&s&&(n+="/"),i?"/"+n:n},isAbsolute:function(n){return e(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,i=0;i<arguments.length;++i){var s=arguments[i];e(s),s.length>0&&(n===void 0?n=s:n+="/"+s)}return n===void 0?".":o.normalize(n)},relative:function(n,i){if(e(n),e(i),n===i||(n=o.resolve(n),i=o.resolve(i),n===i))return"";for(var s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var a=n.length,l=a-s,c=1;c<i.length&&i.charCodeAt(c)===47;++c);for(var f=i.length,p=f-c,m=l<p?l:p,h=-1,g=0;g<=m;++g){if(g===m){if(p>m){if(i.charCodeAt(c+g)===47)return i.slice(c+g+1);if(g===0)return i.slice(c+g)}else l>m&&(n.charCodeAt(s+g)===47?h=g:g===0&&(h=0));break}var y=n.charCodeAt(s+g),w=i.charCodeAt(c+g);if(y!==w)break;y===47&&(h=g)}var b="";for(g=s+h+1;g<=a;++g)(g===a||n.charCodeAt(g)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+i.slice(c+h):(c+=h,i.charCodeAt(c)===47&&++c,i.slice(c))},_makeLong:function(n){return n},dirname:function(n){if(e(n),n.length===0)return".";for(var i=n.charCodeAt(0),s=i===47,a=-1,l=!0,c=n.length-1;c>=1;--c)if(i=n.charCodeAt(c),i===47){if(!l){a=c;break}}else l=!1;return a===-1?s?"/":".":s&&a===1?"//":n.slice(0,a)},basename:function(n,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');e(n);var s=0,a=-1,l=!0,c;if(i!==void 0&&i.length>0&&i.length<=n.length){if(i.length===n.length&&i===n)return"";var f=i.length-1,p=-1;for(c=n.length-1;c>=0;--c){var m=n.charCodeAt(c);if(m===47){if(!l){s=c+1;break}}else p===-1&&(l=!1,p=c+1),f>=0&&(m===i.charCodeAt(f)?--f===-1&&(a=c):(f=-1,a=p))}return s===a?a=p:a===-1&&(a=n.length),n.slice(s,a)}else{for(c=n.length-1;c>=0;--c)if(n.charCodeAt(c)===47){if(!l){s=c+1;break}}else a===-1&&(l=!1,a=c+1);return a===-1?"":n.slice(s,a)}},extname:function(n){e(n);for(var i=-1,s=0,a=-1,l=!0,c=0,f=n.length-1;f>=0;--f){var p=n.charCodeAt(f);if(p===47){if(!l){s=f+1;break}continue}a===-1&&(l=!1,a=f+1),p===46?i===-1?i=f:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===s+1?"":n.slice(i,a)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return r("/",n)},parse:function(n){e(n);var i={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return i;var s=n.charCodeAt(0),a=s===47,l;a?(i.root="/",l=1):l=0;for(var c=-1,f=0,p=-1,m=!0,h=n.length-1,g=0;h>=l;--h){if(s=n.charCodeAt(h),s===47){if(!m){f=h+1;break}continue}p===-1&&(m=!1,p=h+1),s===46?c===-1?c=h:g!==1&&(g=1):c!==-1&&(g=-1)}return c===-1||p===-1||g===0||g===1&&c===p-1&&c===f+1?p!==-1&&(f===0&&a?i.base=i.name=n.slice(1,p):i.base=i.name=n.slice(f,p)):(f===0&&a?(i.name=n.slice(1,c),i.base=n.slice(1,p)):(i.name=n.slice(f,c),i.base=n.slice(f,p)),i.ext=n.slice(c,p)),f>0?i.dir=n.slice(0,f-1):a&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};return o.posix=o,Zn=o,Zn}var up=lp();const pa=ap(up);class cp{constructor(t,r=!1){this.isDev=r,this.url=new URL(t),this.baseDir=pa.dirname(this.url.pathname)}baseDir;url;dir(t){return this.isDev===!0?t:this.url.origin+pa.resolve(this.baseDir,t)}}N("PluginStaticResource",cp);function Tr(){return fa(ur.TOKEN)}function ga(e){e?Qn(ur.TOKEN,e,7,!0):ca(ur.TOKEN,!0)}function ba(){return fa(ur.TENANT)}function fp(e){e?Qn(ur.TENANT,e,7,!0):ca(ur.TENANT,!0)}const hp=N("isMobile",(()=>{const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/,r=window.innerWidth<=768,o="ontouchstart"in window||navigator.maxTouchPoints>0;return t.test(e)||r&&o})());function ma(){return localStorage.getItem(nd)||"UTC+08:00"}function dp(e,t){return Vn(ar(e),t,(r,o)=>{if(typeof r=="object"&&typeof o=="object")return Vn(ar(r),o,(u,n)=>Array.isArray(u)?xs(u,n,Bs):void 0)})}function pp(e){const t=Vr.stringify(e,{encode:!0,delimiter:";"});return t?`;${t}`:""}function ya(e){return e.indexOf(";")===-1?{}:Vr.parse(e,{delimiter:";"})}const ei=[];for(let e=0;e<=15;e++)ei[e]=e.toString(16);function gp(){let e="";for(let t=1;t<=36;t++)t===9||t===14||t===19||t===24?e+="-":t===15?e+=4:t===20?e+=ei[Math.random()*4|8]:e+=ei[Math.random()*16|0];return e.replace(/-/g,"")}let va=0;function bp(e=""){e=e.replaceAll("-","");const t=Math.floor(Math.random()*1e9);return va++,e+"_"+t+va}const m_=N("uuid2",(e,t)=>{const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[];let u;if(t=t||r.length,e)for(u=0;u<e;u++)o[u]=r[0|Math.random()*t];else{let n;for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",u=0;u<36;u++)o[u]||(n=0|Math.random()*16,o[u]=r[u==19?n&3|8:n])}return o.join("")});function mp(e,t){return gt({get:()=>e.value,set:o=>{e.value=o,t(o)}})}function yp(e,t){const r=Object.keys(qt(e)?e.value:e),o={};return r.forEach(u=>{o[u]=gt({get:()=>(qt(e)?e.value:e)[u],set(n){(qt(e)?e.value:e)[u]=n,t(u,n)}})}),o}function vp(e,t){const r=Object.keys(qt(e)?e.value:e),o={};let u={};return r.forEach(n=>{o[n]=gt({get:()=>(u={},(qt(e)?e.value:e)[n]),set(i){const s=qt(e)?e.value:e;u[n]=i;const a={...s,...u};t(n,i,a)}})}),o}function _p(e){if(e==="nullpx")return{value:0,unit:"px"};const t=/^(\d+\.?\d*)([a-zA-Z%]+)$/,r=e.match(t);if(r)return{value:parseFloat(r[1]),unit:r[2]};throw new Error("Invalid value")}function Ep(e){const t=st();let r;const o=()=>{e.deep&&(r=Sr(()=>t.value,u=>{console.info("computedEx:属性或者值修改",u),e.set(u)},{deep:!0}))};return Sr(()=>e.get(),u=>{r&&r(),console.info("computedEx:获取新值,重新监听",u),t.value=u,o()},{immediate:!0}),t}function wp(e){const t=new Map;return function(...r){const o=JSON.stringify(r);if(t.has(o))return t.get(o);const u=e(...r);return t.set(o,u),u}}function _a(e){e.interceptors.request.use(t=>(t.headers||(t.headers=new qs),Object.assign(t.headers,{Token:Tr(),Source:hp?502:501,Lang:_gct.store.lang,"Tenant-Id":ba(),Timezone:ma()}),t))}var Ea="5.1.0";function Kr(e,t){return new Promise(r=>setTimeout(r,e,t))}function Sp(){return new Promise(e=>{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(null)})}function Ap(e,t=1/0){const{requestIdleCallback:r}=window;return r?new Promise(o=>r.call(window,()=>o(),{timeout:t})):Kr(Math.min(e,t))}function wa(e){return!!e&&typeof e.then=="function"}function Sa(e,t){try{const r=e();wa(r)?r.then(o=>t(!0,o),o=>t(!1,o)):t(!0,r)}catch(r){t(!1,r)}}async function Aa(e,t,r=16){const o=Array(e.length);let u=Date.now();for(let n=0;n<e.length;++n){o[n]=t(e[n],n);const i=Date.now();i>=u+r&&(u=i,await Sp())}return o}function Ir(e){return e.then(void 0,()=>{}),e}function Tp(e,t){for(let r=0,o=e.length;r<o;++r)if(e[r]===t)return!0;return!1}function Ip(e,t){return!Tp(e,t)}function ti(e){return parseInt(e)}function ct(e){return parseFloat(e)}function Tt(e,t){return typeof e=="number"&&isNaN(e)?t:e}function Ye(e){return e.reduce((t,r)=>t+(r?1:0),0)}function Ta(e,t=1){if(Math.abs(t)>=1)return Math.round(e/t)*t;{const r=1/t;return Math.round(e*r)/r}}function Rp(e){var t,r;const o=`Unexpected syntax '${e}'`,u=/^\s*([a-z-]*)(.*)$/i.exec(e),n=u[1]||void 0,i={},s=/([.:#][\w-]+|\[.+?\])/gi,a=(l,c)=>{i[l]=i[l]||[],i[l].push(c)};for(;;){const l=s.exec(u[2]);if(!l)break;const c=l[0];switch(c[0]){case".":a("class",c.slice(1));break;case"#":a("id",c.slice(1));break;case"[":{const f=/^\[([\w-]+)([~|^$*]?=("(.*?)"|([\w-]+)))?(\s+[is])?\]$/.exec(c);if(f)a(f[1],(r=(t=f[4])!==null&&t!==void 0?t:f[5])!==null&&r!==void 0?r:"");else throw new Error(o);break}default:throw new Error(o)}}return[n,i]}function Op(e){const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);if(o>127)return new TextEncoder().encode(e);t[r]=o}return t}function xt(e,t){const r=e[0]>>>16,o=e[0]&65535,u=e[1]>>>16,n=e[1]&65535,i=t[0]>>>16,s=t[0]&65535,a=t[1]>>>16,l=t[1]&65535;let c=0,f=0,p=0,m=0;m+=n+l,p+=m>>>16,m&=65535,p+=u+a,f+=p>>>16,p&=65535,f+=o+s,c+=f>>>16,f&=65535,c+=r+i,c&=65535,e[0]=c<<16|f,e[1]=p<<16|m}function at(e,t){const r=e[0]>>>16,o=e[0]&65535,u=e[1]>>>16,n=e[1]&65535,i=t[0]>>>16,s=t[0]&65535,a=t[1]>>>16,l=t[1]&65535;let c=0,f=0,p=0,m=0;m+=n*l,p+=m>>>16,m&=65535,p+=u*l,f+=p>>>16,p&=65535,p+=n*a,f+=p>>>16,p&=65535,f+=o*l,c+=f>>>16,f&=65535,f+=u*a,c+=f>>>16,f&=65535,f+=n*s,c+=f>>>16,f&=65535,c+=r*l+o*a+u*s+n*i,c&=65535,e[0]=c<<16|f,e[1]=p<<16|m}function cr(e,t){const r=e[0];t%=64,t===32?(e[0]=e[1],e[1]=r):t<32?(e[0]=r<<t|e[1]>>>32-t,e[1]=e[1]<<t|r>>>32-t):(t-=32,e[0]=e[1]<<t|r>>>32-t,e[1]=r<<t|e[1]>>>32-t)}function it(e,t){t%=64,t!==0&&(t<32?(e[0]=e[1]>>>32-t,e[1]=e[1]<<t):(e[0]=e[1]<<t-32,e[1]=0))}function Fe(e,t){e[0]^=t[0],e[1]^=t[1]}const Np=[4283543511,3981806797],Lp=[3301882366,444984403];function Ia(e){const t=[0,e[0]>>>1];Fe(e,t),at(e,Np),t[1]=e[0]>>>1,Fe(e,t),at(e,Lp),t[1]=e[0]>>>1,Fe(e,t)}const Xr=[2277735313,289559509],zr=[1291169091,658871167],Ra=[0,5],Mp=[0,1390208809],Pp=[0,944331445];function Cp(e,t){const r=Op(e);t=t||0;const o=[0,r.length],u=o[1]%16,n=o[1]-u,i=[0,t],s=[0,t],a=[0,0],l=[0,0];let c;for(c=0;c<n;c=c+16)a[0]=r[c+4]|r[c+5]<<8|r[c+6]<<16|r[c+7]<<24,a[1]=r[c]|r[c+1]<<8|r[c+2]<<16|r[c+3]<<24,l[0]=r[c+12]|r[c+13]<<8|r[c+14]<<16|r[c+15]<<24,l[1]=r[c+8]|r[c+9]<<8|r[c+10]<<16|r[c+11]<<24,at(a,Xr),cr(a,31),at(a,zr),Fe(i,a),cr(i,27),xt(i,s),at(i,Ra),xt(i,Mp),at(l,zr),cr(l,33),at(l,Xr),Fe(s,l),cr(s,31),xt(s,i),at(s,Ra),xt(s,Pp);a[0]=0,a[1]=0,l[0]=0,l[1]=0;const f=[0,0];switch(u){case 15:f[1]=r[c+14],it(f,48),Fe(l,f);case 14:f[1]=r[c+13],it(f,40),Fe(l,f);case 13:f[1]=r[c+12],it(f,32),Fe(l,f);case 12:f[1]=r[c+11],it(f,24),Fe(l,f);case 11:f[1]=r[c+10],it(f,16),Fe(l,f);case 10:f[1]=r[c+9],it(f,8),Fe(l,f);case 9:f[1]=r[c+8],Fe(l,f),at(l,zr),cr(l,33),at(l,Xr),Fe(s,l);case 8:f[1]=r[c+7],it(f,56),Fe(a,f);case 7:f[1]=r[c+6],it(f,48),Fe(a,f);case 6:f[1]=r[c+5],it(f,40),Fe(a,f);case 5:f[1]=r[c+4],it(f,32),Fe(a,f);case 4:f[1]=r[c+3],it(f,24),Fe(a,f);case 3:f[1]=r[c+2],it(f,16),Fe(a,f);case 2:f[1]=r[c+1],it(f,8),Fe(a,f);case 1:f[1]=r[c],Fe(a,f),at(a,Xr),cr(a,31),at(a,zr),Fe(i,a)}return Fe(i,o),Fe(s,o),xt(i,s),xt(s,i),Ia(i),Ia(s),xt(i,s),xt(s,i),("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}function Dp(e){var t;return{name:e.name,message:e.message,stack:(t=e.stack)===null||t===void 0?void 0:t.split(`
|
|
374
|
+
`),...e}}function kp(e){return/^function\s.*?\{\s*\[native code]\s*}$/.test(String(e))}function Up(e){return typeof e!="function"}function xp(e,t){const r=Ir(new Promise(o=>{const u=Date.now();Sa(e.bind(null,t),(...n)=>{const i=Date.now()-u;if(!n[0])return o(()=>({error:n[1],duration:i}));const s=n[1];if(Up(s))return o(()=>({value:s,duration:i}));o(()=>new Promise(a=>{const l=Date.now();Sa(s,(...c)=>{const f=i+Date.now()-l;if(!c[0])return a({error:c[1],duration:f});a({value:c[1],duration:f})})}))})}));return function(){return r.then(u=>u())}}function Bp(e,t,r,o){const u=Object.keys(e).filter(i=>Ip(r,i)),n=Ir(Aa(u,i=>xp(e[i],t),o));return async function(){const s=await n,a=await Aa(s,f=>Ir(f()),o),l=await Promise.all(a),c={};for(let f=0;f<u.length;++f)c[u[f]]=l[f];return c}}function Oa(){const e=window,t=navigator;return Ye(["MSCSSMatrix"in e,"msSetImmediate"in e,"msIndexedDB"in e,"msMaxTouchPoints"in t,"msPointerEnabled"in t])>=4}function Fp(){const e=window,t=navigator;return Ye(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!Oa()}function Rr(){const e=window,t=navigator;return Ye(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,(t.vendor||"").indexOf("Google")===0,"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function ft(){const e=window,t=navigator;return Ye(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,t.vendor.indexOf("Apple")===0,"RGBColor"in e,"WebKitMediaKeys"in e])>=4}function ri(){const e=window,{HTMLElement:t,Document:r}=e;return Ye(["safari"in e,!("ongestureend"in e),!("TouchEvent"in e),!("orientation"in e),t&&!("autocapitalize"in t.prototype),r&&"pointerLockElement"in r.prototype])>=4}function Or(){const e=window;return kp(e.print)&&String(e.browser)==="[object WebPageNamespace]"}function Nr(){var e,t;const r=window;return Ye(["buildID"in navigator,"MozAppearance"in((t=(e=document.documentElement)===null||e===void 0?void 0:e.style)!==null&&t!==void 0?t:{}),"onmozfullscreenchange"in r,"mozInnerScreenX"in r,"CSSMozDocumentRule"in r,"CanvasCaptureMediaStream"in r])>=4}function jp(){const e=window,t=navigator,{CSS:r}=e;return Ye(["userActivation"in t,r.supports("color","light-dark(#000, #fff)"),r.supports("height","1lh"),"globalPrivacyControl"in t])>=3}function Na(){const{CSS:e}=window;return Ye([e.supports("selector(::details-content)"),e.supports("selector(::before::marker)"),e.supports("selector(::after::marker)"),!("locale"in CompositionEvent.prototype)])>=3}function Wp(){const e=window;return Ye([!("MediaSettingsRange"in e),"RTCEncodedAudioFrame"in e,""+e.Intl=="[object Intl]",""+e.Reflect=="[object Reflect]"])>=3}function Gp(){const e=window,{URLPattern:t}=e;return Ye(["union"in Set.prototype,"Iterator"in e,t&&"hasRegExpGroups"in t.prototype,"RGB8"in WebGLRenderingContext.prototype])>=3}function Hp(){const e=window;return Ye(["DOMRectList"in e,"RTCPeerConnectionIceEvent"in e,"SVGGeometryElement"in e,"ontransitioncancel"in e])>=3}function Lr(){const e=window,t=navigator,{CSS:r,HTMLButtonElement:o}=e;return Ye([!("getStorageUpdates"in t),o&&"popover"in o.prototype,"CSSCounterStyleRule"in e,r.supports("font-size-adjust: ex-height 0.5"),r.supports("text-transform: full-width")])>=4}function Vp(){if(navigator.platform==="iPad")return!0;const e=screen,t=e.width/e.height;return Ye(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}function $p(){const e=document;return e.fullscreenElement||e.msFullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||null}function qp(){const e=document;return(e.exitFullscreen||e.msExitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen).call(e)}function ni(){const e=Rr(),t=Nr(),r=window,o=navigator,u="connection";return e?Ye([!("SharedWorker"in r),o[u]&&"ontypechange"in o[u],!("sinkId"in new Audio)])>=2:t?Ye(["onorientationchange"in r,"orientation"in r,/android/i.test(o.appVersion)])>=2:!1}function Yp(){const e=navigator,t=window,r=Audio.prototype,{visualViewport:o}=t;return Ye(["srLatency"in r,"srChannelCount"in r,"devicePosture"in e,o&&"segments"in o,"getTextInformation"in Image.prototype])>=3}function Kp(){return Qp()?-4:Xp()}function Xp(){const e=window,t=e.OfflineAudioContext||e.webkitOfflineAudioContext;if(!t)return-2;if(zp())return-1;const r=4500,o=5e3,u=new t(1,o,44100),n=u.createOscillator();n.type="triangle",n.frequency.value=1e4;const i=u.createDynamicsCompressor();i.threshold.value=-50,i.knee.value=40,i.ratio.value=12,i.attack.value=0,i.release.value=.25,n.connect(i),i.connect(u.destination),n.start(0);const[s,a]=Jp(u),l=Ir(s.then(c=>Zp(c.getChannelData(0).subarray(r)),c=>{if(c.name==="timeout"||c.name==="suspended")return-3;throw c}));return()=>(a(),l)}function zp(){return ft()&&!ri()&&!Hp()}function Qp(){return ft()&&Lr()&&Or()||Rr()&&Yp()&&Gp()}function Jp(e){let n=()=>{};return[new Promise((s,a)=>{let l=!1,c=0,f=0;e.oncomplete=h=>s(h.renderedBuffer);const p=()=>{setTimeout(()=>a(La("timeout")),Math.min(500,f+5e3-Date.now()))},m=()=>{try{const h=e.startRendering();switch(wa(h)&&Ir(h),e.state){case"running":f=Date.now(),l&&p();break;case"suspended":document.hidden||c++,l&&c>=3?a(La("suspended")):setTimeout(m,500);break}}catch(h){a(h)}};m(),n=()=>{l||(l=!0,f>0&&p())}}),n]}function Zp(e){let t=0;for(let r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function La(e){const t=new Error(e);return t.name=e,t}async function Ma(e,t,r=50){var o,u,n;const i=document;for(;!i.body;)await Kr(r);const s=i.createElement("iframe");try{for(await new Promise((a,l)=>{let c=!1;const f=()=>{c=!0,a()},p=g=>{c=!0,l(g)};s.onload=f,s.onerror=p;const{style:m}=s;m.setProperty("display","block","important"),m.position="absolute",m.top="0",m.left="0",m.visibility="hidden",t&&"srcdoc"in s?s.srcdoc=t:s.src="about:blank",i.body.appendChild(s);const h=()=>{var g,y;c||(((y=(g=s.contentWindow)===null||g===void 0?void 0:g.document)===null||y===void 0?void 0:y.readyState)==="complete"?f():setTimeout(h,10))};h()});!(!((u=(o=s.contentWindow)===null||o===void 0?void 0:o.document)===null||u===void 0)&&u.body);)await Kr(r);return await e(s,s.contentWindow)}finally{(n=s.parentNode)===null||n===void 0||n.removeChild(s)}}function eg(e){const[t,r]=Rp(e),o=document.createElement(t??"div");for(const u of Object.keys(r)){const n=r[u].join(" ");u==="style"?tg(o.style,n):o.setAttribute(u,n)}return o}function tg(e,t){for(const r of t.split(";")){const o=/^\s*([\w-]+)\s*:\s*(.+?)(\s*!([\w-]+))?\s*$/.exec(r);if(o){const[,u,n,,i]=o;e.setProperty(u,n,i||"")}}}function rg(){let e=window;for(;;){const t=e.parent;if(!t||t===e)return!1;try{if(t.location.origin!==e.location.origin)return!0}catch(r){if(r instanceof Error&&r.name==="SecurityError")return!0;throw r}e=t}}const ng="mmMwWLliI0O&1",ig="48px",fr=["monospace","sans-serif","serif"],Pa=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"];function og(){return Ma(async(e,{document:t})=>{const r=t.body;r.style.fontSize=ig;const o=t.createElement("div");o.style.setProperty("visibility","hidden","important");const u={},n={},i=m=>{const h=t.createElement("span"),{style:g}=h;return g.position="absolute",g.top="0",g.left="0",g.fontFamily=m,h.textContent=ng,o.appendChild(h),h},s=(m,h)=>i(`'${m}',${h}`),a=()=>fr.map(i),l=()=>{const m={};for(const h of Pa)m[h]=fr.map(g=>s(h,g));return m},c=m=>fr.some((h,g)=>m[g].offsetWidth!==u[h]||m[g].offsetHeight!==n[h]),f=a(),p=l();r.appendChild(o);for(let m=0;m<fr.length;m++)u[fr[m]]=f[m].offsetWidth,n[fr[m]]=f[m].offsetHeight;return Pa.filter(m=>c(p[m]))})}function sg(){const e=navigator.plugins;if(!e)return;const t=[];for(let r=0;r<e.length;++r){const o=e[r];if(!o)continue;const u=[];for(let n=0;n<o.length;++n){const i=o[n];u.push({type:i.type,suffixes:i.suffixes})}t.push({name:o.name,description:o.description,mimeTypes:u})}return t}function ag(){return lg(gg())}function lg(e){let t=!1,r,o;const[u,n]=ug();return cg(u,n)?(t=fg(n),e?r=o="skipped":[r,o]=hg(u,n)):r=o="unsupported",{winding:t,geometry:r,text:o}}function ug(){const e=document.createElement("canvas");return e.width=1,e.height=1,[e,e.getContext("2d")]}function cg(e,t){return!!(t&&e.toDataURL)}function fg(e){return e.rect(0,0,10,10),e.rect(2,2,6,6),!e.isPointInPath(5,5,"evenodd")}function hg(e,t){dg(e,t);const r=ii(e),o=ii(e);return r!==o?["unstable","unstable"]:(pg(e,t),[ii(e),r])}function dg(e,t){e.width=240,e.height=60,t.textBaseline="alphabetic",t.fillStyle="#f60",t.fillRect(100,1,62,20),t.fillStyle="#069",t.font='11pt "Times New Roman"';const r="Cwm fjordbank gly 😃";t.fillText(r,2,15),t.fillStyle="rgba(102, 204, 0, 0.2)",t.font="18pt Arial",t.fillText(r,4,45)}function pg(e,t){e.width=122,e.height=110,t.globalCompositeOperation="multiply";for(const[r,o,u]of[["#f2f",40,40],["#2ff",80,40],["#ff2",60,80]])t.fillStyle=r,t.beginPath(),t.arc(o,u,40,0,Math.PI*2,!0),t.closePath(),t.fill();t.fillStyle="#f9c",t.arc(60,60,60,0,Math.PI*2,!0),t.arc(60,60,20,0,Math.PI*2,!0),t.fill("evenodd")}function ii(e){return e.toDataURL()}function gg(){const e=ft()&&Lr()&&Or(),t=Nr()&&jp();return e||t}function bg(){const e=navigator;let t=0,r;e.maxTouchPoints!==void 0?t=ti(e.maxTouchPoints):e.msMaxTouchPoints!==void 0&&(t=e.msMaxTouchPoints);try{document.createEvent("TouchEvent"),r=!0}catch{r=!1}const o="ontouchstart"in window;return{maxTouchPoints:t,touchEvent:r,touchStart:o}}function mg(){return navigator.oscpu}function yg(){const e=navigator,t=[],r=e.language||e.userLanguage||e.browserLanguage||e.systemLanguage;if(r!==void 0&&t.push([r]),Array.isArray(e.languages))Rr()&&Wp()||t.push(e.languages);else if(typeof e.languages=="string"){const o=e.languages;o&&t.push(o.split(","))}return t}function vg(){return window.screen.colorDepth}function _g(){return Tt(ct(navigator.deviceMemory),void 0)}function Eg(){if(!(ft()&&Lr()&&Or()))return wg()}function wg(){const e=screen,t=o=>Tt(ti(o),null),r=[t(e.width),t(e.height)];return r.sort().reverse(),r}const Sg=2500,Ag=10;let Qr,oi;function Tg(){if(oi!==void 0)return;const e=()=>{const t=si();ai(t)?oi=setTimeout(e,Sg):(Qr=t,oi=void 0)};e()}function Ig(){return Tg(),async()=>{let e=si();if(ai(e)){if(Qr)return[...Qr];$p()&&(await qp(),e=si())}return ai(e)||(Qr=e),e}}function Rg(){const e=ft()&&Lr()&&Or(),t=Nr()&&Na();if(e||t)return()=>Promise.resolve(void 0);const r=Ig();return async()=>{const o=await r(),u=n=>n===null?null:Ta(n,Ag);return[u(o[0]),u(o[1]),u(o[2]),u(o[3])]}}function si(){const e=screen;return[Tt(ct(e.availTop),null),Tt(ct(e.width)-ct(e.availWidth)-Tt(ct(e.availLeft),0),null),Tt(ct(e.height)-ct(e.availHeight)-Tt(ct(e.availTop),0),null),Tt(ct(e.availLeft),null)]}function ai(e){for(let t=0;t<4;++t)if(e[t])return!1;return!0}function Og(){const e=Ng();return e!==void 0&&Nr()&&Na()?e>=8?8:4:e}function Ng(){return Tt(ti(navigator.hardwareConcurrency),void 0)}function Lg(){var e;const t=(e=window.Intl)===null||e===void 0?void 0:e.DateTimeFormat;if(t){const o=new t().resolvedOptions().timeZone;if(o)return o}const r=-Mg();return`UTC${r>=0?"+":""}${r}`}function Mg(){const e=new Date().getFullYear();return Math.max(ct(new Date(e,0,1).getTimezoneOffset()),ct(new Date(e,6,1).getTimezoneOffset()))}function Pg(){try{return!!window.sessionStorage}catch{return!0}}function Cg(){try{return!!window.localStorage}catch{return!0}}function Dg(){if(!(Oa()||Fp()))try{return!!window.indexedDB}catch{return!0}}function kg(){return!!window.openDatabase}function Ug(){return navigator.cpuClass}function xg(){const{platform:e}=navigator;return e==="MacIntel"&&ft()&&!ri()?Vp()?"iPad":"iPhone":e}function Bg(){return navigator.vendor||""}function Fg(){const e=[];for(const t of["chrome","safari","__crWeb","__gCrWeb","yandex","__yb","__ybro","__firefox__","__edgeTrackingPreventionStatistics","webkit","oprt","samsungAr","ucweb","UCShellJava","puffinDevice"]){const r=window[t];r&&typeof r=="object"&&e.push(t)}return e.sort()}function jg(){const e=document;try{e.cookie="cookietest=1; SameSite=Strict;";const t=e.cookie.indexOf("cookietest=")!==-1;return e.cookie="cookietest=1; SameSite=Strict; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch{return!1}}function Wg(){const e=atob;return{abpIndo:["#Iklan-Melayang","#Kolom-Iklan-728","#SidebarIklan-wrapper",'[title="ALIENBOLA" i]',e("I0JveC1CYW5uZXItYWRz")],abpvn:[".quangcao","#mobileCatfish",e("LmNsb3NlLWFkcw=="),'[id^="bn_bottom_fixed_"]',"#pmadv"],adBlockFinland:[".mainostila",e("LnNwb25zb3JpdA=="),".ylamainos",e("YVtocmVmKj0iL2NsaWNrdGhyZ2guYXNwPyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hcHAucmVhZHBlYWsuY29tL2FkcyJd")],adBlockPersian:["#navbar_notice_50",".kadr",'TABLE[width="140px"]',"#divAgahi",e("YVtocmVmXj0iaHR0cDovL2cxLnYuZndtcm0ubmV0L2FkLyJd")],adBlockWarningRemoval:["#adblock-honeypot",".adblocker-root",".wp_adblock_detect",e("LmhlYWRlci1ibG9ja2VkLWFk"),e("I2FkX2Jsb2NrZXI=")],adGuardAnnoyances:[".hs-sosyal","#cookieconsentdiv",'div[class^="app_gdpr"]',".as-oil",'[data-cypress="soft-push-notification-modal"]'],adGuardBase:[".BetterJsPopOverlay",e("I2FkXzMwMFgyNTA="),e("I2Jhbm5lcmZsb2F0MjI="),e("I2NhbXBhaWduLWJhbm5lcg=="),e("I0FkLUNvbnRlbnQ=")],adGuardChinese:[e("LlppX2FkX2FfSA=="),e("YVtocmVmKj0iLmh0aGJldDM0LmNvbSJd"),"#widget-quan",e("YVtocmVmKj0iLzg0OTkyMDIwLnh5eiJd"),e("YVtocmVmKj0iLjE5NTZobC5jb20vIl0=")],adGuardFrench:["#pavePub",e("LmFkLWRlc2t0b3AtcmVjdGFuZ2xl"),".mobile_adhesion",".widgetadv",e("LmFkc19iYW4=")],adGuardGerman:['aside[data-portal-id="leaderboard"]'],adGuardJapanese:["#kauli_yad_1",e("YVtocmVmXj0iaHR0cDovL2FkMi50cmFmZmljZ2F0ZS5uZXQvIl0="),e("Ll9wb3BJbl9pbmZpbml0ZV9hZA=="),e("LmFkZ29vZ2xl"),e("Ll9faXNib29zdFJldHVybkFk")],adGuardMobile:[e("YW1wLWF1dG8tYWRz"),e("LmFtcF9hZA=="),'amp-embed[type="24smi"]',"#mgid_iframe1",e("I2FkX2ludmlld19hcmVh")],adGuardRussian:[e("YVtocmVmXj0iaHR0cHM6Ly9hZC5sZXRtZWFkcy5jb20vIl0="),e("LnJlY2xhbWE="),'div[id^="smi2adblock"]',e("ZGl2W2lkXj0iQWRGb3hfYmFubmVyXyJd"),"#psyduckpockeball"],adGuardSocial:[e("YVtocmVmXj0iLy93d3cuc3R1bWJsZXVwb24uY29tL3N1Ym1pdD91cmw9Il0="),e("YVtocmVmXj0iLy90ZWxlZ3JhbS5tZS9zaGFyZS91cmw/Il0="),".etsy-tweet","#inlineShare",".popup-social"],adGuardSpanishPortuguese:["#barraPublicidade","#Publicidade","#publiEspecial","#queTooltip",".cnt-publi"],adGuardTrackingProtection:["#qoo-counter",e("YVtocmVmXj0iaHR0cDovL2NsaWNrLmhvdGxvZy5ydS8iXQ=="),e("YVtocmVmXj0iaHR0cDovL2hpdGNvdW50ZXIucnUvdG9wL3N0YXQucGhwIl0="),e("YVtocmVmXj0iaHR0cDovL3RvcC5tYWlsLnJ1L2p1bXAiXQ=="),"#top100counter"],adGuardTurkish:["#backkapat",e("I3Jla2xhbWk="),e("YVtocmVmXj0iaHR0cDovL2Fkc2Vydi5vbnRlay5jb20udHIvIl0="),e("YVtocmVmXj0iaHR0cDovL2l6bGVuemkuY29tL2NhbXBhaWduLyJd"),e("YVtocmVmXj0iaHR0cDovL3d3dy5pbnN0YWxsYWRzLm5ldC8iXQ==")],bulgarian:[e("dGQjZnJlZW5ldF90YWJsZV9hZHM="),"#ea_intext_div",".lapni-pop-over","#xenium_hot_offers"],easyList:[".yb-floorad",e("LndpZGdldF9wb19hZHNfd2lkZ2V0"),e("LnRyYWZmaWNqdW5reS1hZA=="),".textad_headline",e("LnNwb25zb3JlZC10ZXh0LWxpbmtz")],easyListChina:[e("LmFwcGd1aWRlLXdyYXBbb25jbGljayo9ImJjZWJvcy5jb20iXQ=="),e("LmZyb250cGFnZUFkdk0="),"#taotaole","#aafoot.top_box",".cfa_popup"],easyListCookie:[".ezmob-footer",".cc-CookieWarning","[data-cookie-number]",e("LmF3LWNvb2tpZS1iYW5uZXI="),".sygnal24-gdpr-modal-wrap"],easyListCzechSlovak:["#onlajny-stickers",e("I3Jla2xhbW5pLWJveA=="),e("LnJla2xhbWEtbWVnYWJvYXJk"),".sklik",e("W2lkXj0ic2tsaWtSZWtsYW1hIl0=")],easyListDutch:[e("I2FkdmVydGVudGll"),e("I3ZpcEFkbWFya3RCYW5uZXJCbG9jaw=="),".adstekst",e("YVtocmVmXj0iaHR0cHM6Ly94bHR1YmUubmwvY2xpY2svIl0="),"#semilo-lrectangle"],easyListGermany:["#SSpotIMPopSlider",e("LnNwb25zb3JsaW5rZ3J1ZW4="),e("I3dlcmJ1bmdza3k="),e("I3Jla2xhbWUtcmVjaHRzLW1pdHRl"),e("YVtocmVmXj0iaHR0cHM6Ly9iZDc0Mi5jb20vIl0=")],easyListItaly:[e("LmJveF9hZHZfYW5udW5jaQ=="),".sb-box-pubbliredazionale",e("YVtocmVmXj0iaHR0cDovL2FmZmlsaWF6aW9uaWFkcy5zbmFpLml0LyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hZHNlcnZlci5odG1sLml0LyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9hZmZpbGlhemlvbmlhZHMuc25haS5pdC8iXQ==")],easyListLithuania:[e("LnJla2xhbW9zX3RhcnBhcw=="),e("LnJla2xhbW9zX251b3JvZG9z"),e("aW1nW2FsdD0iUmVrbGFtaW5pcyBza3lkZWxpcyJd"),e("aW1nW2FsdD0iRGVkaWt1b3RpLmx0IHNlcnZlcmlhaSJd"),e("aW1nW2FsdD0iSG9zdGluZ2FzIFNlcnZlcmlhaS5sdCJd")],estonian:[e("QVtocmVmKj0iaHR0cDovL3BheTRyZXN1bHRzMjQuZXUiXQ==")],fanboyAnnoyances:["#ac-lre-player",".navigate-to-top","#subscribe_popup",".newsletter_holder","#back-top"],fanboyAntiFacebook:[".util-bar-module-firefly-visible"],fanboyEnhancedTrackers:[".open.pushModal","#issuem-leaky-paywall-articles-zero-remaining-nag","#sovrn_container",'div[class$="-hide"][zoompage-fontsize][style="display: block;"]',".BlockNag__Card"],fanboySocial:["#FollowUs","#meteored_share","#social_follow",".article-sharer",".community__social-desc"],frellwitSwedish:[e("YVtocmVmKj0iY2FzaW5vcHJvLnNlIl1bdGFyZ2V0PSJfYmxhbmsiXQ=="),e("YVtocmVmKj0iZG9rdG9yLXNlLm9uZWxpbmsubWUiXQ=="),"article.category-samarbete",e("ZGl2LmhvbGlkQWRz"),"ul.adsmodern"],greekAdBlock:[e("QVtocmVmKj0iYWRtYW4ub3RlbmV0LmdyL2NsaWNrPyJd"),e("QVtocmVmKj0iaHR0cDovL2F4aWFiYW5uZXJzLmV4b2R1cy5nci8iXQ=="),e("QVtocmVmKj0iaHR0cDovL2ludGVyYWN0aXZlLmZvcnRobmV0LmdyL2NsaWNrPyJd"),"DIV.agores300","TABLE.advright"],hungarian:["#cemp_doboz",".optimonk-iframe-container",e("LmFkX19tYWlu"),e("W2NsYXNzKj0iR29vZ2xlQWRzIl0="),"#hirdetesek_box"],iDontCareAboutCookies:['.alert-info[data-block-track*="CookieNotice"]',".ModuleTemplateCookieIndicator",".o--cookies--container","#cookies-policy-sticky","#stickyCookieBar"],icelandicAbp:[e("QVtocmVmXj0iL2ZyYW1ld29yay9yZXNvdXJjZXMvZm9ybXMvYWRzLmFzcHgiXQ==")],latvian:[e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiAxMjBweDsgaGVpZ2h0OiA0MHB4OyBvdmVyZmxvdzogaGlkZGVuOyBwb3NpdGlvbjogcmVsYXRpdmU7Il0="),e("YVtocmVmPSJodHRwOi8vd3d3LnNhbGlkemluaS5sdi8iXVtzdHlsZT0iZGlzcGxheTogYmxvY2s7IHdpZHRoOiA4OHB4OyBoZWlnaHQ6IDMxcHg7IG92ZXJmbG93OiBoaWRkZW47IHBvc2l0aW9uOiByZWxhdGl2ZTsiXQ==")],listKr:[e("YVtocmVmKj0iLy9hZC5wbGFuYnBsdXMuY28ua3IvIl0="),e("I2xpdmVyZUFkV3JhcHBlcg=="),e("YVtocmVmKj0iLy9hZHYuaW1hZHJlcC5jby5rci8iXQ=="),e("aW5zLmZhc3R2aWV3LWFk"),".revenue_unit_item.dable"],listeAr:[e("LmdlbWluaUxCMUFk"),".right-and-left-sponsers",e("YVtocmVmKj0iLmFmbGFtLmluZm8iXQ=="),e("YVtocmVmKj0iYm9vcmFxLm9yZyJd"),e("YVtocmVmKj0iZHViaXp6bGUuY29tL2FyLz91dG1fc291cmNlPSJd")],listeFr:[e("YVtocmVmXj0iaHR0cDovL3Byb21vLnZhZG9yLmNvbS8iXQ=="),e("I2FkY29udGFpbmVyX3JlY2hlcmNoZQ=="),e("YVtocmVmKj0id2Vib3JhbWEuZnIvZmNnaS1iaW4vIl0="),".site-pub-interstitiel",'div[id^="crt-"][data-criteo-id]'],officialPolish:["#ceneo-placeholder-ceneo-12",e("W2hyZWZePSJodHRwczovL2FmZi5zZW5kaHViLnBsLyJd"),e("YVtocmVmXj0iaHR0cDovL2Fkdm1hbmFnZXIudGVjaGZ1bi5wbC9yZWRpcmVjdC8iXQ=="),e("YVtocmVmXj0iaHR0cDovL3d3dy50cml6ZXIucGwvP3V0bV9zb3VyY2UiXQ=="),e("ZGl2I3NrYXBpZWNfYWQ=")],ro:[e("YVtocmVmXj0iLy9hZmZ0cmsuYWx0ZXgucm8vQ291bnRlci9DbGljayJd"),e("YVtocmVmXj0iaHR0cHM6Ly9ibGFja2ZyaWRheXNhbGVzLnJvL3Ryay9zaG9wLyJd"),e("YVtocmVmXj0iaHR0cHM6Ly9ldmVudC4ycGVyZm9ybWFudC5jb20vZXZlbnRzL2NsaWNrIl0="),e("YVtocmVmXj0iaHR0cHM6Ly9sLnByb2ZpdHNoYXJlLnJvLyJd"),'a[href^="/url/"]'],ruAd:[e("YVtocmVmKj0iLy9mZWJyYXJlLnJ1LyJd"),e("YVtocmVmKj0iLy91dGltZy5ydS8iXQ=="),e("YVtocmVmKj0iOi8vY2hpa2lkaWtpLnJ1Il0="),"#pgeldiz",".yandex-rtb-block"],thaiAds:["a[href*=macau-uta-popup]",e("I2Fkcy1nb29nbGUtbWlkZGxlX3JlY3RhbmdsZS1ncm91cA=="),e("LmFkczMwMHM="),".bumq",".img-kosana"],webAnnoyancesUltralist:["#mod-social-share-2","#social-tools",e("LmN0cGwtZnVsbGJhbm5lcg=="),".zergnet-recommend",".yt.btn-link.btn-md.btn"]}}async function Gg({debug:e}={}){if(!Hg())return;const t=Wg(),r=Object.keys(t),o=[].concat(...r.map(i=>t[i])),u=await Vg(o);e&&$g(t,u);const n=r.filter(i=>{const s=t[i];return Ye(s.map(l=>u[l]))>s.length*.6});return n.sort(),n}function Hg(){return ft()||ni()}async function Vg(e){var t;const r=document,o=r.createElement("div"),u=new Array(e.length),n={};Ca(o);for(let i=0;i<e.length;++i){const s=eg(e[i]);s.tagName==="DIALOG"&&s.show();const a=r.createElement("div");Ca(a),a.appendChild(s),o.appendChild(a),u[i]=s}for(;!r.body;)await Kr(50);r.body.appendChild(o);try{for(let i=0;i<e.length;++i)u[i].offsetParent||(n[e[i]]=!0)}finally{(t=o.parentNode)===null||t===void 0||t.removeChild(o)}return n}function Ca(e){e.style.setProperty("visibility","hidden","important"),e.style.setProperty("display","block","important")}function $g(e,t){let r="DOM blockers debug:\n```";for(const o of Object.keys(e)){r+=`
|
|
375
|
+
${o}:`;for(const u of e[o])r+=`
|
|
376
|
+
${t[u]?"🚫":"➡️"} ${u}`}console.log(`${r}
|
|
377
|
+
\`\`\``)}function qg(){for(const e of["rec2020","p3","srgb"])if(matchMedia(`(color-gamut: ${e})`).matches)return e}function Yg(){if(Da("inverted"))return!0;if(Da("none"))return!1}function Da(e){return matchMedia(`(inverted-colors: ${e})`).matches}function Kg(){if(ka("active"))return!0;if(ka("none"))return!1}function ka(e){return matchMedia(`(forced-colors: ${e})`).matches}const Xg=100;function zg(){if(matchMedia("(min-monochrome: 0)").matches){for(let e=0;e<=Xg;++e)if(matchMedia(`(max-monochrome: ${e})`).matches)return e;throw new Error("Too high value")}}function Qg(){if(hr("no-preference"))return 0;if(hr("high")||hr("more"))return 1;if(hr("low")||hr("less"))return-1;if(hr("forced"))return 10}function hr(e){return matchMedia(`(prefers-contrast: ${e})`).matches}function Jg(){if(Ua("reduce"))return!0;if(Ua("no-preference"))return!1}function Ua(e){return matchMedia(`(prefers-reduced-motion: ${e})`).matches}function Zg(){if(xa("reduce"))return!0;if(xa("no-preference"))return!1}function xa(e){return matchMedia(`(prefers-reduced-transparency: ${e})`).matches}function eb(){if(Ba("high"))return!0;if(Ba("standard"))return!1}function Ba(e){return matchMedia(`(dynamic-range: ${e})`).matches}const ke=Math,Je=()=>0;function tb(){const e=ke.acos||Je,t=ke.acosh||Je,r=ke.asin||Je,o=ke.asinh||Je,u=ke.atanh||Je,n=ke.atan||Je,i=ke.sin||Je,s=ke.sinh||Je,a=ke.cos||Je,l=ke.cosh||Je,c=ke.tan||Je,f=ke.tanh||Je,p=ke.exp||Je,m=ke.expm1||Je,h=ke.log1p||Je,g=R=>ke.pow(ke.PI,R),y=R=>ke.log(R+ke.sqrt(R*R-1)),w=R=>ke.log(R+ke.sqrt(R*R+1)),b=R=>ke.log((1+R)/(1-R))/2,E=R=>ke.exp(R)-1/ke.exp(R)/2,T=R=>(ke.exp(R)+1/ke.exp(R))/2,v=R=>ke.exp(R)-1,A=R=>(ke.exp(2*R)-1)/(ke.exp(2*R)+1),S=R=>ke.log(1+R);return{acos:e(.12312423423423424),acosh:t(1e308),acoshPf:y(1e154),asin:r(.12312423423423424),asinh:o(1),asinhPf:w(1),atanh:u(.5),atanhPf:b(.5),atan:n(.5),sin:i(-1e300),sinh:s(1),sinhPf:E(1),cos:a(10.000000000123),cosh:l(1),coshPf:T(1),tan:c(-1e300),tanh:f(1),tanhPf:A(1),exp:p(1),expm1:m(1),expm1Pf:v(1),log1p:h(10),log1pPf:S(10),powPI:g(-100)}}const rb="mmMwWLliI0fiflO&1",li={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};function nb(){return ib((e,t)=>{const r={},o={};for(const u of Object.keys(li)){const[n={},i=rb]=li[u],s=e.createElement("span");s.textContent=i,s.style.whiteSpace="nowrap";for(const a of Object.keys(n)){const l=n[a];l!==void 0&&(s.style[a]=l)}r[u]=s,t.append(e.createElement("br"),s)}for(const u of Object.keys(li))o[u]=r[u].getBoundingClientRect().width;return o})}function ib(e,t=4e3){return Ma((r,o)=>{const u=o.document,n=u.body,i=n.style;i.width=`${t}px`,i.webkitTextSizeAdjust=i.textSizeAdjust="none",Rr()?n.style.zoom=`${1/o.devicePixelRatio}`:ft()&&(n.style.zoom="reset");const s=u.createElement("div");return s.textContent=[...Array(t/20<<0)].map(()=>"word").join(" "),n.appendChild(s),e(u,n)},'<!doctype html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">')}function ob(){return navigator.pdfViewerEnabled}function sb(){const e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function ab(){const{ApplePaySession:e}=window;if(typeof e?.canMakePayments!="function")return-1;if(lb())return-3;try{return e.canMakePayments()?1:0}catch(t){return ub(t)}}const lb=rg;function ub(e){if(e instanceof Error&&e.name==="InvalidAccessError"&&/\bfrom\b.*\binsecure\b/i.test(e.message))return-2;throw e}function cb(){var e;const t=document.createElement("a"),r=(e=t.attributionSourceId)!==null&&e!==void 0?e:t.attributionsourceid;return r===void 0?void 0:String(r)}const Fa=-1,ja=-2,fb=new Set([10752,2849,2884,2885,2886,2928,2929,2930,2931,2932,2960,2961,2962,2963,2964,2965,2966,2967,2968,2978,3024,3042,3088,3089,3106,3107,32773,32777,32777,32823,32824,32936,32937,32938,32939,32968,32969,32970,32971,3317,33170,3333,3379,3386,33901,33902,34016,34024,34076,3408,3410,3411,3412,3413,3414,3415,34467,34816,34817,34818,34819,34877,34921,34930,35660,35661,35724,35738,35739,36003,36004,36005,36347,36348,36349,37440,37441,37443,7936,7937,7938]),hb=new Set([34047,35723,36063,34852,34853,34854,34229,36392,36795,38449]),db=["FRAGMENT_SHADER","VERTEX_SHADER"],pb=["LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT"],Wa="WEBGL_debug_renderer_info",gb="WEBGL_polygon_mode";function bb({cache:e}){var t,r,o,u,n,i;const s=Ga(e);if(!s)return Fa;if(!$a(s))return ja;const a=Va()?null:s.getExtension(Wa);return{version:((t=s.getParameter(s.VERSION))===null||t===void 0?void 0:t.toString())||"",vendor:((r=s.getParameter(s.VENDOR))===null||r===void 0?void 0:r.toString())||"",vendorUnmasked:a?(o=s.getParameter(a.UNMASKED_VENDOR_WEBGL))===null||o===void 0?void 0:o.toString():"",renderer:((u=s.getParameter(s.RENDERER))===null||u===void 0?void 0:u.toString())||"",rendererUnmasked:a?(n=s.getParameter(a.UNMASKED_RENDERER_WEBGL))===null||n===void 0?void 0:n.toString():"",shadingLanguageVersion:((i=s.getParameter(s.SHADING_LANGUAGE_VERSION))===null||i===void 0?void 0:i.toString())||""}}function mb({cache:e}){const t=Ga(e);if(!t)return Fa;if(!$a(t))return ja;const r=t.getSupportedExtensions(),o=t.getContextAttributes(),u=[],n=[],i=[],s=[],a=[];if(o)for(const c of Object.keys(o))n.push(`${c}=${o[c]}`);const l=Ha(t);for(const c of l){const f=t[c];i.push(`${c}=${f}${fb.has(f)?`=${t.getParameter(f)}`:""}`)}if(r)for(const c of r){if(c===Wa&&Va()||c===gb&&_b())continue;const f=t.getExtension(c);if(!f){u.push(c);continue}for(const p of Ha(f)){const m=f[p];s.push(`${p}=${m}${hb.has(m)?`=${t.getParameter(m)}`:""}`)}}for(const c of db)for(const f of pb){const p=yb(t,c,f);a.push(`${c}.${f}=${p.join(",")}`)}return s.sort(),i.sort(),{contextAttributes:n,parameters:i,shaderPrecisions:a,extensions:r,extensionParameters:s,unsupportedExtensions:u}}function Ga(e){if(e.webgl)return e.webgl.context;const t=document.createElement("canvas");let r;t.addEventListener("webglCreateContextError",()=>r=void 0);for(const o of["webgl","experimental-webgl"]){try{r=t.getContext(o)}catch{}if(r)break}return e.webgl={context:r},r}function yb(e,t,r){const o=e.getShaderPrecisionFormat(e[t],e[r]);return o?[o.rangeMin,o.rangeMax,o.precision]:[]}function Ha(e){return Object.keys(e.__proto__).filter(vb)}function vb(e){return typeof e=="string"&&!e.match(/[^A-Z0-9_x]/)}function Va(){return Nr()}function _b(){return Rr()||ft()}function $a(e){return typeof e.getParameter=="function"}function Eb(){if(!(ni()||ft()))return-2;if(!window.AudioContext)return-1;const t=new AudioContext().baseLatency;return t==null?-1:isFinite(t)?t:-3}function wb(){if(!window.Intl)return-1;const e=window.Intl.DateTimeFormat;if(!e)return-2;const t=e().resolvedOptions().locale;return!t&&t!==""?-3:t}const Sb={fonts:og,domBlockers:Gg,fontPreferences:nb,audio:Kp,screenFrame:Rg,canvas:ag,osCpu:mg,languages:yg,colorDepth:vg,deviceMemory:_g,screenResolution:Eg,hardwareConcurrency:Og,timezone:Lg,sessionStorage:Pg,localStorage:Cg,indexedDB:Dg,openDatabase:kg,cpuClass:Ug,platform:xg,plugins:sg,touchSupport:bg,vendor:Bg,vendorFlavors:Fg,cookiesEnabled:jg,colorGamut:qg,invertedColors:Yg,forcedColors:Kg,monochrome:zg,contrast:Qg,reducedMotion:Jg,reducedTransparency:Zg,hdr:eb,math:tb,pdfViewerEnabled:ob,architecture:sb,applePay:ab,privateClickMeasurement:cb,audioBaseLatency:Eb,dateTimeLocale:wb,webGlBasics:bb,webGlExtensions:mb};function Ab(e){return Bp(Sb,e,[])}const Tb="$ if upgrade to Pro: https://fingerprint.com/github/?utm_source=oss&utm_medium=referral&utm_campaign=confidence_score";function Ib(e){const t=Rb(e),r=Ob(t);return{score:t,comment:Tb.replace(/\$/g,`${r}`)}}function Rb(e){if(ni())return .4;if(ft())return ri()&&!(Lr()&&Or())?.5:.3;const t="value"in e.platform?e.platform.value:"";return/^Win/.test(t)?.6:/^Mac/.test(t)?.5:.7}function Ob(e){return Ta(.99+.01*e,1e-4)}function Nb(e){let t="";for(const r of Object.keys(e).sort()){const o=e[r],u="error"in o?"error":JSON.stringify(o.value);t+=`${t?"|":""}${r.replace(/([:|\\])/g,"\\$1")}:${u}`}return t}function qa(e){return JSON.stringify(e,(t,r)=>r instanceof Error?Dp(r):r,2)}function Ya(e){return Cp(Nb(e))}function Lb(e){let t;const r=Ib(e);return{get visitorId(){return t===void 0&&(t=Ya(this.components)),t},set visitorId(o){t=o},confidence:r,components:e,version:Ea}}function Mb(e=50){return Ap(e,e*2)}function Pb(e,t){const r=Date.now();return{async get(o){const u=Date.now(),n=await e(),i=Lb(n);return(t||o?.debug)&&console.log(`Copy the text below to get the debug data:
|
|
378
378
|
|
|
379
379
|
\`\`\`
|
|
380
|
-
version: ${
|
|
380
|
+
version: ${i.version}
|
|
381
381
|
userAgent: ${navigator.userAgent}
|
|
382
|
-
timeBetweenLoadAndGet: ${
|
|
383
|
-
visitorId: ${
|
|
384
|
-
components: ${
|
|
385
|
-
\`\`\``),s}}}function Oc(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{const e=new XMLHttpRequest;e.open("get",`https://m1.openfpcdn.io/fingerprintjs/v${nn}/npm-monitoring`,!0),e.send()}catch(e){console.error(e)}}async function Lc(e={}){const{delayFallback:t,debug:n,monitoring:i=!0}=e;i&&Oc(),await Ic(t);const a=Ec({cache:{},debug:n});return Nc(a,n)}var _c={load:Lc,hashComponents:Dn,componentsToDebugString:vn};const Mn="FINGERPRINT";function yn(){return typeof window<"u"&&typeof navigator<"u"}function pc(){if(!yn())return{type:"unknown",name:"unknown"};const e=navigator.userAgent;return/iPad|iPhone|iPod/i.test(e)?{type:"mobile",name:"iOS"}:/Android/i.test(e)?{type:"mobile",name:"Android"}:/Windows Phone/i.test(e)?{type:"mobile",name:"Windows Phone"}:/BlackBerry/i.test(e)?{type:"mobile",name:"BlackBerry"}:/Edg/i.test(e)?{type:"web",name:"Edge"}:/OPR|Opera/i.test(e)?{type:"web",name:"Opera"}:/Firefox/i.test(e)?{type:"web",name:"Firefox"}:/Chrome/i.test(e)?{type:"web",name:"Chrome"}:/Safari/i.test(e)?{type:"web",name:"Safari"}:{type:"unknown",name:"unknown"}}async function vc(){return(await _c.load()).get()}async function Qe(){if(!yn())return"unknown/unknown";const{type:e,name:t}=pc(),n=e==="web";if(n){const r=localStorage.getItem(Mn);if(r)return`${t}/${r}`}const a=(await vc()).visitorId;return n&&localStorage.setItem(Mn,a),`${t}/${a}`}function Cn(){let e=sessionStorage.getItem("currentPageTag");return e||(e=Date.now().toString(),sessionStorage.setItem("currentPageTag",e)),e}class P{static _DEFAULT_CONFIG={id:"id",children:"children",pid:"pid",deep:!0};static _getConfig(t){return Object.assign({},P._DEFAULT_CONFIG,t)}static listToTree(t,n={},i){const a=P._getConfig(n),r=new Map,s=[],{id:c,children:u,pid:f,deep:l}=a;for(const d of t){const E=d;l?E[u]=E[u]??void 0:E[u]=E[f]==="ROOT"?E[u]??[]:[],r.set(E[c],i(d))}for(const d of t){const E=d,m=r.get(E[f]);if(m){const T=m;T[u]||(T[u]=[]),T[u].push(i(d))}else s.push(i(d))}return s}static treeToList(t,n={}){const{children:i}=P._getConfig(n),a=[...t];for(let r=0;r<a.length;r++){const c=a[r][i];Array.isArray(c)&&a.splice(r+1,0,...c)}return a}static findNode(t,n,i={}){const{children:a}=P._getConfig(i),r=t?[...t]:[];for(const s of r){if(n(s))return s;const u=s[a];Array.isArray(u)&&r.push(...u)}return null}static findNodeAll(t,n,i={}){const{children:a}=P._getConfig(i),r=t?[...t]:[],s=[];for(const c of r){n(c)&&s.push(c);const f=c[a];Array.isArray(f)&&r.push(...f)}return s}static findPath(t,n,i={}){const{children:a}=P._getConfig(i),r=[],s=t?[...t]:[],c=new Set;for(;s.length;){const u=s[0];if(c.has(u))r.pop(),s.shift();else{c.add(u);const l=u[a];if(Array.isArray(l)&&s.unshift(...l),r.push(u),n(u))return r}}return null}static findClosestParent(t,n,i,a={}){const{id:r}=P._getConfig(a);return P.findPath(t,c=>c[r]===n,a)?.reverse().find(c=>i(c))}static list_to_tree(t,n){const i={},a=[];for(let r=0;r<t.length;r++){const s=t[r];i[s.id]=r,s.children=[]}for(const r of t)if(r.parentId==="ROOT"||!r.parentId)a.push(n(r));else{const s=r,c=i[r.parentId];c!==void 0&&t[c].children?.push(n(s))}return a}static getAllParentPath(t,n){return(P.findPath(t,a=>a.path===n)||[]).map(a=>a.path)}static traverseAndBuildTree(t,n,i={}){i=this._getConfig(i);const{children:a}=i;return t.map(r=>{const s=n(r)||r;return a&&r[a]&&r[a].length>0&&(s[a]=this.traverseAndBuildTree(r.children,n)),s})}static eachTree(t,n,i={}){t.forEach(a=>{const r=n(a,i)||a;a.children&&P.eachTree(a.children,n,r)})}}o("TreeHelper",P);const du=o("calcStyle",(e,t=[])=>{const n={},i=e.padding;i&&(i.top!=null&&i.top!=""&&!t.includes("paddingTop")&&(n["padding-top"]=i.top),i.right!=null&&i.right!=""&&!t.includes("paddingRight")&&(n["padding-right"]=i.right),i.bottom!=null&&i.bottom!=""&&!t.includes("paddingBottom")&&(n["padding-bottom"]=i.bottom),i.left!=null&&i.left!=""&&!t.includes("paddingLeft")&&(n["padding-left"]=i.left));const a=e.margin;a&&(a.top!=null&&a.top!=""&&!t.includes("marginTop")&&(n["margin-top"]=a.top),a.right!=null&&a.right!=""&&!t.includes("marginRight")&&(n["margin-right"]=a.right),a.bottom!=null&&a.bottom!=""&&!t.includes("marginBottom")&&(n["margin-bottom"]=a.bottom),a.left!=null&&a.left!=""&&!t.includes("marginLeft")&&(n["margin-left"]=a.left)),e.background!=null&&e.background!=""&&!t.includes("backgroundColor")&&(n["background-color"]=e.background),e.width!=null&&e.width!=""&&!t.includes("width")&&(n.width=e.width),e.height!=null&&e.height!=""&&!t.includes("height")&&(n.height=e.height,n.overflowX="hidden",n.overflowY="auto");const r=e.position;r&&(r.position!=null&&r.position!=""&&!t.includes("zIndex")&&(n.position=r.position,n["z-index"]=1),r.top!=null&&r.top!=""&&!t.includes("top")&&(n.top=`${r.top}px`),r.right!=null&&r.right!=""&&!t.includes("right")&&(n.right=`${r.right}px`),r.bottom!=null&&r.bottom!=""&&!t.includes("bottom")&&(n.bottom=`${r.bottom}px`),r.left!=null&&r.left!=""&&!t.includes("left")&&(n.left=`${r.left}px`));const s=e.border;return s&&(s.topLeftRadius!=null&&s.topLeftRadius!=""&&!t.includes("borderTopLeftRadius")&&(n["border-top-left-radius"]=s.topLeftRadius),s.topRightRadius!=null&&s.topRightRadius!=""&&!t.includes("borderTopRightRadius")&&(n["border-top-right-radius"]=s.topRightRadius),s.bottomLeftRadius!=null&&s.bottomLeftRadius!=""&&!t.includes("borderBottomLeftRadius")&&(n["border-bottom-left-radius"]=s.bottomLeftRadius),s.bottomRightRadius!=null&&s.bottomRightRadius!=""&&!t.includes("borderBottomRightRadius")&&(n["border-bottom-right-radius"]=s.bottomRightRadius),s.top&&(s.top.color!=null&&s.top.color!=""&&!t.includes("borderTopColor")&&(n["border-top-color"]=s.top.color),s.top.width!=null&&s.top.width!=""&&!t.includes("borderTopWidth")&&(n["border-top-width"]=s.top.width),s.top.style&&!t.includes("borderTopStyle")&&(n["border-top-style"]=s.top.style)),s.right&&(s.right.color!=null&&s.right.color!=""&&!t.includes("borderRightColor")&&(n["border-right-color"]=s.right.color),s.right.width!=null&&s.right.width!=""&&!t.includes("borderRightWidth")&&(n["border-right-width"]=s.right.width),s.right.style&&!t.includes("borderRightStyle")&&(n["border-right-style"]=s.right.style)),s.bottom&&(s.bottom.color!=null&&s.bottom.color!=""&&!t.includes("borderBottomColor")&&(n["border-bottom-color"]=s.bottom.color),s.bottom.width!=null&&s.bottom.width!=""&&!t.includes("borderBottomWidth")&&(n["border-bottom-width"]=s.bottom.width),s.bottom.style&&!t.includes("borderBottomStyle")&&(n["border-bottom-style"]=s.bottom.style)),s.left&&(s.left.color!=null&&s.left.color!=""&&!t.includes("borderLeftColor")&&(n["border-left-color"]=s.left.color),s.left.width!=null&&s.left.width!=""&&!t.includes("borderLeftWidth")&&(n["border-left-width"]=s.left.width),s.left.style&&!t.includes("borderLeftStyle")&&(n["border-left-style"]=s.left.style))),e.border_radius&&(n["border-radius"]=`${e.border_radius}px`),n}),uu=o("calcFontStyle",(e,t=[])=>{const n={},i=e.labelFont;return i&&(i.color!=null&&i.color!=""&&!t.includes("color")&&(n.color=i.color),i.fontSize!=null&&i.fontSize!=""&&!t.includes("fontSize")&&(n["font-size"]=i.fontSize),i.align&&!t.includes("textAlign")&&(n["text-align"]=i.align,n["text-align-last"]=i.align),i.bold===!0&&!t.includes("fontWeight")&&(n["font-weight"]="bold"),i.italic===!0&&!t.includes("fontStyle")&&(n["font-style"]="italic"),i.textDecoration&&!t.includes("textDecoration")&&(n["text-decoration"]=i.textDecoration)),n});function Un(e,t){let n=e;return Object.keys(t).forEach(i=>{n=n.replace(`{${i}}`,t[i]??""),n=n.replace(`{${i}?}`,t[i]??"")}),n=n.replace(/\/\{[a-z]+\?\}/g,""),n}function Dc(e,t){const{target:n="_blank",noopener:i=!0,noreferrer:a=!0,genUrlData:r,routePath:s="",optionStr:c=""}=t||{},u=[];i&&u.push("noopener=yes"),a&&u.push("noreferrer=yes");let f=e;r&&(f=Un(f,r)),s&&(f+=s);let l=u.join(",");return c&&(l=l?`${l},${c}`:c),window.open(f,n,l)}function Mc(e){switch(e){case h.TEXT:case h.INTEGER:case h.LONG:case h.DOUBLE:case h.DECIMAL:case h.DATE:case h.TIME:case h.DATE_TIME:case h.BOOLEAN:case h.USER:case h.USER_MULTI:case h.ORG:case h.ORG_MULTI:case h.ENUM:case h.ENUM_MULTI:case h.REF:case h.REF_MULTI:case h.RDO_REF:case h.EXPRESSION:case h.AGG:case h.SERIAL:case h.DOCUMENT_TEMPLATE:case h.PRINTER:case h.TRANSACTION:case h.MESSAGE_TMPL:case h.RANGE_USER:return!0;default:return!1}}const Se=o("randomUUID",(e=[],t)=>{const{needPrefix:n=!1,isString:i=!0,prefix:a="u_",length:r=8,chars:s="",numPref:c=!1}=t||{};let u="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";s==="capital&number"?u="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789":s==="lowercase&number"?u="abcdefghijklmnopqrstuvwxyz0123456789":s==="lowercase"&&(u="abcdefghijklmnopqrstuvwxyz");let f;for(;!f;){let l="";if(i){c&&(l+=Math.floor(Math.random()*9)+1);for(let d=0;d<r;d++)l+=u.charAt(Math.floor(Math.random()*u.length))}else l=`${n?a:""}${c?Math.floor(Math.random()*9)+1:""}${Math.random().toString(36).substr(2,r)}`;e.includes(l)||(f=l)}return f});Se.Generate=(e,t)=>{const n=Array.isArray(e)?e.concat():[];return{next:()=>{const i=Se(n,t);return n.push(i),i}}};function yc(e,t,n){const i="children",r=M(()=>e.value.reduce((f,l)=>{f.push(l);const d=l[i].map(E=>({...E,_pid_:l.id}));return f.push(...d),f},[])),s=M(()=>r.value.map(f=>f._pid_?f.key.replace(new RegExp(`^${he(t)}_*`),""):null).filter(f=>f));function c(f,l){return Se([...he(s),...f??[]],{...n,...l})}function u(f,l){return Se.Generate([...he(s),...f??[]],{...n,...l})}return{oldUUids:s,flatTableData:r,getUuid:c,getUuidGenerate:u}}const Cc=Q("global-store",{state(){return new yt},getters:{getProjectName(){return this.projectName},geLang(){return this.lang},getAppInfo(){return this.appInfo}},actions:{async init(){const e=location.pathname.split("/")[2];if(e){const t=qt(e);t&&(this.context=t)}},async loadAppInfo(){const e=await _api.apaas.designerCommon.getGetApp();this.appInfo=e},setProjectName(e){this.projectName=e},setLang(e){this.lang=e}}});class Pn{pinia=ft();store;constructor(){ht(this.pinia),this.store=Cc()}}o("GlobalStoreUtil",Pn);class wn{editors=new Map;providers=new Map;register(t,n){this.editors.set(t,n)}unregister(t){this.editors.delete(t)}get(t){if(this.providers.has(t))return this.providers.get(t);const n=this.editors.get(t);if(n){const i=n();return this.providers.set(t,i),i}return null}}o("EditorRegister",wn);class Fn{items=new Map;register(t,n){this.items.set(t,n)}unregister(t){this.items.delete(t)}create(t){const n=this.items.get(t);return n?n():null}}o("FormItemRegister",Fn);var Ie=o("EnvironmentType",(e=>(e.DEV="dev",e.TEST="test",e.PROD="prod",e))(Ie||{}));const Uc=o("IP_REG",/^http:\/\/\d{1,3}(\.\d{1,3}){3}:(\d{1,5})$/),Gn=o("HOST_REG",/^https?:\/\/([a-z0-9]+)-test\./),Pc=o("APP_RUN_PATH_REG",/\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//),wc=o("APP_PROD_PATH_REG",/\/web\/|\/web-single\//),Fc=o("APP_PREVIEW_PATH_REG",/\/web-render\//),Gc=o("DEV_SINGLE_PATH_REG",/\/dev-single\//),Bc=o("TEST_SINGLE_PATH_REG",/\/test-single\//);class Bn{_testEnv=!1;_testTenantData={};_platformOrigin;_isHostMode=!1;constructor(){this._platformOrigin=location.origin||"",this._isHostMode=Gn.test(this._platformOrigin)}get isAppRun(){return Pc.test(location.pathname)}get isAppProd(){return wc.test(location.pathname)}get isAppPreview(){return Fc.test(location.pathname)}get isDevSingleEnv(){return Gc.test(location.pathname)}get isTestEnv(){return Bc.test(location.pathname)||this._testEnv}get platformOrigin(){return this._platformOrigin}get isHostMode(){return this._isHostMode}get testTenantData(){return this._testTenantData}async checkIsTestEnv(){let t=null;if(this._isHostMode){if(t=this._platformOrigin.match(Gn),this._testEnv=!!(t&&t[1]),this._testEnv){const n=await _api.platform.tenant.getInfoByPortOrDomain({domain:t[1]});Object.assign(this._testTenantData,n)}}else{t=this._platformOrigin.match(Uc);const n=t&&t[2];if(n){const i=await _api.platform.tenant.getInfoByPortOrDomain({port:n});i&&(Object.assign(this._testTenantData,i),this._testEnv=i.testEnvPort===n)}}}getEnv(){return this.isTestEnv?Ie.TEST:this.isAppProd?Ie.PROD:Ie.DEV}}o("EnvironmentManager",Bn);class kn{i18n=It({legacy:!1,locale:"zh-CN",fallbackLocale:"en",messages:{en:{message:{hello:"hello world"}},ja:{message:{hello:"こんにちは、世界"}}}});locale="zh-CN";constructor(){this.init()}async init(){await this.loadLocales();const t=this.getMessageUrl({locale:this.locale});await this.loadMessages(t)}async loadLocales(){const t=await(await fetch("/gct-platform/api/i18n-config/list")).json();if(t.code===200){const n=t.data.find(i=>i.defaultLanguage);this.locale=n.languageTag}}async loadMessages(t,n=this.locale){const r=(await(await fetch(t)).text()).split(`
|
|
386
|
-
`).reduce((s,c)=>{const[u,...f]=c.split(":");return s[u]=f.join(":"),s},{});this.i18n.global.mergeLocaleMessage(n,r)}getMessageUrl(t){if("app"in t){const n=t.env==="dev"?`dev_${t.branch}`:t.env;return`minio/${t.app}/locale-js/${n}/${t.locale}__.json`}return`/minio/locale-js/${t.locale}__platform__.json`}}o("LocaleUtil",kn);function Hn(e){e.use(_gct.i18n)}const kc=[];class Hc{router;constructor(){this.router=Nt({history:Ot(),routes:kc})}async add(t){Array.isArray(t)?t.forEach(n=>this.add(n)):this.router.addRoute(t),await this.router.replace(this.router.currentRoute.value.fullPath)}}function Wc(e){e.use(_gct.router)}class Wn{i18nUtil=new kn;i18n=this.i18nUtil.i18n;storeUtil=new Pn;store=this.storeUtil.store;routerUtil=new Hc;router=this.routerUtil.router;message;dictionary=new Bt;env=new Bn;register={editor:new wn,formItem:new Fn};openUtil;async init(){await this.env.checkIsTestEnv(),await this.store.init()}}o("GctGlobal",Wn);class Vn{constructor(t){this.model=t,this.init()}evt=new Be;state=new Ue;item={};provider={};context={};params={};fields=[];modelMap={};init(){this.model.children&&this.initFormItems(this.model.children),this.initEvent(),this.calcState()}initEvent(){}calcState(){}initFormItems(t){t.forEach(n=>{let i=null;if((n.type==="item"||n.type==="hidden")&&(this.fields.push(n.name),this.modelMap[n.name]=n),n.type==="item"&&(i=_gct.register.formItem.create(`${n.type}___${n.editor.type}___${n.name}`),i||(i=_gct.register.formItem.create(`${n.type}___${n.editor.type}`))),i||(i=_gct.register.formItem.create(n.type)),!i){console.error(`未找到表单项提供者:${n.type}`,n);return}if(this.provider[n.name]=i,n.type==="item"){const a=n;this.item[a.name]=i.createController(this,a)}else if(n.type==="hidden"){const a=n;this.item[a.name]=i.createController(this,a)}else if(n.type==="container"||n.container){const a=n;this.item[n.name]=i.createController(this,a),a.children&&this.initFormItems(a.children)}})}calcHidden(){Object.keys(this.item).forEach(n=>{const i=this.item[n];if(i.model.hidden){const a=i.model.hidden(this,i,this.state.data);a!=null&&(i.state.visible=!a)}})}getData(){const t={};return this.fields.forEach(n=>{const i=this.item[n];i&&(i.state.visible===!0||i.model.type==="hidden")&&(t[i.key]=i.value)}),t}resetData(){this.fields.forEach(t=>{const n=this.item[t];n&&n.reset()})}async load(){try{if(!this.model.loadRequest)return{};this.state.loading=!0;const t=await this.model.loadRequest({id:this.context.id});return this.fields.forEach(n=>{const i=this.item[n];i&&(i.value=t[i.key]),i.defaultValue()}),this.state.loaded=!0,t}finally{this.state.loading=!1}}destroy(){this.state.destroyed=!0,this.evt.reset(),this.fields.forEach(t=>{const n=this.item[t];n&&n.destroy()})}validate(){return Promise.resolve(!0)}validateItem(t){return Promise.resolve(!0)}loaded(){this.calcHidden(),this.fields.forEach(t=>{this.item[t].defaultValue()}),this.calcState()}mounted(){}}o("GctFormController",Vn);class Vc extends Vn{initEvent(){super.initEvent(),this.evt.on("change",(t,n,i)=>{if(this.model.watch){const r=this.model.watch[t];r&&r(this,n,i)}const a=this.item[t];a&&a.model.watch&&a.model.watch(this,a,n,i),n!=i&&this.calcHidden(),this.model.autosave===!0&&this.state.loading===!1&&this.autoSave()})}autoSave(){return this.save()}save(){const t=this.getData();return this.state.isNew===!0&&this.model.newRequest?this.model.newRequest(t):this.model.updateRequest?this.model.updateRequest({id:this.context.id},t):Promise.resolve(t)}}o("EditFormController",Vc);function Xc(e){const t=e();return t.state=D(t.state),Me(()=>t.destroy()),t}class qe{model;constructor(t){this.model=t}}o("EditorController",qe);class Xn{constructor(t){this.model=t,this.init()}evt=new Be;context={};params={};state=new Ue;item={};provider={};load(){throw new Error("Method not implemented.")}loaded(){throw new Error("Method not implemented.")}destroy(){throw new Error("Method not implemented.")}validate(){throw new Error("Method not implemented.")}validateItem(t){throw new Error("Method not implemented.")}mounted(){throw new Error("Method not implemented.")}init(){this.model.children&&this.initFormItems(this.model.children),this.initEvent()}initEvent(){}initFormItems(t){t.forEach(n=>{let i=null;if(n.type==="item"&&(i=_gct.register.formItem.create(`${n.type}___${n.editor.type}___${n.name}`),i||(i=_gct.register.formItem.create(`${n.type}___${n.editor.type}`))),i||(i=_gct.register.formItem.create(n.type)),!i){console.error(`未找到表单项提供者:${n.type}`,n);return}if(this.provider[n.name]=i,n.type==="item"){const a=n;this.item[a.name]=i.createController(this,n)}else if(n.type==="container"){const a=n;this.item[n.name]=i.createController(this,n),a.children&&this.initFormItems(a.children)}})}getData(){return{}}resetData(){Object.keys(this.state.data).forEach(n=>{const i=this.state.data[n];i&&(typeof i=="object"?Array.isArray(i)?this.state.data[n]=[]:this.state.data[n]={}:this.state.data[n]=null)})}}o("FormController",Xn);function Yc(e){const t=new Xn(e);return t.state=D(t.state),t}class ${constructor(t,n){this.form=t,this.model=n,this.init()}state=this.crateItemState();get data(){return this.form.state.data}init(){}destroy(){this.state.destroyed=!0}crateItemState(){return new W}}o("FormItemBasicController",$);function jc(e){const t=e();return t.state=D(t.state),t}class Kc extends ${type="collapse-pane";crateItemState(){return new Ct}}o("FormCollapsePaneController",Kc);class $c extends ${type="collapse";crateItemState(){return new Ut}}o("FormCollapseController",$c);class Zc extends ${type="tab";crateItemState(){return new Pt}}o("FormTabController",Zc);class Jc extends ${type="tab-pane";crateItemState(){return new wt}}o("FormTabPaneController",Jc);class xc extends ${type="group";crateItemState(){return new Ft}}o("FormGroupController",xc);class et extends ${get key(){return this.model.field??this.model.name}get value(){return this.form.state.data[this.key]}set value(t){const n=Y(this.form.state.data[this.key]);this.form.state.data[this.key]=t,this.form.evt.emit("change",this.key,t,n),this.state.value=t}get editorValue(){return this.model.fields?this.model.fields.map(t=>this.form.item[t].value):this.value}set editorValue(t){this.model.fields?this.model.fields.forEach((n,i)=>{this.form.item[n].value=t?.[i]}):this.value=t}init(){if(super.init(),this.model.type!=="hidden"){const{editor:t}=this.model;this.state.readonly=t.readonly,t.disabled!=null&&(this.state.disabled=t.disabled)}if(this.model.dictionary){const{mode:t}=this.model.dictionary;t==="static"&&(this.state.options=this.model.dictionary.items||[])}}defaultValue(){this.form.state.data[this.key]===void 0&&this.model.defaultValue!==void 0&&(this.form.state.data[this.key]=this.model.defaultValue)}reset(){this.model.defaultValue!==void 0?this.value=this.model.defaultValue:this.value=void 0}blur(){console.warn("FormEditItemController.blur not implemented")}crateItemState(){return new Pe}}o("FormEditItemController",et);class zc extends et{type="item";async loadDictionary(t){if(this.state.options.length>0)return this.state.options;this.state.options=[],this.state.loading=!0;try{return this.model.dictionary?this.state.options=await _gct.dictionary.asyncGetByConfig(this.model.dictionary,t):this.model.dictionaryTag&&(this.state.options=await _gct.dictionary.asyncGet(this.model.dictionaryTag,t)),this.state.options}finally{this.state.loading=!1}}clearDictionary(){this.state.options=[]}blur(){console.warn("FormEditItemController.blur not implemented")}crateItemState(){return new Gt}}o("FormItemController",zc);class Qc extends et{type="hidden"}o("FormHiddenItemController",Qc);class qc extends qe{}o("LengthUnitEditorController",qc);class el extends qe{}o("ColorEditorController",el);function tl(){return ge(Vt)}function Yn(){return ge("formController")}function nl(e){let t=null;if(e){const i=Yn().item[e];i&&(t=M({get(){return i.value},set(a){typeof a=="string"&&(a=a.trim()),!(typeof a!="object"&&i.value==a)&&(i.value=a)}}))}else{let n=ye().proxy;const i=n.$props,a=n.$emit;t=M({get:()=>i.value,set:r=>{typeof r=="string"&&(r=r.trim()),!(typeof r!="object"&&i.value==r)&&a("update:value",r)}}),n=null}return t}function il(e,t){let n=ye().proxy;const i=n.$props,a=n.$emit,r=e?e.length:0,s=t?t.length:0,c=M({get:()=>{if(!i.value)return"";let u=i.value;return r>0&&u.startsWith(e)&&(u=u.substring(r)),s>0&&u.endsWith(t)&&(u=u.substring(0,u.length-s)),u},set:u=>{if(i.value===u)return;if(u==""){a("update:value","");return}let f=u;r>0&&(f=e+f),s>0&&(f=f+t),a("update:value",f)}});return n=null,c}function rl(e){const t=ge("modal");return t&&e&&(t.ok=e),t}function al(){const e=Rt({});return bt(()=>{const t=n=>{n.data?.type==="IFRAME_PROPS"&&(e.value=n.data.props)};window.addEventListener("message",t),window.parent.postMessage({type:"IFRAME_READY"},"*"),Me(()=>{window.removeEventListener("message",t)})}),M(()=>e.value)}function sl(){return M(()=>window.$wujie?.props||{})}function ol(){return M(()=>window.$wujie?.bus)}function jn(e){return typeof e<"u"}function cl(e){const t=C(e||""),n=C(!1),i=C(!1);return ae(t,a=>{jn(a)&&(i.value=!0,n.value=Kn(a))},{immediate:!!e,flush:"sync"}),{clipboardRef:t,isSuccessRef:n,copiedRef:i}}function Kn(e,{target:t=document.body}={}){const n=document.createElement("textarea"),i=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const a=document.getSelection();let r;a&&a.rangeCount>0&&(r=a.getRangeAt(0)),t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let s=!1;try{s=document.execCommand("copy")}catch(c){throw new Error(c)}return n.remove(),r&&a&&(a.removeAllRanges(),a.addRange(r)),i&&i.focus(),s}const Z={UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504};class ll{handle(t){console.error(t)}}class dl{handle(t){console.error(t)}}class ul{handle(t){if(t.type===k.AJAX){new $n().handle(t);return}console.error(t)}}class $n{handle(t){const n=this._extractStatusCode(t.message);if(n)switch(n){case Z.UNAUTHORIZED:this._handleUnauthorized();break;case Z.FORBIDDEN:this._handleForbidden();break;case Z.NOT_FOUND:this._handleNotFound();break;case Z.INTERNAL_SERVER_ERROR:case Z.BAD_GATEWAY:case Z.SERVICE_UNAVAILABLE:case Z.GATEWAY_TIMEOUT:this._handleServerError(n);break;default:this._handleGenericHttpError(t);break}else this._handleGenericHttpError(t)}_extractStatusCode(t){const n=t.match(/HTTP\s+(\d{3})|Business\s+Error\s+\[(\d+)\]/);return n?parseInt(n[1]||n[2],10):null}_handleGenericHttpError(t){t.message.includes("Business Error")?console.debug("Handling business error:",t.message):t.message.includes("Network")?console.debug("Handling network error:",t.message):console.debug("Handling HTTP error:",t.message)}_handleUnauthorized(){console.warn("Unauthorized access, redirecting to login...")}_handleForbidden(){console.warn("Access forbidden")}_handleNotFound(){console.warn("Resource not found")}_handleServerError(t){console.warn(`Server error: ${t}`)}}class tt{static _strategies=new Map;static init(){this.registerStrategy(k.SCRIPT,new ll),this.registerStrategy(k.VUE,new dl),this.registerStrategy(k.PROMISE,new ul),this.registerStrategy(k.AJAX,new $n)}static getStrategy(t){return this._strategies.get(t)}static registerStrategy(t,n){this._strategies.set(t,n)}}o("ErrorStrategyFactory",tt);class G{static _instance;constructor(){this._initializeStrategies()}static getInstance(){return G._instance||(G._instance=new G),G._instance}static init(){G.getInstance()}static handleVueError(t,n,i){const a={type:k.VUE,message:`Vue Error: ${t.message} | Info: ${i}`,stack:t.stack,timestamp:Date.now(),userAgent:navigator.userAgent};this._instance._processError(a)}static reportError(t,n=k.SCRIPT){const i={type:n,message:t.message,stack:t.stack,timestamp:Date.now(),userAgent:navigator.userAgent};this._instance._processError(i)}_initializeStrategies(){tt.init()}_processError(t){tt.getStrategy(t.type)?.handle(t)}}o("ErrorHandler",G);async function Zn(e){G.init(),e.config.errorHandler=(t,n,i)=>{G.handleVueError(t,n,i)},e.config.warnHandler=(t,n,i)=>{console.warn(`Vue Warning: ${t}`),i&&console.warn("Trace:",i)},window.addEventListener("error",t=>{G.reportError(new Error(t.message),k.SCRIPT)}),window.addEventListener("unhandledrejection",t=>{G.reportError(t.reason,k.PROMISE)})}var J=o("LoginSortTypeEnum",(e=>(e.SYSTEM="SYSTEM",e.THIRD_PARTY="THIRD_PARTY",e))(J||{})),I=o("LoginTypeEnum",(e=>(e.ACCOUNT="ACCOUNT",e.DOMAIN_ACCOUNT="DOMAIN_ACCOUNT",e.MOBILE="MOBILE",e.DINGDING="DINGDING",e.FEISHU="FEISHU",e.QIYEWEIXIN="QIYEWEIXIN",e))(I||{})),p=o("PlatformSettingEnum",(e=>(e.BASIC="BASE_CFG",e.WATERMARK="MARK_CFG",e.SECURITY="SECURITY_CFG",e.LOGIN="LOGIN_CFG",e.THEME="THEME_CFG",e.ORGANIZATION="ORG_CFG",e.APK="APK_CFG",e.DEPLOY="DEPLOY_CFG",e.GLOBAL="GLOBAL_CFG",e))(p||{})),fl=o("PassRule",(e=>(e.NUMBER="NUMBER",e.LOWERCASE="LOWERCASE",e.UPPERCASE="UPPERCASE",e.SPECHARS="SPECHARS",e))(fl||{})),hl=o("KickRuleEnum",(e=>(e.SAME_END="SAME_END",e.DIFFERENT_END="DIFFERENT_END",e))(hl||{})),nt=o("DeployModeEnum",(e=>(e.STANDARD="STANDARD",e.INDEPENDENT_APP="INDEPENDENT_APP",e))(nt||{}));const gl={[I.ACCOUNT]:{icon:"icon-a-Accountnumber",color:"#0E81EC"},[I.DOMAIN_ACCOUNT]:{icon:"icon-a-Domainaccount",color:"#FFAB06"},[I.MOBILE]:{icon:"icon-a-Cellphone",color:"#6A70FE"},[I.DINGDING]:{icon:"DingdingIcon"},[I.FEISHU]:{icon:"FeishuIcon"},[I.QIYEWEIXIN]:{icon:"QiyeweixinIcon"}},Jn=o("SYSTEM_LOGIN_KEYS",[I.ACCOUNT,I.DOMAIN_ACCOUNT,I.MOBILE]),xn=o("OTHER_LOGIN_KEYS",[I.DINGDING,I.FEISHU,I.QIYEWEIXIN]),Ne=o("getLoginTypeOptions",e=>e?e.map(t=>({id:t,label:t,value:t,...gl[t]})):[]),El=o("RELATION_FIELDS",[{label:"extString0_",value:"ext0",type:1},{label:"extString1_",value:"ext1",type:1},{label:"extString2_",value:"ext2",type:1},{label:"extString3_",value:"ext3",type:1},{label:"extString4_",value:"ext4",type:1},{label:"extInt5_",value:"ext5",type:0},{label:"extInt6_",value:"ext6",type:0},{label:"extInt7_",value:"ext7",type:0},{label:"extInt8_",value:"ext8",type:0},{label:"extInt9_",value:"ext9",type:0}]),ml=o("MENU_COLLAPSED_WIDTH",46),Tl=o("MENU_WIDTH_RANGE",[100,1e3]),Al=o("THEME_COLORS",["#026AC8","#0DAA9C"]),Rl=o("WATERMARK_INIT_DATA",{openWatermark:!1,watermarkContent:"custom",fontSize:16,color:"#000000",verticalAlign:"middle",textAlign:"center",text:"${username}",transparent:15,width:1600,height:1080}),Oe=D({copyright:'© 2016-<span class="ownInput">${当前年份}</span> 冠骋信息技术(苏州)有限公司 版权所有',description:"",icon:"",loadingImage:"",logo:"",name:"冠骋云PaaS平台",thumbnail:"",version:"暂未支持"});function bl(e=!0){const t=()=>e?_api.platform.plat.postBase(De({...Oe},"version")):_api.apaas.plat.postBase(De({...Oe},"version"));function n(i,a=!0){const{value:r}=i;if(r)try{Object.assign(Oe,a?JSON.parse(r):r,{version:(void 0).version})}catch(s){console.warn(s)}}return{basicSetting:Oe,setBasicSetting:n,postBasicSetting:t}}const it=D({deployMode:nt.STANDARD}),Sl=M(()=>it.deployMode===nt.INDEPENDENT_APP);function Il(e){const{value:t}=e;if(t)try{Object.assign(it,JSON.parse(t))}catch(n){console.warn(n)}}function Nl(){return{deploySetting:it,setDeploySetting:Il,isIndependentApp:Sl}}const rt=C([I.ACCOUNT]),at=C([]),st=C(Ne(Jn)),ot=C(Ne(xn)),B=D({theme:"full",title:"欢迎登录冠骋云PaaS平台",subtitle:"让数字化赋能客户成功!",logo:"",banner:"",loginModeConfigs:[],openIDOAuthConfigs:[],sortJson:"",defaultAuthType:I.ACCOUNT}),re=D(new Map([[I.ACCOUNT,{address:"",authType:I.ACCOUNT,relationField:"",enabled:0}],[I.DOMAIN_ACCOUNT,{address:"",authType:I.DOMAIN_ACCOUNT,relationField:"",domainSuffix:"",relationFieldName:"",enabled:0}],[I.MOBILE,{smsServiceProvider:"",smsKey:"",smsKeySecret:"",smsTemplateCode:"",smsSignName:"",phoneNumb:"",smsSdkAppId:"",authType:I.MOBILE,enabled:0}],[I.DINGDING,{appId:"",authType:I.DINGDING,secret:"",redirectURL:"",enabled:0}],[I.FEISHU,{appId:"",authType:I.FEISHU,secret:"",redirectURL:"",enabled:0}],[I.QIYEWEIXIN,{appId:"",agentId:"",authType:I.QIYEWEIXIN,secret:"",redirectURL:"",enabled:0,certFileName:""}]]));function Ol(){return{loginSetting:B,postLoginSetting:async()=>{[...rt.value,...at.value].forEach(i=>{const a=re.get(i);a&&(a.enabled=1)}),B.loginModeConfigs=Jn.map(i=>re.get(i)).filter(i=>i!==void 0),B.openIDOAuthConfigs=xn.map(i=>re.get(i)).filter(i=>i!==void 0),B.sortJson=JSON.stringify({[J.SYSTEM]:st.value.map(i=>i.id),[J.THIRD_PARTY]:ot.value.map(i=>i.id)}),await _api.platform.plat.postLogin(B)},setLoginSetting:n=>{if(n&&n.value){const i=JSON.parse(n.value);for(const r in i)r in B&&(B[r]=i[r]);if(fe(i,"sortJson")&&!pe(i.sortJson)){const r=JSON.parse(i.sortJson);fe(r,J.SYSTEM)&&(st.value=Ne(r[J.SYSTEM])),fe(r,J.THIRD_PARTY)&&(ot.value=Ne(r[J.THIRD_PARTY]))}B.loginModeConfigs?.forEach(r=>{re.set(r.authType,{...r,enabled:0})});const a=B.loginModeConfigs?.filter(r=>r.enabled).map(r=>r.authType)||[];a.push(I.ACCOUNT),rt.value=[...new Set(a)],B.openIDOAuthConfigs?.forEach(r=>{re.set(r.authType,{...r,enabled:0})}),at.value=B.openIDOAuthConfigs?.filter(r=>r.enabled).map(r=>r.authType)||[]}},loginModeAuthTypes:rt,openIDOAuthAuthTypes:at,sysLoginSort:st,openIDOAuthAuthSort:ot,loginModeConfig:re}}const x=D({initialPassword:"123456",initialSignPassword:"12345678",enableIdentifier:1,enableDeleteAccount:1,enableDeleteUser:0,requiredFields:[],supportLoginFields:["username_"],extFieldConfigs:[],orgExtFieldConfigs:[]}),ct=C([...El]),zn=C([]);function Ll(e=!0){const t=async()=>{const i=JSON.parse(JSON.stringify(x));e?await _api.platform.plat.postOrg(i):await _api.apaas.plat.postOrg(i)};function n(i){const{value:a}=i;if(a)try{const r=JSON.parse(a);for(const s in r)s=="supportLoginFields"&&(r.supportLoginFields=r.supportLoginFields.filter(c=>c!=="username_"));Object.assign(x,r),x.extFieldConfigs&&x.extFieldConfigs.length&&x.extFieldConfigs.forEach(s=>{ct.value=ct.value.filter(c=>(c.value==s.relationField&&zn.value.push(c),c.value!==s.relationField))}),x.extFieldConfigs=JSON.parse(JSON.stringify(r.extFieldConfigs))}catch(r){console.warn(r)}}return{orgSetting:x,setOrgSetting:n,postOrgSetting:t,relationFields:ct,relationFiledsCopy:zn}}const Le=D({durationHour:2,durationMinute:0,enableChangePassword:1,enableChangeSignPassword:0,enableSignPassword:0,enableKickOut:1,enablePassphrase:1,signEnablePassphrase:1,enableLockAccount:1,expiryDate:30,signExpiryDate:30,firstTimeChangePassword:0,signFirstTimeChangePassword:0,lockTimeout:0,loginKickOutMode:"SAME_END",maxErrorTimes:2,passMinLength:6,signPassMinLength:6,passRule:["NUMBER"],signPassRule:["NUMBER"],signRepeatNum:1,repeatNum:1,timeUnit:"DAYS",signTimeUnit:"DAYS",noOpRetainHour:8,noOpRetainMinute:0,earlyAlarmMinute:5,earlyAlarmSecond:0,inapplicablePerson:[],lockHourTimeout:0,lockMinTimeout:5});function _l(e=!0){const t=async()=>{e?await _api.platform.plat.postSecurity(Le):await _api.apaas.plat.postSecurity(Le)};function n(i){const{value:a}=i;if(a)try{Object.assign(Le,JSON.parse(a))}catch(r){console.warn(r)}}return{securitySetting:Le,postSecuritySetting:t,setSecuritySetting:n}}const _e=D({darkMode:"light",themeColor:"#026AC8",menuMode:"classic",menuWidth:232,menuCollapsible:!0,menuSearchable:!0,menuFilter:!1,showLogo:!0,showBreadcrumb:!1,showBreadcrumbIcon:!1,showTabs:!0,pageProgress:!0,pageLoading:!0,colorMode:"normal"}),lt=C(!1),pl=ml,vl=Tl,Dl=Al,Ml=()=>{_e.colorMode};ae(()=>_e.colorMode,e=>{e&&Ml()});function yl(){const e=async()=>{};function t(i){const{value:a}=i;if(a)try{Object.assign(_e,JSON.parse(a))}catch(r){console.warn(r)}}function n(){lt.value=!lt.value}return{themeSetting:_e,setThemeSetting:t,postThemeSetting:e,menuCollapsed:lt,toggleMenuCollapsed:n,menuCollapsedWidth:pl,menuWidthRange:vl,themeColors:Dl}}const dt=D({...Rl});function Cl(){const e=async()=>{const n=JSON.stringify(dt);await _api.platform.plat.postWatermark({value:n})};function t(n){const{value:i}=n;if(i)try{Object.assign(dt,JSON.parse(i))}catch(a){console.warn(a)}}return{watermarkSetting:dt,postWatermarkSetting:e,setWatermarkSetting:t}}const Qn=D({});function Ul(e){Object.assign(Qn,e)}function Pl(){return{projectSetting:Qn,setProjectConfig:Ul}}const wl=o("usePlatformConfigStore",Q("platform-config",()=>{const e=bl(),t=Ol(),n=Ll(),i=_l(),a=yl(),r=Cl(),s=Nl(),c=Pl();async function u(){const l=await _api.platform.plat.getList(),d={};l&&l.length>0&&l.forEach(E=>{if(E.value)try{d[E.configEnum]=JSON.parse(E.value)}catch(m){console.warn(`${E.configEnum}配置解析失败`,m,E)}}),d[p.BASIC]&&e.setBasicSetting(d[p.BASIC]),d[p.LOGIN]&&t.setLoginSetting(d[p.LOGIN]),d[p.ORGANIZATION]&&n.setOrgSetting(d[p.ORGANIZATION]),d[p.SECURITY]&&i.setSecuritySetting(d[p.SECURITY]),d[p.THEME]&&a.setThemeSetting(d[p.THEME]),d[p.WATERMARK]&&r.setWatermarkSetting(d[p.WATERMARK]),d[p.DEPLOY]&&s.setDeploySetting(d[p.DEPLOY]),console.debug("平台配置初始化完成",d)}async function f(){const l=await _api.apaas.basicConfig.getDetail({configEnum:p.THEME});l&&a.setThemeSetting(l)}return{init:u,renderInit:f,...e,...t,...n,...i,...a,...r,...s,...c}})),fu=o("useUserStore",Q("user",{state:()=>({userInfo:{},roleList:[],sessionTimeout:!1,lastUpdateTime:0}),getters:{getUserInfo(e){return e.userInfo}},actions:{async login(e,{hasError:t}={}){try{const n=await Fl(e,t),{token:i,signWay:a}=n;return sessionStorage.setItem("signWay",a),xt(i),this.afterLoginAction()}catch(n){return Promise.reject(n)}},async getUserInfoAction(e){if(!me&&!e)return null;const t=await _api.platform.user.getInfo({headers:{Token:e}});return this.setUserInfo(t),t},async afterLoginSingleApp(){},async afterLoginAction(){if(!me)return null},async logout(){await Gl()},async setUserInfo(e){this.userInfo={...e,minioDomain:"/minio"},this.lastUpdateTime=new Date().getTime()},async updateUserInfo(e){const t={...this.userInfo,...e};this.setUserInfo(t)}}}));async function Fl(e,{hasError:t=!0}={}){const n=await Qe();return await _api.platform.login.postSign(e,{headers:{browser:n,"Auth-Code":e.authCode,hasError:t}})}async function Gl(){const e=sessionStorage.getItem("currentPlatOrAppId"),t=_gct.env.getEnv(),n=await Qe(),i={appId:e&&JSON.parse(e).appId,platform:e&&JSON.parse(e).type,env:t},a=Cn();await _api.platform.login.getSignOut(i,{headers:{browser:n,pagetag:a}})}const hu=o("useTenantStore",Q("tenant",{state:()=>({tenantId:"",tenantUserInfo:{},tenantUserPermissions:{}}),actions:{setTenant(e){this.tenantId=e},async getTenantUserInfoAction(){if(!this.tenantId)return;const e=await _api.platform.tenant.getUserInfo();return this.tenantUserInfo=e,e}}})),gu=o("usePermissionStore",Q("permission",{state:()=>({userPermissions:{appSuperAdmin:0,permissions:{}}}),getters:{hasAllPermissions(e){return!!e.userPermissions.appSuperAdmin||!!e.userPermissions.permissions["POINT.*"]}},actions:{getPermissionByKey(e,t){if(this.hasAllPermissions)return!0;if(!t)return this.userPermissions.permissions[e];const n=`${e}.${t}`,i=`${e}.*`;return this.userPermissions.permissions[n]||this.userPermissions.permissions[i]},async initPermission(){const e=await _api.apaas.designerCommon.getUserInfo();Object.assign(this.userPermissions,{...e,permissions:Object.fromEntries((e?.permissions??[]).map(t=>[t,!0]))})}}}));async function Bl(e){e.provide(Vt,e),Hn(e),Wc(e)}async function kl(e){await Zn(e),Lt.use(tn),await _gct.init(),await wl().init()}function Hl(){if(window._gct){console.warn("核心包已安装,请勿重复安装!");return}console.info("核心包安装成功!"),window._gct=new Wn,Object.defineProperty(window._gct,"api",{get(){return Ce}}),Object.defineProperty(window,"_api",{get(){return Ce}})}Hl()})}}));
|
|
382
|
+
timeBetweenLoadAndGet: ${u-r}
|
|
383
|
+
visitorId: ${i.visitorId}
|
|
384
|
+
components: ${qa(n)}
|
|
385
|
+
\`\`\``),i}}}function Cb(){if(!(window.__fpjs_d_m||Math.random()>=.001))try{const e=new XMLHttpRequest;e.open("get",`https://m1.openfpcdn.io/fingerprintjs/v${Ea}/npm-monitoring`,!0),e.send()}catch(e){console.error(e)}}async function Db(e={}){const{delayFallback:t,debug:r,monitoring:o=!0}=e;o&&Cb(),await Mb(t);const u=Ab({cache:{},debug:r});return Pb(u,r)}var kb={load:Db,hashComponents:Ya,componentsToDebugString:qa};const Ka="FINGERPRINT";function Xa(){return typeof window<"u"&&typeof navigator<"u"}function Ub(){if(!Xa())return{type:"unknown",name:"unknown"};const e=navigator.userAgent;return/iPad|iPhone|iPod/i.test(e)?{type:"mobile",name:"iOS"}:/Android/i.test(e)?{type:"mobile",name:"Android"}:/Windows Phone/i.test(e)?{type:"mobile",name:"Windows Phone"}:/BlackBerry/i.test(e)?{type:"mobile",name:"BlackBerry"}:/Edg/i.test(e)?{type:"web",name:"Edge"}:/OPR|Opera/i.test(e)?{type:"web",name:"Opera"}:/Firefox/i.test(e)?{type:"web",name:"Firefox"}:/Chrome/i.test(e)?{type:"web",name:"Chrome"}:/Safari/i.test(e)?{type:"web",name:"Safari"}:{type:"unknown",name:"unknown"}}async function xb(){return(await kb.load()).get()}async function ui(){if(!Xa())return"unknown/unknown";const{type:e,name:t}=Ub(),r=e==="web";if(r){const n=localStorage.getItem(Ka);if(n)return`${t}/${n}`}const u=(await xb()).visitorId;return r&&localStorage.setItem(Ka,u),`${t}/${u}`}function za(){let e=sessionStorage.getItem("currentPageTag");return e||(e=Date.now().toString(),sessionStorage.setItem("currentPageTag",e)),e}class lt{static _DEFAULT_CONFIG={id:"id",children:"children",pid:"pid",deep:!0};static _getConfig(t){return Object.assign({},lt._DEFAULT_CONFIG,t)}static listToTree(t,r={},o){const u=lt._getConfig(r),n=new Map,i=[],{id:s,children:a,pid:l,deep:c}=u;for(const f of t){const p=f;c?p[a]=p[a]??void 0:p[a]=p[l]==="ROOT"?p[a]??[]:[],n.set(p[s],o(f))}for(const f of t){const p=f,m=n.get(p[l]);if(m){const h=m;h[a]||(h[a]=[]),h[a].push(o(f))}else i.push(o(f))}return i}static treeToList(t,r={}){const{children:o}=lt._getConfig(r),u=[...t];for(let n=0;n<u.length;n++){const s=u[n][o];Array.isArray(s)&&u.splice(n+1,0,...s)}return u}static findNode(t,r,o={}){const{children:u}=lt._getConfig(o),n=t?[...t]:[];for(const i of n){if(r(i))return i;const a=i[u];Array.isArray(a)&&n.push(...a)}return null}static findNodeAll(t,r,o={}){const{children:u}=lt._getConfig(o),n=t?[...t]:[],i=[];for(const s of n){r(s)&&i.push(s);const l=s[u];Array.isArray(l)&&n.push(...l)}return i}static findPath(t,r,o={}){const{children:u}=lt._getConfig(o),n=[],i=t?[...t]:[],s=new Set;for(;i.length;){const a=i[0];if(s.has(a))n.pop(),i.shift();else{s.add(a);const c=a[u];if(Array.isArray(c)&&i.unshift(...c),n.push(a),r(a))return n}}return null}static findClosestParent(t,r,o,u={}){const{id:n}=lt._getConfig(u);return lt.findPath(t,s=>s[n]===r,u)?.reverse().find(s=>o(s))}static list_to_tree(t,r){const o={},u=[];for(let n=0;n<t.length;n++){const i=t[n];o[i.id]=n,i.children=[]}for(const n of t)if(n.parentId==="ROOT"||!n.parentId)u.push(r(n));else{const i=n,s=o[n.parentId];s!==void 0&&t[s].children?.push(r(i))}return u}static getAllParentPath(t,r){return(lt.findPath(t,u=>u.path===r)||[]).map(u=>u.path)}static traverseAndBuildTree(t,r,o={}){o=this._getConfig(o);const{children:u}=o;return t.map(n=>{const i=r(n)||n;return u&&n[u]&&n[u].length>0&&(i[u]=this.traverseAndBuildTree(n.children,r)),i})}static eachTree(t,r,o={}){t.forEach(u=>{const n=r(u,o)||u;u.children&<.eachTree(u.children,r,n)})}}N("TreeHelper",lt);const y_=N("calcStyle",(e,t=[])=>{const r={},o=e.padding;o&&(o.top!=null&&o.top!=""&&!t.includes("paddingTop")&&(r["padding-top"]=o.top),o.right!=null&&o.right!=""&&!t.includes("paddingRight")&&(r["padding-right"]=o.right),o.bottom!=null&&o.bottom!=""&&!t.includes("paddingBottom")&&(r["padding-bottom"]=o.bottom),o.left!=null&&o.left!=""&&!t.includes("paddingLeft")&&(r["padding-left"]=o.left));const u=e.margin;u&&(u.top!=null&&u.top!=""&&!t.includes("marginTop")&&(r["margin-top"]=u.top),u.right!=null&&u.right!=""&&!t.includes("marginRight")&&(r["margin-right"]=u.right),u.bottom!=null&&u.bottom!=""&&!t.includes("marginBottom")&&(r["margin-bottom"]=u.bottom),u.left!=null&&u.left!=""&&!t.includes("marginLeft")&&(r["margin-left"]=u.left)),e.background!=null&&e.background!=""&&!t.includes("backgroundColor")&&(r["background-color"]=e.background),e.width!=null&&e.width!=""&&!t.includes("width")&&(r.width=e.width),e.height!=null&&e.height!=""&&!t.includes("height")&&(r.height=e.height,r.overflowX="hidden",r.overflowY="auto");const n=e.position;n&&(n.position!=null&&n.position!=""&&!t.includes("zIndex")&&(r.position=n.position,r["z-index"]=1),n.top!=null&&n.top!=""&&!t.includes("top")&&(r.top=`${n.top}px`),n.right!=null&&n.right!=""&&!t.includes("right")&&(r.right=`${n.right}px`),n.bottom!=null&&n.bottom!=""&&!t.includes("bottom")&&(r.bottom=`${n.bottom}px`),n.left!=null&&n.left!=""&&!t.includes("left")&&(r.left=`${n.left}px`));const i=e.border;return i&&(i.topLeftRadius!=null&&i.topLeftRadius!=""&&!t.includes("borderTopLeftRadius")&&(r["border-top-left-radius"]=i.topLeftRadius),i.topRightRadius!=null&&i.topRightRadius!=""&&!t.includes("borderTopRightRadius")&&(r["border-top-right-radius"]=i.topRightRadius),i.bottomLeftRadius!=null&&i.bottomLeftRadius!=""&&!t.includes("borderBottomLeftRadius")&&(r["border-bottom-left-radius"]=i.bottomLeftRadius),i.bottomRightRadius!=null&&i.bottomRightRadius!=""&&!t.includes("borderBottomRightRadius")&&(r["border-bottom-right-radius"]=i.bottomRightRadius),i.top&&(i.top.color!=null&&i.top.color!=""&&!t.includes("borderTopColor")&&(r["border-top-color"]=i.top.color),i.top.width!=null&&i.top.width!=""&&!t.includes("borderTopWidth")&&(r["border-top-width"]=i.top.width),i.top.style&&!t.includes("borderTopStyle")&&(r["border-top-style"]=i.top.style)),i.right&&(i.right.color!=null&&i.right.color!=""&&!t.includes("borderRightColor")&&(r["border-right-color"]=i.right.color),i.right.width!=null&&i.right.width!=""&&!t.includes("borderRightWidth")&&(r["border-right-width"]=i.right.width),i.right.style&&!t.includes("borderRightStyle")&&(r["border-right-style"]=i.right.style)),i.bottom&&(i.bottom.color!=null&&i.bottom.color!=""&&!t.includes("borderBottomColor")&&(r["border-bottom-color"]=i.bottom.color),i.bottom.width!=null&&i.bottom.width!=""&&!t.includes("borderBottomWidth")&&(r["border-bottom-width"]=i.bottom.width),i.bottom.style&&!t.includes("borderBottomStyle")&&(r["border-bottom-style"]=i.bottom.style)),i.left&&(i.left.color!=null&&i.left.color!=""&&!t.includes("borderLeftColor")&&(r["border-left-color"]=i.left.color),i.left.width!=null&&i.left.width!=""&&!t.includes("borderLeftWidth")&&(r["border-left-width"]=i.left.width),i.left.style&&!t.includes("borderLeftStyle")&&(r["border-left-style"]=i.left.style))),e.border_radius&&(r["border-radius"]=`${e.border_radius}px`),r}),v_=N("calcFontStyle",(e,t=[])=>{const r={},o=e.labelFont;return o&&(o.color!=null&&o.color!=""&&!t.includes("color")&&(r.color=o.color),o.fontSize!=null&&o.fontSize!=""&&!t.includes("fontSize")&&(r["font-size"]=o.fontSize),o.align&&!t.includes("textAlign")&&(r["text-align"]=o.align,r["text-align-last"]=o.align),o.bold===!0&&!t.includes("fontWeight")&&(r["font-weight"]="bold"),o.italic===!0&&!t.includes("fontStyle")&&(r["font-style"]="italic"),o.textDecoration&&!t.includes("textDecoration")&&(r["text-decoration"]=o.textDecoration)),r});function Qa(e,t){let r=e;return Object.keys(t).forEach(o=>{r=r.replace(`{${o}}`,t[o]??""),r=r.replace(`{${o}?}`,t[o]??"")}),r=r.replace(/\/\{[a-z]+\?\}/g,""),r}function Ja(e,t){const{target:r="_blank",noopener:o=!0,noreferrer:u=!0,genUrlData:n,routePath:i="",optionStr:s=""}=t||{},a=[];o&&a.push("noopener=yes"),u&&a.push("noreferrer=yes");let l=e;n&&(l=Qa(l,n)),i&&(l+=i);let c=a.join(",");return s&&(c=c?`${c},${s}`:s),window.open(l,r,c)}function Bb(e){switch(e){case me.TEXT:case me.INTEGER:case me.LONG:case me.DOUBLE:case me.DECIMAL:case me.DATE:case me.TIME:case me.DATE_TIME:case me.BOOLEAN:case me.USER:case me.USER_MULTI:case me.ORG:case me.ORG_MULTI:case me.ENUM:case me.ENUM_MULTI:case me.REF:case me.REF_MULTI:case me.RDO_REF:case me.EXPRESSION:case me.AGG:case me.SERIAL:case me.DOCUMENT_TEMPLATE:case me.PRINTER:case me.TRANSACTION:case me.MESSAGE_TMPL:case me.RANGE_USER:return!0;default:return!1}}const Jr=N("randomUUID",(e=[],t)=>{const{needPrefix:r=!1,isString:o=!0,prefix:u="u_",length:n=8,chars:i="",numPref:s=!1}=t||{};let a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";i==="capital&number"?a="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789":i==="lowercase&number"?a="abcdefghijklmnopqrstuvwxyz0123456789":i==="lowercase"&&(a="abcdefghijklmnopqrstuvwxyz");let l;for(;!l;){let c="";if(o){s&&(c+=Math.floor(Math.random()*9)+1);for(let f=0;f<n;f++)c+=a.charAt(Math.floor(Math.random()*a.length))}else c=`${r?u:""}${s?Math.floor(Math.random()*9)+1:""}${Math.random().toString(36).substr(2,n)}`;e.includes(c)||(l=c)}return l});Jr.Generate=(e,t)=>{const r=Array.isArray(e)?e.concat():[];return{next:()=>{const o=Jr(r,t);return r.push(o),o}}};function Fb(e,t,r){const o="children",n=gt(()=>e.value.reduce((l,c)=>{l.push(c);const f=c[o].map(p=>({...p,_pid_:c.id}));return l.push(...f),l},[])),i=gt(()=>n.value.map(l=>l._pid_?l.key.replace(new RegExp(`^${qr(t)}_*`),""):null).filter(l=>l));function s(l,c){return Jr([...qr(i),...l??[]],{...r,...c})}function a(l,c){return Jr.Generate([...qr(i),...l??[]],{...r,...c})}return{oldUUids:i,flatTableData:n,getUuid:s,getUuidGenerate:a}}const Za=N("validateEmoji",e=>{const t=/[\u{1F300}-\u{1F5FF}\u{1F600}-\u{1F64F}\u{1F680}-\u{1F6FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu,r=/\u{1F91D}\u{1F3FB}-\u{1F3FF}/u;return t.test(e)||r.test(e)}),jb=N("hasEmojiAndSpecStr",e=>Za(e)||/[*??::,,[\]【】#]/.test(e)),Wb=N("hasEmojiAndSpecStr1",e=>Za(e)||/[*??::,,[\]\\/【】#]/.test(e)),__=N("validateModelName",(e,t)=>jb(t)?Promise.reject(Ar("sys.model.modelNameError")):Promise.resolve()),E_=N("validateIsModelName",(e,t)=>Wb(t)?Promise.reject(Ar("sys.model.notModelNameError")):Promise.resolve());class Gb{static getFiles({multiple:t,acceptList:r}){const o=document.createElement("input");return o.type="file",o.multiple=!!t,o.accept=r||"*",o.click(),new Promise((u,n)=>{o.onchange=async()=>{const i=o.files||[];u(Object.values(i))},o.onerror=async()=>{n()}})}static async beforeUploadFun(t,{maxSize:r=5,acceptList:o=[],beforeUpload:u}){if(t.name.indexOf(",")>-1)return Promise.reject("文件名不能有逗号");if(u&&await u(t),t.size/1024/1024>r)return Promise.reject(`【${t.name}】文件大小不能超过 ${r}MB`);if(o.length){const i=t?.name?.replaceAll(" ","")?.match(/\.([A-Za-z0-9]+)$/)?.at(-1);if(!o.includes(`.${i?.toLocaleLowerCase()}`))return Promise.reject(`【${t.name}】支持的扩展名为${o.join(" ")}`)}}static async uploadByFile(t,r=!1,o){const u=new FormData;return u.append("file",t,t.name),"/"+await(r?Hb:Vb)(u,o)}static toBase64(t){return new Promise((r,o)=>{const u=new FileReader;u.onloadend=function(){r(u.result)},u.onerror=()=>o("转换失败"),t&&u.readAsDataURL(t)})}static compressToBase64(t,{quality:r=.8,scale:o=.8}={}){return new Promise((u,n)=>{if(!t.type.startsWith("image/")){n("请选择图片文件");return}if(typeof o!="number"||o<=0||o>1){n("缩放比例必须在0-1之间");return}const i=new FileReader;i.onload=s=>{const a=new Image;a.onload=()=>{const l=Math.floor(a.width*o),c=Math.floor(a.height*o),f=document.createElement("canvas");f.width=l,f.height=c;const p=f.getContext("2d");p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(a,0,0,l,c),u(f.toDataURL(t.type,r))},a.onerror=()=>n("图片加载失败"),a.src=s.target?.result},i.onerror=()=>n("文件读取失败"),i.readAsDataURL(t)})}}N("Uploader",Gb);async function Hb(e,t){return _api.apaas.fileResource.postUpload({...t?{modelKey:t}:{}},e,{headers:{"Content-Type":"multipart/form-data;charset=UTF-8"}})}async function Vb(e){return _api.apaas.file.postUploadImage({bucket:"IMAGE"},e,{headers:{"Content-Type":"multipart/form-data;charset=UTF-8"}})}function el(e){const t=e.split(","),o=t[0].match(/:(.*?);/)[1],u=window.atob(t[1]);let n=u.length;const i=new Uint8Array(n);for(;n>0;)n-=1,i[n]=u.charCodeAt(n);return new Blob([i],{type:o})}function tl(e,t){return new Promise((r,o)=>{let u=document.createElement("CANVAS");const n=u.getContext("2d"),i=new Image;i.crossOrigin="",i.onload=function(){if(!u||!n)return o();u.height=i.height,u.width=i.width,n.drawImage(i,0,0);const s=u.toDataURL(t||"image/png");u=null,r(s)},i.src=e})}function $b(e,t,r,o){tl(e).then(u=>{rl(u,t,r,o)})}function rl(e,t,r,o){const u=el(e);nl(u,{filename:t,mime:r,bom:o})}function qb({multiple:e=!1,accept:t="*"}={}){const r=document.createElement("input");return r.type="file",r.multiple=!!e,r.accept=t,r.click(),new Promise((o,u)=>{r.onchange=async()=>{const n=r.files||[];o(Object.values(n))},r.onerror=async()=>{u()}})}function nl(e,{filename:t="file",timestamp:r=!1,mime:o,bom:u}){if(r){const l=t.split(".").pop(),c=t.replace(/\.[^/.]+$/,""),f=Ys(new Date).format("YYYYMMDDHHmmss");t=`${c}${f}.${l}`}const n=typeof u<"u"?[u,e]:[e],i=new Blob(n,{type:o||"application/octet-stream"}),s=window.URL.createObjectURL(i),a=document.createElement("a");a.style.display="none",a.href=s,a.setAttribute("download",t),typeof a.download>"u"&&a.setAttribute("target","_blank"),document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(s)}function Yb({url:e,target:t="_blank",fileName:r}){const o=window.navigator.userAgent.toLowerCase().indexOf("chrome")>-1,u=window.navigator.userAgent.toLowerCase().indexOf("safari")>-1;if(/(iP)/g.test(window.navigator.userAgent))return console.error("Your browser does not support download!"),!1;if(o||u){const n=document.createElement("a");if(n.href=e,n.target=t,n.download!==void 0&&(n.download=r||e.substring(e.lastIndexOf("/")+1,e.length)),document.createEvent){const i=document.createEvent("MouseEvents");return i.initEvent("click",!0,!0),n.dispatchEvent(i),!0}}return e.indexOf("?")===-1&&(e+="?download"),Ja(e,{target:t}),!0}function Kb(e){const t=Fs(e,sd);return t.length>0&&t.length===e.length}class Xb{handlers=[];use(t){this.handlers.push(t)}getHandlers(){return this.handlers}}class zb{interceptors=new Xb;constructor(){this.interceptors.use(this.checkRole)}baseCheck(t){return console.log(t),!0}checkRole(){return!0}has(t){if(!t)return!0;const r=this.interceptors.getHandlers();for(const o of r)if(o(t)===!1)return!1;return this.baseCheck(t)}}const w_=N("permission",new zb),Qb=sr("global-store",{state(){return new Ud},getters:{getProjectName(){return this.projectName},geLang(){return this.lang},getAppInfo(){return this.appInfo},getEmptyDisplay(){return ta[this.globalSetting.emptyDisplay]}},actions:{async init(){const e=location.pathname.split("/")[2];if(e){const t=ya(e);t&&(this.context=t)}},async loadAppInfo(){const e=await _api.apaas.designerCommon.getGetApp();this.appInfo=e},async loadEmptySetting(){const{value:e}=await _gct.api.apaas.basicConfig.getDetail({configEnum:qe.GLOBAL});e&&Object.assign(this.globalSetting,JSON.parse(e))},setProjectName(e){this.projectName=e},setLang(e){this.lang=e}}});class il{pinia=ks();store;constructor(){Us(this.pinia),this.store=Qb()}}N("GlobalStoreUtil",il);var Zr=N("EnvironmentType",(e=>(e.DEV="dev",e.TEST="test",e.PROD="prod",e))(Zr||{}));const Jb=N("IP_REG",/^http:\/\/\d{1,3}(\.\d{1,3}){3}:(\d{1,5})$/),ol=N("HOST_REG",/^https?:\/\/([a-z0-9]+)-test\./),Zb=N("APP_RUN_PATH_REG",/\/web-render|\/web\/|web-single\/|dev-single\/|test-single\//),em=N("APP_PROD_PATH_REG",/\/web\/|\/web-single\//),tm=N("APP_PREVIEW_PATH_REG",/\/web-render\//),rm=N("DEV_SINGLE_PATH_REG",/\/dev-single\//),nm=N("TEST_SINGLE_PATH_REG",/\/test-single\//);class sl{_testEnv=!1;_testTenantData={};_platformOrigin;_isHostMode=!1;constructor(){this._platformOrigin=location.origin||"",this._isHostMode=ol.test(this._platformOrigin)}get isAppRun(){return Zb.test(location.pathname)}get isAppProd(){return em.test(location.pathname)}get isAppPreview(){return tm.test(location.pathname)}get isDevSingleEnv(){return rm.test(location.pathname)}get isTestEnv(){return nm.test(location.pathname)||this._testEnv}get platformOrigin(){return this._platformOrigin}get isHostMode(){return this._isHostMode}get testTenantData(){return this._testTenantData}async checkIsTestEnv(){let t=null;if(this._isHostMode){if(t=this._platformOrigin.match(ol),this._testEnv=!!(t&&t[1]),this._testEnv){const r=await _api.platform.tenant.getInfoByPortOrDomain({domain:t[1]});Object.assign(this._testTenantData,r)}}else{t=this._platformOrigin.match(Jb);const r=t&&t[2];if(r){const o=await _api.platform.tenant.getInfoByPortOrDomain({port:r});o&&(Object.assign(this._testTenantData,o),this._testEnv=o.testEnvPort===r)}}}getEnv(){return this.isTestEnv?Zr.TEST:this.isAppProd?Zr.PROD:Zr.DEV}}N("EnvironmentManager",sl);const en=N("MQTT_DEFAULT_CONNECT_OPTIONS",{keepalive:60,connectTimeout:3e4,reconnectPeriod:5e3,clean:!1}),Bt=N("MQTT_CLIENT_EVENT",{CONNECT:"connect",RECONNECT:"reconnect",DISCONNECT:"disconnect",ERROR:"error",MESSAGE:"message"});var Ze=N("MqttConnectionStatus",(e=>(e.CONNECTING="connecting",e.CONNECTED="connected",e.DISCONNECTING="disconnecting",e.DISCONNECTED="disconnected",e.RECONNECTING="reconnecting",e))(Ze||{})),ci=Object.defineProperty,im=Object.getOwnPropertyDescriptor,om=Object.getOwnPropertyNames,sm=Object.prototype.hasOwnProperty,rt=(e,t)=>()=>(e&&(t=e(e=0)),t),ge=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dr=(e,t)=>{for(var r in t)ci(e,r,{get:t[r],enumerable:!0})},am=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of om(t))!sm.call(e,u)&&u!==r&&ci(e,u,{get:()=>t[u],enumerable:!(o=im(t,u))||o.enumerable});return e},Ue=e=>am(ci({},"__esModule",{value:!0}),e),ue=rt(()=>{}),Be={};dr(Be,{_debugEnd:()=>$i,_debugProcess:()=>Vi,_events:()=>ao,_eventsCount:()=>lo,_exiting:()=>Li,_fatalExceptions:()=>Wi,_getActiveHandles:()=>dl,_getActiveRequests:()=>hl,_kill:()=>Ci,_linkedBinding:()=>cl,_maxListeners:()=>so,_preload_modules:()=>no,_rawDebug:()=>Ri,_startProfilerIdleNotifier:()=>qi,_stopProfilerIdleNotifier:()=>Yi,_tickCallback:()=>Hi,abort:()=>Qi,addListener:()=>uo,allowedNodeEnvironmentFlags:()=>Fi,arch:()=>di,argv:()=>bi,argv0:()=>ro,assert:()=>pl,binding:()=>Ei,browser:()=>Ii,chdir:()=>Ai,config:()=>Mi,cpuUsage:()=>Pr,cwd:()=>Si,debugPort:()=>to,default:()=>yo,dlopen:()=>fl,domain:()=>Ni,emit:()=>go,emitWarning:()=>_i,env:()=>gi,execArgv:()=>mi,execPath:()=>eo,exit:()=>xi,features:()=>ji,hasUncaughtExceptionCaptureCallback:()=>gl,hrtime:()=>tn,kill:()=>Ui,listeners:()=>ml,memoryUsage:()=>ki,moduleLoadList:()=>Oi,nextTick:()=>ll,off:()=>fo,on:()=>It,once:()=>co,openStdin:()=>Bi,pid:()=>Ji,platform:()=>pi,ppid:()=>Zi,prependListener:()=>bo,prependOnceListener:()=>mo,reallyExit:()=>Pi,release:()=>Ti,removeAllListeners:()=>po,removeListener:()=>ho,resourceUsage:()=>Di,setSourceMapsEnabled:()=>io,setUncaughtExceptionCaptureCallback:()=>Gi,stderr:()=>Xi,stdin:()=>zi,stdout:()=>Ki,title:()=>hi,umask:()=>wi,uptime:()=>bl,version:()=>yi,versions:()=>vi});function fi(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function lm(){!Kt||!Xt||(Kt=!1,Xt.length?mt=Xt.concat(mt):Mr=-1,mt.length&&al())}function al(){if(!Kt){var e=setTimeout(lm,0);Kt=!0;for(var t=mt.length;t;){for(Xt=mt,mt=[];++Mr<t;)Xt&&Xt[Mr].run();Mr=-1,t=mt.length}Xt=null,Kt=!1,clearTimeout(e)}}function ll(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];mt.push(new ul(e,t)),mt.length===1&&!Kt&&setTimeout(al,0)}function ul(e,t){this.fun=e,this.array=t}function Ke(){}function cl(e){fi("_linkedBinding")}function fl(e){fi("dlopen")}function hl(){return[]}function dl(){return[]}function pl(e,t){if(!e)throw new Error(t||"assertion error")}function gl(){return!1}function bl(){return Rt.now()/1e3}function tn(e){var t=Math.floor((Date.now()-Rt.now())*.001),r=Rt.now()*.001,o=Math.floor(r)+t,u=Math.floor(r%1*1e9);return e&&(o=o-e[0],u=u-e[1],u<0&&(o--,u+=rn)),[o,u]}function It(){return yo}function ml(e){return[]}var mt,Kt,Xt,Mr,hi,di,pi,gi,bi,mi,yi,vi,_i,Ei,wi,Si,Ai,Ti,Ii,Ri,Oi,Ni,Li,Mi,Pi,Ci,Pr,Di,ki,Ui,xi,Bi,Fi,ji,Wi,Gi,Hi,Vi,$i,qi,Yi,Ki,Xi,zi,Qi,Ji,Zi,eo,to,ro,no,io,Rt,oo,rn,so,ao,lo,uo,co,fo,ho,po,go,bo,mo,yo,um=rt(()=>{ue(),fe(),ce(),mt=[],Kt=!1,Mr=-1,ul.prototype.run=function(){this.fun.apply(null,this.array)},hi="browser",di="x64",pi="browser",gi={PATH:"/usr/bin",LANG:typeof navigator<"u"?navigator.language+".UTF-8":void 0,PWD:"/",HOME:"/home",TMP:"/tmp"},bi=["/usr/bin/node"],mi=[],yi="v16.8.0",vi={},_i=function(e,t){console.warn((t?t+": ":"")+e)},Ei=function(e){fi("binding")},wi=function(e){return 0},Si=function(){return"/"},Ai=function(e){},Ti={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Ii=!0,Ri=Ke,Oi=[],Ni={},Li=!1,Mi={},Pi=Ke,Ci=Ke,Pr=function(){return{}},Di=Pr,ki=Pr,Ui=Ke,xi=Ke,Bi=Ke,Fi={},ji={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Wi=Ke,Gi=Ke,Hi=Ke,Vi=Ke,$i=Ke,qi=Ke,Yi=Ke,Ki=void 0,Xi=void 0,zi=void 0,Qi=Ke,Ji=2,Zi=1,eo="/bin/usr/node",to=9229,ro="node",no=[],io=Ke,Rt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Rt.now===void 0&&(oo=Date.now(),Rt.timing&&Rt.timing.navigationStart&&(oo=Rt.timing.navigationStart),Rt.now=()=>Date.now()-oo),rn=1e9,tn.bigint=function(e){var t=tn(e);return typeof BigInt>"u"?t[0]*rn+t[1]:BigInt(t[0]*rn)+BigInt(t[1])},so=10,ao={},lo=0,uo=It,co=It,fo=It,ho=It,po=It,go=Ke,bo=It,mo=It,yo={version:yi,versions:vi,arch:di,platform:pi,browser:Ii,release:Ti,_rawDebug:Ri,moduleLoadList:Oi,binding:Ei,_linkedBinding:cl,_events:ao,_eventsCount:lo,_maxListeners:so,on:It,addListener:uo,once:co,off:fo,removeListener:ho,removeAllListeners:po,emit:go,prependListener:bo,prependOnceListener:mo,listeners:ml,domain:Ni,_exiting:Li,config:Mi,dlopen:fl,uptime:bl,_getActiveRequests:hl,_getActiveHandles:dl,reallyExit:Pi,_kill:Ci,cpuUsage:Pr,resourceUsage:Di,memoryUsage:ki,kill:Ui,exit:xi,openStdin:Bi,allowedNodeEnvironmentFlags:Fi,assert:pl,features:ji,_fatalExceptions:Wi,setUncaughtExceptionCaptureCallback:Gi,hasUncaughtExceptionCaptureCallback:gl,emitWarning:_i,nextTick:ll,_tickCallback:Hi,_debugProcess:Vi,_debugEnd:$i,_startProfilerIdleNotifier:qi,_stopProfilerIdleNotifier:Yi,stdout:Ki,stdin:zi,stderr:Xi,abort:Qi,umask:wi,chdir:Ai,cwd:Si,env:gi,title:hi,argv:bi,execArgv:mi,pid:Ji,ppid:Zi,execPath:eo,debugPort:to,hrtime:tn,argv0:ro,_preload_modules:no,setSourceMapsEnabled:io}}),ce=rt(()=>{um()});function cm(){if(vo)return pr;vo=!0,pr.byteLength=s,pr.toByteArray=l,pr.fromByteArray=p;for(var e=[],t=[],r=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,n=o.length;u<n;++u)e[u]=o[u],t[o.charCodeAt(u)]=u;t[45]=62,t[95]=63;function i(m){var h=m.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var g=m.indexOf("=");g===-1&&(g=h);var y=g===h?0:4-g%4;return[g,y]}function s(m){var h=i(m),g=h[0],y=h[1];return(g+y)*3/4-y}function a(m,h,g){return(h+g)*3/4-g}function l(m){var h,g=i(m),y=g[0],w=g[1],b=new r(a(m,y,w)),E=0,T=w>0?y-4:y,v;for(v=0;v<T;v+=4)h=t[m.charCodeAt(v)]<<18|t[m.charCodeAt(v+1)]<<12|t[m.charCodeAt(v+2)]<<6|t[m.charCodeAt(v+3)],b[E++]=h>>16&255,b[E++]=h>>8&255,b[E++]=h&255;return w===2&&(h=t[m.charCodeAt(v)]<<2|t[m.charCodeAt(v+1)]>>4,b[E++]=h&255),w===1&&(h=t[m.charCodeAt(v)]<<10|t[m.charCodeAt(v+1)]<<4|t[m.charCodeAt(v+2)]>>2,b[E++]=h>>8&255,b[E++]=h&255),b}function c(m){return e[m>>18&63]+e[m>>12&63]+e[m>>6&63]+e[m&63]}function f(m,h,g){for(var y,w=[],b=h;b<g;b+=3)y=(m[b]<<16&16711680)+(m[b+1]<<8&65280)+(m[b+2]&255),w.push(c(y));return w.join("")}function p(m){for(var h,g=m.length,y=g%3,w=[],b=16383,E=0,T=g-y;E<T;E+=b)w.push(f(m,E,E+b>T?T:E+b));return y===1?(h=m[g-1],w.push(e[h>>2]+e[h<<4&63]+"==")):y===2&&(h=(m[g-2]<<8)+m[g-1],w.push(e[h>>10]+e[h>>4&63]+e[h<<2&63]+"=")),w.join("")}return pr}function fm(){return _o?Cr:(_o=!0,Cr.read=function(e,t,r,o,u){var n,i,s=u*8-o-1,a=(1<<s)-1,l=a>>1,c=-7,f=r?u-1:0,p=r?-1:1,m=e[t+f];for(f+=p,n=m&(1<<-c)-1,m>>=-c,c+=s;c>0;n=n*256+e[t+f],f+=p,c-=8);for(i=n&(1<<-c)-1,n>>=-c,c+=o;c>0;i=i*256+e[t+f],f+=p,c-=8);if(n===0)n=1-l;else{if(n===a)return i?NaN:(m?-1:1)*(1/0);i=i+Math.pow(2,o),n=n-l}return(m?-1:1)*i*Math.pow(2,n-o)},Cr.write=function(e,t,r,o,u,n){var i,s,a,l=n*8-u-1,c=(1<<l)-1,f=c>>1,p=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:n-1,h=o?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-i))<1&&(i--,a*=2),i+f>=1?t+=p/a:t+=p*Math.pow(2,1-f),t*a>=2&&(i++,a/=2),i+f>=c?(s=0,i=c):i+f>=1?(s=(t*a-1)*Math.pow(2,u),i=i+f):(s=t*Math.pow(2,f-1)*Math.pow(2,u),i=0));u>=8;e[r+m]=s&255,m+=h,s/=256,u-=8);for(i=i<<u|s,l+=u;l>0;e[r+m]=i&255,m+=h,i/=256,l-=8);e[r+m-h]|=g*128},Cr)}function hm(){if(Eo)return Ft;Eo=!0;let e=cm(),t=fm(),r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ft.Buffer=i,Ft.SlowBuffer=w,Ft.INSPECT_MAX_BYTES=50;let o=2147483647;Ft.kMaxLength=o,i.TYPED_ARRAY_SUPPORT=u(),!i.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{let d=new Uint8Array(1),_={foo:function(){return 42}};return Object.setPrototypeOf(_,Uint8Array.prototype),Object.setPrototypeOf(d,_),d.foo()===42}catch{return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function n(d){if(d>o)throw new RangeError('The value "'+d+'" is invalid for option "size"');let _=new Uint8Array(d);return Object.setPrototypeOf(_,i.prototype),_}function i(d,_,I){if(typeof d=="number"){if(typeof _=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return c(d)}return s(d,_,I)}i.poolSize=8192;function s(d,_,I){if(typeof d=="string")return f(d,_);if(ArrayBuffer.isView(d))return m(d);if(d==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);if(V(d,ArrayBuffer)||d&&V(d.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(V(d,SharedArrayBuffer)||d&&V(d.buffer,SharedArrayBuffer)))return h(d,_,I);if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=d.valueOf&&d.valueOf();if(B!=null&&B!==d)return i.from(B,_,I);let Z=g(d);if(Z)return Z;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof d[Symbol.toPrimitive]=="function")return i.from(d[Symbol.toPrimitive]("string"),_,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d)}i.from=function(d,_,I){return s(d,_,I)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function a(d){if(typeof d!="number")throw new TypeError('"size" argument must be of type number');if(d<0)throw new RangeError('The value "'+d+'" is invalid for option "size"')}function l(d,_,I){return a(d),d<=0?n(d):_!==void 0?typeof I=="string"?n(d).fill(_,I):n(d).fill(_):n(d)}i.alloc=function(d,_,I){return l(d,_,I)};function c(d){return a(d),n(d<0?0:y(d)|0)}i.allocUnsafe=function(d){return c(d)},i.allocUnsafeSlow=function(d){return c(d)};function f(d,_){if((typeof _!="string"||_==="")&&(_="utf8"),!i.isEncoding(_))throw new TypeError("Unknown encoding: "+_);let I=b(d,_)|0,B=n(I),Z=B.write(d,_);return Z!==I&&(B=B.slice(0,Z)),B}function p(d){let _=d.length<0?0:y(d.length)|0,I=n(_);for(let B=0;B<_;B+=1)I[B]=d[B]&255;return I}function m(d){if(V(d,Uint8Array)){let _=new Uint8Array(d);return h(_.buffer,_.byteOffset,_.byteLength)}return p(d)}function h(d,_,I){if(_<0||d.byteLength<_)throw new RangeError('"offset" is outside of buffer bounds');if(d.byteLength<_+(I||0))throw new RangeError('"length" is outside of buffer bounds');let B;return _===void 0&&I===void 0?B=new Uint8Array(d):I===void 0?B=new Uint8Array(d,_):B=new Uint8Array(d,_,I),Object.setPrototypeOf(B,i.prototype),B}function g(d){if(i.isBuffer(d)){let _=y(d.length)|0,I=n(_);return I.length===0||d.copy(I,0,0,_),I}if(d.length!==void 0)return typeof d.length!="number"||be(d.length)?n(0):p(d);if(d.type==="Buffer"&&Array.isArray(d.data))return p(d.data)}function y(d){if(d>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return d|0}function w(d){return+d!=d&&(d=0),i.alloc(+d)}i.isBuffer=function(d){return d!=null&&d._isBuffer===!0&&d!==i.prototype},i.compare=function(d,_){if(V(d,Uint8Array)&&(d=i.from(d,d.offset,d.byteLength)),V(_,Uint8Array)&&(_=i.from(_,_.offset,_.byteLength)),!i.isBuffer(d)||!i.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(d===_)return 0;let I=d.length,B=_.length;for(let Z=0,he=Math.min(I,B);Z<he;++Z)if(d[Z]!==_[Z]){I=d[Z],B=_[Z];break}return I<B?-1:B<I?1:0},i.isEncoding=function(d){switch(String(d).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(d,_){if(!Array.isArray(d))throw new TypeError('"list" argument must be an Array of Buffers');if(d.length===0)return i.alloc(0);let I;if(_===void 0)for(_=0,I=0;I<d.length;++I)_+=d[I].length;let B=i.allocUnsafe(_),Z=0;for(I=0;I<d.length;++I){let he=d[I];if(V(he,Uint8Array))Z+he.length>B.length?(i.isBuffer(he)||(he=i.from(he)),he.copy(B,Z)):Uint8Array.prototype.set.call(B,he,Z);else if(i.isBuffer(he))he.copy(B,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=he.length}return B};function b(d,_){if(i.isBuffer(d))return d.length;if(ArrayBuffer.isView(d)||V(d,ArrayBuffer))return d.byteLength;if(typeof d!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof d);let I=d.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&I===0)return 0;let Z=!1;for(;;)switch(_){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return G(d).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return pe(d).length;default:if(Z)return B?-1:G(d).length;_=(""+_).toLowerCase(),Z=!0}}i.byteLength=b;function E(d,_,I){let B=!1;if((_===void 0||_<0)&&(_=0),_>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,_>>>=0,I<=_))return"";for(d||(d="utf8");;)switch(d){case"hex":return Y(this,_,I);case"utf8":case"utf-8":return H(this,_,I);case"ascii":return le(this,_,I);case"latin1":case"binary":return z(this,_,I);case"base64":return O(this,_,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne(this,_,I);default:if(B)throw new TypeError("Unknown encoding: "+d);d=(d+"").toLowerCase(),B=!0}}i.prototype._isBuffer=!0;function T(d,_,I){let B=d[_];d[_]=d[I],d[I]=B}i.prototype.swap16=function(){let d=this.length;if(d%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<d;_+=2)T(this,_,_+1);return this},i.prototype.swap32=function(){let d=this.length;if(d%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<d;_+=4)T(this,_,_+3),T(this,_+1,_+2);return this},i.prototype.swap64=function(){let d=this.length;if(d%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<d;_+=8)T(this,_,_+7),T(this,_+1,_+6),T(this,_+2,_+5),T(this,_+3,_+4);return this},i.prototype.toString=function(){let d=this.length;return d===0?"":arguments.length===0?H(this,0,d):E.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(d){if(!i.isBuffer(d))throw new TypeError("Argument must be a Buffer");return this===d?!0:i.compare(this,d)===0},i.prototype.inspect=function(){let d="",_=Ft.INSPECT_MAX_BYTES;return d=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(d+=" ... "),"<Buffer "+d+">"},r&&(i.prototype[r]=i.prototype.inspect),i.prototype.compare=function(d,_,I,B,Z){if(V(d,Uint8Array)&&(d=i.from(d,d.offset,d.byteLength)),!i.isBuffer(d))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof d);if(_===void 0&&(_=0),I===void 0&&(I=d?d.length:0),B===void 0&&(B=0),Z===void 0&&(Z=this.length),_<0||I>d.length||B<0||Z>this.length)throw new RangeError("out of range index");if(B>=Z&&_>=I)return 0;if(B>=Z)return-1;if(_>=I)return 1;if(_>>>=0,I>>>=0,B>>>=0,Z>>>=0,this===d)return 0;let he=Z-B,Ae=I-_,q=Math.min(he,Ae),oe=this.slice(B,Z),Oe=d.slice(_,I);for(let Ne=0;Ne<q;++Ne)if(oe[Ne]!==Oe[Ne]){he=oe[Ne],Ae=Oe[Ne];break}return he<Ae?-1:Ae<he?1:0};function v(d,_,I,B,Z){if(d.length===0)return-1;if(typeof I=="string"?(B=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,be(I)&&(I=Z?0:d.length-1),I<0&&(I=d.length+I),I>=d.length){if(Z)return-1;I=d.length-1}else if(I<0)if(Z)I=0;else return-1;if(typeof _=="string"&&(_=i.from(_,B)),i.isBuffer(_))return _.length===0?-1:A(d,_,I,B,Z);if(typeof _=="number")return _=_&255,typeof Uint8Array.prototype.indexOf=="function"?Z?Uint8Array.prototype.indexOf.call(d,_,I):Uint8Array.prototype.lastIndexOf.call(d,_,I):A(d,[_],I,B,Z);throw new TypeError("val must be string, number or Buffer")}function A(d,_,I,B,Z){let he=1,Ae=d.length,q=_.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(d.length<2||_.length<2)return-1;he=2,Ae/=2,q/=2,I/=2}function oe(Ne,Le){return he===1?Ne[Le]:Ne.readUInt16BE(Le*he)}let Oe;if(Z){let Ne=-1;for(Oe=I;Oe<Ae;Oe++)if(oe(d,Oe)===oe(_,Ne===-1?0:Oe-Ne)){if(Ne===-1&&(Ne=Oe),Oe-Ne+1===q)return Ne*he}else Ne!==-1&&(Oe-=Oe-Ne),Ne=-1}else for(I+q>Ae&&(I=Ae-q),Oe=I;Oe>=0;Oe--){let Ne=!0;for(let Le=0;Le<q;Le++)if(oe(d,Oe+Le)!==oe(_,Le)){Ne=!1;break}if(Ne)return Oe}return-1}i.prototype.includes=function(d,_,I){return this.indexOf(d,_,I)!==-1},i.prototype.indexOf=function(d,_,I){return v(this,d,_,I,!0)},i.prototype.lastIndexOf=function(d,_,I){return v(this,d,_,I,!1)};function S(d,_,I,B){I=Number(I)||0;let Z=d.length-I;B?(B=Number(B),B>Z&&(B=Z)):B=Z;let he=_.length;B>he/2&&(B=he/2);let Ae;for(Ae=0;Ae<B;++Ae){let q=parseInt(_.substr(Ae*2,2),16);if(be(q))return Ae;d[I+Ae]=q}return Ae}function R(d,_,I,B){return _e(G(_,d.length-I),d,I,B)}function C(d,_,I,B){return _e(te(_),d,I,B)}function M(d,_,I,B){return _e(pe(_),d,I,B)}function F(d,_,I,B){return _e(de(_,d.length-I),d,I,B)}i.prototype.write=function(d,_,I,B){if(_===void 0)B="utf8",I=this.length,_=0;else if(I===void 0&&typeof _=="string")B=_,I=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(I)?(I=I>>>0,B===void 0&&(B="utf8")):(B=I,I=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Z=this.length-_;if((I===void 0||I>Z)&&(I=Z),d.length>0&&(I<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");let he=!1;for(;;)switch(B){case"hex":return S(this,d,_,I);case"utf8":case"utf-8":return R(this,d,_,I);case"ascii":case"latin1":case"binary":return C(this,d,_,I);case"base64":return M(this,d,_,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,d,_,I);default:if(he)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),he=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(d,_,I){return _===0&&I===d.length?e.fromByteArray(d):e.fromByteArray(d.slice(_,I))}function H(d,_,I){I=Math.min(d.length,I);let B=[],Z=_;for(;Z<I;){let he=d[Z],Ae=null,q=he>239?4:he>223?3:he>191?2:1;if(Z+q<=I){let oe,Oe,Ne,Le;switch(q){case 1:he<128&&(Ae=he);break;case 2:oe=d[Z+1],(oe&192)===128&&(Le=(he&31)<<6|oe&63,Le>127&&(Ae=Le));break;case 3:oe=d[Z+1],Oe=d[Z+2],(oe&192)===128&&(Oe&192)===128&&(Le=(he&15)<<12|(oe&63)<<6|Oe&63,Le>2047&&(Le<55296||Le>57343)&&(Ae=Le));break;case 4:oe=d[Z+1],Oe=d[Z+2],Ne=d[Z+3],(oe&192)===128&&(Oe&192)===128&&(Ne&192)===128&&(Le=(he&15)<<18|(oe&63)<<12|(Oe&63)<<6|Ne&63,Le>65535&&Le<1114112&&(Ae=Le))}}Ae===null?(Ae=65533,q=1):Ae>65535&&(Ae-=65536,B.push(Ae>>>10&1023|55296),Ae=56320|Ae&1023),B.push(Ae),Z+=q}return x(B)}let j=4096;function x(d){let _=d.length;if(_<=j)return String.fromCharCode.apply(String,d);let I="",B=0;for(;B<_;)I+=String.fromCharCode.apply(String,d.slice(B,B+=j));return I}function le(d,_,I){let B="";I=Math.min(d.length,I);for(let Z=_;Z<I;++Z)B+=String.fromCharCode(d[Z]&127);return B}function z(d,_,I){let B="";I=Math.min(d.length,I);for(let Z=_;Z<I;++Z)B+=String.fromCharCode(d[Z]);return B}function Y(d,_,I){let B=d.length;(!_||_<0)&&(_=0),(!I||I<0||I>B)&&(I=B);let Z="";for(let he=_;he<I;++he)Z+=Ee[d[he]];return Z}function ne(d,_,I){let B=d.slice(_,I),Z="";for(let he=0;he<B.length-1;he+=2)Z+=String.fromCharCode(B[he]+B[he+1]*256);return Z}i.prototype.slice=function(d,_){let I=this.length;d=~~d,_=_===void 0?I:~~_,d<0?(d+=I,d<0&&(d=0)):d>I&&(d=I),_<0?(_+=I,_<0&&(_=0)):_>I&&(_=I),_<d&&(_=d);let B=this.subarray(d,_);return Object.setPrototypeOf(B,i.prototype),B};function W(d,_,I){if(d%1!==0||d<0)throw new RangeError("offset is not uint");if(d+_>I)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(d,_,I){d=d>>>0,_=_>>>0,I||W(d,_,this.length);let B=this[d],Z=1,he=0;for(;++he<_&&(Z*=256);)B+=this[d+he]*Z;return B},i.prototype.readUintBE=i.prototype.readUIntBE=function(d,_,I){d=d>>>0,_=_>>>0,I||W(d,_,this.length);let B=this[d+--_],Z=1;for(;_>0&&(Z*=256);)B+=this[d+--_]*Z;return B},i.prototype.readUint8=i.prototype.readUInt8=function(d,_){return d=d>>>0,_||W(d,1,this.length),this[d]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(d,_){return d=d>>>0,_||W(d,2,this.length),this[d]|this[d+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(d,_){return d=d>>>0,_||W(d,2,this.length),this[d]<<8|this[d+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(d,_){return d=d>>>0,_||W(d,4,this.length),(this[d]|this[d+1]<<8|this[d+2]<<16)+this[d+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(d,_){return d=d>>>0,_||W(d,4,this.length),this[d]*16777216+(this[d+1]<<16|this[d+2]<<8|this[d+3])},i.prototype.readBigUInt64LE=ae(function(d){d=d>>>0,Q(d,"offset");let _=this[d],I=this[d+7];(_===void 0||I===void 0)&&ye(d,this.length-8);let B=_+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24,Z=this[++d]+this[++d]*2**8+this[++d]*2**16+I*2**24;return BigInt(B)+(BigInt(Z)<<BigInt(32))}),i.prototype.readBigUInt64BE=ae(function(d){d=d>>>0,Q(d,"offset");let _=this[d],I=this[d+7];(_===void 0||I===void 0)&&ye(d,this.length-8);let B=_*2**24+this[++d]*2**16+this[++d]*2**8+this[++d],Z=this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+I;return(BigInt(B)<<BigInt(32))+BigInt(Z)}),i.prototype.readIntLE=function(d,_,I){d=d>>>0,_=_>>>0,I||W(d,_,this.length);let B=this[d],Z=1,he=0;for(;++he<_&&(Z*=256);)B+=this[d+he]*Z;return Z*=128,B>=Z&&(B-=Math.pow(2,8*_)),B},i.prototype.readIntBE=function(d,_,I){d=d>>>0,_=_>>>0,I||W(d,_,this.length);let B=_,Z=1,he=this[d+--B];for(;B>0&&(Z*=256);)he+=this[d+--B]*Z;return Z*=128,he>=Z&&(he-=Math.pow(2,8*_)),he},i.prototype.readInt8=function(d,_){return d=d>>>0,_||W(d,1,this.length),this[d]&128?(255-this[d]+1)*-1:this[d]},i.prototype.readInt16LE=function(d,_){d=d>>>0,_||W(d,2,this.length);let I=this[d]|this[d+1]<<8;return I&32768?I|4294901760:I},i.prototype.readInt16BE=function(d,_){d=d>>>0,_||W(d,2,this.length);let I=this[d+1]|this[d]<<8;return I&32768?I|4294901760:I},i.prototype.readInt32LE=function(d,_){return d=d>>>0,_||W(d,4,this.length),this[d]|this[d+1]<<8|this[d+2]<<16|this[d+3]<<24},i.prototype.readInt32BE=function(d,_){return d=d>>>0,_||W(d,4,this.length),this[d]<<24|this[d+1]<<16|this[d+2]<<8|this[d+3]},i.prototype.readBigInt64LE=ae(function(d){d=d>>>0,Q(d,"offset");let _=this[d],I=this[d+7];(_===void 0||I===void 0)&&ye(d,this.length-8);let B=this[d+4]+this[d+5]*2**8+this[d+6]*2**16+(I<<24);return(BigInt(B)<<BigInt(32))+BigInt(_+this[++d]*2**8+this[++d]*2**16+this[++d]*2**24)}),i.prototype.readBigInt64BE=ae(function(d){d=d>>>0,Q(d,"offset");let _=this[d],I=this[d+7];(_===void 0||I===void 0)&&ye(d,this.length-8);let B=(_<<24)+this[++d]*2**16+this[++d]*2**8+this[++d];return(BigInt(B)<<BigInt(32))+BigInt(this[++d]*2**24+this[++d]*2**16+this[++d]*2**8+I)}),i.prototype.readFloatLE=function(d,_){return d=d>>>0,_||W(d,4,this.length),t.read(this,d,!0,23,4)},i.prototype.readFloatBE=function(d,_){return d=d>>>0,_||W(d,4,this.length),t.read(this,d,!1,23,4)},i.prototype.readDoubleLE=function(d,_){return d=d>>>0,_||W(d,8,this.length),t.read(this,d,!0,52,8)},i.prototype.readDoubleBE=function(d,_){return d=d>>>0,_||W(d,8,this.length),t.read(this,d,!1,52,8)};function ee(d,_,I,B,Z,he){if(!i.isBuffer(d))throw new TypeError('"buffer" argument must be a Buffer instance');if(_>Z||_<he)throw new RangeError('"value" argument is out of bounds');if(I+B>d.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(d,_,I,B){if(d=+d,_=_>>>0,I=I>>>0,!B){let Ae=Math.pow(2,8*I)-1;ee(this,d,_,I,Ae,0)}let Z=1,he=0;for(this[_]=d&255;++he<I&&(Z*=256);)this[_+he]=d/Z&255;return _+I},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(d,_,I,B){if(d=+d,_=_>>>0,I=I>>>0,!B){let Ae=Math.pow(2,8*I)-1;ee(this,d,_,I,Ae,0)}let Z=I-1,he=1;for(this[_+Z]=d&255;--Z>=0&&(he*=256);)this[_+Z]=d/he&255;return _+I},i.prototype.writeUint8=i.prototype.writeUInt8=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,1,255,0),this[_]=d&255,_+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,2,65535,0),this[_]=d&255,this[_+1]=d>>>8,_+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,2,65535,0),this[_]=d>>>8,this[_+1]=d&255,_+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,4,4294967295,0),this[_+3]=d>>>24,this[_+2]=d>>>16,this[_+1]=d>>>8,this[_]=d&255,_+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,4,4294967295,0),this[_]=d>>>24,this[_+1]=d>>>16,this[_+2]=d>>>8,this[_+3]=d&255,_+4};function P(d,_,I,B,Z){X(_,B,Z,d,I,7);let he=Number(_&BigInt(4294967295));d[I++]=he,he=he>>8,d[I++]=he,he=he>>8,d[I++]=he,he=he>>8,d[I++]=he;let Ae=Number(_>>BigInt(32)&BigInt(4294967295));return d[I++]=Ae,Ae=Ae>>8,d[I++]=Ae,Ae=Ae>>8,d[I++]=Ae,Ae=Ae>>8,d[I++]=Ae,I}function J(d,_,I,B,Z){X(_,B,Z,d,I,7);let he=Number(_&BigInt(4294967295));d[I+7]=he,he=he>>8,d[I+6]=he,he=he>>8,d[I+5]=he,he=he>>8,d[I+4]=he;let Ae=Number(_>>BigInt(32)&BigInt(4294967295));return d[I+3]=Ae,Ae=Ae>>8,d[I+2]=Ae,Ae=Ae>>8,d[I+1]=Ae,Ae=Ae>>8,d[I]=Ae,I+8}i.prototype.writeBigUInt64LE=ae(function(d,_=0){return P(this,d,_,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=ae(function(d,_=0){return J(this,d,_,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(d,_,I,B){if(d=+d,_=_>>>0,!B){let q=Math.pow(2,8*I-1);ee(this,d,_,I,q-1,-q)}let Z=0,he=1,Ae=0;for(this[_]=d&255;++Z<I&&(he*=256);)d<0&&Ae===0&&this[_+Z-1]!==0&&(Ae=1),this[_+Z]=(d/he>>0)-Ae&255;return _+I},i.prototype.writeIntBE=function(d,_,I,B){if(d=+d,_=_>>>0,!B){let q=Math.pow(2,8*I-1);ee(this,d,_,I,q-1,-q)}let Z=I-1,he=1,Ae=0;for(this[_+Z]=d&255;--Z>=0&&(he*=256);)d<0&&Ae===0&&this[_+Z+1]!==0&&(Ae=1),this[_+Z]=(d/he>>0)-Ae&255;return _+I},i.prototype.writeInt8=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,1,127,-128),d<0&&(d=255+d+1),this[_]=d&255,_+1},i.prototype.writeInt16LE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,2,32767,-32768),this[_]=d&255,this[_+1]=d>>>8,_+2},i.prototype.writeInt16BE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,2,32767,-32768),this[_]=d>>>8,this[_+1]=d&255,_+2},i.prototype.writeInt32LE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,4,2147483647,-2147483648),this[_]=d&255,this[_+1]=d>>>8,this[_+2]=d>>>16,this[_+3]=d>>>24,_+4},i.prototype.writeInt32BE=function(d,_,I){return d=+d,_=_>>>0,I||ee(this,d,_,4,2147483647,-2147483648),d<0&&(d=4294967295+d+1),this[_]=d>>>24,this[_+1]=d>>>16,this[_+2]=d>>>8,this[_+3]=d&255,_+4},i.prototype.writeBigInt64LE=ae(function(d,_=0){return P(this,d,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=ae(function(d,_=0){return J(this,d,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ve(d,_,I,B,Z,he){if(I+B>d.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function re(d,_,I,B,Z){return _=+_,I=I>>>0,Z||ve(d,_,I,4),t.write(d,_,I,B,23,4),I+4}i.prototype.writeFloatLE=function(d,_,I){return re(this,d,_,!0,I)},i.prototype.writeFloatBE=function(d,_,I){return re(this,d,_,!1,I)};function we(d,_,I,B,Z){return _=+_,I=I>>>0,Z||ve(d,_,I,8),t.write(d,_,I,B,52,8),I+8}i.prototype.writeDoubleLE=function(d,_,I){return we(this,d,_,!0,I)},i.prototype.writeDoubleBE=function(d,_,I){return we(this,d,_,!1,I)},i.prototype.copy=function(d,_,I,B){if(!i.isBuffer(d))throw new TypeError("argument should be a Buffer");if(I||(I=0),!B&&B!==0&&(B=this.length),_>=d.length&&(_=d.length),_||(_=0),B>0&&B<I&&(B=I),B===I||d.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(I<0||I>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),d.length-_<B-I&&(B=d.length-_+I);let Z=B-I;return this===d&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,I,B):Uint8Array.prototype.set.call(d,this.subarray(I,B),_),Z},i.prototype.fill=function(d,_,I,B){if(typeof d=="string"){if(typeof _=="string"?(B=_,_=0,I=this.length):typeof I=="string"&&(B=I,I=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!i.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(d.length===1){let he=d.charCodeAt(0);(B==="utf8"&&he<128||B==="latin1")&&(d=he)}}else typeof d=="number"?d=d&255:typeof d=="boolean"&&(d=Number(d));if(_<0||this.length<_||this.length<I)throw new RangeError("Out of range index");if(I<=_)return this;_=_>>>0,I=I===void 0?this.length:I>>>0,d||(d=0);let Z;if(typeof d=="number")for(Z=_;Z<I;++Z)this[Z]=d;else{let he=i.isBuffer(d)?d:i.from(d,B),Ae=he.length;if(Ae===0)throw new TypeError('The value "'+d+'" is invalid for argument "value"');for(Z=0;Z<I-_;++Z)this[Z+_]=he[Z%Ae]}return this};let K={};function U(d,_,I){K[d]=class extends I{constructor(){super(),Object.defineProperty(this,"message",{value:_.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${d}]`,this.stack,delete this.name}get code(){return d}set code(B){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:B,writable:!0})}toString(){return`${this.name} [${d}]: ${this.message}`}}}U("ERR_BUFFER_OUT_OF_BOUNDS",function(d){return d?`${d} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(d,_){return`The "${d}" argument must be of type number. Received type ${typeof _}`},TypeError),U("ERR_OUT_OF_RANGE",function(d,_,I){let B=`The value of "${d}" is out of range.`,Z=I;return Number.isInteger(I)&&Math.abs(I)>2**32?Z=ie(String(I)):typeof I=="bigint"&&(Z=String(I),(I>BigInt(2)**BigInt(32)||I<-(BigInt(2)**BigInt(32)))&&(Z=ie(Z)),Z+="n"),B+=` It must be ${_}. Received ${Z}`,B},RangeError);function ie(d){let _="",I=d.length,B=d[0]==="-"?1:0;for(;I>=B+4;I-=3)_=`_${d.slice(I-3,I)}${_}`;return`${d.slice(0,I)}${_}`}function $(d,_,I){Q(_,"offset"),(d[_]===void 0||d[_+I]===void 0)&&ye(_,d.length-(I+1))}function X(d,_,I,B,Z,he){if(d>I||d<_){let Ae=typeof _=="bigint"?"n":"",q;throw _===0||_===BigInt(0)?q=`>= 0${Ae} and < 2${Ae} ** ${(he+1)*8}${Ae}`:q=`>= -(2${Ae} ** ${(he+1)*8-1}${Ae}) and < 2 ** ${(he+1)*8-1}${Ae}`,new K.ERR_OUT_OF_RANGE("value",q,d)}$(B,Z,he)}function Q(d,_){if(typeof d!="number")throw new K.ERR_INVALID_ARG_TYPE(_,"number",d)}function ye(d,_,I){throw Math.floor(d)!==d?(Q(d,I),new K.ERR_OUT_OF_RANGE("offset","an integer",d)):_<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${_}`,d)}let se=/[^+/0-9A-Za-z-_]/g;function D(d){if(d=d.split("=")[0],d=d.trim().replace(se,""),d.length<2)return"";for(;d.length%4!==0;)d=d+"=";return d}function G(d,_){_=_||1/0;let I,B=d.length,Z=null,he=[];for(let Ae=0;Ae<B;++Ae){if(I=d.charCodeAt(Ae),I>55295&&I<57344){if(!Z){if(I>56319){(_-=3)>-1&&he.push(239,191,189);continue}else if(Ae+1===B){(_-=3)>-1&&he.push(239,191,189);continue}Z=I;continue}if(I<56320){(_-=3)>-1&&he.push(239,191,189),Z=I;continue}I=(Z-55296<<10|I-56320)+65536}else Z&&(_-=3)>-1&&he.push(239,191,189);if(Z=null,I<128){if((_-=1)<0)break;he.push(I)}else if(I<2048){if((_-=2)<0)break;he.push(I>>6|192,I&63|128)}else if(I<65536){if((_-=3)<0)break;he.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((_-=4)<0)break;he.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return he}function te(d){let _=[];for(let I=0;I<d.length;++I)_.push(d.charCodeAt(I)&255);return _}function de(d,_){let I,B,Z,he=[];for(let Ae=0;Ae<d.length&&!((_-=2)<0);++Ae)I=d.charCodeAt(Ae),B=I>>8,Z=I%256,he.push(Z),he.push(B);return he}function pe(d){return e.toByteArray(D(d))}function _e(d,_,I,B){let Z;for(Z=0;Z<B&&!(Z+I>=_.length||Z>=d.length);++Z)_[Z+I]=d[Z];return Z}function V(d,_){return d instanceof _||d!=null&&d.constructor!=null&&d.constructor.name!=null&&d.constructor.name===_.name}function be(d){return d!==d}let Ee=(function(){let d="0123456789abcdef",_=new Array(256);for(let I=0;I<16;++I){let B=I*16;for(let Z=0;Z<16;++Z)_[B+Z]=d[I]+d[Z]}return _})();function ae(d){return typeof BigInt>"u"?Me:d}function Me(){throw new Error("BigInt not supported")}return Ft}var pr,vo,Cr,_o,Ft,Eo,dm=rt(()=>{ue(),fe(),ce(),pr={},vo=!1,Cr={},_o=!1,Ft={},Eo=!1}),Ve={};dr(Ve,{Buffer:()=>nn,INSPECT_MAX_BYTES:()=>yl,default:()=>Ot,kMaxLength:()=>vl});var Ot,nn,yl,vl,$e=rt(()=>{ue(),fe(),ce(),dm(),Ot=hm(),Ot.Buffer,Ot.SlowBuffer,Ot.INSPECT_MAX_BYTES,Ot.kMaxLength,nn=Ot.Buffer,yl=Ot.INSPECT_MAX_BYTES,vl=Ot.kMaxLength}),fe=rt(()=>{$e()}),We=ge((e,t)=>{ue(),fe(),ce();var r=class extends Error{constructor(o){if(!Array.isArray(o))throw new TypeError(`Expected input to be an Array, got ${typeof o}`);let u="";for(let n=0;n<o.length;n++)u+=` ${o[n].stack}
|
|
386
|
+
`;super(u),this.name="AggregateError",this.errors=o}};t.exports={AggregateError:r,ArrayIsArray(o){return Array.isArray(o)},ArrayPrototypeIncludes(o,u){return o.includes(u)},ArrayPrototypeIndexOf(o,u){return o.indexOf(u)},ArrayPrototypeJoin(o,u){return o.join(u)},ArrayPrototypeMap(o,u){return o.map(u)},ArrayPrototypePop(o,u){return o.pop(u)},ArrayPrototypePush(o,u){return o.push(u)},ArrayPrototypeSlice(o,u,n){return o.slice(u,n)},Error,FunctionPrototypeCall(o,u,...n){return o.call(u,...n)},FunctionPrototypeSymbolHasInstance(o,u){return Function.prototype[Symbol.hasInstance].call(o,u)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(o,u){return Object.defineProperties(o,u)},ObjectDefineProperty(o,u,n){return Object.defineProperty(o,u,n)},ObjectGetOwnPropertyDescriptor(o,u){return Object.getOwnPropertyDescriptor(o,u)},ObjectKeys(o){return Object.keys(o)},ObjectSetPrototypeOf(o,u){return Object.setPrototypeOf(o,u)},Promise,PromisePrototypeCatch(o,u){return o.catch(u)},PromisePrototypeThen(o,u,n){return o.then(u,n)},PromiseReject(o){return Promise.reject(o)},PromiseResolve(o){return Promise.resolve(o)},ReflectApply:Reflect.apply,RegExpPrototypeTest(o,u){return o.test(u)},SafeSet:Set,String,StringPrototypeSlice(o,u,n){return o.slice(u,n)},StringPrototypeToLowerCase(o){return o.toLowerCase()},StringPrototypeToUpperCase(o){return o.toUpperCase()},StringPrototypeTrim(o){return o.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(o,u,n){return o.set(u,n)},Boolean,Uint8Array}}),_l=ge((e,t)=>{ue(),fe(),ce(),t.exports={format(r,...o){return r.replace(/%([sdifj])/g,function(...[u,n]){let i=o.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(r){switch(typeof r){case"string":if(r.includes("'"))if(r.includes('"')){if(!r.includes("`")&&!r.includes("${"))return`\`${r}\``}else return`"${r}"`;return`'${r}'`;case"number":return isNaN(r)?"NaN":Object.is(r,-0)?String(r):r;case"bigint":return`${String(r)}n`;case"boolean":case"undefined":return String(r);case"object":return"{}"}}}}),et=ge((e,t)=>{ue(),fe(),ce();var{format:r,inspect:o}=_l(),{AggregateError:u}=We(),n=globalThis.AggregateError||u,i=Symbol("kIsNodeError"),s=["string","function","number","object","Function","Object","boolean","bigint","symbol"],a=/^([A-Z][a-z0-9]*)+$/,l="__node_internal_",c={};function f(b,E){if(!b)throw new c.ERR_INTERNAL_ASSERTION(E)}function p(b){let E="",T=b.length,v=b[0]==="-"?1:0;for(;T>=v+4;T-=3)E=`_${b.slice(T-3,T)}${E}`;return`${b.slice(0,T)}${E}`}function m(b,E,T){if(typeof E=="function")return f(E.length<=T.length,`Code: ${b}; The provided arguments length (${T.length}) does not match the required ones (${E.length}).`),E(...T);let v=(E.match(/%[dfijoOs]/g)||[]).length;return f(v===T.length,`Code: ${b}; The provided arguments length (${T.length}) does not match the required ones (${v}).`),T.length===0?E:r(E,...T)}function h(b,E,T){T||(T=Error);class v extends T{constructor(...S){super(m(b,E,S))}toString(){return`${this.name} [${b}]: ${this.message}`}}Object.defineProperties(v.prototype,{name:{value:T.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${b}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),v.prototype.code=b,v.prototype[i]=!0,c[b]=v}function g(b){let E=l+b.name;return Object.defineProperty(b,"name",{value:E}),b}function y(b,E){if(b&&E&&b!==E){if(Array.isArray(E.errors))return E.errors.push(b),E;let T=new n([E,b],E.message);return T.code=E.code,T}return b||E}var w=class extends Error{constructor(b="The operation was aborted",E=void 0){if(E!==void 0&&typeof E!="object")throw new c.ERR_INVALID_ARG_TYPE("options","Object",E);super(b,E),this.code="ABORT_ERR",this.name="AbortError"}};h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",(b,E,T)=>{f(typeof b=="string","'name' must be a string"),Array.isArray(E)||(E=[E]);let v="The ";b.endsWith(" argument")?v+=`${b} `:v+=`"${b}" ${b.includes(".")?"property":"argument"} `,v+="must be ";let A=[],S=[],R=[];for(let M of E)f(typeof M=="string","All expected entries have to be of type string"),s.includes(M)?A.push(M.toLowerCase()):a.test(M)?S.push(M):(f(M!=="object",'The value "object" should be written as "Object"'),R.push(M));if(S.length>0){let M=A.indexOf("object");M!==-1&&(A.splice(A,M,1),S.push("Object"))}if(A.length>0){switch(A.length){case 1:v+=`of type ${A[0]}`;break;case 2:v+=`one of type ${A[0]} or ${A[1]}`;break;default:{let M=A.pop();v+=`one of type ${A.join(", ")}, or ${M}`}}(S.length>0||R.length>0)&&(v+=" or ")}if(S.length>0){switch(S.length){case 1:v+=`an instance of ${S[0]}`;break;case 2:v+=`an instance of ${S[0]} or ${S[1]}`;break;default:{let M=S.pop();v+=`an instance of ${S.join(", ")}, or ${M}`}}R.length>0&&(v+=" or ")}switch(R.length){case 0:break;case 1:R[0].toLowerCase()!==R[0]&&(v+="an "),v+=`${R[0]}`;break;case 2:v+=`one of ${R[0]} or ${R[1]}`;break;default:{let M=R.pop();v+=`one of ${R.join(", ")}, or ${M}`}}if(T==null)v+=`. Received ${T}`;else if(typeof T=="function"&&T.name)v+=`. Received function ${T.name}`;else if(typeof T=="object"){var C;if((C=T.constructor)!==null&&C!==void 0&&C.name)v+=`. Received an instance of ${T.constructor.name}`;else{let M=o(T,{depth:-1});v+=`. Received ${M}`}}else{let M=o(T,{colors:!1});M.length>25&&(M=`${M.slice(0,25)}...`),v+=`. Received type ${typeof T} (${M})`}return v},TypeError),h("ERR_INVALID_ARG_VALUE",(b,E,T="is invalid")=>{let v=o(E);return v.length>128&&(v=v.slice(0,128)+"..."),`The ${b.includes(".")?"property":"argument"} '${b}' ${T}. Received ${v}`},TypeError),h("ERR_INVALID_RETURN_VALUE",(b,E,T)=>{var v;let A=T!=null&&(v=T.constructor)!==null&&v!==void 0&&v.name?`instance of ${T.constructor.name}`:`type ${typeof T}`;return`Expected ${b} to be returned from the "${E}" function but got ${A}.`},TypeError),h("ERR_MISSING_ARGS",(...b)=>{f(b.length>0,"At least one arg needs to be specified");let E,T=b.length;switch(b=(Array.isArray(b)?b:[b]).map(v=>`"${v}"`).join(" or "),T){case 1:E+=`The ${b[0]} argument`;break;case 2:E+=`The ${b[0]} and ${b[1]} arguments`;break;default:{let v=b.pop();E+=`The ${b.join(", ")}, and ${v} arguments`}break}return`${E} must be specified`},TypeError),h("ERR_OUT_OF_RANGE",(b,E,T)=>{f(E,'Missing "range" argument');let v;if(Number.isInteger(T)&&Math.abs(T)>2**32)v=p(String(T));else if(typeof T=="bigint"){v=String(T);let A=BigInt(2)**BigInt(32);(T>A||T<-A)&&(v=p(v)),v+="n"}else v=o(T);return`The value of "${b}" is out of range. It must be ${E}. Received ${v}`},RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:w,aggregateTwoErrors:g(y),hideStackFrames:g,codes:c}}),Dr=ge((e,t)=>{ue(),fe(),ce();var{AbortController:r,AbortSignal:o}=typeof self<"u"?self:typeof window<"u"?window:void 0;t.exports=r,t.exports.AbortSignal=o,t.exports.default=r}),jt={};dr(jt,{EventEmitter:()=>El,default:()=>gr,defaultMaxListeners:()=>wl,init:()=>Sl,listenerCount:()=>Al,on:()=>Tl,once:()=>Il});function pm(){if(wo)return kr;wo=!0;var e=typeof Reflect=="object"?Reflect:null,t=e&&typeof e.apply=="function"?e.apply:function(T,v,A){return Function.prototype.apply.call(T,v,A)},r;e&&typeof e.ownKeys=="function"?r=e.ownKeys:Object.getOwnPropertySymbols?r=function(T){return Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T))}:r=function(T){return Object.getOwnPropertyNames(T)};function o(T){console&&console.warn&&console.warn(T)}var u=Number.isNaN||function(T){return T!==T};function n(){n.init.call(this)}kr=n,kr.once=w,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._eventsCount=0,n.prototype._maxListeners=void 0;var i=10;function s(T){if(typeof T!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(T){if(typeof T!="number"||T<0||u(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");i=T}}),n.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},n.prototype.setMaxListeners=function(T){if(typeof T!="number"||T<0||u(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this};function a(T){return T._maxListeners===void 0?n.defaultMaxListeners:T._maxListeners}n.prototype.getMaxListeners=function(){return a(this)},n.prototype.emit=function(T){for(var v=[],A=1;A<arguments.length;A++)v.push(arguments[A]);var S=T==="error",R=this._events;if(R!==void 0)S=S&&R.error===void 0;else if(!S)return!1;if(S){var C;if(v.length>0&&(C=v[0]),C instanceof Error)throw C;var M=new Error("Unhandled error."+(C?" ("+C.message+")":""));throw M.context=C,M}var F=R[T];if(F===void 0)return!1;if(typeof F=="function")t(F,this,v);else for(var O=F.length,H=h(F,O),A=0;A<O;++A)t(H[A],this,v);return!0};function l(T,v,A,S){var R,C,M;if(s(A),C=T._events,C===void 0?(C=T._events=Object.create(null),T._eventsCount=0):(C.newListener!==void 0&&(T.emit("newListener",v,A.listener?A.listener:A),C=T._events),M=C[v]),M===void 0)M=C[v]=A,++T._eventsCount;else if(typeof M=="function"?M=C[v]=S?[A,M]:[M,A]:S?M.unshift(A):M.push(A),R=a(T),R>0&&M.length>R&&!M.warned){M.warned=!0;var F=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");F.name="MaxListenersExceededWarning",F.emitter=T,F.type=v,F.count=M.length,o(F)}return T}n.prototype.addListener=function(T,v){return l(this,T,v,!1)},n.prototype.on=n.prototype.addListener,n.prototype.prependListener=function(T,v){return l(this,T,v,!0)};function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(T,v,A){var S={fired:!1,wrapFn:void 0,target:T,type:v,listener:A},R=c.bind(S);return R.listener=A,S.wrapFn=R,R}n.prototype.once=function(T,v){return s(v),this.on(T,f(this,T,v)),this},n.prototype.prependOnceListener=function(T,v){return s(v),this.prependListener(T,f(this,T,v)),this},n.prototype.removeListener=function(T,v){var A,S,R,C,M;if(s(v),S=this._events,S===void 0)return this;if(A=S[T],A===void 0)return this;if(A===v||A.listener===v)--this._eventsCount===0?this._events=Object.create(null):(delete S[T],S.removeListener&&this.emit("removeListener",T,A.listener||v));else if(typeof A!="function"){for(R=-1,C=A.length-1;C>=0;C--)if(A[C]===v||A[C].listener===v){M=A[C].listener,R=C;break}if(R<0)return this;R===0?A.shift():g(A,R),A.length===1&&(S[T]=A[0]),S.removeListener!==void 0&&this.emit("removeListener",T,M||v)}return this},n.prototype.off=n.prototype.removeListener,n.prototype.removeAllListeners=function(T){var v,A,S;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[T]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[T]),this;if(arguments.length===0){var R=Object.keys(A),C;for(S=0;S<R.length;++S)C=R[S],C!=="removeListener"&&this.removeAllListeners(C);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(v=A[T],typeof v=="function")this.removeListener(T,v);else if(v!==void 0)for(S=v.length-1;S>=0;S--)this.removeListener(T,v[S]);return this};function p(T,v,A){var S=T._events;if(S===void 0)return[];var R=S[v];return R===void 0?[]:typeof R=="function"?A?[R.listener||R]:[R]:A?y(R):h(R,R.length)}n.prototype.listeners=function(T){return p(this,T,!0)},n.prototype.rawListeners=function(T){return p(this,T,!1)},n.listenerCount=function(T,v){return typeof T.listenerCount=="function"?T.listenerCount(v):m.call(T,v)},n.prototype.listenerCount=m;function m(T){var v=this._events;if(v!==void 0){var A=v[T];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}n.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]};function h(T,v){for(var A=new Array(v),S=0;S<v;++S)A[S]=T[S];return A}function g(T,v){for(;v+1<T.length;v++)T[v]=T[v+1];T.pop()}function y(T){for(var v=new Array(T.length),A=0;A<v.length;++A)v[A]=T[A].listener||T[A];return v}function w(T,v){return new Promise(function(A,S){function R(M){T.removeListener(v,C),S(M)}function C(){typeof T.removeListener=="function"&&T.removeListener("error",R),A([].slice.call(arguments))}E(T,v,C,{once:!0}),v!=="error"&&b(T,R,{once:!0})})}function b(T,v,A){typeof T.on=="function"&&E(T,"error",v,A)}function E(T,v,A,S){if(typeof T.on=="function")S.once?T.once(v,A):T.on(v,A);else if(typeof T.addEventListener=="function")T.addEventListener(v,function R(C){S.once&&T.removeEventListener(v,R),A(C)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof T)}return kr}var kr,wo,gr,El,wl,Sl,Al,Tl,Il,zt=rt(()=>{ue(),fe(),ce(),kr={},wo=!1,gr=pm(),gr.once,gr.once=function(e,t){return new Promise((r,o)=>{function u(...i){n!==void 0&&e.removeListener("error",n),r(i)}let n;t!=="error"&&(n=i=>{e.removeListener(name,u),o(i)},e.once("error",n)),e.once(t,u)})},gr.on=function(e,t){let r=[],o=[],u=null,n=!1,i={async next(){let l=r.shift();if(l)return createIterResult(l,!1);if(u){let c=Promise.reject(u);return u=null,c}return n?createIterResult(void 0,!0):new Promise((c,f)=>o.push({resolve:c,reject:f}))},async return(){e.removeListener(t,s),e.removeListener("error",a),n=!0;for(let l of o)l.resolve(createIterResult(void 0,!0));return createIterResult(void 0,!0)},throw(l){u=l,e.removeListener(t,s),e.removeListener("error",a)},[Symbol.asyncIterator](){return this}};return e.on(t,s),e.on("error",a),i;function s(...l){let c=o.shift();c?c.resolve(createIterResult(l,!1)):r.push(l)}function a(l){n=!0;let c=o.shift();c?c.reject(l):u=l,i.return()}},{EventEmitter:El,defaultMaxListeners:wl,init:Sl,listenerCount:Al,on:Tl,once:Il}=gr}),nt=ge((e,t)=>{ue(),fe(),ce();var r=($e(),Ue(Ve)),{format:o,inspect:u}=_l(),{codes:{ERR_INVALID_ARG_TYPE:n}}=et(),{kResistStopPropagation:i,AggregateError:s,SymbolDispose:a}=We(),l=globalThis.AbortSignal||Dr().AbortSignal,c=globalThis.AbortController||Dr().AbortController,f=Object.getPrototypeOf(async function(){}).constructor,p=globalThis.Blob||r.Blob,m=typeof p<"u"?function(y){return y instanceof p}:function(y){return!1},h=(y,w)=>{if(y!==void 0&&(y===null||typeof y!="object"||!("aborted"in y)))throw new n(w,"AbortSignal",y)},g=(y,w)=>{if(typeof y!="function")throw new n(w,"Function",y)};t.exports={AggregateError:s,kEmptyObject:Object.freeze({}),once(y){let w=!1;return function(...b){w||(w=!0,y.apply(this,b))}},createDeferredPromise:function(){let y,w;return{promise:new Promise((b,E)=>{y=b,w=E}),resolve:y,reject:w}},promisify(y){return new Promise((w,b)=>{y((E,...T)=>E?b(E):w(...T))})},debuglog(){return function(){}},format:o,inspect:u,types:{isAsyncFunction(y){return y instanceof f},isArrayBufferView(y){return ArrayBuffer.isView(y)}},isBlob:m,deprecate(y,w){return y},addAbortListener:(zt(),Ue(jt)).addAbortListener||function(y,w){if(y===void 0)throw new n("signal","AbortSignal",y);h(y,"signal"),g(w,"listener");let b;return y.aborted?queueMicrotask(()=>w()):(y.addEventListener("abort",w,{__proto__:null,once:!0,[i]:!0}),b=()=>{y.removeEventListener("abort",w)}),{__proto__:null,[a](){var E;(E=b)===null||E===void 0||E()}}},AbortSignalAny:l.any||function(y){if(y.length===1)return y[0];let w=new c,b=()=>w.abort();return y.forEach(E=>{h(E,"signals"),E.addEventListener("abort",b,{once:!0})}),w.signal.addEventListener("abort",()=>{y.forEach(E=>E.removeEventListener("abort",b))},{once:!0}),w.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}),Ur=ge((e,t)=>{ue(),fe(),ce();var{ArrayIsArray:r,ArrayPrototypeIncludes:o,ArrayPrototypeJoin:u,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:s,NumberMAX_SAFE_INTEGER:a,NumberMIN_SAFE_INTEGER:l,NumberParseInt:c,ObjectPrototypeHasOwnProperty:f,RegExpPrototypeExec:p,String:m,StringPrototypeToUpperCase:h,StringPrototypeTrim:g}=We(),{hideStackFrames:y,codes:{ERR_SOCKET_BAD_PORT:w,ERR_INVALID_ARG_TYPE:b,ERR_INVALID_ARG_VALUE:E,ERR_OUT_OF_RANGE:T,ERR_UNKNOWN_SIGNAL:v}}=et(),{normalizeEncoding:A}=nt(),{isAsyncFunction:S,isArrayBufferView:R}=nt().types,C={};function M(V){return V===(V|0)}function F(V){return V===V>>>0}var O=/^[0-7]+$/,H="must be a 32-bit unsigned integer or an octal string";function j(V,be,Ee){if(typeof V>"u"&&(V=Ee),typeof V=="string"){if(p(O,V)===null)throw new E(be,V,H);V=c(V,8)}return z(V,be),V}var x=y((V,be,Ee=l,ae=a)=>{if(typeof V!="number")throw new b(be,"number",V);if(!i(V))throw new T(be,"an integer",V);if(V<Ee||V>ae)throw new T(be,`>= ${Ee} && <= ${ae}`,V)}),le=y((V,be,Ee=-2147483648,ae=2147483647)=>{if(typeof V!="number")throw new b(be,"number",V);if(!i(V))throw new T(be,"an integer",V);if(V<Ee||V>ae)throw new T(be,`>= ${Ee} && <= ${ae}`,V)}),z=y((V,be,Ee=!1)=>{if(typeof V!="number")throw new b(be,"number",V);if(!i(V))throw new T(be,"an integer",V);let ae=Ee?1:0,Me=4294967295;if(V<ae||V>Me)throw new T(be,`>= ${ae} && <= ${Me}`,V)});function Y(V,be){if(typeof V!="string")throw new b(be,"string",V)}function ne(V,be,Ee=void 0,ae){if(typeof V!="number")throw new b(be,"number",V);if(Ee!=null&&V<Ee||ae!=null&&V>ae||(Ee!=null||ae!=null)&&s(V))throw new T(be,`${Ee!=null?`>= ${Ee}`:""}${Ee!=null&&ae!=null?" && ":""}${ae!=null?`<= ${ae}`:""}`,V)}var W=y((V,be,Ee)=>{if(!o(Ee,V)){let ae="must be one of: "+u(n(Ee,Me=>typeof Me=="string"?`'${Me}'`:m(Me)),", ");throw new E(be,V,ae)}});function ee(V,be){if(typeof V!="boolean")throw new b(be,"boolean",V)}function P(V,be,Ee){return V==null||!f(V,be)?Ee:V[be]}var J=y((V,be,Ee=null)=>{let ae=P(Ee,"allowArray",!1),Me=P(Ee,"allowFunction",!1);if(!P(Ee,"nullable",!1)&&V===null||!ae&&r(V)||typeof V!="object"&&(!Me||typeof V!="function"))throw new b(be,"Object",V)}),ve=y((V,be)=>{if(V!=null&&typeof V!="object"&&typeof V!="function")throw new b(be,"a dictionary",V)}),re=y((V,be,Ee=0)=>{if(!r(V))throw new b(be,"Array",V);if(V.length<Ee){let ae=`must be longer than ${Ee}`;throw new E(be,V,ae)}});function we(V,be){re(V,be);for(let Ee=0;Ee<V.length;Ee++)Y(V[Ee],`${be}[${Ee}]`)}function K(V,be){re(V,be);for(let Ee=0;Ee<V.length;Ee++)ee(V[Ee],`${be}[${Ee}]`)}function U(V,be){re(V,be);for(let Ee=0;Ee<V.length;Ee++){let ae=V[Ee],Me=`${be}[${Ee}]`;if(ae==null)throw new b(Me,"AbortSignal",ae);ye(ae,Me)}}function ie(V,be="signal"){if(Y(V,be),C[V]===void 0)throw C[h(V)]!==void 0?new v(V+" (signals must use all capital letters)"):new v(V)}var $=y((V,be="buffer")=>{if(!R(V))throw new b(be,["Buffer","TypedArray","DataView"],V)});function X(V,be){let Ee=A(be),ae=V.length;if(Ee==="hex"&&ae%2!==0)throw new E("encoding",be,`is invalid for data of length ${ae}`)}function Q(V,be="Port",Ee=!0){if(typeof V!="number"&&typeof V!="string"||typeof V=="string"&&g(V).length===0||+V!==+V>>>0||V>65535||V===0&&!Ee)throw new w(be,V,Ee);return V|0}var ye=y((V,be)=>{if(V!==void 0&&(V===null||typeof V!="object"||!("aborted"in V)))throw new b(be,"AbortSignal",V)}),se=y((V,be)=>{if(typeof V!="function")throw new b(be,"Function",V)}),D=y((V,be)=>{if(typeof V!="function"||S(V))throw new b(be,"Function",V)}),G=y((V,be)=>{if(V!==void 0)throw new b(be,"undefined",V)});function te(V,be,Ee){if(!o(Ee,V))throw new b(be,`('${u(Ee,"|")}')`,V)}var de=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function pe(V,be){if(typeof V>"u"||!p(de,V))throw new E(be,V,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function _e(V){if(typeof V=="string")return pe(V,"hints"),V;if(r(V)){let be=V.length,Ee="";if(be===0)return Ee;for(let ae=0;ae<be;ae++){let Me=V[ae];pe(Me,"hints"),Ee+=Me,ae!==be-1&&(Ee+=", ")}return Ee}throw new E("hints",V,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}t.exports={isInt32:M,isUint32:F,parseFileMode:j,validateArray:re,validateStringArray:we,validateBooleanArray:K,validateAbortSignalArray:U,validateBoolean:ee,validateBuffer:$,validateDictionary:ve,validateEncoding:X,validateFunction:se,validateInt32:le,validateInteger:x,validateNumber:ne,validateObject:J,validateOneOf:W,validatePlainFunction:D,validatePort:Q,validateSignalName:ie,validateString:Y,validateUint32:z,validateUndefined:G,validateUnion:te,validateAbortSignal:ye,validateLinkHeaderValue:_e}}),Qt=ge((e,t)=>{ue(),fe(),ce();var r=t.exports={},o,u;function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?o=setTimeout:o=n}catch{o=n}try{typeof clearTimeout=="function"?u=clearTimeout:u=i}catch{u=i}})();function s(w){if(o===setTimeout)return setTimeout(w,0);if((o===n||!o)&&setTimeout)return o=setTimeout,setTimeout(w,0);try{return o(w,0)}catch{try{return o.call(null,w,0)}catch{return o.call(this,w,0)}}}function a(w){if(u===clearTimeout)return clearTimeout(w);if((u===i||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(w);try{return u(w)}catch{try{return u.call(null,w)}catch{return u.call(this,w)}}}var l=[],c=!1,f,p=-1;function m(){!c||!f||(c=!1,f.length?l=f.concat(l):p=-1,l.length&&h())}function h(){if(!c){var w=s(m);c=!0;for(var b=l.length;b;){for(f=l,l=[];++p<b;)f&&f[p].run();p=-1,b=l.length}f=null,c=!1,a(w)}}r.nextTick=function(w){var b=new Array(arguments.length-1);if(arguments.length>1)for(var E=1;E<arguments.length;E++)b[E-1]=arguments[E];l.push(new g(w,b)),l.length===1&&!c&&s(h)};function g(w,b){this.fun=w,this.array=b}g.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={};function y(){}r.on=y,r.addListener=y,r.once=y,r.off=y,r.removeListener=y,r.removeAllListeners=y,r.emit=y,r.prependListener=y,r.prependOnceListener=y,r.listeners=function(w){return[]},r.binding=function(w){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(w){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}),Nt=ge((e,t)=>{ue(),fe(),ce();var{SymbolAsyncIterator:r,SymbolIterator:o,SymbolFor:u}=We(),n=u("nodejs.stream.destroyed"),i=u("nodejs.stream.errored"),s=u("nodejs.stream.readable"),a=u("nodejs.stream.writable"),l=u("nodejs.stream.disturbed"),c=u("nodejs.webstream.isClosedPromise"),f=u("nodejs.webstream.controllerErrorFunction");function p(P,J=!1){var ve;return!!(P&&typeof P.pipe=="function"&&typeof P.on=="function"&&(!J||typeof P.pause=="function"&&typeof P.resume=="function")&&(!P._writableState||((ve=P._readableState)===null||ve===void 0?void 0:ve.readable)!==!1)&&(!P._writableState||P._readableState))}function m(P){var J;return!!(P&&typeof P.write=="function"&&typeof P.on=="function"&&(!P._readableState||((J=P._writableState)===null||J===void 0?void 0:J.writable)!==!1))}function h(P){return!!(P&&typeof P.pipe=="function"&&P._readableState&&typeof P.on=="function"&&typeof P.write=="function")}function g(P){return P&&(P._readableState||P._writableState||typeof P.write=="function"&&typeof P.on=="function"||typeof P.pipe=="function"&&typeof P.on=="function")}function y(P){return!!(P&&!g(P)&&typeof P.pipeThrough=="function"&&typeof P.getReader=="function"&&typeof P.cancel=="function")}function w(P){return!!(P&&!g(P)&&typeof P.getWriter=="function"&&typeof P.abort=="function")}function b(P){return!!(P&&!g(P)&&typeof P.readable=="object"&&typeof P.writable=="object")}function E(P){return y(P)||w(P)||b(P)}function T(P,J){return P==null?!1:J===!0?typeof P[r]=="function":J===!1?typeof P[o]=="function":typeof P[r]=="function"||typeof P[o]=="function"}function v(P){if(!g(P))return null;let J=P._writableState,ve=P._readableState,re=J||ve;return!!(P.destroyed||P[n]||re!=null&&re.destroyed)}function A(P){if(!m(P))return null;if(P.writableEnded===!0)return!0;let J=P._writableState;return J!=null&&J.errored?!1:typeof J?.ended!="boolean"?null:J.ended}function S(P,J){if(!m(P))return null;if(P.writableFinished===!0)return!0;let ve=P._writableState;return ve!=null&&ve.errored?!1:typeof ve?.finished!="boolean"?null:!!(ve.finished||J===!1&&ve.ended===!0&&ve.length===0)}function R(P){if(!p(P))return null;if(P.readableEnded===!0)return!0;let J=P._readableState;return!J||J.errored?!1:typeof J?.ended!="boolean"?null:J.ended}function C(P,J){if(!p(P))return null;let ve=P._readableState;return ve!=null&&ve.errored?!1:typeof ve?.endEmitted!="boolean"?null:!!(ve.endEmitted||J===!1&&ve.ended===!0&&ve.length===0)}function M(P){return P&&P[s]!=null?P[s]:typeof P?.readable!="boolean"?null:v(P)?!1:p(P)&&P.readable&&!C(P)}function F(P){return P&&P[a]!=null?P[a]:typeof P?.writable!="boolean"?null:v(P)?!1:m(P)&&P.writable&&!A(P)}function O(P,J){return g(P)?v(P)?!0:!(J?.readable!==!1&&M(P)||J?.writable!==!1&&F(P)):null}function H(P){var J,ve;return g(P)?P.writableErrored?P.writableErrored:(J=(ve=P._writableState)===null||ve===void 0?void 0:ve.errored)!==null&&J!==void 0?J:null:null}function j(P){var J,ve;return g(P)?P.readableErrored?P.readableErrored:(J=(ve=P._readableState)===null||ve===void 0?void 0:ve.errored)!==null&&J!==void 0?J:null:null}function x(P){if(!g(P))return null;if(typeof P.closed=="boolean")return P.closed;let J=P._writableState,ve=P._readableState;return typeof J?.closed=="boolean"||typeof ve?.closed=="boolean"?J?.closed||ve?.closed:typeof P._closed=="boolean"&&le(P)?P._closed:null}function le(P){return typeof P._closed=="boolean"&&typeof P._defaultKeepAlive=="boolean"&&typeof P._removedConnection=="boolean"&&typeof P._removedContLen=="boolean"}function z(P){return typeof P._sent100=="boolean"&&le(P)}function Y(P){var J;return typeof P._consuming=="boolean"&&typeof P._dumped=="boolean"&&((J=P.req)===null||J===void 0?void 0:J.upgradeOrConnect)===void 0}function ne(P){if(!g(P))return null;let J=P._writableState,ve=P._readableState,re=J||ve;return!re&&z(P)||!!(re&&re.autoDestroy&&re.emitClose&&re.closed===!1)}function W(P){var J;return!!(P&&((J=P[l])!==null&&J!==void 0?J:P.readableDidRead||P.readableAborted))}function ee(P){var J,ve,re,we,K,U,ie,$,X,Q;return!!(P&&((J=(ve=(re=(we=(K=(U=P[i])!==null&&U!==void 0?U:P.readableErrored)!==null&&K!==void 0?K:P.writableErrored)!==null&&we!==void 0?we:(ie=P._readableState)===null||ie===void 0?void 0:ie.errorEmitted)!==null&&re!==void 0?re:($=P._writableState)===null||$===void 0?void 0:$.errorEmitted)!==null&&ve!==void 0?ve:(X=P._readableState)===null||X===void 0?void 0:X.errored)!==null&&J!==void 0?J:!((Q=P._writableState)===null||Q===void 0)&&Q.errored))}t.exports={isDestroyed:v,kIsDestroyed:n,isDisturbed:W,kIsDisturbed:l,isErrored:ee,kIsErrored:i,isReadable:M,kIsReadable:s,kIsClosedPromise:c,kControllerErrorFunction:f,kIsWritable:a,isClosed:x,isDuplexNodeStream:h,isFinished:O,isIterable:T,isReadableNodeStream:p,isReadableStream:y,isReadableEnded:R,isReadableFinished:C,isReadableErrored:j,isNodeStream:g,isWebStream:E,isWritable:F,isWritableNodeStream:m,isWritableStream:w,isWritableEnded:A,isWritableFinished:S,isWritableErrored:H,isServerRequest:Y,isServerResponse:z,willEmitClose:ne,isTransformStream:b}}),Wt=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),{AbortError:o,codes:u}=et(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=u,{kEmptyObject:s,once:a}=nt(),{validateAbortSignal:l,validateFunction:c,validateObject:f,validateBoolean:p}=Ur(),{Promise:m,PromisePrototypeThen:h,SymbolDispose:g}=We(),{isClosed:y,isReadable:w,isReadableNodeStream:b,isReadableStream:E,isReadableFinished:T,isReadableErrored:v,isWritable:A,isWritableNodeStream:S,isWritableStream:R,isWritableFinished:C,isWritableErrored:M,isNodeStream:F,willEmitClose:O,kIsClosedPromise:H}=Nt(),j;function x(W){return W.setHeader&&typeof W.abort=="function"}var le=()=>{};function z(W,ee,P){var J,ve;if(arguments.length===2?(P=ee,ee=s):ee==null?ee=s:f(ee,"options"),c(P,"callback"),l(ee.signal,"options.signal"),P=a(P),E(W)||R(W))return Y(W,ee,P);if(!F(W))throw new n("stream",["ReadableStream","WritableStream","Stream"],W);let re=(J=ee.readable)!==null&&J!==void 0?J:b(W),we=(ve=ee.writable)!==null&&ve!==void 0?ve:S(W),K=W._writableState,U=W._readableState,ie=()=>{W.writable||Q()},$=O(W)&&b(W)===re&&S(W)===we,X=C(W,!1),Q=()=>{X=!0,W.destroyed&&($=!1),!($&&(!W.readable||re))&&(!re||ye)&&P.call(W)},ye=T(W,!1),se=()=>{ye=!0,W.destroyed&&($=!1),!($&&(!W.writable||we))&&(!we||X)&&P.call(W)},D=V=>{P.call(W,V)},G=y(W),te=()=>{G=!0;let V=M(W)||v(W);if(V&&typeof V!="boolean")return P.call(W,V);if(re&&!ye&&b(W,!0)&&!T(W,!1))return P.call(W,new i);if(we&&!X&&!C(W,!1))return P.call(W,new i);P.call(W)},de=()=>{G=!0;let V=M(W)||v(W);if(V&&typeof V!="boolean")return P.call(W,V);P.call(W)},pe=()=>{W.req.on("finish",Q)};x(W)?(W.on("complete",Q),$||W.on("abort",te),W.req?pe():W.on("request",pe)):we&&!K&&(W.on("end",ie),W.on("close",ie)),!$&&typeof W.aborted=="boolean"&&W.on("aborted",te),W.on("end",se),W.on("finish",Q),ee.error!==!1&&W.on("error",D),W.on("close",te),G?r.nextTick(te):K!=null&&K.errorEmitted||U!=null&&U.errorEmitted?$||r.nextTick(de):(!re&&(!$||w(W))&&(X||A(W)===!1)||!we&&(!$||A(W))&&(ye||w(W)===!1)||U&&W.req&&W.aborted)&&r.nextTick(de);let _e=()=>{P=le,W.removeListener("aborted",te),W.removeListener("complete",Q),W.removeListener("abort",te),W.removeListener("request",pe),W.req&&W.req.removeListener("finish",Q),W.removeListener("end",ie),W.removeListener("close",ie),W.removeListener("finish",Q),W.removeListener("end",se),W.removeListener("error",D),W.removeListener("close",te)};if(ee.signal&&!G){let V=()=>{let be=P;_e(),be.call(W,new o(void 0,{cause:ee.signal.reason}))};if(ee.signal.aborted)r.nextTick(V);else{j=j||nt().addAbortListener;let be=j(ee.signal,V),Ee=P;P=a((...ae)=>{be[g](),Ee.apply(W,ae)})}}return _e}function Y(W,ee,P){let J=!1,ve=le;if(ee.signal)if(ve=()=>{J=!0,P.call(W,new o(void 0,{cause:ee.signal.reason}))},ee.signal.aborted)r.nextTick(ve);else{j=j||nt().addAbortListener;let we=j(ee.signal,ve),K=P;P=a((...U)=>{we[g](),K.apply(W,U)})}let re=(...we)=>{J||r.nextTick(()=>P.apply(W,we))};return h(W[H].promise,re,re),le}function ne(W,ee){var P;let J=!1;return ee===null&&(ee=s),(P=ee)!==null&&P!==void 0&&P.cleanup&&(p(ee.cleanup,"cleanup"),J=ee.cleanup),new m((ve,re)=>{let we=z(W,ee,K=>{J&&we(),K?re(K):ve()})})}t.exports=z,t.exports.finished=ne}),br=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),{aggregateTwoErrors:o,codes:{ERR_MULTIPLE_CALLBACK:u},AbortError:n}=et(),{Symbol:i}=We(),{kIsDestroyed:s,isDestroyed:a,isFinished:l,isServerRequest:c}=Nt(),f=i("kDestroy"),p=i("kConstruct");function m(O,H,j){O&&(O.stack,H&&!H.errored&&(H.errored=O),j&&!j.errored&&(j.errored=O))}function h(O,H){let j=this._readableState,x=this._writableState,le=x||j;return x!=null&&x.destroyed||j!=null&&j.destroyed?(typeof H=="function"&&H(),this):(m(O,x,j),x&&(x.destroyed=!0),j&&(j.destroyed=!0),le.constructed?g(this,O,H):this.once(f,function(z){g(this,o(z,O),H)}),this)}function g(O,H,j){let x=!1;function le(z){if(x)return;x=!0;let Y=O._readableState,ne=O._writableState;m(z,ne,Y),ne&&(ne.closed=!0),Y&&(Y.closed=!0),typeof j=="function"&&j(z),z?r.nextTick(y,O,z):r.nextTick(w,O)}try{O._destroy(H||null,le)}catch(z){le(z)}}function y(O,H){b(O,H),w(O)}function w(O){let H=O._readableState,j=O._writableState;j&&(j.closeEmitted=!0),H&&(H.closeEmitted=!0),(j!=null&&j.emitClose||H!=null&&H.emitClose)&&O.emit("close")}function b(O,H){let j=O._readableState,x=O._writableState;x!=null&&x.errorEmitted||j!=null&&j.errorEmitted||(x&&(x.errorEmitted=!0),j&&(j.errorEmitted=!0),O.emit("error",H))}function E(){let O=this._readableState,H=this._writableState;O&&(O.constructed=!0,O.closed=!1,O.closeEmitted=!1,O.destroyed=!1,O.errored=null,O.errorEmitted=!1,O.reading=!1,O.ended=O.readable===!1,O.endEmitted=O.readable===!1),H&&(H.constructed=!0,H.destroyed=!1,H.closed=!1,H.closeEmitted=!1,H.errored=null,H.errorEmitted=!1,H.finalCalled=!1,H.prefinished=!1,H.ended=H.writable===!1,H.ending=H.writable===!1,H.finished=H.writable===!1)}function T(O,H,j){let x=O._readableState,le=O._writableState;if(le!=null&&le.destroyed||x!=null&&x.destroyed)return this;x!=null&&x.autoDestroy||le!=null&&le.autoDestroy?O.destroy(H):H&&(H.stack,le&&!le.errored&&(le.errored=H),x&&!x.errored&&(x.errored=H),j?r.nextTick(b,O,H):b(O,H))}function v(O,H){if(typeof O._construct!="function")return;let j=O._readableState,x=O._writableState;j&&(j.constructed=!1),x&&(x.constructed=!1),O.once(p,H),!(O.listenerCount(p)>1)&&r.nextTick(A,O)}function A(O){let H=!1;function j(x){if(H){T(O,x??new u);return}H=!0;let le=O._readableState,z=O._writableState,Y=z||le;le&&(le.constructed=!0),z&&(z.constructed=!0),Y.destroyed?O.emit(f,x):x?T(O,x,!0):r.nextTick(S,O)}try{O._construct(x=>{r.nextTick(j,x)})}catch(x){r.nextTick(j,x)}}function S(O){O.emit(p)}function R(O){return O?.setHeader&&typeof O.abort=="function"}function C(O){O.emit("close")}function M(O,H){O.emit("error",H),r.nextTick(C,O)}function F(O,H){!O||a(O)||(!H&&!l(O)&&(H=new n),c(O)?(O.socket=null,O.destroy(H)):R(O)?O.abort():R(O.req)?O.req.abort():typeof O.destroy=="function"?O.destroy(H):typeof O.close=="function"?O.close():H?r.nextTick(M,O,H):r.nextTick(C,O),O.destroyed||(O[s]=!0))}t.exports={construct:v,destroyer:F,destroy:h,undestroy:E,errorOrDestroy:T}}),So=ge((e,t)=>{ue(),fe(),ce();var{ArrayIsArray:r,ObjectSetPrototypeOf:o}=We(),{EventEmitter:u}=(zt(),Ue(jt));function n(s){u.call(this,s)}o(n.prototype,u.prototype),o(n,u),n.prototype.pipe=function(s,a){let l=this;function c(w){s.writable&&s.write(w)===!1&&l.pause&&l.pause()}l.on("data",c);function f(){l.readable&&l.resume&&l.resume()}s.on("drain",f),!s._isStdio&&(!a||a.end!==!1)&&(l.on("end",m),l.on("close",h));let p=!1;function m(){p||(p=!0,s.end())}function h(){p||(p=!0,typeof s.destroy=="function"&&s.destroy())}function g(w){y(),u.listenerCount(this,"error")===0&&this.emit("error",w)}i(l,"error",g),i(s,"error",g);function y(){l.removeListener("data",c),s.removeListener("drain",f),l.removeListener("end",m),l.removeListener("close",h),l.removeListener("error",g),s.removeListener("error",g),l.removeListener("end",y),l.removeListener("close",y),s.removeListener("close",y)}return l.on("end",y),l.on("close",y),s.on("close",y),s.emit("pipe",l),s};function i(s,a,l){if(typeof s.prependListener=="function")return s.prependListener(a,l);!s._events||!s._events[a]?s.on(a,l):r(s._events[a])?s._events[a].unshift(l):s._events[a]=[l,s._events[a]]}t.exports={Stream:n,prependListener:i}}),on=ge((e,t)=>{ue(),fe(),ce();var{SymbolDispose:r}=We(),{AbortError:o,codes:u}=et(),{isNodeStream:n,isWebStream:i,kControllerErrorFunction:s}=Nt(),a=Wt(),{ERR_INVALID_ARG_TYPE:l}=u,c,f=(p,m)=>{if(typeof p!="object"||!("aborted"in p))throw new l(m,"AbortSignal",p)};t.exports.addAbortSignal=function(p,m){if(f(p,"signal"),!n(m)&&!i(m))throw new l("stream",["ReadableStream","WritableStream","Stream"],m);return t.exports.addAbortSignalNoValidate(p,m)},t.exports.addAbortSignalNoValidate=function(p,m){if(typeof p!="object"||!("aborted"in p))return m;let h=n(m)?()=>{m.destroy(new o(void 0,{cause:p.reason}))}:()=>{m[s](new o(void 0,{cause:p.reason}))};if(p.aborted)h();else{c=c||nt().addAbortListener;let g=c(p,h);a(m,g[r])}return m}}),gm=ge((e,t)=>{ue(),fe(),ce();var{StringPrototypeSlice:r,SymbolIterator:o,TypedArrayPrototypeSet:u,Uint8Array:n}=We(),{Buffer:i}=($e(),Ue(Ve)),{inspect:s}=nt();t.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(a){let l={data:a,next:null};this.length>0?this.tail.next=l:this.head=l,this.tail=l,++this.length}unshift(a){let l={data:a,next:this.head};this.length===0&&(this.tail=l),this.head=l,++this.length}shift(){if(this.length===0)return;let a=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,a}clear(){this.head=this.tail=null,this.length=0}join(a){if(this.length===0)return"";let l=this.head,c=""+l.data;for(;(l=l.next)!==null;)c+=a+l.data;return c}concat(a){if(this.length===0)return i.alloc(0);let l=i.allocUnsafe(a>>>0),c=this.head,f=0;for(;c;)u(l,c.data,f),f+=c.data.length,c=c.next;return l}consume(a,l){let c=this.head.data;if(a<c.length){let f=c.slice(0,a);return this.head.data=c.slice(a),f}return a===c.length?this.shift():l?this._getString(a):this._getBuffer(a)}first(){return this.head.data}*[o](){for(let a=this.head;a;a=a.next)yield a.data}_getString(a){let l="",c=this.head,f=0;do{let p=c.data;if(a>p.length)l+=p,a-=p.length;else{a===p.length?(l+=p,++f,c.next?this.head=c.next:this.head=this.tail=null):(l+=r(p,0,a),this.head=c,c.data=r(p,a));break}++f}while((c=c.next)!==null);return this.length-=f,l}_getBuffer(a){let l=i.allocUnsafe(a),c=a,f=this.head,p=0;do{let m=f.data;if(a>m.length)u(l,m,c-a),a-=m.length;else{a===m.length?(u(l,m,c-a),++p,f.next?this.head=f.next:this.head=this.tail=null):(u(l,new n(m.buffer,m.byteOffset,a),c-a),this.head=f,f.data=m.slice(a));break}++p}while((f=f.next)!==null);return this.length-=p,l}[Symbol.for("nodejs.util.inspect.custom")](a,l){return s(this,{...l,depth:0,customInspect:!1})}}}),sn=ge((e,t)=>{ue(),fe(),ce();var{MathFloor:r,NumberIsInteger:o}=We(),{validateInteger:u}=Ur(),{ERR_INVALID_ARG_VALUE:n}=et().codes,i=16*1024,s=16;function a(p,m,h){return p.highWaterMark!=null?p.highWaterMark:m?p[h]:null}function l(p){return p?s:i}function c(p,m){u(m,"value",0),p?s=m:i=m}function f(p,m,h,g){let y=a(m,g,h);if(y!=null){if(!o(y)||y<0){let w=g?`options.${h}`:"options.highWaterMark";throw new n(w,y)}return r(y)}return l(p.objectMode)}t.exports={getHighWaterMark:f,getDefaultHighWaterMark:l,setDefaultHighWaterMark:c}}),bm=ge((e,t)=>{ue(),fe(),ce();var r=($e(),Ue(Ve)),o=r.Buffer;function u(i,s){for(var a in i)s[a]=i[a]}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=r:(u(r,e),e.Buffer=n);function n(i,s,a){return o(i,s,a)}n.prototype=Object.create(o.prototype),u(o,n),n.from=function(i,s,a){if(typeof i=="number")throw new TypeError("Argument must not be a number");return o(i,s,a)},n.alloc=function(i,s,a){if(typeof i!="number")throw new TypeError("Argument must be a number");var l=o(i);return s!==void 0?typeof a=="string"?l.fill(s,a):l.fill(s):l.fill(0),l},n.allocUnsafe=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return o(i)},n.allocUnsafeSlow=function(i){if(typeof i!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(i)}}),mm=ge(e=>{ue(),fe(),ce();var t=bm().Buffer,r=t.isEncoding||function(b){switch(b=""+b,b&&b.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(b){if(!b)return"utf8";for(var E;;)switch(b){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return b;default:if(E)return;b=(""+b).toLowerCase(),E=!0}}function u(b){var E=o(b);if(typeof E!="string"&&(t.isEncoding===r||!r(b)))throw new Error("Unknown encoding: "+b);return E||b}e.StringDecoder=n;function n(b){this.encoding=u(b);var E;switch(this.encoding){case"utf16le":this.text=p,this.end=m,E=4;break;case"utf8":this.fillLast=l,E=4;break;case"base64":this.text=h,this.end=g,E=3;break;default:this.write=y,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(E)}n.prototype.write=function(b){if(b.length===0)return"";var E,T;if(this.lastNeed){if(E=this.fillLast(b),E===void 0)return"";T=this.lastNeed,this.lastNeed=0}else T=0;return T<b.length?E?E+this.text(b,T):this.text(b,T):E||""},n.prototype.end=f,n.prototype.text=c,n.prototype.fillLast=function(b){if(this.lastNeed<=b.length)return b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,this.lastTotal-this.lastNeed,0,b.length),this.lastNeed-=b.length};function i(b){return b<=127?0:b>>5===6?2:b>>4===14?3:b>>3===30?4:b>>6===2?-1:-2}function s(b,E,T){var v=E.length-1;if(v<T)return 0;var A=i(E[v]);return A>=0?(A>0&&(b.lastNeed=A-1),A):--v<T||A===-2?0:(A=i(E[v]),A>=0?(A>0&&(b.lastNeed=A-2),A):--v<T||A===-2?0:(A=i(E[v]),A>=0?(A>0&&(A===2?A=0:b.lastNeed=A-3),A):0))}function a(b,E,T){if((E[0]&192)!==128)return b.lastNeed=0,"�";if(b.lastNeed>1&&E.length>1){if((E[1]&192)!==128)return b.lastNeed=1,"�";if(b.lastNeed>2&&E.length>2&&(E[2]&192)!==128)return b.lastNeed=2,"�"}}function l(b){var E=this.lastTotal-this.lastNeed,T=a(this,b);if(T!==void 0)return T;if(this.lastNeed<=b.length)return b.copy(this.lastChar,E,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);b.copy(this.lastChar,E,0,b.length),this.lastNeed-=b.length}function c(b,E){var T=s(this,b,E);if(!this.lastNeed)return b.toString("utf8",E);this.lastTotal=T;var v=b.length-(T-this.lastNeed);return b.copy(this.lastChar,0,v),b.toString("utf8",E,v)}function f(b){var E=b&&b.length?this.write(b):"";return this.lastNeed?E+"�":E}function p(b,E){if((b.length-E)%2===0){var T=b.toString("utf16le",E);if(T){var v=T.charCodeAt(T.length-1);if(v>=55296&&v<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1],T.slice(0,-1)}return T}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=b[b.length-1],b.toString("utf16le",E,b.length-1)}function m(b){var E=b&&b.length?this.write(b):"";if(this.lastNeed){var T=this.lastTotal-this.lastNeed;return E+this.lastChar.toString("utf16le",0,T)}return E}function h(b,E){var T=(b.length-E)%3;return T===0?b.toString("base64",E):(this.lastNeed=3-T,this.lastTotal=3,T===1?this.lastChar[0]=b[b.length-1]:(this.lastChar[0]=b[b.length-2],this.lastChar[1]=b[b.length-1]),b.toString("base64",E,b.length-T))}function g(b){var E=b&&b.length?this.write(b):"";return this.lastNeed?E+this.lastChar.toString("base64",0,3-this.lastNeed):E}function y(b){return b.toString(this.encoding)}function w(b){return b&&b.length?this.write(b):""}}),Rl=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),{PromisePrototypeThen:o,SymbolAsyncIterator:u,SymbolIterator:n}=We(),{Buffer:i}=($e(),Ue(Ve)),{ERR_INVALID_ARG_TYPE:s,ERR_STREAM_NULL_VALUES:a}=et().codes;function l(c,f,p){let m;if(typeof f=="string"||f instanceof i)return new c({objectMode:!0,...p,read(){this.push(f),this.push(null)}});let h;if(f&&f[u])h=!0,m=f[u]();else if(f&&f[n])h=!1,m=f[n]();else throw new s("iterable",["Iterable"],f);let g=new c({objectMode:!0,highWaterMark:1,...p}),y=!1;g._read=function(){y||(y=!0,b())},g._destroy=function(E,T){o(w(E),()=>r.nextTick(T,E),v=>r.nextTick(T,v||E))};async function w(E){let T=E!=null,v=typeof m.throw=="function";if(T&&v){let{value:A,done:S}=await m.throw(E);if(await A,S)return}if(typeof m.return=="function"){let{value:A}=await m.return();await A}}async function b(){for(;;){try{let{value:E,done:T}=h?await m.next():m.next();if(T)g.push(null);else{let v=E&&typeof E.then=="function"?await E:E;if(v===null)throw y=!1,new a;if(g.push(v))continue;y=!1}}catch(E){g.destroy(E)}break}}return g}t.exports=l}),an=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),{ArrayPrototypeIndexOf:o,NumberIsInteger:u,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:s,ObjectKeys:a,ObjectSetPrototypeOf:l,Promise:c,SafeSet:f,SymbolAsyncDispose:p,SymbolAsyncIterator:m,Symbol:h}=We();t.exports=ae,ae.ReadableState=Ee;var{EventEmitter:g}=(zt(),Ue(jt)),{Stream:y,prependListener:w}=So(),{Buffer:b}=($e(),Ue(Ve)),{addAbortSignal:E}=on(),T=Wt(),v=nt().debuglog("stream",L=>{v=L}),A=gm(),S=br(),{getHighWaterMark:R,getDefaultHighWaterMark:C}=sn(),{aggregateTwoErrors:M,codes:{ERR_INVALID_ARG_TYPE:F,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_OUT_OF_RANGE:H,ERR_STREAM_PUSH_AFTER_EOF:j,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:x},AbortError:le}=et(),{validateObject:z}=Ur(),Y=h("kPaused"),{StringDecoder:ne}=mm(),W=Rl();l(ae.prototype,y.prototype),l(ae,y);var ee=()=>{},{errorOrDestroy:P}=S,J=1,ve=2,re=4,we=8,K=16,U=32,ie=64,$=128,X=256,Q=512,ye=1024,se=2048,D=4096,G=8192,te=16384,de=32768,pe=65536,_e=1<<17,V=1<<18;function be(L){return{enumerable:!1,get(){return(this.state&L)!==0},set(k){k?this.state|=L:this.state&=~L}}}s(Ee.prototype,{objectMode:be(J),ended:be(ve),endEmitted:be(re),reading:be(we),constructed:be(K),sync:be(U),needReadable:be(ie),emittedReadable:be($),readableListening:be(X),resumeScheduled:be(Q),errorEmitted:be(ye),emitClose:be(se),autoDestroy:be(D),destroyed:be(G),closed:be(te),closeEmitted:be(de),multiAwaitDrain:be(pe),readingMore:be(_e),dataEmitted:be(V)});function Ee(L,k,Se){typeof Se!="boolean"&&(Se=k instanceof Lt()),this.state=se|D|K|U,L&&L.objectMode&&(this.state|=J),Se&&L&&L.readableObjectMode&&(this.state|=J),this.highWaterMark=L?R(this,L,"readableHighWaterMark",Se):C(!1),this.buffer=new A,this.length=0,this.pipes=[],this.flowing=null,this[Y]=null,L&&L.emitClose===!1&&(this.state&=~se),L&&L.autoDestroy===!1&&(this.state&=~D),this.errored=null,this.defaultEncoding=L&&L.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,L&&L.encoding&&(this.decoder=new ne(L.encoding),this.encoding=L.encoding)}function ae(L){if(!(this instanceof ae))return new ae(L);let k=this instanceof Lt();this._readableState=new Ee(L,this,k),L&&(typeof L.read=="function"&&(this._read=L.read),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.construct=="function"&&(this._construct=L.construct),L.signal&&!k&&E(L.signal,this)),y.call(this,L),S.construct(this,()=>{this._readableState.needReadable&&q(this,this._readableState)})}ae.prototype.destroy=S.destroy,ae.prototype._undestroy=S.undestroy,ae.prototype._destroy=function(L,k){k(L)},ae.prototype[g.captureRejectionSymbol]=function(L){this.destroy(L)},ae.prototype[p]=function(){let L;return this.destroyed||(L=this.readableEnded?null:new le,this.destroy(L)),new c((k,Se)=>T(this,Te=>Te&&Te!==L?Se(Te):k(null)))},ae.prototype.push=function(L,k){return Me(this,L,k,!1)},ae.prototype.unshift=function(L,k){return Me(this,L,k,!0)};function Me(L,k,Se,Te){v("readableAddChunk",k);let Re=L._readableState,He;if((Re.state&J)===0&&(typeof k=="string"?(Se=Se||Re.defaultEncoding,Re.encoding!==Se&&(Te&&Re.encoding?k=b.from(k,Se).toString(Re.encoding):(k=b.from(k,Se),Se=""))):k instanceof b?Se="":y._isUint8Array(k)?(k=y._uint8ArrayToBuffer(k),Se=""):k!=null&&(He=new F("chunk",["string","Buffer","Uint8Array"],k))),He)P(L,He);else if(k===null)Re.state&=~we,Z(L,Re);else if((Re.state&J)!==0||k&&k.length>0)if(Te)if((Re.state&re)!==0)P(L,new x);else{if(Re.destroyed||Re.errored)return!1;d(L,Re,k,!0)}else if(Re.ended)P(L,new j);else{if(Re.destroyed||Re.errored)return!1;Re.state&=~we,Re.decoder&&!Se?(k=Re.decoder.write(k),Re.objectMode||k.length!==0?d(L,Re,k,!1):q(L,Re)):d(L,Re,k,!1)}else Te||(Re.state&=~we,q(L,Re));return!Re.ended&&(Re.length<Re.highWaterMark||Re.length===0)}function d(L,k,Se,Te){k.flowing&&k.length===0&&!k.sync&&L.listenerCount("data")>0?((k.state&pe)!==0?k.awaitDrainWriters.clear():k.awaitDrainWriters=null,k.dataEmitted=!0,L.emit("data",Se)):(k.length+=k.objectMode?1:Se.length,Te?k.buffer.unshift(Se):k.buffer.push(Se),(k.state&ie)!==0&&he(L)),q(L,k)}ae.prototype.isPaused=function(){let L=this._readableState;return L[Y]===!0||L.flowing===!1},ae.prototype.setEncoding=function(L){let k=new ne(L);this._readableState.decoder=k,this._readableState.encoding=this._readableState.decoder.encoding;let Se=this._readableState.buffer,Te="";for(let Re of Se)Te+=k.write(Re);return Se.clear(),Te!==""&&Se.push(Te),this._readableState.length=Te.length,this};var _=1073741824;function I(L){if(L>_)throw new H("size","<= 1GiB",L);return L--,L|=L>>>1,L|=L>>>2,L|=L>>>4,L|=L>>>8,L|=L>>>16,L++,L}function B(L,k){return L<=0||k.length===0&&k.ended?0:(k.state&J)!==0?1:n(L)?k.flowing&&k.length?k.buffer.first().length:k.length:L<=k.length?L:k.ended?k.length:0}ae.prototype.read=function(L){v("read",L),L===void 0?L=NaN:u(L)||(L=i(L,10));let k=this._readableState,Se=L;if(L>k.highWaterMark&&(k.highWaterMark=I(L)),L!==0&&(k.state&=~$),L===0&&k.needReadable&&((k.highWaterMark!==0?k.length>=k.highWaterMark:k.length>0)||k.ended))return v("read: emitReadable",k.length,k.ended),k.length===0&&k.ended?wt(this):he(this),null;if(L=B(L,k),L===0&&k.ended)return k.length===0&&wt(this),null;let Te=(k.state&ie)!==0;if(v("need readable",Te),(k.length===0||k.length-L<k.highWaterMark)&&(Te=!0,v("length less than watermark",Te)),k.ended||k.reading||k.destroyed||k.errored||!k.constructed)Te=!1,v("reading, ended or constructing",Te);else if(Te){v("do read"),k.state|=we|U,k.length===0&&(k.state|=ie);try{this._read(k.highWaterMark)}catch(He){P(this,He)}k.state&=~U,k.reading||(L=B(Se,k))}let Re;return L>0?Re=Er(L,k):Re=null,Re===null?(k.needReadable=k.length<=k.highWaterMark,L=0):(k.length-=L,k.multiAwaitDrain?k.awaitDrainWriters.clear():k.awaitDrainWriters=null),k.length===0&&(k.ended||(k.needReadable=!0),Se!==L&&k.ended&&wt(this)),Re!==null&&!k.errorEmitted&&!k.closeEmitted&&(k.dataEmitted=!0,this.emit("data",Re)),Re};function Z(L,k){if(v("onEofChunk"),!k.ended){if(k.decoder){let Se=k.decoder.end();Se&&Se.length&&(k.buffer.push(Se),k.length+=k.objectMode?1:Se.length)}k.ended=!0,k.sync?he(L):(k.needReadable=!1,k.emittedReadable=!0,Ae(L))}}function he(L){let k=L._readableState;v("emitReadable",k.needReadable,k.emittedReadable),k.needReadable=!1,k.emittedReadable||(v("emitReadable",k.flowing),k.emittedReadable=!0,r.nextTick(Ae,L))}function Ae(L){let k=L._readableState;v("emitReadable_",k.destroyed,k.length,k.ended),!k.destroyed&&!k.errored&&(k.length||k.ended)&&(L.emit("readable"),k.emittedReadable=!1),k.needReadable=!k.flowing&&!k.ended&&k.length<=k.highWaterMark,_t(L)}function q(L,k){!k.readingMore&&k.constructed&&(k.readingMore=!0,r.nextTick(oe,L,k))}function oe(L,k){for(;!k.reading&&!k.ended&&(k.length<k.highWaterMark||k.flowing&&k.length===0);){let Se=k.length;if(v("maybeReadMore read 0"),L.read(0),Se===k.length)break}k.readingMore=!1}ae.prototype._read=function(L){throw new O("_read()")},ae.prototype.pipe=function(L,k){let Se=this,Te=this._readableState;Te.pipes.length===1&&(Te.multiAwaitDrain||(Te.multiAwaitDrain=!0,Te.awaitDrainWriters=new f(Te.awaitDrainWriters?[Te.awaitDrainWriters]:[]))),Te.pipes.push(L),v("pipe count=%d opts=%j",Te.pipes.length,k);let Re=(!k||k.end!==!1)&&L!==r.stdout&&L!==r.stderr?tt:or;Te.endEmitted?r.nextTick(Re):Se.once("end",Re),L.on("unpipe",He);function He(At,kt){v("onunpipe"),At===Se&&kt&&kt.hasUnpiped===!1&&(kt.hasUnpiped=!0,Wr())}function tt(){v("onend"),L.end()}let pt,jr=!1;function Wr(){v("cleanup"),L.removeListener("close",St),L.removeListener("finish",$t),pt&&L.removeListener("drain",pt),L.removeListener("error",ir),L.removeListener("unpipe",He),Se.removeListener("end",tt),Se.removeListener("end",or),Se.removeListener("data",Gn),jr=!0,pt&&Te.awaitDrainWriters&&(!L._writableState||L._writableState.needDrain)&&pt()}function Gr(){jr||(Te.pipes.length===1&&Te.pipes[0]===L?(v("false write response, pause",0),Te.awaitDrainWriters=L,Te.multiAwaitDrain=!1):Te.pipes.length>1&&Te.pipes.includes(L)&&(v("false write response, pause",Te.awaitDrainWriters.size),Te.awaitDrainWriters.add(L)),Se.pause()),pt||(pt=Oe(Se,L),L.on("drain",pt))}Se.on("data",Gn);function Gn(At){v("ondata");let kt=L.write(At);v("dest.write",kt),kt===!1&&Gr()}function ir(At){if(v("onerror",At),or(),L.removeListener("error",ir),L.listenerCount("error")===0){let kt=L._writableState||L._readableState;kt&&!kt.errorEmitted?P(L,At):L.emit("error",At)}}w(L,"error",ir);function St(){L.removeListener("finish",$t),or()}L.once("close",St);function $t(){v("onfinish"),L.removeListener("close",St),or()}L.once("finish",$t);function or(){v("unpipe"),Se.unpipe(L)}return L.emit("pipe",Se),L.writableNeedDrain===!0?Gr():Te.flowing||(v("pipe resume"),Se.resume()),L};function Oe(L,k){return function(){let Se=L._readableState;Se.awaitDrainWriters===k?(v("pipeOnDrain",1),Se.awaitDrainWriters=null):Se.multiAwaitDrain&&(v("pipeOnDrain",Se.awaitDrainWriters.size),Se.awaitDrainWriters.delete(k)),(!Se.awaitDrainWriters||Se.awaitDrainWriters.size===0)&&L.listenerCount("data")&&L.resume()}}ae.prototype.unpipe=function(L){let k=this._readableState,Se={hasUnpiped:!1};if(k.pipes.length===0)return this;if(!L){let Re=k.pipes;k.pipes=[],this.pause();for(let He=0;He<Re.length;He++)Re[He].emit("unpipe",this,{hasUnpiped:!1});return this}let Te=o(k.pipes,L);return Te===-1?this:(k.pipes.splice(Te,1),k.pipes.length===0&&this.pause(),L.emit("unpipe",this,Se),this)},ae.prototype.on=function(L,k){let Se=y.prototype.on.call(this,L,k),Te=this._readableState;return L==="data"?(Te.readableListening=this.listenerCount("readable")>0,Te.flowing!==!1&&this.resume()):L==="readable"&&!Te.endEmitted&&!Te.readableListening&&(Te.readableListening=Te.needReadable=!0,Te.flowing=!1,Te.emittedReadable=!1,v("on readable",Te.length,Te.reading),Te.length?he(this):Te.reading||r.nextTick(Le,this)),Se},ae.prototype.addListener=ae.prototype.on,ae.prototype.removeListener=function(L,k){let Se=y.prototype.removeListener.call(this,L,k);return L==="readable"&&r.nextTick(Ne,this),Se},ae.prototype.off=ae.prototype.removeListener,ae.prototype.removeAllListeners=function(L){let k=y.prototype.removeAllListeners.apply(this,arguments);return(L==="readable"||L===void 0)&&r.nextTick(Ne,this),k};function Ne(L){let k=L._readableState;k.readableListening=L.listenerCount("readable")>0,k.resumeScheduled&&k[Y]===!1?k.flowing=!0:L.listenerCount("data")>0?L.resume():k.readableListening||(k.flowing=null)}function Le(L){v("readable nexttick read 0"),L.read(0)}ae.prototype.resume=function(){let L=this._readableState;return L.flowing||(v("resume"),L.flowing=!L.readableListening,Ce(this,L)),L[Y]=!1,this};function Ce(L,k){k.resumeScheduled||(k.resumeScheduled=!0,r.nextTick(vt,L,k))}function vt(L,k){v("resume",k.reading),k.reading||L.read(0),k.resumeScheduled=!1,L.emit("resume"),_t(L),k.flowing&&!k.reading&&L.read(0)}ae.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Y]=!0,this};function _t(L){let k=L._readableState;for(v("flow",k.flowing);k.flowing&&L.read()!==null;);}ae.prototype.wrap=function(L){let k=!1;L.on("data",Te=>{!this.push(Te)&&L.pause&&(k=!0,L.pause())}),L.on("end",()=>{this.push(null)}),L.on("error",Te=>{P(this,Te)}),L.on("close",()=>{this.destroy()}),L.on("destroy",()=>{this.destroy()}),this._read=()=>{k&&L.resume&&(k=!1,L.resume())};let Se=a(L);for(let Te=1;Te<Se.length;Te++){let Re=Se[Te];this[Re]===void 0&&typeof L[Re]=="function"&&(this[Re]=L[Re].bind(L))}return this},ae.prototype[m]=function(){return Qe(this)},ae.prototype.iterator=function(L){return L!==void 0&&z(L,"options"),Qe(this,L)};function Qe(L,k){typeof L.read!="function"&&(L=ae.wrap(L,{objectMode:!0}));let Se=Et(L,k);return Se.stream=L,Se}async function*Et(L,k){let Se=ee;function Te(tt){this===L?(Se(),Se=ee):Se=tt}L.on("readable",Te);let Re,He=T(L,{writable:!1},tt=>{Re=tt?M(Re,tt):null,Se(),Se=ee});try{for(;;){let tt=L.destroyed?null:L.read();if(tt!==null)yield tt;else{if(Re)throw Re;if(Re===null)return;await new c(Te)}}}catch(tt){throw Re=M(Re,tt),Re}finally{(Re||k?.destroyOnReturn!==!1)&&(Re===void 0||L._readableState.autoDestroy)?S.destroyer(L,null):(L.off("readable",Te),He())}}s(ae.prototype,{readable:{__proto__:null,get(){let L=this._readableState;return!!L&&L.readable!==!1&&!L.destroyed&&!L.errorEmitted&&!L.endEmitted},set(L){this._readableState&&(this._readableState.readable=!!L)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(L){this._readableState&&(this._readableState.flowing=L)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(L){this._readableState&&(this._readableState.destroyed=L)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(Ee.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Y]!==!1},set(L){this[Y]=!!L}}}),ae._fromList=Er;function Er(L,k){if(k.length===0)return null;let Se;return k.objectMode?Se=k.buffer.shift():!L||L>=k.length?(k.decoder?Se=k.buffer.join(""):k.buffer.length===1?Se=k.buffer.first():Se=k.buffer.concat(k.length),k.buffer.clear()):Se=k.buffer.consume(L,k.decoder),Se}function wt(L){let k=L._readableState;v("endReadable",k.endEmitted),k.endEmitted||(k.ended=!0,r.nextTick(ot,k,L))}function ot(L,k){if(v("endReadableNT",L.endEmitted,L.length),!L.errored&&!L.closeEmitted&&!L.endEmitted&&L.length===0){if(L.endEmitted=!0,k.emit("end"),k.writable&&k.allowHalfOpen===!1)r.nextTick(Wn,k);else if(L.autoDestroy){let Se=k._writableState;(!Se||Se.autoDestroy&&(Se.finished||Se.writable===!1))&&k.destroy()}}}function Wn(L){L.writable&&!L.writableEnded&&!L.destroyed&&L.end()}ae.from=function(L,k){return W(ae,L,k)};var wr;function Fr(){return wr===void 0&&(wr={}),wr}ae.fromWeb=function(L,k){return Fr().newStreamReadableFromReadableStream(L,k)},ae.toWeb=function(L,k){return Fr().newReadableStreamFromStreamReadable(L,k)},ae.wrap=function(L,k){var Se,Te;return new ae({objectMode:(Se=(Te=L.readableObjectMode)!==null&&Te!==void 0?Te:L.objectMode)!==null&&Se!==void 0?Se:!0,...k,destroy(Re,He){S.destroyer(L,Re),He(Re)}}).wrap(L)}}),Ao=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),{ArrayPrototypeSlice:o,Error:u,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:s,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:l,Symbol:c,SymbolHasInstance:f}=We();t.exports=z,z.WritableState=x;var{EventEmitter:p}=(zt(),Ue(jt)),m=So().Stream,{Buffer:h}=($e(),Ue(Ve)),g=br(),{addAbortSignal:y}=on(),{getHighWaterMark:w,getDefaultHighWaterMark:b}=sn(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:T,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:A,ERR_STREAM_DESTROYED:S,ERR_STREAM_ALREADY_FINISHED:R,ERR_STREAM_NULL_VALUES:C,ERR_STREAM_WRITE_AFTER_END:M,ERR_UNKNOWN_ENCODING:F}=et().codes,{errorOrDestroy:O}=g;a(z.prototype,m.prototype),a(z,m);function H(){}var j=c("kOnFinished");function x(D,G,te){typeof te!="boolean"&&(te=G instanceof Lt()),this.objectMode=!!(D&&D.objectMode),te&&(this.objectMode=this.objectMode||!!(D&&D.writableObjectMode)),this.highWaterMark=D?w(this,D,"writableHighWaterMark",te):b(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let de=!!(D&&D.decodeStrings===!1);this.decodeStrings=!de,this.defaultEncoding=D&&D.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=P.bind(void 0,G),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,le(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!D||D.emitClose!==!1,this.autoDestroy=!D||D.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[j]=[]}function le(D){D.buffered=[],D.bufferedIndex=0,D.allBuffers=!0,D.allNoop=!0}x.prototype.getBuffer=function(){return o(this.buffered,this.bufferedIndex)},i(x.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function z(D){let G=this instanceof Lt();if(!G&&!n(z,this))return new z(D);this._writableState=new x(D,this,G),D&&(typeof D.write=="function"&&(this._write=D.write),typeof D.writev=="function"&&(this._writev=D.writev),typeof D.destroy=="function"&&(this._destroy=D.destroy),typeof D.final=="function"&&(this._final=D.final),typeof D.construct=="function"&&(this._construct=D.construct),D.signal&&y(D.signal,this)),m.call(this,D),g.construct(this,()=>{let te=this._writableState;te.writing||we(this,te),$(this,te)})}i(z,f,{__proto__:null,value:function(D){return n(this,D)?!0:this!==z?!1:D&&D._writableState instanceof x}}),z.prototype.pipe=function(){O(this,new A)};function Y(D,G,te,de){let pe=D._writableState;if(typeof te=="function")de=te,te=pe.defaultEncoding;else{if(!te)te=pe.defaultEncoding;else if(te!=="buffer"&&!h.isEncoding(te))throw new F(te);typeof de!="function"&&(de=H)}if(G===null)throw new C;if(!pe.objectMode)if(typeof G=="string")pe.decodeStrings!==!1&&(G=h.from(G,te),te="buffer");else if(G instanceof h)te="buffer";else if(m._isUint8Array(G))G=m._uint8ArrayToBuffer(G),te="buffer";else throw new E("chunk",["string","Buffer","Uint8Array"],G);let _e;return pe.ending?_e=new M:pe.destroyed&&(_e=new S("write")),_e?(r.nextTick(de,_e),O(D,_e,!0),_e):(pe.pendingcb++,ne(D,pe,G,te,de))}z.prototype.write=function(D,G,te){return Y(this,D,G,te)===!0},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){let D=this._writableState;D.corked&&(D.corked--,D.writing||we(this,D))},z.prototype.setDefaultEncoding=function(D){if(typeof D=="string"&&(D=l(D)),!h.isEncoding(D))throw new F(D);return this._writableState.defaultEncoding=D,this};function ne(D,G,te,de,pe){let _e=G.objectMode?1:te.length;G.length+=_e;let V=G.length<G.highWaterMark;return V||(G.needDrain=!0),G.writing||G.corked||G.errored||!G.constructed?(G.buffered.push({chunk:te,encoding:de,callback:pe}),G.allBuffers&&de!=="buffer"&&(G.allBuffers=!1),G.allNoop&&pe!==H&&(G.allNoop=!1)):(G.writelen=_e,G.writecb=pe,G.writing=!0,G.sync=!0,D._write(te,de,G.onwrite),G.sync=!1),V&&!G.errored&&!G.destroyed}function W(D,G,te,de,pe,_e,V){G.writelen=de,G.writecb=V,G.writing=!0,G.sync=!0,G.destroyed?G.onwrite(new S("write")):te?D._writev(pe,G.onwrite):D._write(pe,_e,G.onwrite),G.sync=!1}function ee(D,G,te,de){--G.pendingcb,de(te),re(G),O(D,te)}function P(D,G){let te=D._writableState,de=te.sync,pe=te.writecb;if(typeof pe!="function"){O(D,new v);return}te.writing=!1,te.writecb=null,te.length-=te.writelen,te.writelen=0,G?(G.stack,te.errored||(te.errored=G),D._readableState&&!D._readableState.errored&&(D._readableState.errored=G),de?r.nextTick(ee,D,te,G,pe):ee(D,te,G,pe)):(te.buffered.length>te.bufferedIndex&&we(D,te),de?te.afterWriteTickInfo!==null&&te.afterWriteTickInfo.cb===pe?te.afterWriteTickInfo.count++:(te.afterWriteTickInfo={count:1,cb:pe,stream:D,state:te},r.nextTick(J,te.afterWriteTickInfo)):ve(D,te,1,pe))}function J({stream:D,state:G,count:te,cb:de}){return G.afterWriteTickInfo=null,ve(D,G,te,de)}function ve(D,G,te,de){for(!G.ending&&!D.destroyed&&G.length===0&&G.needDrain&&(G.needDrain=!1,D.emit("drain"));te-- >0;)G.pendingcb--,de();G.destroyed&&re(G),$(D,G)}function re(D){if(D.writing)return;for(let pe=D.bufferedIndex;pe<D.buffered.length;++pe){var G;let{chunk:_e,callback:V}=D.buffered[pe],be=D.objectMode?1:_e.length;D.length-=be,V((G=D.errored)!==null&&G!==void 0?G:new S("write"))}let te=D[j].splice(0);for(let pe=0;pe<te.length;pe++){var de;te[pe]((de=D.errored)!==null&&de!==void 0?de:new S("end"))}le(D)}function we(D,G){if(G.corked||G.bufferProcessing||G.destroyed||!G.constructed)return;let{buffered:te,bufferedIndex:de,objectMode:pe}=G,_e=te.length-de;if(!_e)return;let V=de;if(G.bufferProcessing=!0,_e>1&&D._writev){G.pendingcb-=_e-1;let be=G.allNoop?H:ae=>{for(let Me=V;Me<te.length;++Me)te[Me].callback(ae)},Ee=G.allNoop&&V===0?te:o(te,V);Ee.allBuffers=G.allBuffers,W(D,G,!0,G.length,Ee,"",be),le(G)}else{do{let{chunk:be,encoding:Ee,callback:ae}=te[V];te[V++]=null;let Me=pe?1:be.length;W(D,G,!1,Me,be,Ee,ae)}while(V<te.length&&!G.writing);V===te.length?le(G):V>256?(te.splice(0,V),G.bufferedIndex=0):G.bufferedIndex=V}G.bufferProcessing=!1}z.prototype._write=function(D,G,te){if(this._writev)this._writev([{chunk:D,encoding:G}],te);else throw new T("_write()")},z.prototype._writev=null,z.prototype.end=function(D,G,te){let de=this._writableState;typeof D=="function"?(te=D,D=null,G=null):typeof G=="function"&&(te=G,G=null);let pe;if(D!=null){let _e=Y(this,D,G);_e instanceof u&&(pe=_e)}return de.corked&&(de.corked=1,this.uncork()),pe||(!de.errored&&!de.ending?(de.ending=!0,$(this,de,!0),de.ended=!0):de.finished?pe=new R("end"):de.destroyed&&(pe=new S("end"))),typeof te=="function"&&(pe||de.finished?r.nextTick(te,pe):de[j].push(te)),this};function K(D){return D.ending&&!D.destroyed&&D.constructed&&D.length===0&&!D.errored&&D.buffered.length===0&&!D.finished&&!D.writing&&!D.errorEmitted&&!D.closeEmitted}function U(D,G){let te=!1;function de(pe){if(te){O(D,pe??v());return}if(te=!0,G.pendingcb--,pe){let _e=G[j].splice(0);for(let V=0;V<_e.length;V++)_e[V](pe);O(D,pe,G.sync)}else K(G)&&(G.prefinished=!0,D.emit("prefinish"),G.pendingcb++,r.nextTick(X,D,G))}G.sync=!0,G.pendingcb++;try{D._final(de)}catch(pe){de(pe)}G.sync=!1}function ie(D,G){!G.prefinished&&!G.finalCalled&&(typeof D._final=="function"&&!G.destroyed?(G.finalCalled=!0,U(D,G)):(G.prefinished=!0,D.emit("prefinish")))}function $(D,G,te){K(G)&&(ie(D,G),G.pendingcb===0&&(te?(G.pendingcb++,r.nextTick((de,pe)=>{K(pe)?X(de,pe):pe.pendingcb--},D,G)):K(G)&&(G.pendingcb++,X(D,G))))}function X(D,G){G.pendingcb--,G.finished=!0;let te=G[j].splice(0);for(let de=0;de<te.length;de++)te[de]();if(D.emit("finish"),G.autoDestroy){let de=D._readableState;(!de||de.autoDestroy&&(de.endEmitted||de.readable===!1))&&D.destroy()}}s(z.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(D){this._writableState&&(this._writableState.destroyed=D)}},writable:{__proto__:null,get(){let D=this._writableState;return!!D&&D.writable!==!1&&!D.destroyed&&!D.errored&&!D.ending&&!D.ended},set(D){this._writableState&&(this._writableState.writable=!!D)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let D=this._writableState;return D?!D.destroyed&&!D.ending&&D.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Q=g.destroy;z.prototype.destroy=function(D,G){let te=this._writableState;return!te.destroyed&&(te.bufferedIndex<te.buffered.length||te[j].length)&&r.nextTick(re,te),Q.call(this,D,G),this},z.prototype._undestroy=g.undestroy,z.prototype._destroy=function(D,G){G(D)},z.prototype[p.captureRejectionSymbol]=function(D){this.destroy(D)};var ye;function se(){return ye===void 0&&(ye={}),ye}z.fromWeb=function(D,G){return se().newStreamWritableFromWritableStream(D,G)},z.toWeb=function(D){return se().newWritableStreamFromStreamWritable(D)}}),ym=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),o=($e(),Ue(Ve)),{isReadable:u,isWritable:n,isIterable:i,isNodeStream:s,isReadableNodeStream:a,isWritableNodeStream:l,isDuplexNodeStream:c,isReadableStream:f,isWritableStream:p}=Nt(),m=Wt(),{AbortError:h,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:y}}=et(),{destroyer:w}=br(),b=Lt(),E=an(),T=Ao(),{createDeferredPromise:v}=nt(),A=Rl(),S=globalThis.Blob||o.Blob,R=typeof S<"u"?function(j){return j instanceof S}:function(j){return!1},C=globalThis.AbortController||Dr().AbortController,{FunctionPrototypeCall:M}=We(),F=class extends b{constructor(j){super(j),j?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),j?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};t.exports=function j(x,le){if(c(x))return x;if(a(x))return H({readable:x});if(l(x))return H({writable:x});if(s(x))return H({writable:!1,readable:!1});if(f(x))return H({readable:E.fromWeb(x)});if(p(x))return H({writable:T.fromWeb(x)});if(typeof x=="function"){let{value:Y,write:ne,final:W,destroy:ee}=O(x);if(i(Y))return A(F,Y,{objectMode:!0,write:ne,final:W,destroy:ee});let P=Y?.then;if(typeof P=="function"){let J,ve=M(P,Y,re=>{if(re!=null)throw new y("nully","body",re)},re=>{w(J,re)});return J=new F({objectMode:!0,readable:!1,write:ne,final(re){W(async()=>{try{await ve,r.nextTick(re,null)}catch(we){r.nextTick(re,we)}})},destroy:ee})}throw new y("Iterable, AsyncIterable or AsyncFunction",le,Y)}if(R(x))return j(x.arrayBuffer());if(i(x))return A(F,x,{objectMode:!0,writable:!1});if(f(x?.readable)&&p(x?.writable))return F.fromWeb(x);if(typeof x?.writable=="object"||typeof x?.readable=="object"){let Y=x!=null&&x.readable?a(x?.readable)?x?.readable:j(x.readable):void 0,ne=x!=null&&x.writable?l(x?.writable)?x?.writable:j(x.writable):void 0;return H({readable:Y,writable:ne})}let z=x?.then;if(typeof z=="function"){let Y;return M(z,x,ne=>{ne!=null&&Y.push(ne),Y.push(null)},ne=>{w(Y,ne)}),Y=new F({objectMode:!0,writable:!1,read(){}})}throw new g(le,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function O(j){let{promise:x,resolve:le}=v(),z=new C,Y=z.signal;return{value:j((async function*(){for(;;){let ne=x;x=null;let{chunk:W,done:ee,cb:P}=await ne;if(r.nextTick(P),ee)return;if(Y.aborted)throw new h(void 0,{cause:Y.reason});({promise:x,resolve:le}=v()),yield W}})(),{signal:Y}),write(ne,W,ee){let P=le;le=null,P({chunk:ne,done:!1,cb:ee})},final(ne){let W=le;le=null,W({done:!0,cb:ne})},destroy(ne,W){z.abort(),W(ne)}}}function H(j){let x=j.readable&&typeof j.readable.read!="function"?E.wrap(j.readable):j.readable,le=j.writable,z=!!u(x),Y=!!n(le),ne,W,ee,P,J;function ve(re){let we=P;P=null,we?we(re):re&&J.destroy(re)}return J=new F({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!(le!=null&&le.writableObjectMode),readable:z,writable:Y}),Y&&(m(le,re=>{Y=!1,re&&w(x,re),ve(re)}),J._write=function(re,we,K){le.write(re,we)?K():ne=K},J._final=function(re){le.end(),W=re},le.on("drain",function(){if(ne){let re=ne;ne=null,re()}}),le.on("finish",function(){if(W){let re=W;W=null,re()}})),z&&(m(x,re=>{z=!1,re&&w(x,re),ve(re)}),x.on("readable",function(){if(ee){let re=ee;ee=null,re()}}),x.on("end",function(){J.push(null)}),J._read=function(){for(;;){let re=x.read();if(re===null){ee=J._read;return}if(!J.push(re))return}}),J._destroy=function(re,we){!re&&P!==null&&(re=new h),ee=null,ne=null,W=null,P===null?we(re):(P=we,w(le,re),w(x,re))},J}}),Lt=ge((e,t)=>{ue(),fe(),ce();var{ObjectDefineProperties:r,ObjectGetOwnPropertyDescriptor:o,ObjectKeys:u,ObjectSetPrototypeOf:n}=We();t.exports=a;var i=an(),s=Ao();n(a.prototype,i.prototype),n(a,i);{let p=u(s.prototype);for(let m=0;m<p.length;m++){let h=p[m];a.prototype[h]||(a.prototype[h]=s.prototype[h])}}function a(p){if(!(this instanceof a))return new a(p);i.call(this,p),s.call(this,p),p?(this.allowHalfOpen=p.allowHalfOpen!==!1,p.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),p.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}r(a.prototype,{writable:{__proto__:null,...o(s.prototype,"writable")},writableHighWaterMark:{__proto__:null,...o(s.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...o(s.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...o(s.prototype,"writableBuffer")},writableLength:{__proto__:null,...o(s.prototype,"writableLength")},writableFinished:{__proto__:null,...o(s.prototype,"writableFinished")},writableCorked:{__proto__:null,...o(s.prototype,"writableCorked")},writableEnded:{__proto__:null,...o(s.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...o(s.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(p){this._readableState&&this._writableState&&(this._readableState.destroyed=p,this._writableState.destroyed=p)}}});var l;function c(){return l===void 0&&(l={}),l}a.fromWeb=function(p,m){return c().newStreamDuplexFromReadableWritablePair(p,m)},a.toWeb=function(p){return c().newReadableWritablePairFromDuplex(p)};var f;a.from=function(p){return f||(f=ym()),f(p,"body")}}),Ol=ge((e,t)=>{ue(),fe(),ce();var{ObjectSetPrototypeOf:r,Symbol:o}=We();t.exports=a;var{ERR_METHOD_NOT_IMPLEMENTED:u}=et().codes,n=Lt(),{getHighWaterMark:i}=sn();r(a.prototype,n.prototype),r(a,n);var s=o("kCallback");function a(f){if(!(this instanceof a))return new a(f);let p=f?i(this,f,"readableHighWaterMark",!0):null;p===0&&(f={...f,highWaterMark:null,readableHighWaterMark:p,writableHighWaterMark:f.writableHighWaterMark||0}),n.call(this,f),this._readableState.sync=!1,this[s]=null,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",c)}function l(f){typeof this._flush=="function"&&!this.destroyed?this._flush((p,m)=>{if(p){f?f(p):this.destroy(p);return}m!=null&&this.push(m),this.push(null),f&&f()}):(this.push(null),f&&f())}function c(){this._final!==l&&l.call(this)}a.prototype._final=l,a.prototype._transform=function(f,p,m){throw new u("_transform()")},a.prototype._write=function(f,p,m){let h=this._readableState,g=this._writableState,y=h.length;this._transform(f,p,(w,b)=>{if(w){m(w);return}b!=null&&this.push(b),g.ended||y===h.length||h.length<h.highWaterMark?m():this[s]=m})},a.prototype._read=function(){if(this[s]){let f=this[s];this[s]=null,f()}}}),Nl=ge((e,t)=>{ue(),fe(),ce();var{ObjectSetPrototypeOf:r}=We();t.exports=u;var o=Ol();r(u.prototype,o.prototype),r(u,o);function u(n){if(!(this instanceof u))return new u(n);o.call(this,n)}u.prototype._transform=function(n,i,s){s(null,n)}}),To=ge((e,t)=>{ue(),fe(),ce();var r=Qt(),{ArrayIsArray:o,Promise:u,SymbolAsyncIterator:n,SymbolDispose:i}=We(),s=Wt(),{once:a}=nt(),l=br(),c=Lt(),{aggregateTwoErrors:f,codes:{ERR_INVALID_ARG_TYPE:p,ERR_INVALID_RETURN_VALUE:m,ERR_MISSING_ARGS:h,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:y},AbortError:w}=et(),{validateFunction:b,validateAbortSignal:E}=Ur(),{isIterable:T,isReadable:v,isReadableNodeStream:A,isNodeStream:S,isTransformStream:R,isWebStream:C,isReadableStream:M,isReadableFinished:F}=Nt(),O=globalThis.AbortController||Dr().AbortController,H,j,x;function le(re,we,K){let U=!1;re.on("close",()=>{U=!0});let ie=s(re,{readable:we,writable:K},$=>{U=!$});return{destroy:$=>{U||(U=!0,l.destroyer(re,$||new g("pipe")))},cleanup:ie}}function z(re){return b(re[re.length-1],"streams[stream.length - 1]"),re.pop()}function Y(re){if(T(re))return re;if(A(re))return ne(re);throw new p("val",["Readable","Iterable","AsyncIterable"],re)}async function*ne(re){j||(j=an()),yield*j.prototype[n].call(re)}async function W(re,we,K,{end:U}){let ie,$=null,X=se=>{if(se&&(ie=se),$){let D=$;$=null,D()}},Q=()=>new u((se,D)=>{ie?D(ie):$=()=>{ie?D(ie):se()}});we.on("drain",X);let ye=s(we,{readable:!1},X);try{we.writableNeedDrain&&await Q();for await(let se of re)we.write(se)||await Q();U&&(we.end(),await Q()),K()}catch(se){K(ie!==se?f(ie,se):se)}finally{ye(),we.off("drain",X)}}async function ee(re,we,K,{end:U}){R(we)&&(we=we.writable);let ie=we.getWriter();try{for await(let $ of re)await ie.ready,ie.write($).catch(()=>{});await ie.ready,U&&await ie.close(),K()}catch($){try{await ie.abort($),K($)}catch(X){K(X)}}}function P(...re){return J(re,a(z(re)))}function J(re,we,K){if(re.length===1&&o(re[0])&&(re=re[0]),re.length<2)throw new h("streams");let U=new O,ie=U.signal,$=K?.signal,X=[];E($,"options.signal");function Q(){pe(new w)}x=x||nt().addAbortListener;let ye;$&&(ye=x($,Q));let se,D,G=[],te=0;function de(Ee){pe(Ee,--te===0)}function pe(Ee,ae){var Me;if(Ee&&(!se||se.code==="ERR_STREAM_PREMATURE_CLOSE")&&(se=Ee),!(!se&&!ae)){for(;G.length;)G.shift()(se);(Me=ye)===null||Me===void 0||Me[i](),U.abort(),ae&&(se||X.forEach(d=>d()),r.nextTick(we,se,D))}}let _e;for(let Ee=0;Ee<re.length;Ee++){let ae=re[Ee],Me=Ee<re.length-1,d=Ee>0,_=Me||K?.end!==!1,I=Ee===re.length-1;if(S(ae)){let B=function(Z){Z&&Z.name!=="AbortError"&&Z.code!=="ERR_STREAM_PREMATURE_CLOSE"&&de(Z)};if(_){let{destroy:Z,cleanup:he}=le(ae,Me,d);G.push(Z),v(ae)&&I&&X.push(he)}ae.on("error",B),v(ae)&&I&&X.push(()=>{ae.removeListener("error",B)})}if(Ee===0)if(typeof ae=="function"){if(_e=ae({signal:ie}),!T(_e))throw new m("Iterable, AsyncIterable or Stream","source",_e)}else T(ae)||A(ae)||R(ae)?_e=ae:_e=c.from(ae);else if(typeof ae=="function"){if(R(_e)){var V;_e=Y((V=_e)===null||V===void 0?void 0:V.readable)}else _e=Y(_e);if(_e=ae(_e,{signal:ie}),Me){if(!T(_e,!0))throw new m("AsyncIterable",`transform[${Ee-1}]`,_e)}else{var be;H||(H=Nl());let B=new H({objectMode:!0}),Z=(be=_e)===null||be===void 0?void 0:be.then;if(typeof Z=="function")te++,Z.call(_e,q=>{D=q,q!=null&&B.write(q),_&&B.end(),r.nextTick(de)},q=>{B.destroy(q),r.nextTick(de,q)});else if(T(_e,!0))te++,W(_e,B,de,{end:_});else if(M(_e)||R(_e)){let q=_e.readable||_e;te++,W(q,B,de,{end:_})}else throw new m("AsyncIterable or Promise","destination",_e);_e=B;let{destroy:he,cleanup:Ae}=le(_e,!1,!0);G.push(he),I&&X.push(Ae)}}else if(S(ae)){if(A(_e)){te+=2;let B=ve(_e,ae,de,{end:_});v(ae)&&I&&X.push(B)}else if(R(_e)||M(_e)){let B=_e.readable||_e;te++,W(B,ae,de,{end:_})}else if(T(_e))te++,W(_e,ae,de,{end:_});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],_e);_e=ae}else if(C(ae)){if(A(_e))te++,ee(Y(_e),ae,de,{end:_});else if(M(_e)||T(_e))te++,ee(_e,ae,de,{end:_});else if(R(_e))te++,ee(_e.readable,ae,de,{end:_});else throw new p("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],_e);_e=ae}else _e=c.from(ae)}return(ie!=null&&ie.aborted||$!=null&&$.aborted)&&r.nextTick(Q),_e}function ve(re,we,K,{end:U}){let ie=!1;if(we.on("close",()=>{ie||K(new y)}),re.pipe(we,{end:!1}),U){let $=function(){ie=!0,we.end()};F(re)?r.nextTick($):re.once("end",$)}else K();return s(re,{readable:!0,writable:!1},$=>{let X=re._readableState;$&&$.code==="ERR_STREAM_PREMATURE_CLOSE"&&X&&X.ended&&!X.errored&&!X.errorEmitted?re.once("end",K).once("error",K):K($)}),s(we,{readable:!1,writable:!0},K)}t.exports={pipelineImpl:J,pipeline:P}}),Ll=ge((e,t)=>{ue(),fe(),ce();var{pipeline:r}=To(),o=Lt(),{destroyer:u}=br(),{isNodeStream:n,isReadable:i,isWritable:s,isWebStream:a,isTransformStream:l,isWritableStream:c,isReadableStream:f}=Nt(),{AbortError:p,codes:{ERR_INVALID_ARG_VALUE:m,ERR_MISSING_ARGS:h}}=et(),g=Wt();t.exports=function(...y){if(y.length===0)throw new h("streams");if(y.length===1)return o.from(y[0]);let w=[...y];if(typeof y[0]=="function"&&(y[0]=o.from(y[0])),typeof y[y.length-1]=="function"){let O=y.length-1;y[O]=o.from(y[O])}for(let O=0;O<y.length;++O)if(!(!n(y[O])&&!a(y[O]))){if(O<y.length-1&&!(i(y[O])||f(y[O])||l(y[O])))throw new m(`streams[${O}]`,w[O],"must be readable");if(O>0&&!(s(y[O])||c(y[O])||l(y[O])))throw new m(`streams[${O}]`,w[O],"must be writable")}let b,E,T,v,A;function S(O){let H=v;v=null,H?H(O):O?A.destroy(O):!F&&!M&&A.destroy()}let R=y[0],C=r(y,S),M=!!(s(R)||c(R)||l(R)),F=!!(i(C)||f(C)||l(C));if(A=new o({writableObjectMode:!!(R!=null&&R.writableObjectMode),readableObjectMode:!!(C!=null&&C.readableObjectMode),writable:M,readable:F}),M){if(n(R))A._write=function(H,j,x){R.write(H,j)?x():b=x},A._final=function(H){R.end(),E=H},R.on("drain",function(){if(b){let H=b;b=null,H()}});else if(a(R)){let H=(l(R)?R.writable:R).getWriter();A._write=async function(j,x,le){try{await H.ready,H.write(j).catch(()=>{}),le()}catch(z){le(z)}},A._final=async function(j){try{await H.ready,H.close().catch(()=>{}),E=j}catch(x){j(x)}}}let O=l(C)?C.readable:C;g(O,()=>{if(E){let H=E;E=null,H()}})}if(F){if(n(C))C.on("readable",function(){if(T){let O=T;T=null,O()}}),C.on("end",function(){A.push(null)}),A._read=function(){for(;;){let O=C.read();if(O===null){T=A._read;return}if(!A.push(O))return}};else if(a(C)){let O=(l(C)?C.readable:C).getReader();A._read=async function(){for(;;)try{let{value:H,done:j}=await O.read();if(!A.push(H))return;if(j){A.push(null);return}}catch{return}}}}return A._destroy=function(O,H){!O&&v!==null&&(O=new p),T=null,b=null,E=null,v===null?H(O):(v=H,n(C)&&u(C,O))},A}}),vm=ge((e,t)=>{ue(),fe(),ce();var r=globalThis.AbortController||Dr().AbortController,{codes:{ERR_INVALID_ARG_VALUE:o,ERR_INVALID_ARG_TYPE:u,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:s}=et(),{validateAbortSignal:a,validateInteger:l,validateObject:c}=Ur(),f=We().Symbol("kWeak"),p=We().Symbol("kResistStopPropagation"),{finished:m}=Wt(),h=Ll(),{addAbortSignalNoValidate:g}=on(),{isWritable:y,isNodeStream:w}=Nt(),{deprecate:b}=nt(),{ArrayPrototypePush:E,Boolean:T,MathFloor:v,Number:A,NumberIsNaN:S,Promise:R,PromiseReject:C,PromiseResolve:M,PromisePrototypeThen:F,Symbol:O}=We(),H=O("kEmpty"),j=O("kEof");function x($,X){if(X!=null&&c(X,"options"),X?.signal!=null&&a(X.signal,"options.signal"),w($)&&!y($))throw new o("stream",$,"must be writable");let Q=h(this,$);return X!=null&&X.signal&&g(X.signal,Q),Q}function le($,X){if(typeof $!="function")throw new u("fn",["Function","AsyncFunction"],$);X!=null&&c(X,"options"),X?.signal!=null&&a(X.signal,"options.signal");let Q=1;X?.concurrency!=null&&(Q=v(X.concurrency));let ye=Q-1;return X?.highWaterMark!=null&&(ye=v(X.highWaterMark)),l(Q,"options.concurrency",1),l(ye,"options.highWaterMark",0),ye+=Q,(async function*(){let se=nt().AbortSignalAny([X?.signal].filter(T)),D=this,G=[],te={signal:se},de,pe,_e=!1,V=0;function be(){_e=!0,Ee()}function Ee(){V-=1,ae()}function ae(){pe&&!_e&&V<Q&&G.length<ye&&(pe(),pe=null)}async function Me(){try{for await(let d of D){if(_e)return;if(se.aborted)throw new s;try{if(d=$(d,te),d===H)continue;d=M(d)}catch(_){d=C(_)}V+=1,F(d,Ee,be),G.push(d),de&&(de(),de=null),!_e&&(G.length>=ye||V>=Q)&&await new R(_=>{pe=_})}G.push(j)}catch(d){let _=C(d);F(_,Ee,be),G.push(_)}finally{_e=!0,de&&(de(),de=null)}}Me();try{for(;;){for(;G.length>0;){let d=await G[0];if(d===j)return;if(se.aborted)throw new s;d!==H&&(yield d),G.shift(),ae()}await new R(d=>{de=d})}}finally{_e=!0,pe&&(pe(),pe=null)}}).call(this)}function z($=void 0){return $!=null&&c($,"options"),$?.signal!=null&&a($.signal,"options.signal"),(async function*(){let X=0;for await(let ye of this){var Q;if($!=null&&(Q=$.signal)!==null&&Q!==void 0&&Q.aborted)throw new s({cause:$.signal.reason});yield[X++,ye]}}).call(this)}async function Y($,X=void 0){for await(let Q of P.call(this,$,X))return!0;return!1}async function ne($,X=void 0){if(typeof $!="function")throw new u("fn",["Function","AsyncFunction"],$);return!await Y.call(this,async(...Q)=>!await $(...Q),X)}async function W($,X){for await(let Q of P.call(this,$,X))return Q}async function ee($,X){if(typeof $!="function")throw new u("fn",["Function","AsyncFunction"],$);async function Q(ye,se){return await $(ye,se),H}for await(let ye of le.call(this,Q,X));}function P($,X){if(typeof $!="function")throw new u("fn",["Function","AsyncFunction"],$);async function Q(ye,se){return await $(ye,se)?ye:H}return le.call(this,Q,X)}var J=class extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function ve($,X,Q){var ye;if(typeof $!="function")throw new u("reducer",["Function","AsyncFunction"],$);Q!=null&&c(Q,"options"),Q?.signal!=null&&a(Q.signal,"options.signal");let se=arguments.length>1;if(Q!=null&&(ye=Q.signal)!==null&&ye!==void 0&&ye.aborted){let pe=new s(void 0,{cause:Q.signal.reason});throw this.once("error",()=>{}),await m(this.destroy(pe)),pe}let D=new r,G=D.signal;if(Q!=null&&Q.signal){let pe={once:!0,[f]:this,[p]:!0};Q.signal.addEventListener("abort",()=>D.abort(),pe)}let te=!1;try{for await(let pe of this){var de;if(te=!0,Q!=null&&(de=Q.signal)!==null&&de!==void 0&&de.aborted)throw new s;se?X=await $(X,pe,{signal:G}):(X=pe,se=!0)}if(!te&&!se)throw new J}finally{D.abort()}return X}async function re($){$!=null&&c($,"options"),$?.signal!=null&&a($.signal,"options.signal");let X=[];for await(let ye of this){var Q;if($!=null&&(Q=$.signal)!==null&&Q!==void 0&&Q.aborted)throw new s(void 0,{cause:$.signal.reason});E(X,ye)}return X}function we($,X){let Q=le.call(this,$,X);return(async function*(){for await(let ye of Q)yield*ye}).call(this)}function K($){if($=A($),S($))return 0;if($<0)throw new i("number",">= 0",$);return $}function U($,X=void 0){return X!=null&&c(X,"options"),X?.signal!=null&&a(X.signal,"options.signal"),$=K($),(async function*(){var Q;if(X!=null&&(Q=X.signal)!==null&&Q!==void 0&&Q.aborted)throw new s;for await(let se of this){var ye;if(X!=null&&(ye=X.signal)!==null&&ye!==void 0&&ye.aborted)throw new s;$--<=0&&(yield se)}}).call(this)}function ie($,X=void 0){return X!=null&&c(X,"options"),X?.signal!=null&&a(X.signal,"options.signal"),$=K($),(async function*(){var Q;if(X!=null&&(Q=X.signal)!==null&&Q!==void 0&&Q.aborted)throw new s;for await(let se of this){var ye;if(X!=null&&(ye=X.signal)!==null&&ye!==void 0&&ye.aborted)throw new s;if($-- >0&&(yield se),$<=0)return}}).call(this)}t.exports.streamReturningOperators={asIndexedPairs:b(z,"readable.asIndexedPairs will be removed in a future version."),drop:U,filter:P,flatMap:we,map:le,take:ie,compose:x},t.exports.promiseReturningOperators={every:ne,forEach:ee,reduce:ve,toArray:re,some:Y,find:W}}),Ml=ge((e,t)=>{ue(),fe(),ce();var{ArrayPrototypePop:r,Promise:o}=We(),{isIterable:u,isNodeStream:n,isWebStream:i}=Nt(),{pipelineImpl:s}=To(),{finished:a}=Wt();Pl();function l(...c){return new o((f,p)=>{let m,h,g=c[c.length-1];if(g&&typeof g=="object"&&!n(g)&&!u(g)&&!i(g)){let y=r(c);m=y.signal,h=y.end}s(c,(y,w)=>{y?p(y):f(w)},{signal:m,end:h})})}t.exports={finished:a,pipeline:l}}),Pl=ge((e,t)=>{ue(),fe(),ce();var{Buffer:r}=($e(),Ue(Ve)),{ObjectDefineProperty:o,ObjectKeys:u,ReflectApply:n}=We(),{promisify:{custom:i}}=nt(),{streamReturningOperators:s,promiseReturningOperators:a}=vm(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=et(),c=Ll(),{setDefaultHighWaterMark:f,getDefaultHighWaterMark:p}=sn(),{pipeline:m}=To(),{destroyer:h}=br(),g=Wt(),y=Ml(),w=Nt(),b=t.exports=So().Stream;b.isDestroyed=w.isDestroyed,b.isDisturbed=w.isDisturbed,b.isErrored=w.isErrored,b.isReadable=w.isReadable,b.isWritable=w.isWritable,b.Readable=an();for(let T of u(s)){let v=function(...S){if(new.target)throw l();return b.Readable.from(n(A,this,S))},A=s[T];o(v,"name",{__proto__:null,value:A.name}),o(v,"length",{__proto__:null,value:A.length}),o(b.Readable.prototype,T,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}for(let T of u(a)){let v=function(...S){if(new.target)throw l();return n(A,this,S)},A=a[T];o(v,"name",{__proto__:null,value:A.name}),o(v,"length",{__proto__:null,value:A.length}),o(b.Readable.prototype,T,{__proto__:null,value:v,enumerable:!1,configurable:!0,writable:!0})}b.Writable=Ao(),b.Duplex=Lt(),b.Transform=Ol(),b.PassThrough=Nl(),b.pipeline=m;var{addAbortSignal:E}=on();b.addAbortSignal=E,b.finished=g,b.destroy=h,b.compose=c,b.setDefaultHighWaterMark=f,b.getDefaultHighWaterMark=p,o(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return y}}),o(m,i,{__proto__:null,enumerable:!0,get(){return y.pipeline}}),o(g,i,{__proto__:null,enumerable:!0,get(){return y.finished}}),b.Stream=b,b._isUint8Array=function(T){return T instanceof Uint8Array},b._uint8ArrayToBuffer=function(T){return r.from(T.buffer,T.byteOffset,T.byteLength)}}),Jt=ge((e,t)=>{ue(),fe(),ce();var r=Pl(),o=Ml(),u=r.Readable.destroy;t.exports=r.Readable,t.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,t.exports._isUint8Array=r._isUint8Array,t.exports.isDisturbed=r.isDisturbed,t.exports.isErrored=r.isErrored,t.exports.isReadable=r.isReadable,t.exports.Readable=r.Readable,t.exports.Writable=r.Writable,t.exports.Duplex=r.Duplex,t.exports.Transform=r.Transform,t.exports.PassThrough=r.PassThrough,t.exports.addAbortSignal=r.addAbortSignal,t.exports.finished=r.finished,t.exports.destroy=r.destroy,t.exports.destroy=u,t.exports.pipeline=r.pipeline,t.exports.compose=r.compose,Object.defineProperty(r,"promises",{configurable:!0,enumerable:!0,get(){return o}}),t.exports.Stream=r.Stream,t.exports.default=t.exports}),_m=ge((e,t)=>{ue(),fe(),ce(),typeof Object.create=="function"?t.exports=function(r,o){o&&(r.super_=o,r.prototype=Object.create(o.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(r,o){if(o){r.super_=o;var u=function(){};u.prototype=o.prototype,r.prototype=new u,r.prototype.constructor=r}}}),Em=ge((e,t)=>{ue(),fe(),ce();var{Buffer:r}=($e(),Ue(Ve)),o=Symbol.for("BufferList");function u(n){if(!(this instanceof u))return new u(n);u._init.call(this,n)}u._init=function(n){Object.defineProperty(this,o,{value:!0}),this._bufs=[],this.length=0,n&&this.append(n)},u.prototype._new=function(n){return new u(n)},u.prototype._offset=function(n){if(n===0)return[0,0];let i=0;for(let s=0;s<this._bufs.length;s++){let a=i+this._bufs[s].length;if(n<a||s===this._bufs.length-1)return[s,n-i];i=a}},u.prototype._reverseOffset=function(n){let i=n[0],s=n[1];for(let a=0;a<i;a++)s+=this._bufs[a].length;return s},u.prototype.getBuffers=function(){return this._bufs},u.prototype.get=function(n){if(n>this.length||n<0)return;let i=this._offset(n);return this._bufs[i[0]][i[1]]},u.prototype.slice=function(n,i){return typeof n=="number"&&n<0&&(n+=this.length),typeof i=="number"&&i<0&&(i+=this.length),this.copy(null,0,n,i)},u.prototype.copy=function(n,i,s,a){if((typeof s!="number"||s<0)&&(s=0),(typeof a!="number"||a>this.length)&&(a=this.length),s>=this.length||a<=0)return n||r.alloc(0);let l=!!n,c=this._offset(s),f=a-s,p=f,m=l&&i||0,h=c[1];if(s===0&&a===this.length){if(!l)return this._bufs.length===1?this._bufs[0]:r.concat(this._bufs,this.length);for(let g=0;g<this._bufs.length;g++)this._bufs[g].copy(n,m),m+=this._bufs[g].length;return n}if(p<=this._bufs[c[0]].length-h)return l?this._bufs[c[0]].copy(n,i,h,h+p):this._bufs[c[0]].slice(h,h+p);l||(n=r.allocUnsafe(f));for(let g=c[0];g<this._bufs.length;g++){let y=this._bufs[g].length-h;if(p>y)this._bufs[g].copy(n,m,h),m+=y;else{this._bufs[g].copy(n,m,h,h+p),m+=y;break}p-=y,h&&(h=0)}return n.length>m?n.slice(0,m):n},u.prototype.shallowSlice=function(n,i){if(n=n||0,i=typeof i!="number"?this.length:i,n<0&&(n+=this.length),i<0&&(i+=this.length),n===i)return this._new();let s=this._offset(n),a=this._offset(i),l=this._bufs.slice(s[0],a[0]+1);return a[1]===0?l.pop():l[l.length-1]=l[l.length-1].slice(0,a[1]),s[1]!==0&&(l[0]=l[0].slice(s[1])),this._new(l)},u.prototype.toString=function(n,i,s){return this.slice(i,s).toString(n)},u.prototype.consume=function(n){if(n=Math.trunc(n),Number.isNaN(n)||n<=0)return this;for(;this._bufs.length;)if(n>=this._bufs[0].length)n-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(n),this.length-=n;break}return this},u.prototype.duplicate=function(){let n=this._new();for(let i=0;i<this._bufs.length;i++)n.append(this._bufs[i]);return n},u.prototype.append=function(n){return this._attach(n,u.prototype._appendBuffer)},u.prototype.prepend=function(n){return this._attach(n,u.prototype._prependBuffer,!0)},u.prototype._attach=function(n,i,s){if(n==null)return this;if(n.buffer)i.call(this,r.from(n.buffer,n.byteOffset,n.byteLength));else if(Array.isArray(n)){let[a,l]=s?[n.length-1,-1]:[0,1];for(let c=a;c>=0&&c<n.length;c+=l)this._attach(n[c],i,s)}else if(this._isBufferList(n)){let[a,l]=s?[n._bufs.length-1,-1]:[0,1];for(let c=a;c>=0&&c<n._bufs.length;c+=l)this._attach(n._bufs[c],i,s)}else typeof n=="number"&&(n=n.toString()),i.call(this,r.from(n));return this},u.prototype._appendBuffer=function(n){this._bufs.push(n),this.length+=n.length},u.prototype._prependBuffer=function(n){this._bufs.unshift(n),this.length+=n.length},u.prototype.indexOf=function(n,i,s){if(s===void 0&&typeof i=="string"&&(s=i,i=void 0),typeof n=="function"||Array.isArray(n))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof n=="number"?n=r.from([n]):typeof n=="string"?n=r.from(n,s):this._isBufferList(n)?n=n.slice():Array.isArray(n.buffer)?n=r.from(n.buffer,n.byteOffset,n.byteLength):r.isBuffer(n)||(n=r.from(n)),i=Number(i||0),isNaN(i)&&(i=0),i<0&&(i=this.length+i),i<0&&(i=0),n.length===0)return i>this.length?this.length:i;let a=this._offset(i),l=a[0],c=a[1];for(;l<this._bufs.length;l++){let f=this._bufs[l];for(;c<f.length;)if(f.length-c>=n.length){let p=f.indexOf(n,c);if(p!==-1)return this._reverseOffset([l,p]);c=f.length-n.length+1}else{let p=this._reverseOffset([l,c]);if(this._match(p,n))return p;c++}c=0}return-1},u.prototype._match=function(n,i){if(this.length-n<i.length)return!1;for(let s=0;s<i.length;s++)if(this.get(n+s)!==i[s])return!1;return!0},(function(){let n={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let i in n)(function(s){n[s]===null?u.prototype[s]=function(a,l){return this.slice(a,a+l)[s](0,l)}:u.prototype[s]=function(a=0){return this.slice(a,a+n[s])[s](0)}})(i)})(),u.prototype._isBufferList=function(n){return n instanceof u||u.isBufferList(n)},u.isBufferList=function(n){return n!=null&&n[o]},t.exports=u}),wm=ge((e,t)=>{ue(),fe(),ce();var r=Jt().Duplex,o=_m(),u=Em();function n(i){if(!(this instanceof n))return new n(i);if(typeof i=="function"){this._callback=i;let s=(function(a){this._callback&&(this._callback(a),this._callback=null)}).bind(this);this.on("pipe",function(a){a.on("error",s)}),this.on("unpipe",function(a){a.removeListener("error",s)}),i=null}u._init.call(this,i),r.call(this)}o(n,r),Object.assign(n.prototype,u.prototype),n.prototype._new=function(i){return new n(i)},n.prototype._write=function(i,s,a){this._appendBuffer(i),typeof a=="function"&&a()},n.prototype._read=function(i){if(!this.length)return this.push(null);i=Math.min(i,this.length),this.push(this.slice(0,i)),this.consume(i)},n.prototype.end=function(i){r.prototype.end.call(this,i),this._callback&&(this._callback(null,this.slice()),this._callback=null)},n.prototype._destroy=function(i,s){this._bufs.length=0,this.length=0,s(i)},n.prototype._isBufferList=function(i){return i instanceof n||i instanceof u||n.isBufferList(i)},n.isBufferList=u.isBufferList,t.exports=n,t.exports.BufferListStream=n,t.exports.BufferList=u}),Sm=ge((e,t)=>{ue(),fe(),ce();var r=class{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}};t.exports=r}),Cl=ge((e,t)=>{ue(),fe(),ce();var r=t.exports,{Buffer:o}=($e(),Ue(Ve));r.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},r.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},r.requiredHeaderFlagsErrors={};for(let n in r.requiredHeaderFlags){let i=r.requiredHeaderFlags[n];r.requiredHeaderFlagsErrors[n]="Invalid header flag bits, must be 0x"+i.toString(16)+" for "+r.types[n]+" packet"}r.codes={};for(let n in r.types){let i=r.types[n];r.codes[i]=n}r.CMD_SHIFT=4,r.CMD_MASK=240,r.DUP_MASK=8,r.QOS_MASK=3,r.QOS_SHIFT=1,r.RETAIN_MASK=1,r.VARBYTEINT_MASK=127,r.VARBYTEINT_FIN_MASK=128,r.VARBYTEINT_MAX=268435455,r.SESSIONPRESENT_MASK=1,r.SESSIONPRESENT_HEADER=o.from([r.SESSIONPRESENT_MASK]),r.CONNACK_HEADER=o.from([r.codes.connack<<r.CMD_SHIFT]),r.USERNAME_MASK=128,r.PASSWORD_MASK=64,r.WILL_RETAIN_MASK=32,r.WILL_QOS_MASK=24,r.WILL_QOS_SHIFT=3,r.WILL_FLAG_MASK=4,r.CLEAN_SESSION_MASK=2,r.CONNECT_HEADER=o.from([r.codes.connect<<r.CMD_SHIFT]),r.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},r.propertiesCodes={};for(let n in r.properties){let i=r.properties[n];r.propertiesCodes[i]=n}r.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"};function u(n){return[0,1,2].map(i=>[0,1].map(s=>[0,1].map(a=>{let l=o.alloc(1);return l.writeUInt8(r.codes[n]<<r.CMD_SHIFT|(s?r.DUP_MASK:0)|i<<r.QOS_SHIFT|a,0,!0),l})))}r.PUBLISH_HEADER=u("publish"),r.SUBSCRIBE_HEADER=u("subscribe"),r.SUBSCRIBE_OPTIONS_QOS_MASK=3,r.SUBSCRIBE_OPTIONS_NL_MASK=1,r.SUBSCRIBE_OPTIONS_NL_SHIFT=2,r.SUBSCRIBE_OPTIONS_RAP_MASK=1,r.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,r.SUBSCRIBE_OPTIONS_RH_MASK=3,r.SUBSCRIBE_OPTIONS_RH_SHIFT=4,r.SUBSCRIBE_OPTIONS_RH=[0,16,32],r.SUBSCRIBE_OPTIONS_NL=4,r.SUBSCRIBE_OPTIONS_RAP=8,r.SUBSCRIBE_OPTIONS_QOS=[0,1,2],r.UNSUBSCRIBE_HEADER=u("unsubscribe"),r.ACKS={unsuback:u("unsuback"),puback:u("puback"),pubcomp:u("pubcomp"),pubrel:u("pubrel"),pubrec:u("pubrec")},r.SUBACK_HEADER=o.from([r.codes.suback<<r.CMD_SHIFT]),r.VERSION3=o.from([3]),r.VERSION4=o.from([4]),r.VERSION5=o.from([5]),r.VERSION131=o.from([131]),r.VERSION132=o.from([132]),r.QOS=[0,1,2].map(n=>o.from([n])),r.EMPTY={pingreq:o.from([r.codes.pingreq<<4,0]),pingresp:o.from([r.codes.pingresp<<4,0]),disconnect:o.from([r.codes.disconnect<<4,0])},r.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},r.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},r.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},r.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},r.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},r.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}}),Am=ge((e,t)=>{ue(),fe(),ce();var r=1e3,o=r*60,u=o*60,n=u*24,i=n*7,s=n*365.25;t.exports=function(p,m){m=m||{};var h=typeof p;if(h==="string"&&p.length>0)return a(p);if(h==="number"&&isFinite(p))return m.long?c(p):l(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function a(p){if(p=String(p),!(p.length>100)){var m=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(m){var h=parseFloat(m[1]),g=(m[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return h*s;case"weeks":case"week":case"w":return h*i;case"days":case"day":case"d":return h*n;case"hours":case"hour":case"hrs":case"hr":case"h":return h*u;case"minutes":case"minute":case"mins":case"min":case"m":return h*o;case"seconds":case"second":case"secs":case"sec":case"s":return h*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return h;default:return}}}}function l(p){var m=Math.abs(p);return m>=n?Math.round(p/n)+"d":m>=u?Math.round(p/u)+"h":m>=o?Math.round(p/o)+"m":m>=r?Math.round(p/r)+"s":p+"ms"}function c(p){var m=Math.abs(p);return m>=n?f(p,m,n,"day"):m>=u?f(p,m,u,"hour"):m>=o?f(p,m,o,"minute"):m>=r?f(p,m,r,"second"):p+" ms"}function f(p,m,h,g){var y=m>=h*1.5;return Math.round(p/h)+" "+g+(y?"s":"")}}),Tm=ge((e,t)=>{ue(),fe(),ce();function r(o){n.debug=n,n.default=n,n.coerce=f,n.disable=l,n.enable=s,n.enabled=c,n.humanize=Am(),n.destroy=p,Object.keys(o).forEach(m=>{n[m]=o[m]}),n.names=[],n.skips=[],n.formatters={};function u(m){let h=0;for(let g=0;g<m.length;g++)h=(h<<5)-h+m.charCodeAt(g),h|=0;return n.colors[Math.abs(h)%n.colors.length]}n.selectColor=u;function n(m){let h,g=null,y,w;function b(...E){if(!b.enabled)return;let T=b,v=Number(new Date),A=v-(h||v);T.diff=A,T.prev=h,T.curr=v,h=v,E[0]=n.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let S=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(R,C)=>{if(R==="%%")return"%";S++;let M=n.formatters[C];if(typeof M=="function"){let F=E[S];R=M.call(T,F),E.splice(S,1),S--}return R}),n.formatArgs.call(T,E),(T.log||n.log).apply(T,E)}return b.namespace=m,b.useColors=n.useColors(),b.color=n.selectColor(m),b.extend=i,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(y!==n.namespaces&&(y=n.namespaces,w=n.enabled(m)),w),set:E=>{g=E}}),typeof n.init=="function"&&n.init(b),b}function i(m,h){let g=n(this.namespace+(typeof h>"u"?":":h)+m);return g.log=this.log,g}function s(m){n.save(m),n.namespaces=m,n.names=[],n.skips=[];let h=(typeof m=="string"?m:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of h)g[0]==="-"?n.skips.push(g.slice(1)):n.names.push(g)}function a(m,h){let g=0,y=0,w=-1,b=0;for(;g<m.length;)if(y<h.length&&(h[y]===m[g]||h[y]==="*"))h[y]==="*"?(w=y,b=g,y++):(g++,y++);else if(w!==-1)y=w+1,b++,g=b;else return!1;for(;y<h.length&&h[y]==="*";)y++;return y===h.length}function l(){let m=[...n.names,...n.skips.map(h=>"-"+h)].join(",");return n.enable(""),m}function c(m){for(let h of n.skips)if(a(m,h))return!1;for(let h of n.names)if(a(m,h))return!0;return!1}function f(m){return m instanceof Error?m.stack||m.message:m}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}t.exports=r}),Mt=ge((e,t)=>{ue(),fe(),ce(),e.formatArgs=o,e.save=u,e.load=n,e.useColors=r,e.storage=i(),e.destroy=(()=>{let a=!1;return()=>{a||(a=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let a;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let l="color: "+this.color;a.splice(1,0,l,"color: inherit");let c=0,f=0;a[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(c++,p==="%c"&&(f=c))}),a.splice(f,0,l)}e.log=console.debug||console.log||(()=>{});function u(a){try{a?e.storage.setItem("debug",a):e.storage.removeItem("debug")}catch{}}function n(){let a;try{a=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!a&&typeof Be<"u"&&"env"in Be&&(a=Be.env.DEBUG),a}function i(){try{return localStorage}catch{}}t.exports=Tm()(e);var{formatters:s}=t.exports;s.j=function(a){try{return JSON.stringify(a)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}),Im=ge((e,t)=>{ue(),fe(),ce();var r=wm(),{EventEmitter:o}=(zt(),Ue(jt)),u=Sm(),n=Cl(),i=Mt()("mqtt-packet:parser"),s=class Cs extends o{constructor(){super(),this.parser=this.constructor.parser}static parser(l){return this instanceof Cs?(this.settings=l||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):new Cs().parser(l)}_resetState(){i("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new u,this.error=null,this._list=r(),this._stateCounter=0}parse(l){for(this.error&&this._resetState(),this._list.append(l),i("parse: current state: %s",this._states[this._stateCounter]);(this.packet.length!==-1||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,i("parse: state complete. _stateCounter is now: %d",this._stateCounter),i("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return i("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){let l=this._list.readUInt8(0),c=l>>n.CMD_SHIFT;this.packet.cmd=n.types[c];let f=l&15,p=n.requiredHeaderFlags[c];return p!=null&&f!==p?this._emitError(new Error(n.requiredHeaderFlagsErrors[c])):(this.packet.retain=(l&n.RETAIN_MASK)!==0,this.packet.qos=l>>n.QOS_SHIFT&n.QOS_MASK,this.packet.qos>2?this._emitError(new Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=(l&n.DUP_MASK)!==0,i("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}_parseLength(){let l=this._parseVarByteNum(!0);return l&&(this.packet.length=l.value,this._list.consume(l.bytes)),i("_parseLength %d",l.value),!!l}_parsePayload(){i("_parsePayload: payload %O",this._list);let l=!1;if(this.packet.length===0||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}l=!0}return i("_parsePayload complete result: %s",l),l}_parseConnect(){i("_parseConnect");let l,c,f,p,m={},h=this.packet,g=this._parseString();if(g===null)return this._emitError(new Error("Cannot parse protocolId"));if(g!=="MQTT"&&g!=="MQIsdp")return this._emitError(new Error("Invalid protocolId"));if(h.protocolId=g,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(h.protocolVersion=this._list.readUInt8(this._pos),h.protocolVersion>=128&&(h.bridgeMode=!0,h.protocolVersion=h.protocolVersion-128),h.protocolVersion!==3&&h.protocolVersion!==4&&h.protocolVersion!==5)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(this._list.readUInt8(this._pos)&1)return this._emitError(new Error("Connect flag bit 0 must be 0, but got 1"));m.username=this._list.readUInt8(this._pos)&n.USERNAME_MASK,m.password=this._list.readUInt8(this._pos)&n.PASSWORD_MASK,m.will=this._list.readUInt8(this._pos)&n.WILL_FLAG_MASK;let y=!!(this._list.readUInt8(this._pos)&n.WILL_RETAIN_MASK),w=(this._list.readUInt8(this._pos)&n.WILL_QOS_MASK)>>n.WILL_QOS_SHIFT;if(m.will)h.will={},h.will.retain=y,h.will.qos=w;else{if(y)return this._emitError(new Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(w)return this._emitError(new Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(h.clean=(this._list.readUInt8(this._pos)&n.CLEAN_SESSION_MASK)!==0,this._pos++,h.keepalive=this._parseNum(),h.keepalive===-1)return this._emitError(new Error("Packet too short"));if(h.protocolVersion===5){let E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(h.properties=E)}let b=this._parseString();if(b===null)return this._emitError(new Error("Packet too short"));if(h.clientId=b,i("_parseConnect: packet.clientId: %s",h.clientId),m.will){if(h.protocolVersion===5){let E=this._parseProperties();Object.getOwnPropertyNames(E).length&&(h.will.properties=E)}if(l=this._parseString(),l===null)return this._emitError(new Error("Cannot parse will topic"));if(h.will.topic=l,i("_parseConnect: packet.will.topic: %s",h.will.topic),c=this._parseBuffer(),c===null)return this._emitError(new Error("Cannot parse will payload"));h.will.payload=c,i("_parseConnect: packet.will.paylaod: %s",h.will.payload)}if(m.username){if(p=this._parseString(),p===null)return this._emitError(new Error("Cannot parse username"));h.username=p,i("_parseConnect: packet.username: %s",h.username)}if(m.password){if(f=this._parseBuffer(),f===null)return this._emitError(new Error("Cannot parse password"));h.password=f}return this.settings=h,i("_parseConnect: complete"),h}_parseConnack(){i("_parseConnack");let l=this.packet;if(this._list.length<1)return null;let c=this._list.readUInt8(this._pos++);if(c>1)return this._emitError(new Error("Invalid connack flags, bits 7-1 must be set to 0"));if(l.sessionPresent=!!(c&n.SESSIONPRESENT_MASK),this.settings.protocolVersion===5)this._list.length>=2?l.reasonCode=this._list.readUInt8(this._pos++):l.reasonCode=0;else{if(this._list.length<2)return null;l.returnCode=this._list.readUInt8(this._pos++)}if(l.returnCode===-1||l.reasonCode===-1)return this._emitError(new Error("Cannot parse return code"));if(this.settings.protocolVersion===5){let f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(l.properties=f)}i("_parseConnack: complete")}_parsePublish(){i("_parsePublish");let l=this.packet;if(l.topic=this._parseString(),l.topic===null)return this._emitError(new Error("Cannot parse topic"));if(!(l.qos>0&&!this._parseMessageId())){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}l.payload=this._list.slice(this._pos,l.length),i("_parsePublish: payload from buffer list: %o",l.payload)}}_parseSubscribe(){i("_parseSubscribe");let l=this.packet,c,f,p,m,h,g,y;if(l.subscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let w=this._parseProperties();Object.getOwnPropertyNames(w).length&&(l.properties=w)}if(l.length<=0)return this._emitError(new Error("Malformed subscribe, no payload specified"));for(;this._pos<l.length;){if(c=this._parseString(),c===null)return this._emitError(new Error("Cannot parse topic"));if(this._pos>=l.length)return this._emitError(new Error("Malformed Subscribe Payload"));if(f=this._parseByte(),this.settings.protocolVersion===5){if(f&192)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(f&252)return this._emitError(new Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if(p=f&n.SUBSCRIBE_OPTIONS_QOS_MASK,p>2)return this._emitError(new Error("Invalid subscribe QoS, must be <= 2"));if(g=(f>>n.SUBSCRIBE_OPTIONS_NL_SHIFT&n.SUBSCRIBE_OPTIONS_NL_MASK)!==0,h=(f>>n.SUBSCRIBE_OPTIONS_RAP_SHIFT&n.SUBSCRIBE_OPTIONS_RAP_MASK)!==0,m=f>>n.SUBSCRIBE_OPTIONS_RH_SHIFT&n.SUBSCRIBE_OPTIONS_RH_MASK,m>2)return this._emitError(new Error("Invalid retain handling, must be <= 2"));y={topic:c,qos:p},this.settings.protocolVersion===5?(y.nl=g,y.rap=h,y.rh=m):this.settings.bridgeMode&&(y.rh=0,y.rap=!0,y.nl=!0),i("_parseSubscribe: push subscription `%s` to subscription",y),l.subscriptions.push(y)}}}_parseSuback(){i("_parseSuback");let l=this.packet;if(this.packet.granted=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}if(l.length<=0)return this._emitError(new Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){let c=this._list.readUInt8(this._pos++);if(this.settings.protocolVersion===5){if(!n.MQTT5_SUBACK_CODES[c])return this._emitError(new Error("Invalid suback code"))}else if(c>2&&c!==128)return this._emitError(new Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(c)}}}_parseUnsubscribe(){i("_parseUnsubscribe");let l=this.packet;if(l.unsubscriptions=[],!!this._parseMessageId()){if(this.settings.protocolVersion===5){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}if(l.length<=0)return this._emitError(new Error("Malformed unsubscribe, no payload specified"));for(;this._pos<l.length;){let c=this._parseString();if(c===null)return this._emitError(new Error("Cannot parse topic"));i("_parseUnsubscribe: push topic `%s` to unsubscriptions",c),l.unsubscriptions.push(c)}}}_parseUnsuback(){i("_parseUnsuback");let l=this.packet;if(!this._parseMessageId())return this._emitError(new Error("Cannot parse messageId"));if((this.settings.protocolVersion===3||this.settings.protocolVersion===4)&&l.length!==2)return this._emitError(new Error("Malformed unsuback, payload length must be 2"));if(l.length<=0)return this._emitError(new Error("Malformed unsuback, no payload specified"));if(this.settings.protocolVersion===5){let c=this._parseProperties();for(Object.getOwnPropertyNames(c).length&&(l.properties=c),l.granted=[];this._pos<this.packet.length;){let f=this._list.readUInt8(this._pos++);if(!n.MQTT5_UNSUBACK_CODES[f])return this._emitError(new Error("Invalid unsuback code"));this.packet.granted.push(f)}}}_parseConfirmation(){i("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);let l=this.packet;if(this._parseMessageId(),this.settings.protocolVersion===5){if(l.length>2){switch(l.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!n.MQTT5_PUBACK_PUBREC_CODES[l.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!n.MQTT5_PUBREL_PUBCOMP_CODES[l.reasonCode])return this._emitError(new Error("Invalid "+this.packet.cmd+" reason code"));break}i("_parseConfirmation: packet.reasonCode `%d`",l.reasonCode)}else l.reasonCode=0;if(l.length>3){let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}}return!0}_parseDisconnect(){let l=this.packet;if(i("_parseDisconnect"),this.settings.protocolVersion===5){this._list.length>0?(l.reasonCode=this._parseByte(),n.MQTT5_DISCONNECT_CODES[l.reasonCode]||this._emitError(new Error("Invalid disconnect reason code"))):l.reasonCode=0;let c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}return i("_parseDisconnect result: true"),!0}_parseAuth(){i("_parseAuth");let l=this.packet;if(this.settings.protocolVersion!==5)return this._emitError(new Error("Not supported auth packet for this version MQTT"));if(l.reasonCode=this._parseByte(),!n.MQTT5_AUTH_CODES[l.reasonCode])return this._emitError(new Error("Invalid auth reason code"));let c=this._parseProperties();return Object.getOwnPropertyNames(c).length&&(l.properties=c),i("_parseAuth: result: true"),!0}_parseMessageId(){let l=this.packet;return l.messageId=this._parseNum(),l.messageId===null?(this._emitError(new Error("Cannot parse messageId")),!1):(i("_parseMessageId: packet.messageId %d",l.messageId),!0)}_parseString(l){let c=this._parseNum(),f=c+this._pos;if(c===-1||f>this._list.length||f>this.packet.length)return null;let p=this._list.toString("utf8",this._pos,f);return this._pos+=c,i("_parseString: result: %s",p),p}_parseStringPair(){return i("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){let l=this._parseNum(),c=l+this._pos;if(l===-1||c>this._list.length||c>this.packet.length)return null;let f=this._list.slice(this._pos,c);return this._pos+=l,i("_parseBuffer: result: %o",f),f}_parseNum(){if(this._list.length-this._pos<2)return-1;let l=this._list.readUInt16BE(this._pos);return this._pos+=2,i("_parseNum: result: %s",l),l}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;let l=this._list.readUInt32BE(this._pos);return this._pos+=4,i("_parse4ByteNum: result: %s",l),l}_parseVarByteNum(l){i("_parseVarByteNum");let c=4,f=0,p=1,m=0,h=!1,g,y=this._pos?this._pos:0;for(;f<c&&y+f<this._list.length;){if(g=this._list.readUInt8(y+f++),m+=p*(g&n.VARBYTEINT_MASK),p*=128,(g&n.VARBYTEINT_FIN_MASK)===0){h=!0;break}if(this._list.length<=f)break}return!h&&f===c&&this._list.length>=f&&this._emitError(new Error("Invalid variable byte integer")),y&&(this._pos+=f),h?l?h={bytes:f,value:m}:h=m:h=!1,i("_parseVarByteNum: result: %o",h),h}_parseByte(){let l;return this._pos<this._list.length&&(l=this._list.readUInt8(this._pos),this._pos++),i("_parseByte: result: %o",l),l}_parseByType(l){switch(i("_parseByType: type: %s",l),l){case"byte":return this._parseByte()!==0;case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}_parseProperties(){i("_parseProperties");let l=this._parseVarByteNum(),c=this._pos+l,f={};for(;this._pos<c;){let p=this._parseByte();if(!p)return this._emitError(new Error("Cannot parse property code type")),!1;let m=n.propertiesCodes[p];if(!m)return this._emitError(new Error("Unknown property")),!1;if(m==="userProperties"){f[m]||(f[m]=Object.create(null));let h=this._parseByType(n.propertiesTypes[m]);if(f[m][h.name])if(Array.isArray(f[m][h.name]))f[m][h.name].push(h.value);else{let g=f[m][h.name];f[m][h.name]=[g],f[m][h.name].push(h.value)}else f[m][h.name]=h.value;continue}f[m]?Array.isArray(f[m])?f[m].push(this._parseByType(n.propertiesTypes[m])):(f[m]=[f[m]],f[m].push(this._parseByType(n.propertiesTypes[m]))):f[m]=this._parseByType(n.propertiesTypes[m])}return f}_newPacket(){return i("_newPacket"),this.packet&&(this._list.consume(this.packet.length),i("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),i("_newPacket: new packet"),this.packet=new u,this._pos=0,!0}_emitError(l){i("_emitError",l),this.error=l,this.emit("error",l)}};t.exports=s}),Rm=ge((e,t)=>{ue(),fe(),ce();var{Buffer:r}=($e(),Ue(Ve)),o=65536,u={},n=r.isBuffer(r.from([1,2]).subarray(0,1));function i(c){let f=r.allocUnsafe(2);return f.writeUInt8(c>>8,0),f.writeUInt8(c&255,1),f}function s(){for(let c=0;c<o;c++)u[c]=i(c)}function a(c){let f=0,p=0,m=r.allocUnsafe(4);do f=c%128|0,c=c/128|0,c>0&&(f=f|128),m.writeUInt8(f,p++);while(c>0&&p<4);return c>0&&(p=0),n?m.subarray(0,p):m.slice(0,p)}function l(c){let f=r.allocUnsafe(4);return f.writeUInt32BE(c,0),f}t.exports={cache:u,generateCache:s,generateNumber:i,genBufVariableByteInt:a,generate4ByteBuffer:l}}),Om=ge((e,t)=>{ue(),fe(),ce(),typeof Be>"u"||!Be.version||Be.version.indexOf("v0.")===0||Be.version.indexOf("v1.")===0&&Be.version.indexOf("v1.8.")!==0?t.exports={nextTick:r}:t.exports=Be;function r(o,u,n,i){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var s=arguments.length,a,l;switch(s){case 0:case 1:return Be.nextTick(o);case 2:return Be.nextTick(function(){o.call(null,u)});case 3:return Be.nextTick(function(){o.call(null,u,n)});case 4:return Be.nextTick(function(){o.call(null,u,n,i)});default:for(a=new Array(s-1),l=0;l<a.length;)a[l++]=arguments[l];return Be.nextTick(function(){o.apply(null,a)})}}}),Dl=ge((e,t)=>{ue(),fe(),ce();var r=Cl(),{Buffer:o}=($e(),Ue(Ve)),u=o.allocUnsafe(0),n=o.from([0]),i=Rm(),s=Om().nextTick,a=Mt()("mqtt-packet:writeToStream"),l=i.cache,c=i.generateNumber,f=i.generateCache,p=i.genBufVariableByteInt,m=i.generate4ByteBuffer,h=z,g=!0;function y(K,U,ie){switch(a("generate called"),U.cork&&(U.cork(),s(w,U)),g&&(g=!1,f()),a("generate: packet.cmd: %s",K.cmd),K.cmd){case"connect":return b(K,U);case"connack":return E(K,U,ie);case"publish":return T(K,U,ie);case"puback":case"pubrec":case"pubrel":case"pubcomp":return v(K,U,ie);case"subscribe":return A(K,U,ie);case"suback":return S(K,U,ie);case"unsubscribe":return R(K,U,ie);case"unsuback":return C(K,U,ie);case"pingreq":case"pingresp":return M(K,U);case"disconnect":return F(K,U,ie);case"auth":return O(K,U,ie);default:return U.destroy(new Error("Unknown command")),!1}}Object.defineProperty(y,"cacheNumbers",{get(){return h===z},set(K){K?((!l||Object.keys(l).length===0)&&(g=!0),h=z):(g=!1,h=Y)}});function w(K){K.uncork()}function b(K,U,ie){let $=K||{},X=$.protocolId||"MQTT",Q=$.protocolVersion||4,ye=$.will,se=$.clean,D=$.keepalive||0,G=$.clientId||"",te=$.username,de=$.password,pe=$.properties;se===void 0&&(se=!0);let _e=0;if(typeof X!="string"&&!o.isBuffer(X))return U.destroy(new Error("Invalid protocolId")),!1;if(_e+=X.length+2,Q!==3&&Q!==4&&Q!==5)return U.destroy(new Error("Invalid protocol version")),!1;if(_e+=1,(typeof G=="string"||o.isBuffer(G))&&(G||Q>=4)&&(G||se))_e+=o.byteLength(G)+2;else{if(Q<4)return U.destroy(new Error("clientId must be supplied before 3.1.1")),!1;if(se*1===0)return U.destroy(new Error("clientId must be given if cleanSession set to 0")),!1}if(typeof D!="number"||D<0||D>65535||D%1!==0)return U.destroy(new Error("Invalid keepalive")),!1;_e+=2,_e+=1;let V,be;if(Q===5){if(V=ee(U,pe),!V)return!1;_e+=V.length}if(ye){if(typeof ye!="object")return U.destroy(new Error("Invalid will")),!1;if(!ye.topic||typeof ye.topic!="string")return U.destroy(new Error("Invalid will topic")),!1;if(_e+=o.byteLength(ye.topic)+2,_e+=2,ye.payload)if(ye.payload.length>=0)typeof ye.payload=="string"?_e+=o.byteLength(ye.payload):_e+=ye.payload.length;else return U.destroy(new Error("Invalid will payload")),!1;if(be={},Q===5){if(be=ee(U,ye.properties),!be)return!1;_e+=be.length}}let Ee=!1;if(te!=null)if(we(te))Ee=!0,_e+=o.byteLength(te)+2;else return U.destroy(new Error("Invalid username")),!1;if(de!=null){if(!Ee)return U.destroy(new Error("Username is required to use password")),!1;if(we(de))_e+=re(de)+2;else return U.destroy(new Error("Invalid password")),!1}U.write(r.CONNECT_HEADER),j(U,_e),W(U,X),$.bridgeMode&&(Q+=128),U.write(Q===131?r.VERSION131:Q===132?r.VERSION132:Q===4?r.VERSION4:Q===5?r.VERSION5:r.VERSION3);let ae=0;return ae|=te!=null?r.USERNAME_MASK:0,ae|=de!=null?r.PASSWORD_MASK:0,ae|=ye&&ye.retain?r.WILL_RETAIN_MASK:0,ae|=ye&&ye.qos?ye.qos<<r.WILL_QOS_SHIFT:0,ae|=ye?r.WILL_FLAG_MASK:0,ae|=se?r.CLEAN_SESSION_MASK:0,U.write(o.from([ae])),h(U,D),Q===5&&V.write(),W(U,G),ye&&(Q===5&&be.write(),x(U,ye.topic),W(U,ye.payload)),te!=null&&W(U,te),de!=null&&W(U,de),!0}function E(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=$===5?X.reasonCode:X.returnCode,ye=X.properties,se=2;if(typeof Q!="number")return U.destroy(new Error("Invalid return code")),!1;let D=null;if($===5){if(D=ee(U,ye),!D)return!1;se+=D.length}return U.write(r.CONNACK_HEADER),j(U,se),U.write(X.sessionPresent?r.SESSIONPRESENT_HEADER:n),U.write(o.from([Q])),D?.write(),!0}function T(K,U,ie){a("publish: packet: %o",K);let $=ie?ie.protocolVersion:4,X=K||{},Q=X.qos||0,ye=X.retain?r.RETAIN_MASK:0,se=X.topic,D=X.payload||u,G=X.messageId,te=X.properties,de=0;if(typeof se=="string")de+=o.byteLength(se)+2;else if(o.isBuffer(se))de+=se.length+2;else return U.destroy(new Error("Invalid topic")),!1;if(o.isBuffer(D)?de+=D.length:de+=o.byteLength(D),Q&&typeof G!="number")return U.destroy(new Error("Invalid messageId")),!1;Q&&(de+=2);let pe=null;if($===5){if(pe=ee(U,te),!pe)return!1;de+=pe.length}return U.write(r.PUBLISH_HEADER[Q][X.dup?1:0][ye?1:0]),j(U,de),h(U,re(se)),U.write(se),Q>0&&h(U,G),pe?.write(),a("publish: payload: %o",D),U.write(D)}function v(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=X.cmd||"puback",ye=X.messageId,se=X.dup&&Q==="pubrel"?r.DUP_MASK:0,D=0,G=X.reasonCode,te=X.properties,de=$===5?3:2;if(Q==="pubrel"&&(D=1),typeof ye!="number")return U.destroy(new Error("Invalid messageId")),!1;let pe=null;if($===5&&typeof te=="object"){if(pe=P(U,te,ie,de),!pe)return!1;de+=pe.length}return U.write(r.ACKS[Q][D][se][0]),de===3&&(de+=G!==0?1:-1),j(U,de),h(U,ye),$===5&&de!==2&&U.write(o.from([G])),pe!==null?pe.write():de===4&&U.write(o.from([0])),!0}function A(K,U,ie){a("subscribe: packet: ");let $=ie?ie.protocolVersion:4,X=K||{},Q=X.dup?r.DUP_MASK:0,ye=X.messageId,se=X.subscriptions,D=X.properties,G=0;if(typeof ye!="number")return U.destroy(new Error("Invalid messageId")),!1;G+=2;let te=null;if($===5){if(te=ee(U,D),!te)return!1;G+=te.length}if(typeof se=="object"&&se.length)for(let pe=0;pe<se.length;pe+=1){let _e=se[pe].topic,V=se[pe].qos;if(typeof _e!="string")return U.destroy(new Error("Invalid subscriptions - invalid topic")),!1;if(typeof V!="number")return U.destroy(new Error("Invalid subscriptions - invalid qos")),!1;if($===5){if(typeof(se[pe].nl||!1)!="boolean")return U.destroy(new Error("Invalid subscriptions - invalid No Local")),!1;if(typeof(se[pe].rap||!1)!="boolean")return U.destroy(new Error("Invalid subscriptions - invalid Retain as Published")),!1;let be=se[pe].rh||0;if(typeof be!="number"||be>2)return U.destroy(new Error("Invalid subscriptions - invalid Retain Handling")),!1}G+=o.byteLength(_e)+2+1}else return U.destroy(new Error("Invalid subscriptions")),!1;a("subscribe: writing to stream: %o",r.SUBSCRIBE_HEADER),U.write(r.SUBSCRIBE_HEADER[1][Q?1:0][0]),j(U,G),h(U,ye),te!==null&&te.write();let de=!0;for(let pe of se){let _e=pe.topic,V=pe.qos,be=+pe.nl,Ee=+pe.rap,ae=pe.rh,Me;x(U,_e),Me=r.SUBSCRIBE_OPTIONS_QOS[V],$===5&&(Me|=be?r.SUBSCRIBE_OPTIONS_NL:0,Me|=Ee?r.SUBSCRIBE_OPTIONS_RAP:0,Me|=ae?r.SUBSCRIBE_OPTIONS_RH[ae]:0),de=U.write(o.from([Me]))}return de}function S(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=X.messageId,ye=X.granted,se=X.properties,D=0;if(typeof Q!="number")return U.destroy(new Error("Invalid messageId")),!1;if(D+=2,typeof ye=="object"&&ye.length)for(let te=0;te<ye.length;te+=1){if(typeof ye[te]!="number")return U.destroy(new Error("Invalid qos vector")),!1;D+=1}else return U.destroy(new Error("Invalid qos vector")),!1;let G=null;if($===5){if(G=P(U,se,ie,D),!G)return!1;D+=G.length}return U.write(r.SUBACK_HEADER),j(U,D),h(U,Q),G!==null&&G.write(),U.write(o.from(ye))}function R(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=X.messageId,ye=X.dup?r.DUP_MASK:0,se=X.unsubscriptions,D=X.properties,G=0;if(typeof Q!="number")return U.destroy(new Error("Invalid messageId")),!1;if(G+=2,typeof se=="object"&&se.length)for(let pe=0;pe<se.length;pe+=1){if(typeof se[pe]!="string")return U.destroy(new Error("Invalid unsubscriptions")),!1;G+=o.byteLength(se[pe])+2}else return U.destroy(new Error("Invalid unsubscriptions")),!1;let te=null;if($===5){if(te=ee(U,D),!te)return!1;G+=te.length}U.write(r.UNSUBSCRIBE_HEADER[1][ye?1:0][0]),j(U,G),h(U,Q),te!==null&&te.write();let de=!0;for(let pe=0;pe<se.length;pe++)de=x(U,se[pe]);return de}function C(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=X.messageId,ye=X.dup?r.DUP_MASK:0,se=X.granted,D=X.properties,G=X.cmd,te=0,de=2;if(typeof Q!="number")return U.destroy(new Error("Invalid messageId")),!1;if($===5)if(typeof se=="object"&&se.length)for(let _e=0;_e<se.length;_e+=1){if(typeof se[_e]!="number")return U.destroy(new Error("Invalid qos vector")),!1;de+=1}else return U.destroy(new Error("Invalid qos vector")),!1;let pe=null;if($===5){if(pe=P(U,D,ie,de),!pe)return!1;de+=pe.length}return U.write(r.ACKS[G][te][ye][0]),j(U,de),h(U,Q),pe!==null&&pe.write(),$===5&&U.write(o.from(se)),!0}function M(K,U,ie){return U.write(r.EMPTY[K.cmd])}function F(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=X.reasonCode,ye=X.properties,se=$===5?1:0,D=null;if($===5){if(D=P(U,ye,ie,se),!D)return!1;se+=D.length}return U.write(o.from([r.codes.disconnect<<4])),j(U,se),$===5&&U.write(o.from([Q])),D!==null&&D.write(),!0}function O(K,U,ie){let $=ie?ie.protocolVersion:4,X=K||{},Q=X.reasonCode,ye=X.properties,se=$===5?1:0;$!==5&&U.destroy(new Error("Invalid mqtt version for auth packet"));let D=P(U,ye,ie,se);return D?(se+=D.length,U.write(o.from([r.codes.auth<<4])),j(U,se),U.write(o.from([Q])),D!==null&&D.write(),!0):!1}var H={};function j(K,U){if(U>r.VARBYTEINT_MAX)return K.destroy(new Error(`Invalid variable byte integer: ${U}`)),!1;let ie=H[U];return ie||(ie=p(U),U<16384&&(H[U]=ie)),a("writeVarByteInt: writing to stream: %o",ie),K.write(ie)}function x(K,U){let ie=o.byteLength(U);return h(K,ie),a("writeString: %s",U),K.write(U,"utf8")}function le(K,U,ie){x(K,U),x(K,ie)}function z(K,U){return a("writeNumberCached: number: %d",U),a("writeNumberCached: %o",l[U]),K.write(l[U])}function Y(K,U){let ie=c(U);return a("writeNumberGenerated: %o",ie),K.write(ie)}function ne(K,U){let ie=m(U);return a("write4ByteNumber: %o",ie),K.write(ie)}function W(K,U){typeof U=="string"?x(K,U):U?(h(K,U.length),K.write(U)):h(K,0)}function ee(K,U){if(typeof U!="object"||U.length!=null)return{length:1,write(){ve(K,{},0)}};let ie=0;function $(X,Q){let ye=r.propertiesTypes[X],se=0;switch(ye){case"byte":{if(typeof Q!="boolean")return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=2;break}case"int8":{if(typeof Q!="number"||Q<0||Q>255)return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=2;break}case"binary":{if(Q&&Q===null)return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=1+o.byteLength(Q)+2;break}case"int16":{if(typeof Q!="number"||Q<0||Q>65535)return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=3;break}case"int32":{if(typeof Q!="number"||Q<0||Q>4294967295)return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=5;break}case"var":{if(typeof Q!="number"||Q<0||Q>268435455)return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=1+o.byteLength(p(Q));break}case"string":{if(typeof Q!="string")return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=3+o.byteLength(Q.toString());break}case"pair":{if(typeof Q!="object")return K.destroy(new Error(`Invalid ${X}: ${Q}`)),!1;se+=Object.getOwnPropertyNames(Q).reduce((D,G)=>{let te=Q[G];return Array.isArray(te)?D+=te.reduce((de,pe)=>(de+=3+o.byteLength(G.toString())+2+o.byteLength(pe.toString()),de),0):D+=3+o.byteLength(G.toString())+2+o.byteLength(Q[G].toString()),D},0);break}default:return K.destroy(new Error(`Invalid property ${X}: ${Q}`)),!1}return se}if(U)for(let X in U){let Q=0,ye=0,se=U[X];if(se!==void 0){if(Array.isArray(se))for(let D=0;D<se.length;D++){if(ye=$(X,se[D]),!ye)return!1;Q+=ye}else{if(ye=$(X,se),!ye)return!1;Q=ye}if(!Q)return!1;ie+=Q}}return{length:o.byteLength(p(ie))+ie,write(){ve(K,U,ie)}}}function P(K,U,ie,$){let X=["reasonString","userProperties"],Q=ie&&ie.properties&&ie.properties.maximumPacketSize?ie.properties.maximumPacketSize:0,ye=ee(K,U);if(Q)for(;$+ye.length>Q;){let se=X.shift();if(se&&U[se])delete U[se],ye=ee(K,U);else return!1}return ye}function J(K,U,ie){switch(r.propertiesTypes[U]){case"byte":{K.write(o.from([r.properties[U]])),K.write(o.from([+ie]));break}case"int8":{K.write(o.from([r.properties[U]])),K.write(o.from([ie]));break}case"binary":{K.write(o.from([r.properties[U]])),W(K,ie);break}case"int16":{K.write(o.from([r.properties[U]])),h(K,ie);break}case"int32":{K.write(o.from([r.properties[U]])),ne(K,ie);break}case"var":{K.write(o.from([r.properties[U]])),j(K,ie);break}case"string":{K.write(o.from([r.properties[U]])),x(K,ie);break}case"pair":{Object.getOwnPropertyNames(ie).forEach($=>{let X=ie[$];Array.isArray(X)?X.forEach(Q=>{K.write(o.from([r.properties[U]])),le(K,$.toString(),Q.toString())}):(K.write(o.from([r.properties[U]])),le(K,$.toString(),X.toString()))});break}default:return K.destroy(new Error(`Invalid property ${U} value: ${ie}`)),!1}}function ve(K,U,ie){j(K,ie);for(let $ in U)if(Object.prototype.hasOwnProperty.call(U,$)&&U[$]!=null){let X=U[$];if(Array.isArray(X))for(let Q=0;Q<X.length;Q++)J(K,$,X[Q]);else J(K,$,X)}}function re(K){return K?K instanceof o?K.length:o.byteLength(K):0}function we(K){return typeof K=="string"||K instanceof o}t.exports=y}),Nm=ge((e,t)=>{ue(),fe(),ce();var r=Dl(),{EventEmitter:o}=(zt(),Ue(jt)),{Buffer:u}=($e(),Ue(Ve));function n(s,a){let l=new i;return r(s,l,a),l.concat()}var i=class extends o{constructor(){super(),this._array=new Array(20),this._i=0}write(s){return this._array[this._i++]=s,!0}concat(){let s=0,a=new Array(this._array.length),l=this._array,c=0,f;for(f=0;f<l.length&&l[f]!==void 0;f++)typeof l[f]!="string"?a[f]=l[f].length:a[f]=u.byteLength(l[f]),s+=a[f];let p=u.allocUnsafe(s);for(f=0;f<l.length&&l[f]!==void 0;f++)typeof l[f]!="string"?(l[f].copy(p,c),c+=a[f]):(p.write(l[f],c),c+=a[f]);return p}destroy(s){s&&this.emit("error",s)}};t.exports=n}),Lm=ge(e=>{ue(),fe(),ce(),e.parser=Im().parser,e.generate=Nm(),e.writeToStream=Dl()}),Mm=ge((e,t)=>{ue(),fe(),ce(),t.exports=o;function r(n){return n instanceof nn?nn.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function o(n){if(n=n||{},n.circles)return u(n);let i=new Map;if(i.set(Date,f=>new Date(f)),i.set(Map,(f,p)=>new Map(a(Array.from(f),p))),i.set(Set,(f,p)=>new Set(a(Array.from(f),p))),n.constructorHandlers)for(let f of n.constructorHandlers)i.set(f[0],f[1]);let s=null;return n.proto?c:l;function a(f,p){let m=Object.keys(f),h=new Array(m.length);for(let g=0;g<m.length;g++){let y=m[g],w=f[y];typeof w!="object"||w===null?h[y]=w:w.constructor!==Object&&(s=i.get(w.constructor))?h[y]=s(w,p):ArrayBuffer.isView(w)?h[y]=r(w):h[y]=p(w)}return h}function l(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return a(f,l);if(f.constructor!==Object&&(s=i.get(f.constructor)))return s(f,l);let p={};for(let m in f){if(Object.hasOwnProperty.call(f,m)===!1)continue;let h=f[m];typeof h!="object"||h===null?p[m]=h:h.constructor!==Object&&(s=i.get(h.constructor))?p[m]=s(h,l):ArrayBuffer.isView(h)?p[m]=r(h):p[m]=l(h)}return p}function c(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return a(f,c);if(f.constructor!==Object&&(s=i.get(f.constructor)))return s(f,c);let p={};for(let m in f){let h=f[m];typeof h!="object"||h===null?p[m]=h:h.constructor!==Object&&(s=i.get(h.constructor))?p[m]=s(h,c):ArrayBuffer.isView(h)?p[m]=r(h):p[m]=c(h)}return p}}function u(n){let i=[],s=[],a=new Map;if(a.set(Date,m=>new Date(m)),a.set(Map,(m,h)=>new Map(c(Array.from(m),h))),a.set(Set,(m,h)=>new Set(c(Array.from(m),h))),n.constructorHandlers)for(let m of n.constructorHandlers)a.set(m[0],m[1]);let l=null;return n.proto?p:f;function c(m,h){let g=Object.keys(m),y=new Array(g.length);for(let w=0;w<g.length;w++){let b=g[w],E=m[b];if(typeof E!="object"||E===null)y[b]=E;else if(E.constructor!==Object&&(l=a.get(E.constructor)))y[b]=l(E,h);else if(ArrayBuffer.isView(E))y[b]=r(E);else{let T=i.indexOf(E);T!==-1?y[b]=s[T]:y[b]=h(E)}}return y}function f(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return c(m,f);if(m.constructor!==Object&&(l=a.get(m.constructor)))return l(m,f);let h={};i.push(m),s.push(h);for(let g in m){if(Object.hasOwnProperty.call(m,g)===!1)continue;let y=m[g];if(typeof y!="object"||y===null)h[g]=y;else if(y.constructor!==Object&&(l=a.get(y.constructor)))h[g]=l(y,f);else if(ArrayBuffer.isView(y))h[g]=r(y);else{let w=i.indexOf(y);w!==-1?h[g]=s[w]:h[g]=f(y)}}return i.pop(),s.pop(),h}function p(m){if(typeof m!="object"||m===null)return m;if(Array.isArray(m))return c(m,p);if(m.constructor!==Object&&(l=a.get(m.constructor)))return l(m,p);let h={};i.push(m),s.push(h);for(let g in m){let y=m[g];if(typeof y!="object"||y===null)h[g]=y;else if(y.constructor!==Object&&(l=a.get(y.constructor)))h[g]=l(y,p);else if(ArrayBuffer.isView(y))h[g]=r(y);else{let w=i.indexOf(y);w!==-1?h[g]=s[w]:h[g]=p(y)}}return i.pop(),s.pop(),h}}}),Pm=ge((e,t)=>{ue(),fe(),ce(),t.exports=Mm()()}),kl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0}),e.validateTopic=t,e.validateTopics=r;function t(o){let u=o.split("/");for(let n=0;n<u.length;n++)if(u[n]!=="+"){if(u[n]==="#")return n===u.length-1;if(u[n].indexOf("+")!==-1||u[n].indexOf("#")!==-1)return!1}return!0}function r(o){if(o.length===0)return"empty_topic_list";for(let u=0;u<o.length;u++)if(!t(o[u]))return o[u];return null}}),Ul=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=Jt(),r={objectMode:!0},o={clean:!0},u=class{options;_inflights;constructor(n){this.options=n||{},this.options={...o,...n},this._inflights=new Map}put(n,i){return this._inflights.set(n.messageId,n),i&&i(),this}createStream(){let n=new t.Readable(r),i=[],s=!1,a=0;return this._inflights.forEach((l,c)=>{i.push(l)}),n._read=()=>{!s&&a<i.length?n.push(i[a++]):n.push(null)},n.destroy=l=>{if(!s)return s=!0,setTimeout(()=>{n.emit("close")},0),n},n}del(n,i){let s=this._inflights.get(n.messageId);return s?(this._inflights.delete(n.messageId),i(null,s)):i&&i(new Error("missing packet")),this}get(n,i){let s=this._inflights.get(n.messageId);return s?i(null,s):i&&i(new Error("missing packet")),this}close(n){this.options.clean&&(this._inflights=null),n&&n()}};e.default=u}),Cm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=[0,16,128,131,135,144,145,151,153],r=(o,u,n)=>{o.log("handlePublish: packet %o",u),n=typeof n<"u"?n:o.noop;let i=u.topic.toString(),s=u.payload,{qos:a}=u,{messageId:l}=u,{options:c}=o;if(o.options.protocolVersion===5){let f;if(u.properties&&(f=u.properties.topicAlias),typeof f<"u")if(i.length===0)if(f>0&&f<=65535){let p=o.topicAliasRecv.getTopicByAlias(f);if(p)i=p,o.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",i,f);else{o.log("handlePublish :: unregistered topic alias. alias: %d",f),o.emit("error",new Error("Received unregistered Topic Alias"));return}}else{o.log("handlePublish :: topic alias out of range. alias: %d",f),o.emit("error",new Error("Received Topic Alias is out of range"));return}else if(o.topicAliasRecv.put(i,f))o.log("handlePublish :: registered topic: %s - alias: %d",i,f);else{o.log("handlePublish :: topic alias out of range. alias: %d",f),o.emit("error",new Error("Received Topic Alias is out of range"));return}}switch(o.log("handlePublish: qos %d",a),a){case 2:{c.customHandleAcks(i,s,u,(f,p)=>{if(typeof f=="number"&&(p=f,f=null),f)return o.emit("error",f);if(t.indexOf(p)===-1)return o.emit("error",new Error("Wrong reason code for pubrec"));p?o._sendPacket({cmd:"pubrec",messageId:l,reasonCode:p},n):o.incomingStore.put(u,()=>{o._sendPacket({cmd:"pubrec",messageId:l},n)})});break}case 1:{c.customHandleAcks(i,s,u,(f,p)=>{if(typeof f=="number"&&(p=f,f=null),f)return o.emit("error",f);if(t.indexOf(p)===-1)return o.emit("error",new Error("Wrong reason code for puback"));p||o.emit("message",i,s,u),o.handleMessage(u,m=>{if(m)return n&&n(m);o._sendPacket({cmd:"puback",messageId:l,reasonCode:p},n)})});break}case 0:o.emit("message",i,s,u),o.handleMessage(u,n);break;default:o.log("handlePublish: unknown QoS. Doing nothing.");break}};e.default=r}),Dm=ge((e,t)=>{t.exports={version:"5.15.0"}}),mr=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0}),e.MQTTJS_VERSION=e.nextTick=e.ErrorWithSubackPacket=e.ErrorWithReasonCode=void 0,e.applyMixin=o;var t=class zc extends Error{code;constructor(n,i){super(n),this.code=i,Object.setPrototypeOf(this,zc.prototype),Object.getPrototypeOf(this).name="ErrorWithReasonCode"}};e.ErrorWithReasonCode=t;var r=class Qc extends Error{packet;constructor(n,i){super(n),this.packet=i,Object.setPrototypeOf(this,Qc.prototype),Object.getPrototypeOf(this).name="ErrorWithSubackPacket"}};e.ErrorWithSubackPacket=r;function o(u,n,i=!1){let s=[n];for(;;){let a=s[0],l=Object.getPrototypeOf(a);if(l?.prototype)s.unshift(l);else break}for(let a of s)for(let l of Object.getOwnPropertyNames(a.prototype))(i||l!=="constructor")&&Object.defineProperty(u.prototype,l,Object.getOwnPropertyDescriptor(a.prototype,l)??Object.create(null))}e.nextTick=typeof Be?.nextTick=="function"?Be.nextTick:u=>{setTimeout(u,0)},e.MQTTJS_VERSION=Dm().version}),ln=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var t=mr();e.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"};var r=(o,u)=>{let{messageId:n}=u,i=u.cmd,s=null,a=o.outgoing[n]?o.outgoing[n].cb:null,l=null;if(!a){o.log("_handleAck :: Server sent an ack in error. Ignoring.");return}switch(o.log("_handleAck :: packet type",i),i){case"pubcomp":case"puback":{let c=u.reasonCode;c&&c>0&&c!==16?(l=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[c]}`,c),o._removeOutgoingAndStoreMessage(n,()=>{a(l,u)})):o._removeOutgoingAndStoreMessage(n,a);break}case"pubrec":{s={cmd:"pubrel",qos:2,messageId:n};let c=u.reasonCode;c&&c>0&&c!==16?(l=new t.ErrorWithReasonCode(`Publish error: ${e.ReasonCodes[c]}`,c),o._removeOutgoingAndStoreMessage(n,()=>{a(l,u)})):o._sendPacket(s);break}case"suback":{delete o.outgoing[n],o.messageIdProvider.deallocate(n);let c=u.granted;for(let f=0;f<c.length;f++){let p=c[f];if((p&128)!==0){l=new Error(`Subscribe error: ${e.ReasonCodes[p]}`),l.code=p;let m=o.messageIdToTopic[n];m&&m.forEach(h=>{delete o._resubscribeTopics[h]})}}delete o.messageIdToTopic[n],o._invokeStoreProcessingQueue(),a(l,u);break}case"unsuback":{delete o.outgoing[n],o.messageIdProvider.deallocate(n),o._invokeStoreProcessingQueue(),a(null,u);break}default:o.emit("error",new Error("unrecognized packet type"))}o.disconnecting&&Object.keys(o.outgoing).length===0&&o.emit("outgoingEmpty")};e.default=r}),km=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=mr(),r=ln(),o=(u,n)=>{let{options:i}=u,s=i.protocolVersion,a=s===5?n.reasonCode:n.returnCode;if(s!==5){let l=new t.ErrorWithReasonCode(`Protocol error: Auth packets are only supported in MQTT 5. Your version:${s}`,a);u.emit("error",l);return}u.handleAuth(n,(l,c)=>{if(l){u.emit("error",l);return}if(a===24)u.reconnecting=!1,u._sendPacket(c);else{let f=new t.ErrorWithReasonCode(`Connection refused: ${r.ReasonCodes[a]}`,a);u.emit("error",f)}})};e.default=o}),Um=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,o=typeof Be=="object"&&Be?Be:{},u=(m,h,g,y)=>{typeof o.emitWarning=="function"?o.emitWarning(m,h,g,y):console.error(`[${g}] ${h}: ${m}`)},n=globalThis.AbortController,i=globalThis.AbortSignal;if(typeof n>"u"){i=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(g,y){this._onabort.push(y)}},n=class{constructor(){h()}signal=new i;abort(g){if(!this.signal.aborted){this.signal.reason=g,this.signal.aborted=!0;for(let y of this.signal._onabort)y(g);this.signal.onabort?.(g)}}};let m=o.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",h=()=>{m&&(m=!1,u("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",h))}}var s=m=>!r.has(m),a=m=>m&&m===Math.floor(m)&&m>0&&isFinite(m),l=m=>a(m)?m<=Math.pow(2,8)?Uint8Array:m<=Math.pow(2,16)?Uint16Array:m<=Math.pow(2,32)?Uint32Array:m<=Number.MAX_SAFE_INTEGER?c:null:null,c=class extends Array{constructor(m){super(m),this.fill(0)}},f=class Hr{heap;length;static#l=!1;static create(h){let g=l(h);if(!g)return[];Hr.#l=!0;let y=new Hr(h,g);return Hr.#l=!1,y}constructor(h,g){if(!Hr.#l)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new g(h),this.length=0}push(h){this.heap[this.length++]=h}pop(){return this.heap[--this.length]}},p=class Jc{#l;#f;#g;#b;#L;#M;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#m;#n;#r;#e;#u;#h;#a;#o;#y;#s;#v;#_;#d;#E;#I;#c;static unsafeExposeInternals(h){return{starts:h.#_,ttls:h.#d,sizes:h.#v,keyMap:h.#n,keyList:h.#r,valList:h.#e,next:h.#u,prev:h.#h,get head(){return h.#a},get tail(){return h.#o},free:h.#y,isBackgroundFetch:g=>h.#t(g),backgroundFetch:(g,y,w,b)=>h.#D(g,y,w,b),moveToTail:g=>h.#N(g),indexes:g=>h.#w(g),rindexes:g=>h.#S(g),isStale:g=>h.#p(g)}}get max(){return this.#l}get maxSize(){return this.#f}get calculatedSize(){return this.#m}get size(){return this.#i}get fetchMethod(){return this.#L}get memoMethod(){return this.#M}get dispose(){return this.#g}get disposeAfter(){return this.#b}constructor(h){let{max:g=0,ttl:y,ttlResolution:w=1,ttlAutopurge:b,updateAgeOnGet:E,updateAgeOnHas:T,allowStale:v,dispose:A,disposeAfter:S,noDisposeOnSet:R,noUpdateTTL:C,maxSize:M=0,maxEntrySize:F=0,sizeCalculation:O,fetchMethod:H,memoMethod:j,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:le,allowStaleOnFetchRejection:z,allowStaleOnFetchAbort:Y,ignoreFetchAbort:ne}=h;if(g!==0&&!a(g))throw new TypeError("max option must be a nonnegative integer");let W=g?l(g):Array;if(!W)throw new Error("invalid max value: "+g);if(this.#l=g,this.#f=M,this.maxEntrySize=F||this.#f,this.sizeCalculation=O,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(j!==void 0&&typeof j!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#M=j,H!==void 0&&typeof H!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#L=H,this.#I=!!H,this.#n=new Map,this.#r=new Array(g).fill(void 0),this.#e=new Array(g).fill(void 0),this.#u=new W(g),this.#h=new W(g),this.#a=0,this.#o=0,this.#y=f.create(g),this.#i=0,this.#m=0,typeof A=="function"&&(this.#g=A),typeof S=="function"?(this.#b=S,this.#s=[]):(this.#b=void 0,this.#s=void 0),this.#E=!!this.#g,this.#c=!!this.#b,this.noDisposeOnSet=!!R,this.noUpdateTTL=!!C,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!z,this.allowStaleOnFetchAbort=!!Y,this.ignoreFetchAbort=!!ne,this.maxEntrySize!==0){if(this.#f!==0&&!a(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!a(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#W()}if(this.allowStale=!!v,this.noDeleteOnStaleGet=!!le,this.updateAgeOnGet=!!E,this.updateAgeOnHas=!!T,this.ttlResolution=a(w)||w===0?w:1,this.ttlAutopurge=!!b,this.ttl=y||0,this.ttl){if(!a(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#k()}if(this.#l===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#l&&!this.#f){let ee="LRU_CACHE_UNBOUNDED";s(ee)&&(r.add(ee),u("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",ee,Jc))}}getRemainingTTL(h){return this.#n.has(h)?1/0:0}#k(){let h=new c(this.#l),g=new c(this.#l);this.#d=h,this.#_=g,this.#U=(b,E,T=t.now())=>{if(g[b]=E!==0?T:0,h[b]=E,E!==0&&this.ttlAutopurge){let v=setTimeout(()=>{this.#p(b)&&this.#A(this.#r[b],"expire")},E+1);v.unref&&v.unref()}},this.#R=b=>{g[b]=h[b]!==0?t.now():0},this.#T=(b,E)=>{if(h[E]){let T=h[E],v=g[E];if(!T||!v)return;b.ttl=T,b.start=v,b.now=y||w();let A=b.now-v;b.remainingTTL=T-A}};let y=0,w=()=>{let b=t.now();if(this.ttlResolution>0){y=b;let E=setTimeout(()=>y=0,this.ttlResolution);E.unref&&E.unref()}return b};this.getRemainingTTL=b=>{let E=this.#n.get(b);if(E===void 0)return 0;let T=h[E],v=g[E];if(!T||!v)return 1/0;let A=(y||w())-v;return T-A},this.#p=b=>{let E=g[b],T=h[b];return!!T&&!!E&&(y||w())-E>T}}#R=()=>{};#T=()=>{};#U=()=>{};#p=()=>!1;#W(){let h=new c(this.#l);this.#m=0,this.#v=h,this.#O=g=>{this.#m-=h[g],h[g]=0},this.#x=(g,y,w,b)=>{if(this.#t(y))return 0;if(!a(w))if(b){if(typeof b!="function")throw new TypeError("sizeCalculation must be a function");if(w=b(y,g),!a(w))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return w},this.#P=(g,y,w)=>{if(h[g]=y,this.#f){let b=this.#f-h[g];for(;this.#m>b;)this.#C(!0)}this.#m+=h[g],w&&(w.entrySize=y,w.totalCalculatedSize=this.#m)}}#O=h=>{};#P=(h,g,y)=>{};#x=(h,g,y,w)=>{if(y||w)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:h=this.allowStale}={}){if(this.#i)for(let g=this.#o;!(!this.#B(g)||((h||!this.#p(g))&&(yield g),g===this.#a));)g=this.#h[g]}*#S({allowStale:h=this.allowStale}={}){if(this.#i)for(let g=this.#a;!(!this.#B(g)||((h||!this.#p(g))&&(yield g),g===this.#o));)g=this.#u[g]}#B(h){return h!==void 0&&this.#n.get(this.#r[h])===h}*entries(){for(let h of this.#w())this.#e[h]!==void 0&&this.#r[h]!==void 0&&!this.#t(this.#e[h])&&(yield[this.#r[h],this.#e[h]])}*rentries(){for(let h of this.#S())this.#e[h]!==void 0&&this.#r[h]!==void 0&&!this.#t(this.#e[h])&&(yield[this.#r[h],this.#e[h]])}*keys(){for(let h of this.#w()){let g=this.#r[h];g!==void 0&&!this.#t(this.#e[h])&&(yield g)}}*rkeys(){for(let h of this.#S()){let g=this.#r[h];g!==void 0&&!this.#t(this.#e[h])&&(yield g)}}*values(){for(let h of this.#w())this.#e[h]!==void 0&&!this.#t(this.#e[h])&&(yield this.#e[h])}*rvalues(){for(let h of this.#S())this.#e[h]!==void 0&&!this.#t(this.#e[h])&&(yield this.#e[h])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(h,g={}){for(let y of this.#w()){let w=this.#e[y],b=this.#t(w)?w.__staleWhileFetching:w;if(b!==void 0&&h(b,this.#r[y],this))return this.get(this.#r[y],g)}}forEach(h,g=this){for(let y of this.#w()){let w=this.#e[y],b=this.#t(w)?w.__staleWhileFetching:w;b!==void 0&&h.call(g,b,this.#r[y],this)}}rforEach(h,g=this){for(let y of this.#S()){let w=this.#e[y],b=this.#t(w)?w.__staleWhileFetching:w;b!==void 0&&h.call(g,b,this.#r[y],this)}}purgeStale(){let h=!1;for(let g of this.#S({allowStale:!0}))this.#p(g)&&(this.#A(this.#r[g],"expire"),h=!0);return h}info(h){let g=this.#n.get(h);if(g===void 0)return;let y=this.#e[g],w=this.#t(y)?y.__staleWhileFetching:y;if(w===void 0)return;let b={value:w};if(this.#d&&this.#_){let E=this.#d[g],T=this.#_[g];if(E&&T){let v=E-(t.now()-T);b.ttl=v,b.start=Date.now()}}return this.#v&&(b.size=this.#v[g]),b}dump(){let h=[];for(let g of this.#w({allowStale:!0})){let y=this.#r[g],w=this.#e[g],b=this.#t(w)?w.__staleWhileFetching:w;if(b===void 0||y===void 0)continue;let E={value:b};if(this.#d&&this.#_){E.ttl=this.#d[g];let T=t.now()-this.#_[g];E.start=Math.floor(Date.now()-T)}this.#v&&(E.size=this.#v[g]),h.unshift([y,E])}return h}load(h){this.clear();for(let[g,y]of h){if(y.start){let w=Date.now()-y.start;y.start=t.now()-w}this.set(g,y.value,y)}}set(h,g,y={}){if(g===void 0)return this.delete(h),this;let{ttl:w=this.ttl,start:b,noDisposeOnSet:E=this.noDisposeOnSet,sizeCalculation:T=this.sizeCalculation,status:v}=y,{noUpdateTTL:A=this.noUpdateTTL}=y,S=this.#x(h,g,y.size||0,T);if(this.maxEntrySize&&S>this.maxEntrySize)return v&&(v.set="miss",v.maxEntrySizeExceeded=!0),this.#A(h,"set"),this;let R=this.#i===0?void 0:this.#n.get(h);if(R===void 0)R=this.#i===0?this.#o:this.#y.length!==0?this.#y.pop():this.#i===this.#l?this.#C(!1):this.#i,this.#r[R]=h,this.#e[R]=g,this.#n.set(h,R),this.#u[this.#o]=R,this.#h[R]=this.#o,this.#o=R,this.#i++,this.#P(R,S,v),v&&(v.set="add"),A=!1;else{this.#N(R);let C=this.#e[R];if(g!==C){if(this.#I&&this.#t(C)){C.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:M}=C;M!==void 0&&!E&&(this.#E&&this.#g?.(M,h,"set"),this.#c&&this.#s?.push([M,h,"set"]))}else E||(this.#E&&this.#g?.(C,h,"set"),this.#c&&this.#s?.push([C,h,"set"]));if(this.#O(R),this.#P(R,S,v),this.#e[R]=g,v){v.set="replace";let M=C&&this.#t(C)?C.__staleWhileFetching:C;M!==void 0&&(v.oldValue=M)}}else v&&(v.set="update")}if(w!==0&&!this.#d&&this.#k(),this.#d&&(A||this.#U(R,w,b),v&&this.#T(v,R)),!E&&this.#c&&this.#s){let C=this.#s,M;for(;M=C?.shift();)this.#b?.(...M)}return this}pop(){try{for(;this.#i;){let h=this.#e[this.#a];if(this.#C(!0),this.#t(h)){if(h.__staleWhileFetching)return h.__staleWhileFetching}else if(h!==void 0)return h}}finally{if(this.#c&&this.#s){let h=this.#s,g;for(;g=h?.shift();)this.#b?.(...g)}}}#C(h){let g=this.#a,y=this.#r[g],w=this.#e[g];return this.#I&&this.#t(w)?w.__abortController.abort(new Error("evicted")):(this.#E||this.#c)&&(this.#E&&this.#g?.(w,y,"evict"),this.#c&&this.#s?.push([w,y,"evict"])),this.#O(g),h&&(this.#r[g]=void 0,this.#e[g]=void 0,this.#y.push(g)),this.#i===1?(this.#a=this.#o=0,this.#y.length=0):this.#a=this.#u[g],this.#n.delete(y),this.#i--,g}has(h,g={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:w}=g,b=this.#n.get(h);if(b!==void 0){let E=this.#e[b];if(this.#t(E)&&E.__staleWhileFetching===void 0)return!1;if(this.#p(b))w&&(w.has="stale",this.#T(w,b));else return y&&this.#R(b),w&&(w.has="hit",this.#T(w,b)),!0}else w&&(w.has="miss");return!1}peek(h,g={}){let{allowStale:y=this.allowStale}=g,w=this.#n.get(h);if(w===void 0||!y&&this.#p(w))return;let b=this.#e[w];return this.#t(b)?b.__staleWhileFetching:b}#D(h,g,y,w){let b=g===void 0?void 0:this.#e[g];if(this.#t(b))return b;let E=new n,{signal:T}=y;T?.addEventListener("abort",()=>E.abort(T.reason),{signal:E.signal});let v={signal:E.signal,options:y,context:w},A=(O,H=!1)=>{let{aborted:j}=E.signal,x=y.ignoreFetchAbort&&O!==void 0;if(y.status&&(j&&!H?(y.status.fetchAborted=!0,y.status.fetchError=E.signal.reason,x&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),j&&!x&&!H)return R(E.signal.reason);let le=M;return this.#e[g]===M&&(O===void 0?le.__staleWhileFetching?this.#e[g]=le.__staleWhileFetching:this.#A(h,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(h,O,v.options))),O},S=O=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=O),R(O)),R=O=>{let{aborted:H}=E.signal,j=H&&y.allowStaleOnFetchAbort,x=j||y.allowStaleOnFetchRejection,le=x||y.noDeleteOnFetchRejection,z=M;if(this.#e[g]===M&&(!le||z.__staleWhileFetching===void 0?this.#A(h,"fetch"):j||(this.#e[g]=z.__staleWhileFetching)),x)return y.status&&z.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),z.__staleWhileFetching;if(z.__returned===z)throw O},C=(O,H)=>{let j=this.#L?.(h,b,v);j&&j instanceof Promise&&j.then(x=>O(x===void 0?void 0:x),H),E.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(O(void 0),y.allowStaleOnFetchAbort&&(O=x=>A(x,!0)))})};y.status&&(y.status.fetchDispatched=!0);let M=new Promise(C).then(A,S),F=Object.assign(M,{__abortController:E,__staleWhileFetching:b,__returned:void 0});return g===void 0?(this.set(h,F,{...v.options,status:void 0}),g=this.#n.get(h)):this.#e[g]=F,F}#t(h){if(!this.#I)return!1;let g=h;return!!g&&g instanceof Promise&&g.hasOwnProperty("__staleWhileFetching")&&g.__abortController instanceof n}async fetch(h,g={}){let{allowStale:y=this.allowStale,updateAgeOnGet:w=this.updateAgeOnGet,noDeleteOnStaleGet:b=this.noDeleteOnStaleGet,ttl:E=this.ttl,noDisposeOnSet:T=this.noDisposeOnSet,size:v=0,sizeCalculation:A=this.sizeCalculation,noUpdateTTL:S=this.noUpdateTTL,noDeleteOnFetchRejection:R=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:C=this.allowStaleOnFetchRejection,ignoreFetchAbort:M=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:O,forceRefresh:H=!1,status:j,signal:x}=g;if(!this.#I)return j&&(j.fetch="get"),this.get(h,{allowStale:y,updateAgeOnGet:w,noDeleteOnStaleGet:b,status:j});let le={allowStale:y,updateAgeOnGet:w,noDeleteOnStaleGet:b,ttl:E,noDisposeOnSet:T,size:v,sizeCalculation:A,noUpdateTTL:S,noDeleteOnFetchRejection:R,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:F,ignoreFetchAbort:M,status:j,signal:x},z=this.#n.get(h);if(z===void 0){j&&(j.fetch="miss");let Y=this.#D(h,z,le,O);return Y.__returned=Y}else{let Y=this.#e[z];if(this.#t(Y)){let P=y&&Y.__staleWhileFetching!==void 0;return j&&(j.fetch="inflight",P&&(j.returnedStale=!0)),P?Y.__staleWhileFetching:Y.__returned=Y}let ne=this.#p(z);if(!H&&!ne)return j&&(j.fetch="hit"),this.#N(z),w&&this.#R(z),j&&this.#T(j,z),Y;let W=this.#D(h,z,le,O),ee=W.__staleWhileFetching!==void 0&&y;return j&&(j.fetch=ne?"stale":"refresh",ee&&ne&&(j.returnedStale=!0)),ee?W.__staleWhileFetching:W.__returned=W}}async forceFetch(h,g={}){let y=await this.fetch(h,g);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(h,g={}){let y=this.#M;if(!y)throw new Error("no memoMethod provided to constructor");let{context:w,forceRefresh:b,...E}=g,T=this.get(h,E);if(!b&&T!==void 0)return T;let v=y(h,T,{options:E,context:w});return this.set(h,v,E),v}get(h,g={}){let{allowStale:y=this.allowStale,updateAgeOnGet:w=this.updateAgeOnGet,noDeleteOnStaleGet:b=this.noDeleteOnStaleGet,status:E}=g,T=this.#n.get(h);if(T!==void 0){let v=this.#e[T],A=this.#t(v);return E&&this.#T(E,T),this.#p(T)?(E&&(E.get="stale"),A?(E&&y&&v.__staleWhileFetching!==void 0&&(E.returnedStale=!0),y?v.__staleWhileFetching:void 0):(b||this.#A(h,"expire"),E&&y&&(E.returnedStale=!0),y?v:void 0)):(E&&(E.get="hit"),A?v.__staleWhileFetching:(this.#N(T),w&&this.#R(T),v))}else E&&(E.get="miss")}#F(h,g){this.#h[g]=h,this.#u[h]=g}#N(h){h!==this.#o&&(h===this.#a?this.#a=this.#u[h]:this.#F(this.#h[h],this.#u[h]),this.#F(this.#o,h),this.#o=h)}delete(h){return this.#A(h,"delete")}#A(h,g){let y=!1;if(this.#i!==0){let w=this.#n.get(h);if(w!==void 0)if(y=!0,this.#i===1)this.#j(g);else{this.#O(w);let b=this.#e[w];if(this.#t(b)?b.__abortController.abort(new Error("deleted")):(this.#E||this.#c)&&(this.#E&&this.#g?.(b,h,g),this.#c&&this.#s?.push([b,h,g])),this.#n.delete(h),this.#r[w]=void 0,this.#e[w]=void 0,w===this.#o)this.#o=this.#h[w];else if(w===this.#a)this.#a=this.#u[w];else{let E=this.#h[w];this.#u[E]=this.#u[w];let T=this.#u[w];this.#h[T]=this.#h[w]}this.#i--,this.#y.push(w)}}if(this.#c&&this.#s?.length){let w=this.#s,b;for(;b=w?.shift();)this.#b?.(...b)}return y}clear(){return this.#j("delete")}#j(h){for(let g of this.#S({allowStale:!0})){let y=this.#e[g];if(this.#t(y))y.__abortController.abort(new Error("deleted"));else{let w=this.#r[g];this.#E&&this.#g?.(y,w,h),this.#c&&this.#s?.push([y,w,h])}}if(this.#n.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#_&&(this.#d.fill(0),this.#_.fill(0)),this.#v&&this.#v.fill(0),this.#a=0,this.#o=0,this.#y.length=0,this.#m=0,this.#i=0,this.#c&&this.#s){let g=this.#s,y;for(;y=g?.shift();)this.#b?.(...y)}}};e.LRUCache=p}),Pt=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.ContainerIterator=e.Container=e.Base=void 0;var t=class{constructor(u=0){this.iteratorType=u}equals(u){return this.o===u.o}};e.ContainerIterator=t;var r=class{constructor(){this.i=0}get length(){return this.i}size(){return this.i}empty(){return this.i===0}};e.Base=r;var o=class extends r{};e.Container=o}),xm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Pt(),r=class extends t.Base{constructor(u=[]){super(),this.S=[];let n=this;u.forEach(function(i){n.push(i)})}clear(){this.i=0,this.S=[]}push(u){return this.S.push(u),this.i+=1,this.i}pop(){if(this.i!==0)return this.i-=1,this.S.pop()}top(){return this.S[this.i-1]}},o=r;e.default=o}),Bm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Pt(),r=class extends t.Base{constructor(u=[]){super(),this.j=0,this.q=[];let n=this;u.forEach(function(i){n.push(i)})}clear(){this.q=[],this.i=this.j=0}push(u){let n=this.q.length;if(this.j/n>.5&&this.j+this.i>=n&&n>4096){let i=this.i;for(let s=0;s<i;++s)this.q[s]=this.q[this.j+s];this.j=0,this.q[this.i]=u}else this.q[this.j+this.i]=u;return++this.i}pop(){if(this.i===0)return;let u=this.q[this.j++];return this.i-=1,u}front(){if(this.i!==0)return this.q[this.j]}},o=r;e.default=o}),Fm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Pt(),r=class extends t.Base{constructor(u=[],n=function(s,a){return s>a?-1:s<a?1:0},i=!0){if(super(),this.v=n,Array.isArray(u))this.C=i?[...u]:u;else{this.C=[];let a=this;u.forEach(function(l){a.C.push(l)})}this.i=this.C.length;let s=this.i>>1;for(let a=this.i-1>>1;a>=0;--a)this.k(a,s)}m(u){let n=this.C[u];for(;u>0;){let i=u-1>>1,s=this.C[i];if(this.v(s,n)<=0)break;this.C[u]=s,u=i}this.C[u]=n}k(u,n){let i=this.C[u];for(;u<n;){let s=u<<1|1,a=s+1,l=this.C[s];if(a<this.i&&this.v(l,this.C[a])>0&&(s=a,l=this.C[a]),this.v(l,i)>=0)break;this.C[u]=l,u=s}this.C[u]=i}clear(){this.i=0,this.C.length=0}push(u){this.C.push(u),this.m(this.i),this.i+=1}pop(){if(this.i===0)return;let u=this.C[0],n=this.C.pop();return this.i-=1,this.i&&(this.C[0]=n,this.k(0,this.i>>1)),u}top(){return this.C[0]}find(u){return this.C.indexOf(u)>=0}remove(u){let n=this.C.indexOf(u);return n<0?!1:(n===0?this.pop():n===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(n,1,this.C.pop()),this.i-=1,this.m(n),this.k(n,this.i>>1)),!0)}updateItem(u){let n=this.C.indexOf(u);return n<0?!1:(this.m(n),this.k(n,this.i>>1),!0)}toArray(){return[...this.C]}},o=r;e.default=o}),Io=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Pt(),r=class extends t.Container{},o=r;e.default=o}),Ct=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.throwIteratorAccessError=t;function t(){throw new RangeError("Iterator access denied!")}}),xl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.RandomIterator=void 0;var t=Pt(),r=Ct(),o=class extends t.ContainerIterator{constructor(u,n){super(n),this.o=u,this.iteratorType===0?(this.pre=function(){return this.o===0&&(0,r.throwIteratorAccessError)(),this.o-=1,this},this.next=function(){return this.o===this.container.size()&&(0,r.throwIteratorAccessError)(),this.o+=1,this}):(this.pre=function(){return this.o===this.container.size()-1&&(0,r.throwIteratorAccessError)(),this.o+=1,this},this.next=function(){return this.o===-1&&(0,r.throwIteratorAccessError)(),this.o-=1,this})}get pointer(){return this.container.getElementByPos(this.o)}set pointer(u){this.container.setElementByPos(this.o,u)}};e.RandomIterator=o}),jm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Io()),r=xl();function o(s){return s&&s.t?s:{default:s}}var u=class Zc extends r.RandomIterator{constructor(a,l,c){super(a,c),this.container=l}copy(){return new Zc(this.o,this.container,this.iteratorType)}},n=class extends t.default{constructor(s=[],a=!0){if(super(),Array.isArray(s))this.J=a?[...s]:s,this.i=s.length;else{this.J=[];let l=this;s.forEach(function(c){l.pushBack(c)})}}clear(){this.i=0,this.J.length=0}begin(){return new u(0,this)}end(){return new u(this.i,this)}rBegin(){return new u(this.i-1,this,1)}rEnd(){return new u(-1,this,1)}front(){return this.J[0]}back(){return this.J[this.i-1]}getElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;return this.J[s]}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;return this.J.splice(s,1),this.i-=1,this.i}eraseElementByValue(s){let a=0;for(let l=0;l<this.i;++l)this.J[l]!==s&&(this.J[a++]=this.J[l]);return this.i=this.J.length=a,this.i}eraseElementByIterator(s){let a=s.o;return s=s.next(),this.eraseElementByPos(a),s}pushBack(s){return this.J.push(s),this.i+=1,this.i}popBack(){if(this.i!==0)return this.i-=1,this.J.pop()}setElementByPos(s,a){if(s<0||s>this.i-1)throw new RangeError;this.J[s]=a}insert(s,a,l=1){if(s<0||s>this.i)throw new RangeError;return this.J.splice(s,0,...new Array(l).fill(a)),this.i+=l,this.i}find(s){for(let a=0;a<this.i;++a)if(this.J[a]===s)return new u(a,this);return this.end()}reverse(){this.J.reverse()}unique(){let s=1;for(let a=1;a<this.i;++a)this.J[a]!==this.J[a-1]&&(this.J[s++]=this.J[a]);return this.i=this.J.length=s,this.i}sort(s){this.J.sort(s)}forEach(s){for(let a=0;a<this.i;++a)s(this.J[a],a,this)}[Symbol.iterator](){return(function*(){yield*this.J}).bind(this)()}},i=n;e.default=i}),Wm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=u(Io()),r=Pt(),o=Ct();function u(a){return a&&a.t?a:{default:a}}var n=class ef extends r.ContainerIterator{constructor(l,c,f,p){super(p),this.o=l,this.h=c,this.container=f,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this})}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.l}set pointer(l){this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.l=l}copy(){return new ef(this.o,this.h,this.container,this.iteratorType)}},i=class extends t.default{constructor(a=[]){super(),this.h={},this.p=this._=this.h.L=this.h.B=this.h;let l=this;a.forEach(function(c){l.pushBack(c)})}V(a){let{L:l,B:c}=a;l.B=c,c.L=l,a===this.p&&(this.p=c),a===this._&&(this._=l),this.i-=1}G(a,l){let c=l.B,f={l:a,L:l,B:c};l.B=f,c.L=f,l===this.h&&(this.p=f),c===this.h&&(this._=f),this.i+=1}clear(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}begin(){return new n(this.p,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this._,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){return this.p.l}back(){return this._.l}getElementByPos(a){if(a<0||a>this.i-1)throw new RangeError;let l=this.p;for(;a--;)l=l.B;return l.l}eraseElementByPos(a){if(a<0||a>this.i-1)throw new RangeError;let l=this.p;for(;a--;)l=l.B;return this.V(l),this.i}eraseElementByValue(a){let l=this.p;for(;l!==this.h;)l.l===a&&this.V(l),l=l.B;return this.i}eraseElementByIterator(a){let l=a.o;return l===this.h&&(0,o.throwIteratorAccessError)(),a=a.next(),this.V(l),a}pushBack(a){return this.G(a,this._),this.i}popBack(){if(this.i===0)return;let a=this._.l;return this.V(this._),a}pushFront(a){return this.G(a,this.h),this.i}popFront(){if(this.i===0)return;let a=this.p.l;return this.V(this.p),a}setElementByPos(a,l){if(a<0||a>this.i-1)throw new RangeError;let c=this.p;for(;a--;)c=c.B;c.l=l}insert(a,l,c=1){if(a<0||a>this.i)throw new RangeError;if(c<=0)return this.i;if(a===0)for(;c--;)this.pushFront(l);else if(a===this.i)for(;c--;)this.pushBack(l);else{let f=this.p;for(let m=1;m<a;++m)f=f.B;let p=f.B;for(this.i+=c;c--;)f.B={l,L:f},f.B.L=f,f=f.B;f.B=p,p.L=f}return this.i}find(a){let l=this.p;for(;l!==this.h;){if(l.l===a)return new n(l,this.h,this);l=l.B}return this.end()}reverse(){if(this.i<=1)return;let a=this.p,l=this._,c=0;for(;c<<1<this.i;){let f=a.l;a.l=l.l,l.l=f,a=a.B,l=l.L,c+=1}}unique(){if(this.i<=1)return this.i;let a=this.p;for(;a!==this.h;){let l=a;for(;l.B!==this.h&&l.l===l.B.l;)l=l.B,this.i-=1;a.B=l.B,a.B.L=a,a=a.B}return this.i}sort(a){if(this.i<=1)return;let l=[];this.forEach(function(f){l.push(f)}),l.sort(a);let c=this.p;l.forEach(function(f){c.l=f,c=c.B})}merge(a){let l=this;if(this.i===0)a.forEach(function(c){l.pushBack(c)});else{let c=this.p;a.forEach(function(f){for(;c!==l.h&&c.l<=f;)c=c.B;l.G(f,c.L)})}return this.i}forEach(a){let l=this.p,c=0;for(;l!==this.h;)a(l.l,c++,this),l=l.B}[Symbol.iterator](){return(function*(){if(this.i===0)return;let a=this.p;for(;a!==this.h;)yield a.l,a=a.B}).bind(this)()}},s=i;e.default=s}),Gm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=o(Io()),r=xl();function o(s){return s&&s.t?s:{default:s}}var u=class tf extends r.RandomIterator{constructor(a,l,c){super(a,c),this.container=l}copy(){return new tf(this.o,this.container,this.iteratorType)}},n=class extends t.default{constructor(s=[],a=4096){super(),this.j=0,this.D=0,this.R=0,this.N=0,this.P=0,this.A=[];let l=(()=>{if(typeof s.length=="number")return s.length;if(typeof s.size=="number")return s.size;if(typeof s.size=="function")return s.size();throw new TypeError("Cannot get the length or size of the container")})();this.F=a,this.P=Math.max(Math.ceil(l/this.F),1);for(let p=0;p<this.P;++p)this.A.push(new Array(this.F));let c=Math.ceil(l/this.F);this.j=this.R=(this.P>>1)-(c>>1),this.D=this.N=this.F-l%this.F>>1;let f=this;s.forEach(function(p){f.pushBack(p)})}T(){let s=[],a=Math.max(this.P>>1,1);for(let l=0;l<a;++l)s[l]=new Array(this.F);for(let l=this.j;l<this.P;++l)s[s.length]=this.A[l];for(let l=0;l<this.R;++l)s[s.length]=this.A[l];s[s.length]=[...this.A[this.R]],this.j=a,this.R=s.length-1;for(let l=0;l<a;++l)s[s.length]=new Array(this.F);this.A=s,this.P=s.length}O(s){let a=this.D+s+1,l=a%this.F,c=l-1,f=this.j+(a-l)/this.F;return l===0&&(f-=1),f%=this.P,c<0&&(c+=this.F),{curNodeBucketIndex:f,curNodePointerIndex:c}}clear(){this.A=[new Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}begin(){return new u(0,this)}end(){return new u(this.i,this)}rBegin(){return new u(this.i-1,this,1)}rEnd(){return new u(-1,this,1)}front(){if(this.i!==0)return this.A[this.j][this.D]}back(){if(this.i!==0)return this.A[this.R][this.N]}pushBack(s){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=s,this.i}popBack(){if(this.i===0)return;let s=this.A[this.R][this.N];return this.i!==1&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,s}pushFront(s){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=s,this.i}popFront(){if(this.i===0)return;let s=this.A[this.j][this.D];return this.i!==1&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,s}getElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;let{curNodeBucketIndex:a,curNodePointerIndex:l}=this.O(s);return this.A[a][l]}setElementByPos(s,a){if(s<0||s>this.i-1)throw new RangeError;let{curNodeBucketIndex:l,curNodePointerIndex:c}=this.O(s);this.A[l][c]=a}insert(s,a,l=1){if(s<0||s>this.i)throw new RangeError;if(s===0)for(;l--;)this.pushFront(a);else if(s===this.i)for(;l--;)this.pushBack(a);else{let c=[];for(let f=s;f<this.i;++f)c.push(this.getElementByPos(f));this.cut(s-1);for(let f=0;f<l;++f)this.pushBack(a);for(let f=0;f<c.length;++f)this.pushBack(c[f])}return this.i}cut(s){if(s<0)return this.clear(),0;let{curNodeBucketIndex:a,curNodePointerIndex:l}=this.O(s);return this.R=a,this.N=l,this.i=s+1,this.i}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;if(s===0)this.popFront();else if(s===this.i-1)this.popBack();else{let a=[];for(let c=s+1;c<this.i;++c)a.push(this.getElementByPos(c));this.cut(s),this.popBack();let l=this;a.forEach(function(c){l.pushBack(c)})}return this.i}eraseElementByValue(s){if(this.i===0)return 0;let a=[];for(let c=0;c<this.i;++c){let f=this.getElementByPos(c);f!==s&&a.push(f)}let l=a.length;for(let c=0;c<l;++c)this.setElementByPos(c,a[c]);return this.cut(l-1)}eraseElementByIterator(s){let a=s.o;return this.eraseElementByPos(a),s=s.next(),s}find(s){for(let a=0;a<this.i;++a)if(this.getElementByPos(a)===s)return new u(a,this);return this.end()}reverse(){let s=0,a=this.i-1;for(;s<a;){let l=this.getElementByPos(s);this.setElementByPos(s,this.getElementByPos(a)),this.setElementByPos(a,l),s+=1,a-=1}}unique(){if(this.i<=1)return this.i;let s=1,a=this.getElementByPos(0);for(let l=1;l<this.i;++l){let c=this.getElementByPos(l);c!==a&&(a=c,this.setElementByPos(s++,c))}for(;this.i>s;)this.popBack();return this.i}sort(s){let a=[];for(let l=0;l<this.i;++l)a.push(this.getElementByPos(l));a.sort(s);for(let l=0;l<this.i;++l)this.setElementByPos(l,a[l])}shrinkToFit(){if(this.i===0)return;let s=[];this.forEach(function(a){s.push(a)}),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(let a=0;a<this.P;++a)this.A.push(new Array(this.F));for(let a=0;a<s.length;++a)this.pushBack(s[a])}forEach(s){for(let a=0;a<this.i;++a)s(this.getElementByPos(a),a,this)}[Symbol.iterator](){return(function*(){for(let s=0;s<this.i;++s)yield this.getElementByPos(s)}).bind(this)()}},i=n;e.default=i}),Hm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.TreeNodeEnableIndex=e.TreeNode=void 0;var t=class{constructor(o,u){this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=o,this.l=u}L(){let o=this;if(o.ee===1&&o.tt.tt===o)o=o.W;else if(o.U)for(o=o.U;o.W;)o=o.W;else{let u=o.tt;for(;u.U===o;)o=u,u=o.tt;o=u}return o}B(){let o=this;if(o.W){for(o=o.W;o.U;)o=o.U;return o}else{let u=o.tt;for(;u.W===o;)o=u,u=o.tt;return o.W!==u?u:o}}te(){let o=this.tt,u=this.W,n=u.U;return o.tt===this?o.tt=u:o.U===this?o.U=u:o.W=u,u.tt=o,u.U=this,this.tt=u,this.W=n,n&&(n.tt=this),u}se(){let o=this.tt,u=this.U,n=u.W;return o.tt===this?o.tt=u:o.U===this?o.U=u:o.W=u,u.tt=o,u.W=this,this.tt=u,this.U=n,n&&(n.tt=this),u}};e.TreeNode=t;var r=class extends t{constructor(){super(...arguments),this.rt=1}te(){let o=super.te();return this.ie(),o.ie(),o}se(){let o=super.se();return this.ie(),o.ie(),o}ie(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}};e.TreeNodeEnableIndex=r}),Bl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Hm(),r=Pt(),o=Ct(),u=class extends r.Container{constructor(i=function(a,l){return a<l?-1:a>l?1:0},s=!1){super(),this.Y=void 0,this.v=i,s?(this.re=t.TreeNodeEnableIndex,this.M=function(a,l,c){let f=this.ne(a,l,c);if(f){let p=f.tt;for(;p!==this.h;)p.rt+=1,p=p.tt;let m=this.he(f);if(m){let{parentNode:h,grandParent:g,curNode:y}=m;h.ie(),g.ie(),y.ie()}}return this.i},this.V=function(a){let l=this.fe(a);for(;l!==this.h;)l.rt-=1,l=l.tt}):(this.re=t.TreeNode,this.M=function(a,l,c){let f=this.ne(a,l,c);return f&&this.he(f),this.i},this.V=this.fe),this.h=new this.re}X(i,s){let a=this.h;for(;i;){let l=this.v(i.u,s);if(l<0)i=i.W;else if(l>0)a=i,i=i.U;else return i}return a}Z(i,s){let a=this.h;for(;i;)this.v(i.u,s)<=0?i=i.W:(a=i,i=i.U);return a}$(i,s){let a=this.h;for(;i;){let l=this.v(i.u,s);if(l<0)a=i,i=i.W;else if(l>0)i=i.U;else return i}return a}rr(i,s){let a=this.h;for(;i;)this.v(i.u,s)<0?(a=i,i=i.W):i=i.U;return a}ue(i){for(;;){let s=i.tt;if(s===this.h)return;if(i.ee===1){i.ee=0;return}if(i===s.U){let a=s.W;if(a.ee===1)a.ee=0,s.ee=1,s===this.Y?this.Y=s.te():s.te();else if(a.W&&a.W.ee===1){a.ee=s.ee,s.ee=0,a.W.ee=0,s===this.Y?this.Y=s.te():s.te();return}else a.U&&a.U.ee===1?(a.ee=1,a.U.ee=0,a.se()):(a.ee=1,i=s)}else{let a=s.U;if(a.ee===1)a.ee=0,s.ee=1,s===this.Y?this.Y=s.se():s.se();else if(a.U&&a.U.ee===1){a.ee=s.ee,s.ee=0,a.U.ee=0,s===this.Y?this.Y=s.se():s.se();return}else a.W&&a.W.ee===1?(a.ee=1,a.W.ee=0,a.te()):(a.ee=1,i=s)}}}fe(i){if(this.i===1)return this.clear(),this.h;let s=i;for(;s.U||s.W;){if(s.W)for(s=s.W;s.U;)s=s.U;else s=s.U;[i.u,s.u]=[s.u,i.u],[i.l,s.l]=[s.l,i.l],i=s}this.h.U===s?this.h.U=s.tt:this.h.W===s&&(this.h.W=s.tt),this.ue(s);let a=s.tt;return s===a.U?a.U=void 0:a.W=void 0,this.i-=1,this.Y.ee=0,a}oe(i,s){return i===void 0?!1:this.oe(i.U,s)||s(i)?!0:this.oe(i.W,s)}he(i){for(;;){let s=i.tt;if(s.ee===0)return;let a=s.tt;if(s===a.U){let l=a.W;if(l&&l.ee===1){if(l.ee=s.ee=0,a===this.Y)return;a.ee=1,i=a;continue}else if(i===s.W){if(i.ee=0,i.U&&(i.U.tt=s),i.W&&(i.W.tt=a),s.W=i.U,a.U=i.W,i.U=s,i.W=a,a===this.Y)this.Y=i,this.h.tt=i;else{let c=a.tt;c.U===a?c.U=i:c.W=i}return i.tt=a.tt,s.tt=i,a.tt=i,a.ee=1,{parentNode:s,grandParent:a,curNode:i}}else s.ee=0,a===this.Y?this.Y=a.se():a.se(),a.ee=1}else{let l=a.U;if(l&&l.ee===1){if(l.ee=s.ee=0,a===this.Y)return;a.ee=1,i=a;continue}else if(i===s.U){if(i.ee=0,i.U&&(i.U.tt=a),i.W&&(i.W.tt=s),a.W=i.U,s.U=i.W,i.U=a,i.W=s,a===this.Y)this.Y=i,this.h.tt=i;else{let c=a.tt;c.U===a?c.U=i:c.W=i}return i.tt=a.tt,s.tt=i,a.tt=i,a.ee=1,{parentNode:s,grandParent:a,curNode:i}}else s.ee=0,a===this.Y?this.Y=a.te():a.te(),a.ee=1}return}}ne(i,s,a){if(this.Y===void 0){this.i+=1,this.Y=new this.re(i,s),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,this.h.W=this.Y;return}let l,c=this.h.U,f=this.v(c.u,i);if(f===0){c.l=s;return}else if(f>0)c.U=new this.re(i,s),c.U.tt=c,l=c.U,this.h.U=l;else{let p=this.h.W,m=this.v(p.u,i);if(m===0){p.l=s;return}else if(m<0)p.W=new this.re(i,s),p.W.tt=p,l=p.W,this.h.W=l;else{if(a!==void 0){let h=a.o;if(h!==this.h){let g=this.v(h.u,i);if(g===0){h.l=s;return}else if(g>0){let y=h.L(),w=this.v(y.u,i);if(w===0){y.l=s;return}else w<0&&(l=new this.re(i,s),y.W===void 0?(y.W=l,l.tt=y):(h.U=l,l.tt=h))}}}if(l===void 0)for(l=this.Y;;){let h=this.v(l.u,i);if(h>0){if(l.U===void 0){l.U=new this.re(i,s),l.U.tt=l,l=l.U;break}l=l.U}else if(h<0){if(l.W===void 0){l.W=new this.re(i,s),l.W.tt=l,l=l.W;break}l=l.W}else{l.l=s;return}}}}return this.i+=1,l}I(i,s){for(;i;){let a=this.v(i.u,s);if(a<0)i=i.W;else if(a>0)i=i.U;else return i}return i||this.h}clear(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}updateKeyByIterator(i,s){let a=i.o;if(a===this.h&&(0,o.throwIteratorAccessError)(),this.i===1)return a.u=s,!0;if(a===this.h.U)return this.v(a.B().u,s)>0?(a.u=s,!0):!1;if(a===this.h.W)return this.v(a.L().u,s)<0?(a.u=s,!0):!1;let l=a.L().u;if(this.v(l,s)>=0)return!1;let c=a.B().u;return this.v(c,s)<=0?!1:(a.u=s,!0)}eraseElementByPos(i){if(i<0||i>this.i-1)throw new RangeError;let s=0,a=this;return this.oe(this.Y,function(l){return i===s?(a.V(l),!0):(s+=1,!1)}),this.i}eraseElementByKey(i){if(this.i===0)return!1;let s=this.I(this.Y,i);return s===this.h?!1:(this.V(s),!0)}eraseElementByIterator(i){let s=i.o;s===this.h&&(0,o.throwIteratorAccessError)();let a=s.W===void 0;return i.iteratorType===0?a&&i.next():(!a||s.U===void 0)&&i.next(),this.V(s),i}forEach(i){let s=0;for(let a of this)i(a,s++,this)}getElementByPos(i){if(i<0||i>this.i-1)throw new RangeError;let s,a=0;for(let l of this){if(a===i){s=l;break}a+=1}return s}getHeight(){if(this.i===0)return 0;let i=function(s){return s?Math.max(i(s.U),i(s.W))+1:0};return i(this.Y)}},n=u;e.default=n}),Fl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Pt(),r=Ct(),o=class extends t.ContainerIterator{constructor(n,i,s){super(s),this.o=n,this.h=i,this.iteratorType===0?(this.pre=function(){return this.o===this.h.U&&(0,r.throwIteratorAccessError)(),this.o=this.o.L(),this},this.next=function(){return this.o===this.h&&(0,r.throwIteratorAccessError)(),this.o=this.o.B(),this}):(this.pre=function(){return this.o===this.h.W&&(0,r.throwIteratorAccessError)(),this.o=this.o.B(),this},this.next=function(){return this.o===this.h&&(0,r.throwIteratorAccessError)(),this.o=this.o.L(),this})}get index(){let n=this.o,i=this.h.tt;if(n===this.h)return i?i.rt-1:0;let s=0;for(n.U&&(s+=n.U.rt);n!==i;){let a=n.tt;n===a.W&&(s+=1,a.U&&(s+=a.U.rt)),n=a}return s}},u=o;e.default=u}),Vm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=u(Bl()),r=u(Fl()),o=Ct();function u(a){return a&&a.t?a:{default:a}}var n=class rf extends r.default{constructor(l,c,f,p){super(l,c,p),this.container=f}get pointer(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o.u}copy(){return new rf(this.o,this.h,this.container,this.iteratorType)}},i=class extends t.default{constructor(a=[],l,c){super(l,c);let f=this;a.forEach(function(p){f.insert(p)})}*K(a){a!==void 0&&(yield*this.K(a.U),yield a.u,yield*this.K(a.W))}begin(){return new n(this.h.U||this.h,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this.h.W||this.h,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){return this.h.U?this.h.U.u:void 0}back(){return this.h.W?this.h.W.u:void 0}insert(a,l){return this.M(a,void 0,l)}find(a){let l=this.I(this.Y,a);return new n(l,this.h,this)}lowerBound(a){let l=this.X(this.Y,a);return new n(l,this.h,this)}upperBound(a){let l=this.Z(this.Y,a);return new n(l,this.h,this)}reverseLowerBound(a){let l=this.$(this.Y,a);return new n(l,this.h,this)}reverseUpperBound(a){let l=this.rr(this.Y,a);return new n(l,this.h,this)}union(a){let l=this;return a.forEach(function(c){l.insert(c)}),this.i}[Symbol.iterator](){return this.K(this.Y)}},s=i;e.default=s}),$m=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=u(Bl()),r=u(Fl()),o=Ct();function u(a){return a&&a.t?a:{default:a}}var n=class nf extends r.default{constructor(l,c,f,p){super(l,c,p),this.container=f}get pointer(){this.o===this.h&&(0,o.throwIteratorAccessError)();let l=this;return new Proxy([],{get(c,f){if(f==="0")return l.o.u;if(f==="1")return l.o.l},set(c,f,p){if(f!=="1")throw new TypeError("props must be 1");return l.o.l=p,!0}})}copy(){return new nf(this.o,this.h,this.container,this.iteratorType)}},i=class extends t.default{constructor(a=[],l,c){super(l,c);let f=this;a.forEach(function(p){f.setElement(p[0],p[1])})}*K(a){a!==void 0&&(yield*this.K(a.U),yield[a.u,a.l],yield*this.K(a.W))}begin(){return new n(this.h.U||this.h,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this.h.W||this.h,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){if(this.i===0)return;let a=this.h.U;return[a.u,a.l]}back(){if(this.i===0)return;let a=this.h.W;return[a.u,a.l]}lowerBound(a){let l=this.X(this.Y,a);return new n(l,this.h,this)}upperBound(a){let l=this.Z(this.Y,a);return new n(l,this.h,this)}reverseLowerBound(a){let l=this.$(this.Y,a);return new n(l,this.h,this)}reverseUpperBound(a){let l=this.rr(this.Y,a);return new n(l,this.h,this)}setElement(a,l,c){return this.M(a,l,c)}find(a){let l=this.I(this.Y,a);return new n(l,this.h,this)}getElementByKey(a){return this.I(this.Y,a).l}union(a){let l=this;return a.forEach(function(c){l.setElement(c[0],c[1])}),this.i}[Symbol.iterator](){return this.K(this.Y)}},s=i;e.default=s}),jl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=t;function t(r){let o=typeof r;return o==="object"&&r!==null||o==="function"}}),Wl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var t=Pt(),r=u(jl()),o=Ct();function u(s){return s&&s.t?s:{default:s}}var n=class extends t.ContainerIterator{constructor(s,a,l){super(l),this.o=s,this.h=a,this.iteratorType===0?(this.pre=function(){return this.o.L===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this}):(this.pre=function(){return this.o.B===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.B,this},this.next=function(){return this.o===this.h&&(0,o.throwIteratorAccessError)(),this.o=this.o.L,this})}};e.HashContainerIterator=n;var i=class extends t.Container{constructor(){super(),this.H=[],this.g={},this.HASH_TAG=Symbol("@@HASH_TAG"),Object.setPrototypeOf(this.g,null),this.h={},this.h.L=this.h.B=this.p=this._=this.h}V(s){let{L:a,B:l}=s;a.B=l,l.L=a,s===this.p&&(this.p=l),s===this._&&(this._=a),this.i-=1}M(s,a,l){l===void 0&&(l=(0,r.default)(s));let c;if(l){let f=s[this.HASH_TAG];if(f!==void 0)return this.H[f].l=a,this.i;Object.defineProperty(s,this.HASH_TAG,{value:this.H.length,configurable:!0}),c={u:s,l:a,L:this._,B:this.h},this.H.push(c)}else{let f=this.g[s];if(f)return f.l=a,this.i;c={u:s,l:a,L:this._,B:this.h},this.g[s]=c}return this.i===0?(this.p=c,this.h.B=c):this._.B=c,this._=c,this.h.L=c,++this.i}I(s,a){if(a===void 0&&(a=(0,r.default)(s)),a){let l=s[this.HASH_TAG];return l===void 0?this.h:this.H[l]}else return this.g[s]||this.h}clear(){let s=this.HASH_TAG;this.H.forEach(function(a){delete a.u[s]}),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}eraseElementByKey(s,a){let l;if(a===void 0&&(a=(0,r.default)(s)),a){let c=s[this.HASH_TAG];if(c===void 0)return!1;delete s[this.HASH_TAG],l=this.H[c],delete this.H[c]}else{if(l=this.g[s],l===void 0)return!1;delete this.g[s]}return this.V(l),!0}eraseElementByIterator(s){let a=s.o;return a===this.h&&(0,o.throwIteratorAccessError)(),this.V(a),s.next()}eraseElementByPos(s){if(s<0||s>this.i-1)throw new RangeError;let a=this.p;for(;s--;)a=a.B;return this.V(a),this.i}};e.HashContainer=i}),qm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Wl(),r=Ct(),o=class of extends t.HashContainerIterator{constructor(s,a,l,c){super(s,a,c),this.container=l}get pointer(){return this.o===this.h&&(0,r.throwIteratorAccessError)(),this.o.u}copy(){return new of(this.o,this.h,this.container,this.iteratorType)}},u=class extends t.HashContainer{constructor(i=[]){super();let s=this;i.forEach(function(a){s.insert(a)})}begin(){return new o(this.p,this.h,this)}end(){return new o(this.h,this.h,this)}rBegin(){return new o(this._,this.h,this,1)}rEnd(){return new o(this.h,this.h,this,1)}front(){return this.p.u}back(){return this._.u}insert(i,s){return this.M(i,void 0,s)}getElementByPos(i){if(i<0||i>this.i-1)throw new RangeError;let s=this.p;for(;i--;)s=s.B;return s.u}find(i,s){let a=this.I(i,s);return new o(a,this.h,this)}forEach(i){let s=0,a=this.p;for(;a!==this.h;)i(a.u,s++,this),a=a.B}[Symbol.iterator](){return(function*(){let i=this.p;for(;i!==this.h;)yield i.u,i=i.B}).bind(this)()}},n=u;e.default=n}),Ym=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=Wl(),r=u(jl()),o=Ct();function u(a){return a&&a.t?a:{default:a}}var n=class sf extends t.HashContainerIterator{constructor(l,c,f,p){super(l,c,p),this.container=f}get pointer(){this.o===this.h&&(0,o.throwIteratorAccessError)();let l=this;return new Proxy([],{get(c,f){if(f==="0")return l.o.u;if(f==="1")return l.o.l},set(c,f,p){if(f!=="1")throw new TypeError("props must be 1");return l.o.l=p,!0}})}copy(){return new sf(this.o,this.h,this.container,this.iteratorType)}},i=class extends t.HashContainer{constructor(a=[]){super();let l=this;a.forEach(function(c){l.setElement(c[0],c[1])})}begin(){return new n(this.p,this.h,this)}end(){return new n(this.h,this.h,this)}rBegin(){return new n(this._,this.h,this,1)}rEnd(){return new n(this.h,this.h,this,1)}front(){if(this.i!==0)return[this.p.u,this.p.l]}back(){if(this.i!==0)return[this._.u,this._.l]}setElement(a,l,c){return this.M(a,l,c)}getElementByKey(a,l){if(l===void 0&&(l=(0,r.default)(a)),l){let f=a[this.HASH_TAG];return f!==void 0?this.H[f].l:void 0}let c=this.g[a];return c?c.l:void 0}getElementByPos(a){if(a<0||a>this.i-1)throw new RangeError;let l=this.p;for(;a--;)l=l.B;return[l.u,l.l]}find(a,l){let c=this.I(a,l);return new n(c,this.h,this)}forEach(a){let l=0,c=this.p;for(;c!==this.h;)a([c.u,c.l],l++,this),c=c.B}[Symbol.iterator](){return(function*(){let a=this.p;for(;a!==this.h;)yield[a.u,a.l],a=a.B}).bind(this)()}},s=i;e.default=s}),Km=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"t",{value:!0}),Object.defineProperty(e,"Deque",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"HashMap",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"HashSet",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"LinkList",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"OrderedMap",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"OrderedSet",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"PriorityQueue",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"Queue",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"Stack",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return u.default}});var t=f(xm()),r=f(Bm()),o=f(Fm()),u=f(jm()),n=f(Wm()),i=f(Gm()),s=f(Vm()),a=f($m()),l=f(qm()),c=f(Ym());function f(p){return p&&p.t?p:{default:p}}}),Xm=ge((e,t)=>{ue(),fe(),ce();var r=Km().OrderedSet,o=Mt()("number-allocator:trace"),u=Mt()("number-allocator:error");function n(s,a){this.low=s,this.high=a}n.prototype.equals=function(s){return this.low===s.low&&this.high===s.high},n.prototype.compare=function(s){return this.low<s.low&&this.high<s.low?-1:s.low<this.low&&s.high<this.low?1:0};function i(s,a){if(!(this instanceof i))return new i(s,a);this.min=s,this.max=a,this.ss=new r([],(l,c)=>l.compare(c)),o("Create"),this.clear()}i.prototype.firstVacant=function(){return this.ss.size()===0?null:this.ss.front().low},i.prototype.alloc=function(){if(this.ss.size()===0)return o("alloc():empty"),null;let s=this.ss.begin(),a=s.pointer.low,l=s.pointer.high,c=a;return c+1<=l?this.ss.updateKeyByIterator(s,new n(a+1,l)):this.ss.eraseElementByPos(0),o("alloc():"+c),c},i.prototype.use=function(s){let a=new n(s,s),l=this.ss.lowerBound(a);if(!l.equals(this.ss.end())){let c=l.pointer.low,f=l.pointer.high;return l.pointer.equals(a)?(this.ss.eraseElementByIterator(l),o("use():"+s),!0):c>s?!1:c===s?(this.ss.updateKeyByIterator(l,new n(c+1,f)),o("use():"+s),!0):f===s?(this.ss.updateKeyByIterator(l,new n(c,f-1)),o("use():"+s),!0):(this.ss.updateKeyByIterator(l,new n(s+1,f)),this.ss.insert(new n(c,s-1)),o("use():"+s),!0)}return o("use():failed"),!1},i.prototype.free=function(s){if(s<this.min||s>this.max){u("free():"+s+" is out of range");return}let a=new n(s,s),l=this.ss.upperBound(a);if(l.equals(this.ss.end())){if(l.equals(this.ss.begin())){this.ss.insert(a);return}l.pre();let c=l.pointer.high;l.pointer.high+1===s?this.ss.updateKeyByIterator(l,new n(c,s)):this.ss.insert(a)}else if(l.equals(this.ss.begin()))if(s+1===l.pointer.low){let c=l.pointer.high;this.ss.updateKeyByIterator(l,new n(s,c))}else this.ss.insert(a);else{let c=l.pointer.low,f=l.pointer.high;l.pre();let p=l.pointer.low;l.pointer.high+1===s?s+1===c?(this.ss.eraseElementByIterator(l),this.ss.updateKeyByIterator(l,new n(p,f))):this.ss.updateKeyByIterator(l,new n(p,s)):s+1===c?(this.ss.eraseElementByIterator(l.next()),this.ss.insert(new n(s,f))):this.ss.insert(a)}o("free():"+s)},i.prototype.clear=function(){o("clear()"),this.ss.clear(),this.ss.insert(new n(this.min,this.max))},i.prototype.intervalCount=function(){return this.ss.size()},i.prototype.dump=function(){console.log("length:"+this.ss.size());for(let s of this.ss)console.log(s)},t.exports=i}),Gl=ge((e,t)=>{ue(),fe(),ce();var r=Xm();t.exports.NumberAllocator=r}),zm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=Um(),r=Gl(),o=class{aliasToTopic;topicToAlias;max;numberAllocator;length;constructor(u){u>0&&(this.aliasToTopic=new t.LRUCache({max:u}),this.topicToAlias={},this.numberAllocator=new r.NumberAllocator(1,u),this.max=u,this.length=0)}put(u,n){if(n===0||n>this.max)return!1;let i=this.aliasToTopic.get(n);return i&&delete this.topicToAlias[i],this.aliasToTopic.set(n,u),this.topicToAlias[u]=n,this.numberAllocator.use(n),this.length=this.aliasToTopic.size,!0}getTopicByAlias(u){return this.aliasToTopic.get(u)}getAliasByTopic(u){let n=this.topicToAlias[u];return typeof n<"u"&&this.aliasToTopic.get(n),n}clear(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}getLruAlias(){return this.numberAllocator.firstVacant()||[...this.aliasToTopic.keys()][this.aliasToTopic.size-1]}};e.default=o}),Qm=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0});var r=ln(),o=t(zm()),u=mr(),n=(i,s)=>{i.log("_handleConnack");let{options:a}=i,l=a.protocolVersion===5?s.reasonCode:s.returnCode;if(clearTimeout(i.connackTimer),delete i.topicAliasSend,s.properties){if(s.properties.topicAliasMaximum){if(s.properties.topicAliasMaximum>65535){i.emit("error",new Error("topicAliasMaximum from broker is out of range"));return}s.properties.topicAliasMaximum>0&&(i.topicAliasSend=new o.default(s.properties.topicAliasMaximum))}s.properties.serverKeepAlive&&a.keepalive&&(a.keepalive=s.properties.serverKeepAlive),s.properties.maximumPacketSize&&(a.properties||(a.properties={}),a.properties.maximumPacketSize=s.properties.maximumPacketSize)}if(l===0)i.reconnecting=!1,i._onConnect(s);else if(l>0){let c=new u.ErrorWithReasonCode(`Connection refused: ${r.ReasonCodes[l]}`,l);i.emit("error",c),i.options.reconnectOnConnackError&&i._cleanUp(!0)}};e.default=n}),Jm=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=(r,o,u)=>{r.log("handling pubrel packet");let n=typeof u<"u"?u:r.noop,{messageId:i}=o,s={cmd:"pubcomp",messageId:i};r.incomingStore.get(o,(a,l)=>{a?r._sendPacket(s,n):(r.emit("message",l.topic,l.payload,l),r.handleMessage(l,c=>{if(c)return n(c);r.incomingStore.del(l,r.noop),r._sendPacket(s,n)}))})};e.default=t}),Zm=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0});var r=t(Cm()),o=t(km()),u=t(Qm()),n=t(ln()),i=t(Jm()),s=(a,l,c)=>{let{options:f}=a;if(f.protocolVersion===5&&f.properties&&f.properties.maximumPacketSize&&f.properties.maximumPacketSize<l.length)return a.emit("error",new Error(`exceeding packets size ${l.cmd}`)),a.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),a;switch(a.log("_handlePacket :: emitting packetreceive"),a.emit("packetreceive",l),l.cmd){case"publish":(0,r.default)(a,l,c);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":a.reschedulePing(),(0,n.default)(a,l),c();break;case"pubrel":a.reschedulePing(),(0,i.default)(a,l,c);break;case"connack":(0,u.default)(a,l),c();break;case"auth":a.reschedulePing(),(0,o.default)(a,l),c();break;case"pingresp":a.log("_handlePacket :: received pingresp"),a.reschedulePing(!0),c();break;case"disconnect":a.emit("disconnect",l),c();break;default:a.log("_handlePacket :: unknown command"),c();break}};e.default=s}),Hl=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=class{nextId;constructor(){this.nextId=Math.max(1,Math.floor(Math.random()*65535))}allocate(){let r=this.nextId++;return this.nextId===65536&&(this.nextId=1),r}getLastAllocated(){return this.nextId===1?65535:this.nextId-1}register(r){return!0}deallocate(r){}clear(){}};e.default=t}),ey=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=class{aliasToTopic;max;length;constructor(r){this.aliasToTopic={},this.max=r}put(r,o){return o===0||o>this.max?!1:(this.aliasToTopic[o]=r,this.length=Object.keys(this.aliasToTopic).length,!0)}getTopicByAlias(r){return this.aliasToTopic[r]}clear(){this.aliasToTopic={}}};e.default=t}),ty=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var r=t((zt(),Ue(jt))),o=mr(),u=class{};e.TypedEventEmitter=u,(0,o.applyMixin)(u,r.default)}),un=ge((e,t)=>{ue(),fe(),ce();function r(o){"@babel/helpers - typeof";return t.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},t.exports.__esModule=!0,t.exports.default=t.exports,r(o)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),ry=ge((e,t)=>{ue(),fe(),ce();var r=un().default;function o(u,n){if(r(u)!="object"||!u)return u;var i=u[Symbol.toPrimitive];if(i!==void 0){var s=i.call(u,n||"default");if(r(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(u)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),ny=ge((e,t)=>{ue(),fe(),ce();var r=un().default,o=ry();function u(n){var i=o(n,"string");return r(i)=="symbol"?i:i+""}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports}),iy=ge((e,t)=>{ue(),fe(),ce();var r=ny();function o(u,n,i){return(n=r(n))in u?Object.defineProperty(u,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):u[n]=i,u}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),oy=ge((e,t)=>{ue(),fe(),ce();function r(o){if(Array.isArray(o))return o}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),sy=ge((e,t)=>{ue(),fe(),ce();function r(o,u){var n=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(n!=null){var i,s,a,l,c=[],f=!0,p=!1;try{if(a=(n=n.call(o)).next,u===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(i=a.call(n)).done)&&(c.push(i.value),c.length!==u);f=!0);}catch(m){p=!0,s=m}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(p)throw s}}return c}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),ay=ge((e,t)=>{ue(),fe(),ce();function r(o,u){(u==null||u>o.length)&&(u=o.length);for(var n=0,i=Array(u);n<u;n++)i[n]=o[n];return i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),ly=ge((e,t)=>{ue(),fe(),ce();var r=ay();function o(u,n){if(u){if(typeof u=="string")return r(u,n);var i={}.toString.call(u).slice(8,-1);return i==="Object"&&u.constructor&&(i=u.constructor.name),i==="Map"||i==="Set"?Array.from(u):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(u,n):void 0}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),uy=ge((e,t)=>{ue(),fe(),ce();function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
387
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),cy=ge((e,t)=>{ue(),fe(),ce();var r=oy(),o=sy(),u=ly(),n=uy();function i(s,a){return r(s)||o(s,a)||u(s,a)||n()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}),Vl=ge((e,t)=>{ue(),fe(),ce(),(function(r,o){typeof e=="object"&&typeof t<"u"?o(e):typeof define=="function"&&define.amd?define(["exports"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.fastUniqueNumbers={}))})(e,function(r){var o=function(m){return function(h){var g=m(h);return h.add(g),g}},u=function(m){return function(h,g){return m.set(h,g),g}},n=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,i=536870912,s=i*2,a=function(m,h){return function(g){var y=h.get(g),w=y===void 0?g.size:y<s?y+1:0;if(!g.has(w))return m(g,w);if(g.size<i){for(;g.has(w);)w=Math.floor(Math.random()*s);return m(g,w)}if(g.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;g.has(w);)w=Math.floor(Math.random()*n);return m(g,w)}},l=new WeakMap,c=u(l),f=a(c,l),p=o(f);r.addUniqueNumber=p,r.generateUniqueNumber=f})}),fy=ge((e,t)=>{ue(),fe(),ce();function r(u,n,i,s,a,l,c){try{var f=u[l](c),p=f.value}catch(m){return void i(m)}f.done?n(p):Promise.resolve(p).then(s,a)}function o(u){return function(){var n=this,i=arguments;return new Promise(function(s,a){var l=u.apply(n,i);function c(p){r(l,s,a,c,f,"next",p)}function f(p){r(l,s,a,c,f,"throw",p)}c(void 0)})}}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),$l=ge((e,t)=>{ue(),fe(),ce();function r(o,u){this.v=o,this.k=u}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),ql=ge((e,t)=>{ue(),fe(),ce();function r(o,u,n,i){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}t.exports=r=function(a,l,c,f){function p(m,h){r(a,m,function(g){return this._invoke(m,h,g)})}l?s?s(a,l,{value:c,enumerable:!f,configurable:!f,writable:!f}):a[l]=c:(p("next",0),p("throw",1),p("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,r(o,u,n,i)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),Yl=ge((e,t)=>{ue(),fe(),ce();var r=ql();function o(){var u,n,i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function l(w,b,E,T){var v=b&&b.prototype instanceof f?b:f,A=Object.create(v.prototype);return r(A,"_invoke",(function(S,R,C){var M,F,O,H=0,j=C||[],x=!1,le={p:0,n:0,v:u,a:z,f:z.bind(u,4),d:function(Y,ne){return M=Y,F=0,O=u,le.n=ne,c}};function z(Y,ne){for(F=Y,O=ne,n=0;!x&&H&&!W&&n<j.length;n++){var W,ee=j[n],P=le.p,J=ee[2];Y>3?(W=J===ne)&&(O=ee[(F=ee[4])?5:(F=3,3)],ee[4]=ee[5]=u):ee[0]<=P&&((W=Y<2&&P<ee[1])?(F=0,le.v=ne,le.n=ee[1]):P<J&&(W=Y<3||ee[0]>ne||ne>J)&&(ee[4]=Y,ee[5]=ne,le.n=J,F=0))}if(W||Y>1)return c;throw x=!0,ne}return function(Y,ne,W){if(H>1)throw TypeError("Generator is already running");for(x&&ne===1&&z(ne,W),F=ne,O=W;(n=F<2?u:O)||!x;){M||(F?F<3?(F>1&&(le.n=-1),z(F,O)):le.n=O:le.v=O);try{if(H=2,M){if(F||(Y="next"),n=M[Y]){if(!(n=n.call(M,O)))throw TypeError("iterator result is not an object");if(!n.done)return n;O=n.value,F<2&&(F=0)}else F===1&&(n=M.return)&&n.call(M),F<2&&(O=TypeError("The iterator does not provide a '"+Y+"' method"),F=1);M=u}else if((n=(x=le.n<0)?O:S.call(R,le))!==c)break}catch(ee){M=u,F=1,O=ee}finally{H=1}}return{value:n,done:x}}})(w,E,T),!0),A}var c={};function f(){}function p(){}function m(){}n=Object.getPrototypeOf;var h=[][s]?n(n([][s]())):(r(n={},s,function(){return this}),n),g=m.prototype=f.prototype=Object.create(h);function y(w){return Object.setPrototypeOf?Object.setPrototypeOf(w,m):(w.__proto__=m,r(w,a,"GeneratorFunction")),w.prototype=Object.create(g),w}return p.prototype=m,r(g,"constructor",m),r(m,"constructor",p),p.displayName="GeneratorFunction",r(m,a,"GeneratorFunction"),r(g),r(g,a,"Generator"),r(g,s,function(){return this}),r(g,"toString",function(){return"[object Generator]"}),(t.exports=o=function(){return{w:l,m:y}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),Kl=ge((e,t)=>{ue(),fe(),ce();var r=$l(),o=ql();function u(n,i){function s(l,c,f,p){try{var m=n[l](c),h=m.value;return h instanceof r?i.resolve(h.v).then(function(g){s("next",g,f,p)},function(g){s("throw",g,f,p)}):i.resolve(h).then(function(g){m.value=g,f(m)},function(g){return s("throw",g,f,p)})}catch(g){p(g)}}var a;this.next||(o(u.prototype),o(u.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(l,c,f){function p(){return new i(function(m,h){s(l,f,m,h)})}return a=a?a.then(p,p):p()},!0)}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports}),Xl=ge((e,t)=>{ue(),fe(),ce();var r=Yl(),o=Kl();function u(n,i,s,a,l){return new o(r().w(n,i,s,a),l||Promise)}t.exports=u,t.exports.__esModule=!0,t.exports.default=t.exports}),hy=ge((e,t)=>{ue(),fe(),ce();var r=Xl();function o(u,n,i,s,a){var l=r(u,n,i,s,a);return l.next().then(function(c){return c.done?c.value:l.next()})}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),dy=ge((e,t)=>{ue(),fe(),ce();function r(o){var u=Object(o),n=[];for(var i in u)n.unshift(i);return function s(){for(;n.length;)if((i=n.pop())in u)return s.value=i,s.done=!1,s;return s.done=!0,s}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}),py=ge((e,t)=>{ue(),fe(),ce();var r=un().default;function o(u){if(u!=null){var n=u[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],i=0;if(n)return n.call(u);if(typeof u.next=="function")return u;if(!isNaN(u.length))return{next:function(){return u&&i>=u.length&&(u=void 0),{value:u&&u[i++],done:!u}}}}throw new TypeError(r(u)+" is not iterable")}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports}),gy=ge((e,t)=>{ue(),fe(),ce();var r=$l(),o=Yl(),u=hy(),n=Xl(),i=Kl(),s=dy(),a=py();function l(){var c=o(),f=c.m(l),p=(Object.getPrototypeOf?Object.getPrototypeOf(f):f.__proto__).constructor;function m(y){var w=typeof y=="function"&&y.constructor;return!!w&&(w===p||(w.displayName||w.name)==="GeneratorFunction")}var h={throw:1,return:2,break:3,continue:3};function g(y){var w,b;return function(E){w||(w={stop:function(){return b(E.a,2)},catch:function(){return E.v},abrupt:function(T,v){return b(E.a,h[T],v)},delegateYield:function(T,v,A){return w.resultName=v,b(E.d,a(T),A)},finish:function(T){return b(E.f,T)}},b=function(T,v,A){E.p=w.prev,E.n=w.next;try{return T(v,A)}finally{w.next=E.n}}),w.resultName&&(w[w.resultName]=E.v,w.resultName=void 0),w.sent=E.v,w.next=E.n;try{return y.call(this,w)}finally{E.p=w.prev,E.n=w.next}}}return(t.exports=l=function(){return{wrap:function(y,w,b,E){return c.w(g(y),w,b,E&&E.reverse())},isGeneratorFunction:m,mark:c.m,awrap:function(y,w){return new r(y,w)},AsyncIterator:i,async:function(y,w,b,E,T){return(m(w)?n:u)(g(y),w,b,E,T)},keys:s,values:a}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports}),by=ge((e,t)=>{ue(),fe(),ce();var r=gy()();t.exports=r;try{regeneratorRuntime=r}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}),my=ge((e,t)=>{ue(),fe(),ce(),(function(r,o){typeof e=="object"&&typeof t<"u"?o(e,iy(),cy(),Vl(),fy(),by()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/defineProperty","@babel/runtime/helpers/slicedToArray","fast-unique-numbers","@babel/runtime/helpers/asyncToGenerator","@babel/runtime/regenerator"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.brokerFactory={},r._defineProperty,r._slicedToArray,r.fastUniqueNumbers,r._asyncToGenerator,r._regeneratorRuntime))})(e,function(r,o,u,n,i,s){var a=function(b){return typeof b.start=="function"},l=new WeakMap;function c(b,E){var T=Object.keys(b);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(b);E&&(v=v.filter(function(A){return Object.getOwnPropertyDescriptor(b,A).enumerable})),T.push.apply(T,v)}return T}function f(b){for(var E=1;E<arguments.length;E++){var T=arguments[E]!=null?arguments[E]:{};E%2?c(Object(T),!0).forEach(function(v){o(b,v,T[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(T)):c(Object(T)).forEach(function(v){Object.defineProperty(b,v,Object.getOwnPropertyDescriptor(T,v))})}return b}var p=function(b){return f(f({},b),{},{connect:function(E){var T=E.call;return i(s.mark(function v(){var A,S,R,C;return s.wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return A=new MessageChannel,S=A.port1,R=A.port2,M.next=1,T("connect",{port:S},[S]);case 1:return C=M.sent,l.set(R,C),M.abrupt("return",R);case 2:case"end":return M.stop()}},v)}))},disconnect:function(E){var T=E.call;return(function(){var v=i(s.mark(function A(S){var R;return s.wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(R=l.get(S),R!==void 0){C.next=1;break}throw new Error("The given port is not connected.");case 1:return C.next=2,T("disconnect",{portId:R});case 2:case"end":return C.stop()}},A)}));return function(A){return v.apply(this,arguments)}})()},isSupported:function(E){var T=E.call;return function(){return T("isSupported")}}})};function m(b,E){var T=Object.keys(b);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(b);E&&(v=v.filter(function(A){return Object.getOwnPropertyDescriptor(b,A).enumerable})),T.push.apply(T,v)}return T}function h(b){for(var E=1;E<arguments.length;E++){var T=arguments[E]!=null?arguments[E]:{};E%2?m(Object(T),!0).forEach(function(v){o(b,v,T[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(T)):m(Object(T)).forEach(function(v){Object.defineProperty(b,v,Object.getOwnPropertyDescriptor(T,v))})}return b}var g=new WeakMap,y=function(b){if(g.has(b))return g.get(b);var E=new Map;return g.set(b,E),E},w=function(b){var E=p(b);return function(T){var v=y(T);T.addEventListener("message",function(j){var x=j.data,le=x.id;if(le!==null&&v.has(le)){var z=v.get(le),Y=z.reject,ne=z.resolve;v.delete(le),x.error===void 0?ne(x.result):Y(new Error(x.error.message))}}),a(T)&&T.start();for(var A=function(j){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return new Promise(function(z,Y){var ne=n.generateUniqueNumber(v);v.set(ne,{reject:Y,resolve:z}),x===null?T.postMessage({id:ne,method:j},le):T.postMessage({id:ne,method:j,params:x},le)})},S=function(j,x){var le=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];T.postMessage({id:null,method:j,params:x},le)},R={},C=0,M=Object.entries(E);C<M.length;C++){var F=u(M[C],2),O=F[0],H=F[1];R=h(h({},R),{},o({},O,H({call:A,notify:S})))}return h({},R)}};r.createBroker=w})}),yy=ge((e,t)=>{ue(),fe(),ce(),(function(r,o){typeof e=="object"&&typeof t<"u"?o(e,un(),my(),Vl()):typeof define=="function"&&define.amd?define(["exports","@babel/runtime/helpers/typeof","broker-factory","fast-unique-numbers"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.workerTimersBroker={},r._typeof,r.brokerFactory,r.fastUniqueNumbers))})(e,function(r,o,u,n){var i=new Map([[0,null]]),s=new Map([[0,null]]),a=u.createBroker({clearInterval:function(c){var f=c.call;return function(p){o(i.get(p))==="symbol"&&(i.set(p,null),f("clear",{timerId:p,timerType:"interval"}).then(function(){i.delete(p)}))}},clearTimeout:function(c){var f=c.call;return function(p){o(s.get(p))==="symbol"&&(s.set(p,null),f("clear",{timerId:p,timerType:"timeout"}).then(function(){s.delete(p)}))}},setInterval:function(c){var f=c.call;return function(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=arguments.length,g=new Array(h>2?h-2:0),y=2;y<h;y++)g[y-2]=arguments[y];var w=Symbol(),b=n.generateUniqueNumber(i);i.set(b,w);var E=function(){return f("set",{delay:m,now:performance.timeOrigin+performance.now(),timerId:b,timerType:"interval"}).then(function(){var T=i.get(b);if(T===void 0)throw new Error("The timer is in an undefined state.");T===w&&(p.apply(void 0,g),i.get(b)===w&&E())})};return E(),b}},setTimeout:function(c){var f=c.call;return function(p){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=arguments.length,g=new Array(h>2?h-2:0),y=2;y<h;y++)g[y-2]=arguments[y];var w=Symbol(),b=n.generateUniqueNumber(s);return s.set(b,w),f("set",{delay:m,now:performance.timeOrigin+performance.now(),timerId:b,timerType:"timeout"}).then(function(){var E=s.get(b);if(E===void 0)throw new Error("The timer is in an undefined state.");E===w&&(s.delete(b),p.apply(void 0,g))}),b}}}),l=function(c){var f=new Worker(c);return a(f)};r.load=l,r.wrap=a})}),vy=ge((e,t)=>{ue(),fe(),ce(),(function(r,o){typeof e=="object"&&typeof t<"u"?o(e,yy()):typeof define=="function"&&define.amd?define(["exports","worker-timers-broker"],o):(r=typeof globalThis<"u"?globalThis:r||self,o(r.workerTimers={},r.workerTimersBroker))})(e,function(r,o){var u=function(f,p){var m=null;return function(){if(m!==null)return m;var h=new Blob([p],{type:"application/javascript; charset=utf-8"}),g=URL.createObjectURL(h);return m=f(g),setTimeout(function(){return URL.revokeObjectURL(g)}),m}},n=`(()=>{var e={45:(e,t,r)=>{var n=r(738).default;e.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},79:e=>{e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},122:(e,t,r)=>{var n=r(79);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},156:e=>{e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,u,a,i=[],s=!0,c=!1;try{if(u=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=u.call(r)).done)&&(i.push(n.value),i.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},293:e=>{function t(e,t,r,n,o,u,a){try{var i=e[u](a),s=i.value}catch(e){return void r(e)}i.done?t(s):Promise.resolve(s).then(n,o)}e.exports=function(e){return function(){var r=this,n=arguments;return new Promise((function(o,u){var a=e.apply(r,n);function i(e){t(a,o,u,i,s,"next",e)}function s(e){t(a,o,u,i,s,"throw",e)}i(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},389:function(e,t){!function(e){"use strict";var t=function(e){return function(t){var r=e(t);return t.add(r),r}},r=function(e){return function(t,r){return e.set(t,r),r}},n=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,u=2*o,a=function(e,t){return function(r){var a=t.get(r),i=void 0===a?r.size:a<u?a+1:0;if(!r.has(i))return e(r,i);if(r.size<o){for(;r.has(i);)i=Math.floor(Math.random()*u);return e(r,i)}if(r.size>n)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;r.has(i);)i=Math.floor(Math.random()*n);return e(r,i)}},i=new WeakMap,s=r(i),c=a(s,i),f=t(c);e.addUniqueNumber=f,e.generateUniqueNumber=c}(t)},472:function(e,t,r){!function(e,t,r,n){"use strict";var o=function(e,t){return function(r){var o=t.get(r);if(void 0===o)return Promise.resolve(!1);var u=n(o,2),a=u[0],i=u[1];return e(a),t.delete(r),i(!1),Promise.resolve(!0)}},u=function(e,t){var r=function(n,o,u,a){var i=n-e.now();i>0?o.set(a,[t(r,i,n,o,u,a),u]):(o.delete(a),u(!0))};return r},a=function(e,t,r,n){return function(o,u,a){var i=o+u-t.timeOrigin,s=i-t.now();return new Promise((function(t){e.set(a,[r(n,s,i,e,t,a),t])}))}},i=new Map,s=o(globalThis.clearTimeout,i),c=new Map,f=o(globalThis.clearTimeout,c),l=u(performance,globalThis.setTimeout),p=a(i,performance,globalThis.setTimeout,l),d=a(c,performance,globalThis.setTimeout,l);r.createWorker(self,{clear:function(){var r=e(t.mark((function e(r){var n,o,u;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.timerId,o=r.timerType,e.next=1,"interval"===o?s(n):f(n);case 1:return u=e.sent,e.abrupt("return",{result:u});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}(),set:function(){var r=e(t.mark((function e(r){var n,o,u,a,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.delay,o=r.now,u=r.timerId,a=r.timerType,e.next=1,("interval"===a?p:d)(n,o,u);case 1:return i=e.sent,e.abrupt("return",{result:i});case 2:case"end":return e.stop()}}),e)})));function n(e){return r.apply(this,arguments)}return n}()})}(r(293),r(756),r(623),r(715))},546:e=>{function t(r,n,o,u){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}e.exports=t=function(e,r,n,o){if(r)a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n;else{var u=function(r,n){t(e,r,(function(e){return this._invoke(r,n,e)}))};u("next",0),u("throw",1),u("return",2)}},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,o,u)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,r)=>{var n=r(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},623:function(e,t,r){!function(e,t,r,n,o){"use strict";var u={INTERNAL_ERROR:-32603,INVALID_PARAMS:-32602,METHOD_NOT_FOUND:-32601},a=function(e,t){return Object.assign(new Error(e),{status:t})},i=function(e){return a('The requested method called "'.concat(e,'" is not supported.'),u.METHOD_NOT_FOUND)},s=function(e){return a('The handler of the method called "'.concat(e,'" returned no required result.'),u.INTERNAL_ERROR)},c=function(e){return a('The handler of the method called "'.concat(e,'" returned an unexpected result.'),u.INTERNAL_ERROR)},f=function(e){return a('The specified parameter called "portId" with the given value "'.concat(e,'" does not identify a port connected to this worker.'),u.INVALID_PARAMS)},l=function(e,n){return function(){var o=t(r.mark((function t(o){var u,a,f,l,p,d,v,x,y,b,h,m,_,g,w;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u=o.data,a=u.id,f=u.method,l=u.params,p=n[f],t.prev=1,void 0!==p){t.next=2;break}throw i(f);case 2:if(void 0!==(d=void 0===l?p():p(l))){t.next=3;break}throw s(f);case 3:if(!(d instanceof Promise)){t.next=5;break}return t.next=4,d;case 4:g=t.sent,t.next=6;break;case 5:g=d;case 6:if(v=g,null!==a){t.next=8;break}if(void 0===v.result){t.next=7;break}throw c(f);case 7:t.next=10;break;case 8:if(void 0!==v.result){t.next=9;break}throw c(f);case 9:x=v.result,y=v.transferables,b=void 0===y?[]:y,e.postMessage({id:a,result:x},b);case 10:t.next=12;break;case 11:t.prev=11,w=t.catch(1),h=w.message,m=w.status,_=void 0===m?-32603:m,e.postMessage({error:{code:_,message:h},id:a});case 12:case"end":return t.stop()}}),t,null,[[1,11]])})));return function(e){return o.apply(this,arguments)}}()},p=function(){return new Promise((function(e){var t=new ArrayBuffer(0),r=new MessageChannel,n=r.port1,o=r.port2;n.onmessage=function(t){var r=t.data;return e(null!==r)},o.postMessage(t,[t])}))};function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var x=new Map,y=function(e,n,u){return v(v({},n),{},{connect:function(t){var r=t.port;r.start();var u=e(r,n),a=o.generateUniqueNumber(x);return x.set(a,(function(){u(),r.close(),x.delete(a)})),{result:a}},disconnect:function(e){var t=e.portId,r=x.get(t);if(void 0===r)throw f(t);return r(),{result:null}},isSupported:function(){var e=t(r.mark((function e(){var t,n,o;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,p();case 1:if(!e.sent){e.next=5;break}if(!((t=u())instanceof Promise)){e.next=3;break}return e.next=2,t;case 2:o=e.sent,e.next=4;break;case 3:o=t;case 4:return n=o,e.abrupt("return",{result:n});case 5:return e.abrupt("return",{result:!1});case 6:case"end":return e.stop()}}),e)})));function n(){return e.apply(this,arguments)}return n}()})},b=function(e,t){var r=y(b,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return!0}),n=l(e,r);return e.addEventListener("message",n),function(){return e.removeEventListener("message",n)}};e.createWorker=b,e.isSupported=p}(t,r(293),r(756),r(693),r(389))},633:(e,t,r)=>{var n=r(172),o=r(993),u=r(869),a=r(887),i=r(791),s=r(373),c=r(579);function f(){"use strict";var t=o(),r=t.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function v(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,o,u){return t.resultName=o,r(n.d,c(e),u)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=f=function(){return{wrap:function(e,r,n,o){return t.w(v(e),r,n,o&&o.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:i,async:function(e,t,r,n,o){return(p(t)?a:u)(v(e),t,r,n,o)},keys:s,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},693:(e,t,r)=>{var n=r(736);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},715:(e,t,r)=>{var n=r(987),o=r(156),u=r(122),a=r(752);e.exports=function(e,t){return n(e)||o(e,t)||u(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},736:(e,t,r)=>{var n=r(738).default,o=r(45);e.exports=function(e){var t=o(e,"string");return"symbol"==n(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},752:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,r)=>{var n=r(633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},791:(e,t,r)=>{var n=r(172),o=r(546);e.exports=function e(t,r){function u(e,o,a,i){try{var s=t[e](o),c=s.value;return c instanceof n?r.resolve(c.v).then((function(e){u("next",e,a,i)}),(function(e){u("throw",e,a,i)})):r.resolve(c).then((function(e){s.value=e,a(s)}),(function(e){return u("throw",e,a,i)}))}catch(e){i(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),o(this,"_invoke",(function(e,t,n){function o(){return new r((function(t,r){u(e,n,t,r)}))}return a=a?a.then(o,o):o()}),!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,r)=>{var n=r(887);e.exports=function(e,t,r,o,u){var a=n(e,t,r,o,u);return a.next().then((function(e){return e.done?e.value:a.next()}))},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,r)=>{var n=r(993),o=r(791);e.exports=function(e,t,r,u,a){return new o(n().w(e,t,r,u),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},987:e=>{e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,r)=>{var n=r(546);function o(){var t,r,u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",i=u.toStringTag||"@@toStringTag";function s(e,o,u,a){var i=o&&o.prototype instanceof f?o:f,s=Object.create(i.prototype);return n(s,"_invoke",function(e,n,o){var u,a,i,s=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return u=e,a=0,i=t,p.n=r,c}};function d(e,n){for(a=e,i=n,r=0;!l&&s&&!o&&r<f.length;r++){var o,u=f[r],d=p.p,v=u[2];e>3?(o=v===n)&&(i=u[(a=u[4])?5:(a=3,3)],u[4]=u[5]=t):u[0]<=d&&((o=e<2&&d<u[1])?(a=0,p.v=n,p.n=u[1]):d<v&&(o=e<3||u[0]>n||n>v)&&(u[4]=e,u[5]=n,p.n=v,a=0))}if(o||e>1)return c;throw l=!0,n}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),a=f,i=v;(r=a<2?t:i)||!l;){u||(a?a<3?(a>1&&(p.n=-1),d(a,i)):p.n=i:p.v=i);try{if(s=2,u){if(a||(o="next"),r=u[o]){if(!(r=r.call(u,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,a<2&&(a=0)}else 1===a&&(r=u.return)&&r.call(u),a<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),a=1);u=t}else if((r=(l=p.n<0)?i:e.call(n,p))!==c)break}catch(e){u=t,a=1,i=e}finally{s=1}}return{value:r,done:l}}}(e,u,a),!0),s}var c={};function f(){}function l(){}function p(){}r=Object.getPrototypeOf;var d=[][a]?r(r([][a]())):(n(r={},a,(function(){return this})),r),v=p.prototype=f.prototype=Object.create(d);function x(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return l.prototype=p,n(v,"constructor",p),n(p,"constructor",l),l.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,a,(function(){return this})),n(v,"toString",(function(){return"[object Generator]"})),(e.exports=o=function(){return{w:s,m:x}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var u=t[n]={exports:{}};return e[n].call(u.exports,u,u.exports,r),u.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();`,i=u(o.load,n),s=function(f){return i().clearInterval(f)},a=function(f){return i().clearTimeout(f)},l=function(){var f;return(f=i()).setInterval.apply(f,arguments)},c=function(){var f;return(f=i()).setTimeout.apply(f,arguments)};r.clearInterval=s,r.clearTimeout=a,r.setInterval=l,r.setTimeout=c})}),cn=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0}),e.isReactNativeBrowser=e.isWebWorker=void 0;var t=()=>typeof window<"u"?typeof navigator<"u"&&navigator.userAgent?.toLowerCase().indexOf(" electron/")>-1&&Be?.versions?!Object.prototype.hasOwnProperty.call(Be.versions,"electron"):typeof window.document<"u":!1,r=()=>!!(typeof self=="object"&&self?.constructor?.name?.includes("WorkerGlobalScope")&&typeof Deno>"u"),o=()=>typeof navigator<"u"&&navigator.product==="ReactNative",u=t()||r()||o();e.isWebWorker=r(),e.isReactNativeBrowser=o(),e.default=u}),_y=ge(e=>{ue(),fe(),ce();var t=e&&e.__createBinding||(Object.create?function(l,c,f,p){p===void 0&&(p=f);var m=Object.getOwnPropertyDescriptor(c,f);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,p,m)}:function(l,c,f,p){p===void 0&&(p=f),l[p]=c[f]}),r=e&&e.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),o=e&&e.__importStar||(function(){var l=function(c){return l=Object.getOwnPropertyNames||function(f){var p=[];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(p[p.length]=m);return p},l(c)};return function(c){if(c&&c.__esModule)return c;var f={};if(c!=null)for(var p=l(c),m=0;m<p.length;m++)p[m]!=="default"&&t(f,c,p[m]);return r(f,c),f}})();Object.defineProperty(e,"__esModule",{value:!0});var u=vy(),n=o(cn()),i={set:u.setInterval,clear:u.clearInterval},s={set:(l,c)=>setInterval(l,c),clear:l=>clearInterval(l)},a=l=>{switch(l){case"native":return s;case"worker":return i;default:return n.default&&!n.isWebWorker&&!n.isReactNativeBrowser?i:s}};e.default=a}),zl=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0});var r=t(_y()),o=class{_keepalive;timerId;timer;destroyed=!1;counter;client;_keepaliveTimeoutTimestamp;_intervalEvery;get keepaliveTimeoutTimestamp(){return this._keepaliveTimeoutTimestamp}get intervalEvery(){return this._intervalEvery}get keepalive(){return this._keepalive}constructor(u,n){this.client=u,this.timer=typeof n=="object"&&"set"in n&&"clear"in n?n:(0,r.default)(n),this.setKeepalive(u.options.keepalive)}clear(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}setKeepalive(u){if(u*=1e3,isNaN(u)||u<=0||u>2147483647)throw new Error(`Keepalive value must be an integer between 0 and 2147483647. Provided value is ${u}`);this._keepalive=u,this.reschedule(),this.client.log(`KeepaliveManager: set keepalive to ${u}ms`)}destroy(){this.clear(),this.destroyed=!0}reschedule(){if(this.destroyed)return;this.clear(),this.counter=0;let u=Math.ceil(this._keepalive*1.5);this._keepaliveTimeoutTimestamp=Date.now()+u,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set(()=>{this.destroyed||(this.counter+=1,this.counter===2?this.client.sendPing():this.counter>2&&this.client.onKeepaliveTimeout())},this._intervalEvery)}};e.default=o}),Ro=ge(e=>{ue(),fe(),ce();var t=e&&e.__createBinding||(Object.create?function(v,A,S,R){R===void 0&&(R=S);var C=Object.getOwnPropertyDescriptor(A,S);(!C||("get"in C?!A.__esModule:C.writable||C.configurable))&&(C={enumerable:!0,get:function(){return A[S]}}),Object.defineProperty(v,R,C)}:function(v,A,S,R){R===void 0&&(R=S),v[R]=A[S]}),r=e&&e.__setModuleDefault||(Object.create?function(v,A){Object.defineProperty(v,"default",{enumerable:!0,value:A})}:function(v,A){v.default=A}),o=e&&e.__importStar||(function(){var v=function(A){return v=Object.getOwnPropertyNames||function(S){var R=[];for(var C in S)Object.prototype.hasOwnProperty.call(S,C)&&(R[R.length]=C);return R},v(A)};return function(A){if(A&&A.__esModule)return A;var S={};if(A!=null)for(var R=v(A),C=0;C<R.length;C++)R[C]!=="default"&&t(S,A,R[C]);return r(S,A),S}})(),u=e&&e.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0});var n=u(Lm()),i=Jt(),s=u(Pm()),a=u(Mt()),l=o(kl()),c=u(Ul()),f=u(Zm()),p=u(Hl()),m=u(ey()),h=mr(),g=ty(),y=u(zl()),w=o(cn()),b=globalThis.setImmediate||((...v)=>{let A=v.shift();(0,h.nextTick)(()=>{A(...v)})}),E={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:30*1e3,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},T=class Ds extends g.TypedEventEmitter{static VERSION=h.MQTTJS_VERSION;connected;disconnecting;disconnected;reconnecting;incomingStore;outgoingStore;options;queueQoSZero;_reconnectCount;log;messageIdProvider;outgoing;messageIdToTopic;noop;keepaliveManager;stream;queue;streamBuilder;_resubscribeTopics;connackTimer;reconnectTimer;_storeProcessing;_packetIdsDuringStoreProcessing;_storeProcessingQueue;_firstConnection;topicAliasRecv;topicAliasSend;_deferredReconnect;connackPacket;static defaultId(){return`mqttjs_${Math.random().toString(16).substr(2,8)}`}constructor(A,S){super(),this.options=S||{};for(let R in E)typeof this.options[R]>"u"?this.options[R]=E[R]:this.options[R]=S[R];this.log=this.options.log||(0,a.default)("mqttjs:client"),this.noop=this._noop.bind(this),this.log("MqttClient :: version:",Ds.VERSION),w.isWebWorker?this.log("MqttClient :: environment","webworker"):this.log("MqttClient :: environment",w.default?"browser":"node"),this.log("MqttClient :: options.protocol",S.protocol),this.log("MqttClient :: options.protocolVersion",S.protocolVersion),this.log("MqttClient :: options.username",S.username),this.log("MqttClient :: options.keepalive",S.keepalive),this.log("MqttClient :: options.reconnectPeriod",S.reconnectPeriod),this.log("MqttClient :: options.rejectUnauthorized",S.rejectUnauthorized),this.log("MqttClient :: options.properties.topicAliasMaximum",S.properties?S.properties.topicAliasMaximum:void 0),this.options.clientId=typeof S.clientId=="string"?S.clientId:Ds.defaultId(),this.log("MqttClient :: clientId",this.options.clientId),this.options.customHandleAcks=S.protocolVersion===5&&S.customHandleAcks?S.customHandleAcks:(...R)=>{R[3](null,0)},this.options.writeCache||(n.default.writeToStream.cacheNumbers=!1),this.streamBuilder=A,this.messageIdProvider=typeof this.options.messageIdProvider>"u"?new p.default:this.options.messageIdProvider,this.outgoingStore=S.outgoingStore||new c.default,this.incomingStore=S.incomingStore||new c.default,this.queueQoSZero=S.queueQoSZero===void 0?!0:S.queueQoSZero,this._resubscribeTopics={},this.messageIdToTopic={},this.keepaliveManager=null,this.connected=!1,this.disconnecting=!1,this.reconnecting=!1,this.queue=[],this.connackTimer=null,this.reconnectTimer=null,this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={},this._storeProcessingQueue=[],this.outgoing={},this._firstConnection=!0,S.properties&&S.properties.topicAliasMaximum>0&&(S.properties.topicAliasMaximum>65535?this.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):this.topicAliasRecv=new m.default(S.properties.topicAliasMaximum)),this.on("connect",()=>{let{queue:R}=this,C=()=>{let M=R.shift();this.log("deliver :: entry %o",M);let F=null;if(!M){this._resubscribe();return}F=M.packet,this.log("deliver :: call _sendPacket for %o",F);let O=!0;F.messageId&&F.messageId!==0&&(this.messageIdProvider.register(F.messageId)||(O=!1)),O?this._sendPacket(F,H=>{M.cb&&M.cb(H),C()}):(this.log("messageId: %d has already used. The message is skipped and removed.",F.messageId),C())};this.log("connect :: sending queued packets"),C()}),this.on("close",()=>{this.log("close :: connected set to `false`"),this.connected=!1,this.log("close :: clearing connackTimer"),clearTimeout(this.connackTimer),this._destroyKeepaliveManager(),this.topicAliasRecv&&this.topicAliasRecv.clear(),this.log("close :: calling _setupReconnect"),this._setupReconnect()}),this.options.manualConnect||(this.log("MqttClient :: setting up stream"),this.connect())}handleAuth(A,S){S()}handleMessage(A,S){S()}_nextId(){return this.messageIdProvider.allocate()}getLastMessageId(){return this.messageIdProvider.getLastAllocated()}connect(){let A=new i.Writable,S=n.default.parser(this.options),R=null,C=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new c.default,this.outgoingStore=this.options.outgoingStore||new c.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),S.on("packet",j=>{this.log("parser :: on packet push to packets array."),C.push(j)});let M=()=>{this.log("work :: getting next packet in queue");let j=C.shift();if(j)this.log("work :: packet pulled from queue"),(0,f.default)(this,j,F);else{this.log("work :: no packets in queue");let x=R;R=null,this.log("work :: done flag is %s",!!x),x&&x()}},F=()=>{if(C.length)(0,h.nextTick)(M);else{let j=R;R=null,j()}};A._write=(j,x,le)=>{R=le,this.log("writable stream :: parsing buffer"),S.parse(j),M()};let O=j=>{this.log("streamErrorHandler :: error",j.message),j.code?(this.log("streamErrorHandler :: emitting error"),this.emit("error",j)):this.noop(j)};this.log("connect :: pipe stream to writable stream"),this.stream.pipe(A),this.stream.on("error",O),this.stream.on("close",()=>{this.log("(%s)stream :: on close",this.options.clientId),this._flushVolatile(),this.log("stream: emit close to MqttClient"),this.emit("close")}),this.log("connect: sending packet `connect`");let H={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(H.will={...this.options.will,payload:this.options.will?.payload}),this.topicAliasRecv&&(H.properties||(H.properties={}),this.topicAliasRecv&&(H.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(H),S.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end(()=>this.emit("error",new Error("Packet has no Authentication Method"))),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&typeof this.options.authPacket=="object"){let j={cmd:"auth",reasonCode:0,...this.options.authPacket};this._writePacket(j)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout(()=>{this.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),this.emit("error",new Error("connack timeout")),this._cleanUp(!0)},this.options.connectTimeout),this}publish(A,S,R,C){this.log("publish :: message `%s` to topic `%s`",S,A);let{options:M}=this;typeof R=="function"&&(C=R,R=null),R=R||{},R={qos:0,retain:!1,dup:!1,...R};let{qos:F,retain:O,dup:H,properties:j,cbStorePut:x}=R;if(this._checkDisconnecting(C))return this;let le=()=>{let z=0;if((F===1||F===2)&&(z=this._nextId(),z===null))return this.log("No messageId left"),!1;let Y={cmd:"publish",topic:A,payload:S,qos:F,retain:O,messageId:z,dup:H};switch(M.protocolVersion===5&&(Y.properties=j),this.log("publish :: qos",F),F){case 1:case 2:this.outgoing[Y.messageId]={volatile:!1,cb:C||this.noop},this.log("MqttClient:publish: packet cmd: %s",Y.cmd),this._sendPacket(Y,void 0,x);break;default:this.log("MqttClient:publish: packet cmd: %s",Y.cmd),this._sendPacket(Y,C,x);break}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!le())&&this._storeProcessingQueue.push({invoke:le,cbStorePut:R.cbStorePut,callback:C}),this}publishAsync(A,S,R){return new Promise((C,M)=>{this.publish(A,S,R,(F,O)=>{F?M(F):C(O)})})}subscribe(A,S,R){let C=this.options.protocolVersion;typeof S=="function"&&(R=S),R=R||this.noop;let M=!1,F=[];typeof A=="string"?(A=[A],F=A):Array.isArray(A)?F=A:typeof A=="object"&&(M=A.resubscribe,delete A.resubscribe,F=Object.keys(A));let O=l.validateTopics(F);if(O!==null)return b(R,new Error(`Invalid topic ${O}`)),this;if(this._checkDisconnecting(R))return this.log("subscribe: discconecting true"),this;let H={qos:0};C===5&&(H.nl=!1,H.rap=!1,H.rh=0),S={...H,...S};let{properties:j}=S,x=[],le=(ne,W)=>{if(W=W||S,!Object.prototype.hasOwnProperty.call(this._resubscribeTopics,ne)||this._resubscribeTopics[ne].qos<W.qos||M){let ee={topic:ne,qos:W.qos};C===5&&(ee.nl=W.nl,ee.rap=W.rap,ee.rh=W.rh,ee.properties=j),this.log("subscribe: pushing topic `%s` and qos `%s` to subs list",ee.topic,ee.qos),x.push(ee)}};if(Array.isArray(A)?A.forEach(ne=>{this.log("subscribe: array topic %s",ne),le(ne)}):Object.keys(A).forEach(ne=>{this.log("subscribe: object topic %s, %o",ne,A[ne]),le(ne,A[ne])}),!x.length)return R(null,[]),this;let z=(ne,W)=>{let ee={cmd:"subscribe",subscriptions:ne,messageId:W};if(j&&(ee.properties=j),this.options.resubscribe){this.log("subscribe :: resubscribe true");let J=[];ne.forEach(ve=>{if(this.options.reconnectPeriod>0){let re={qos:ve.qos};C===5&&(re.nl=ve.nl||!1,re.rap=ve.rap||!1,re.rh=ve.rh||0,re.properties=ve.properties),this._resubscribeTopics[ve.topic]=re,J.push(ve.topic)}}),this.messageIdToTopic[ee.messageId]=J}let P=new Promise((J,ve)=>{this.outgoing[ee.messageId]={volatile:!0,cb(re,we){if(!re){let{granted:K}=we;for(let U=0;U<K.length;U+=1)ne[U].qos=K[U]}re?ve(new h.ErrorWithSubackPacket(re.message,we)):J(we)}}});return this.log("subscribe :: call _sendPacket"),this._sendPacket(ee),P},Y=()=>{let ne=this.options.subscribeBatchSize??x.length,W=[];for(let ee=0;ee<x.length;ee+=ne){let P=x.slice(ee,ee+ne),J=this._nextId();if(J===null)return this.log("No messageId left"),!1;W.push(z(P,J))}return Promise.all(W).then(ee=>{R(null,x,ee.at(-1))}).catch(ee=>{R(ee,x,ee.packet)}),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!Y())&&this._storeProcessingQueue.push({invoke:Y,callback:R}),this}subscribeAsync(A,S){return new Promise((R,C)=>{this.subscribe(A,S,(M,F)=>{M?C(M):R(F)})})}unsubscribe(A,S,R){typeof A=="string"&&(A=[A]),typeof S=="function"&&(R=S),R=R||this.noop;let C=l.validateTopics(A);if(C!==null)return b(R,new Error(`Invalid topic ${C}`)),this;if(this._checkDisconnecting(R))return this;let M=()=>{let F=this._nextId();if(F===null)return this.log("No messageId left"),!1;let O={cmd:"unsubscribe",messageId:F,unsubscriptions:[]};return typeof A=="string"?O.unsubscriptions=[A]:Array.isArray(A)&&(O.unsubscriptions=A),this.options.resubscribe&&O.unsubscriptions.forEach(H=>{delete this._resubscribeTopics[H]}),typeof S=="object"&&S.properties&&(O.properties=S.properties),this.outgoing[O.messageId]={volatile:!0,cb:R},this.log("unsubscribe: call _sendPacket"),this._sendPacket(O),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!M())&&this._storeProcessingQueue.push({invoke:M,callback:R}),this}unsubscribeAsync(A,S){return new Promise((R,C)=>{this.unsubscribe(A,S,(M,F)=>{M?C(M):R(F)})})}end(A,S,R){this.log("end :: (%s)",this.options.clientId),(A==null||typeof A!="boolean")&&(R=R||S,S=A,A=!1),typeof S!="object"&&(R=R||S,S=null),this.log("end :: cb? %s",!!R),(!R||typeof R!="function")&&(R=this.noop);let C=()=>{this.log("end :: closeStores: closing incoming and outgoing stores"),this.disconnected=!0,this.incomingStore.close(F=>{this.outgoingStore.close(O=>{if(this.log("end :: closeStores: emitting end"),this.emit("end"),R){let H=F||O;this.log("end :: closeStores: invoking callback with args"),R(H)}})}),this._deferredReconnect?this._deferredReconnect():(this.options.reconnectPeriod===0||this.options.manualConnect)&&(this.disconnecting=!1)},M=()=>{this.log("end :: (%s) :: finish :: calling _cleanUp with force %s",this.options.clientId,A),this._cleanUp(A,()=>{this.log("end :: finish :: calling process.nextTick on closeStores"),(0,h.nextTick)(C)},S)};return this.disconnecting?(R(),this):(this._clearReconnect(),this.disconnecting=!0,!A&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,M,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),M()),this)}endAsync(A,S){return new Promise((R,C)=>{this.end(A,S,M=>{M?C(M):R()})})}removeOutgoingMessage(A){if(this.outgoing[A]){let{cb:S}=this.outgoing[A];this._removeOutgoingAndStoreMessage(A,()=>{S(new Error("Message removed"))})}return this}reconnect(A){this.log("client reconnect");let S=()=>{A?(this.options.incomingStore=A.incomingStore,this.options.outgoingStore=A.outgoingStore):(this.options.incomingStore=null,this.options.outgoingStore=null),this.incomingStore=this.options.incomingStore||new c.default,this.outgoingStore=this.options.outgoingStore||new c.default,this.disconnecting=!1,this.disconnected=!1,this._deferredReconnect=null,this._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=S:S(),this}_flushVolatile(){this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach(A=>{this.outgoing[A].volatile&&typeof this.outgoing[A].cb=="function"&&(this.outgoing[A].cb(new Error("Connection closed")),delete this.outgoing[A])}))}_flush(){this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach(A=>{typeof this.outgoing[A].cb=="function"&&(this.outgoing[A].cb(new Error("Connection closed")),delete this.outgoing[A])}))}_removeTopicAliasAndRecoverTopicName(A){let S;A.properties&&(S=A.properties.topicAlias);let R=A.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",S,R),R.length===0){if(typeof S>"u")return new Error("Unregistered Topic Alias");if(R=this.topicAliasSend.getTopicByAlias(S),typeof R>"u")return new Error("Unregistered Topic Alias");A.topic=R}S&&delete A.properties.topicAlias}_checkDisconnecting(A){return this.disconnecting&&(A&&A!==this.noop?A(new Error("client disconnecting")):this.emit("error",new Error("client disconnecting"))),this.disconnecting}_reconnect(){this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end(()=>{this.connect()}),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}_setupReconnect(){!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval(()=>{this.log("reconnectTimer :: reconnect triggered!"),this._reconnect()},this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}_clearReconnect(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}_cleanUp(A,S,R={}){if(S&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",S)),this.log("_cleanUp :: forced? %s",A),A)this.options.reconnectPeriod===0&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{let C={cmd:"disconnect",...R};this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(C,()=>{this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),b(()=>{this.stream.end(()=>{this.log("_cleanUp :: (%s) :: stream destroyed",this.options.clientId)})})})}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),S&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",S),S())}_storeAndSend(A,S,R){this.log("storeAndSend :: store packet with cmd %s to outgoingStore",A.cmd);let C=A,M;if(C.cmd==="publish"&&(C=(0,s.default)(A),M=this._removeTopicAliasAndRecoverTopicName(C),M))return S&&S(M);this.outgoingStore.put(C,F=>{if(F)return S&&S(F);R(),this._writePacket(A,S)})}_applyTopicAlias(A){if(this.options.protocolVersion===5&&A.cmd==="publish"){let S;A.properties&&(S=A.properties.topicAlias);let R=A.topic.toString();if(this.topicAliasSend)if(S){if(R.length!==0&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",R,S),!this.topicAliasSend.put(R,S)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",R,S),new Error("Sending Topic Alias out of range")}else R.length!==0&&(this.options.autoAssignTopicAlias?(S=this.topicAliasSend.getAliasByTopic(R),S?(A.topic="",A.properties={...A.properties,topicAlias:S},this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",R,S)):(S=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(R,S),A.properties={...A.properties,topicAlias:S},this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",R,S))):this.options.autoUseTopicAlias&&(S=this.topicAliasSend.getAliasByTopic(R),S&&(A.topic="",A.properties={...A.properties,topicAlias:S},this.log("applyTopicAlias :: auto use topic: %s - alias: %d",R,S))));else if(S)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",R,S),new Error("Sending Topic Alias out of range")}}_noop(A){this.log("noop ::",A)}_writePacket(A,S){this.log("_writePacket :: packet: %O",A),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",A),this.log("_writePacket :: writing to stream");let R=n.default.writeToStream(A,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",R),!R&&S&&S!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",S)):S&&(this.log("_writePacket :: invoking cb"),S())}_sendPacket(A,S,R,C){this.log("_sendPacket :: (%s) :: start",this.options.clientId),R=R||this.noop,S=S||this.noop;let M=this._applyTopicAlias(A);if(M){S(M);return}if(!this.connected){if(A.cmd==="auth"){this._writePacket(A,S);return}this.log("_sendPacket :: client not connected. Storing packet offline."),this._storePacket(A,S,R);return}if(C){this._writePacket(A,S);return}switch(A.cmd){case"publish":break;case"pubrel":this._storeAndSend(A,S,R);return;default:this._writePacket(A,S);return}switch(A.qos){case 2:case 1:this._storeAndSend(A,S,R);break;default:this._writePacket(A,S);break}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}_storePacket(A,S,R){this.log("_storePacket :: packet: %o",A),this.log("_storePacket :: cb? %s",!!S),R=R||this.noop;let C=A;if(C.cmd==="publish"){C=(0,s.default)(A);let F=this._removeTopicAliasAndRecoverTopicName(C);if(F)return S&&S(F)}let M=C.qos||0;M===0&&this.queueQoSZero||C.cmd!=="publish"?this.queue.push({packet:C,cb:S}):M>0?(S=this.outgoing[C.messageId]?this.outgoing[C.messageId].cb:null,this.outgoingStore.put(C,F=>{if(F)return S&&S(F);R()})):S&&S(new Error("No connection to broker"))}_setupKeepaliveManager(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new y.default(this,this.options.timerVariant))}_destroyKeepaliveManager(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}reschedulePing(A=!1){this.keepaliveManager&&this.options.keepalive&&(A||this.options.reschedulePings)&&this._reschedulePing()}_reschedulePing(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}sendPing(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}onKeepaliveTimeout(){this.emit("error",new Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}_resubscribe(){this.log("_resubscribe");let A=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&A.length>0)if(this.options.resubscribe)if(this.options.protocolVersion===5){this.log("_resubscribe: protocolVersion 5");for(let S=0;S<A.length;S++){let R={};R[A[S]]=this._resubscribeTopics[A[S]],R.resubscribe=!0,this.subscribe(R,{properties:R[A[S]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}_onConnect(A){if(this.disconnected){this.emit("connect",A);return}this.connackPacket=A,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;let S=()=>{let R=this.outgoingStore.createStream(),C=()=>{R.destroy(),R=null,this._flushStoreProcessingQueue(),M()},M=()=>{this._storeProcessing=!1,this._packetIdsDuringStoreProcessing={}};this.once("close",C),R.on("error",O=>{M(),this._flushStoreProcessingQueue(),this.removeListener("close",C),this.emit("error",O)});let F=()=>{if(!R)return;let O=R.read(1),H;if(!O){R.once("readable",F);return}if(this._storeProcessing=!0,this._packetIdsDuringStoreProcessing[O.messageId]){F();return}!this.disconnecting&&!this.reconnectTimer?(H=this.outgoing[O.messageId]?this.outgoing[O.messageId].cb:null,this.outgoing[O.messageId]={volatile:!1,cb(j,x){H&&H(j,x),F()}},this._packetIdsDuringStoreProcessing[O.messageId]=!0,this.messageIdProvider.register(O.messageId)?this._sendPacket(O,void 0,void 0,!0):this.log("messageId: %d has already used.",O.messageId)):R.destroy&&R.destroy()};R.on("end",()=>{let O=!0;for(let H in this._packetIdsDuringStoreProcessing)if(!this._packetIdsDuringStoreProcessing[H]){O=!1;break}this.removeListener("close",C),O?(M(),this._invokeAllStoreProcessingQueue(),this.emit("connect",A)):S()}),F()};S()}_invokeStoreProcessingQueue(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){let A=this._storeProcessingQueue[0];if(A&&A.invoke())return this._storeProcessingQueue.shift(),!0}return!1}_invokeAllStoreProcessingQueue(){for(;this._invokeStoreProcessingQueue(););}_flushStoreProcessingQueue(){for(let A of this._storeProcessingQueue)A.cbStorePut&&A.cbStorePut(new Error("Connection closed")),A.callback&&A.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)}_removeOutgoingAndStoreMessage(A,S){delete this.outgoing[A],this.outgoingStore.del({messageId:A},(R,C)=>{S(R,C),this.messageIdProvider.deallocate(A),this._invokeStoreProcessingQueue()})}};e.default=T}),Ey=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=Gl(),r=class{numberAllocator;lastId;constructor(){this.numberAllocator=new t.NumberAllocator(1,65535)}allocate(){return this.lastId=this.numberAllocator.alloc(),this.lastId}getLastAllocated(){return this.lastId}register(o){return this.numberAllocator.use(o)}deallocate(o){this.numberAllocator.free(o)}clear(){this.numberAllocator.clear()}};e.default=r});function wy(){if(Oo)return fn;Oo=!0;let e=2147483647,t=36,r=1,o=26,u=38,n=700,i=72,s=128,a="-",l=/^xn--/,c=/[^\0-\x7F]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=t-r,h=Math.floor,g=String.fromCharCode;function y(M){throw new RangeError(p[M])}function w(M,F){let O=[],H=M.length;for(;H--;)O[H]=F(M[H]);return O}function b(M,F){let O=M.split("@"),H="";O.length>1&&(H=O[0]+"@",M=O[1]),M=M.replace(f,".");let j=M.split("."),x=w(j,F).join(".");return H+x}function E(M){let F=[],O=0,H=M.length;for(;O<H;){let j=M.charCodeAt(O++);if(j>=55296&&j<=56319&&O<H){let x=M.charCodeAt(O++);(x&64512)==56320?F.push(((j&1023)<<10)+(x&1023)+65536):(F.push(j),O--)}else F.push(j)}return F}let T=M=>String.fromCodePoint(...M),v=function(M){return M>=48&&M<58?26+(M-48):M>=65&&M<91?M-65:M>=97&&M<123?M-97:t},A=function(M,F){return M+22+75*(M<26)-((F!=0)<<5)},S=function(M,F,O){let H=0;for(M=O?h(M/n):M>>1,M+=h(M/F);M>m*o>>1;H+=t)M=h(M/m);return h(H+(m+1)*M/(M+u))},R=function(M){let F=[],O=M.length,H=0,j=s,x=i,le=M.lastIndexOf(a);le<0&&(le=0);for(let z=0;z<le;++z)M.charCodeAt(z)>=128&&y("not-basic"),F.push(M.charCodeAt(z));for(let z=le>0?le+1:0;z<O;){let Y=H;for(let W=1,ee=t;;ee+=t){z>=O&&y("invalid-input");let P=v(M.charCodeAt(z++));P>=t&&y("invalid-input"),P>h((e-H)/W)&&y("overflow"),H+=P*W;let J=ee<=x?r:ee>=x+o?o:ee-x;if(P<J)break;let ve=t-J;W>h(e/ve)&&y("overflow"),W*=ve}let ne=F.length+1;x=S(H-Y,ne,Y==0),h(H/ne)>e-j&&y("overflow"),j+=h(H/ne),H%=ne,F.splice(H++,0,j)}return String.fromCodePoint(...F)},C=function(M){let F=[];M=E(M);let O=M.length,H=s,j=0,x=i;for(let Y of M)Y<128&&F.push(g(Y));let le=F.length,z=le;for(le&&F.push(a);z<O;){let Y=e;for(let W of M)W>=H&&W<Y&&(Y=W);let ne=z+1;Y-H>h((e-j)/ne)&&y("overflow"),j+=(Y-H)*ne,H=Y;for(let W of M)if(W<H&&++j>e&&y("overflow"),W===H){let ee=j;for(let P=t;;P+=t){let J=P<=x?r:P>=x+o?o:P-x;if(ee<J)break;let ve=ee-J,re=t-J;F.push(g(A(J+ve%re,0))),ee=h(ve/re)}F.push(g(A(ee,0))),x=S(j,ne,z===le),j=0,++z}++j,++H}return F.join("")};return fn={version:"2.3.1",ucs2:{decode:E,encode:T},decode:R,encode:C,toASCII:function(M){return b(M,function(F){return c.test(F)?"xn--"+C(F):F})},toUnicode:function(M){return b(M,function(F){return l.test(F)?R(F.slice(4).toLowerCase()):F})}},fn}var fn,Oo,Gt,Sy=rt(()=>{ue(),fe(),ce(),fn={},Oo=!1,Gt=wy(),Gt.decode,Gt.encode,Gt.toASCII,Gt.toUnicode,Gt.ucs2,Gt.version});function Ay(){return Po||(Po=!0,Mo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(e,t);if(n.value!==o||n.enumerable!==!0)return!1}return!0}),Mo}function Ty(){return Do||(Do=!0,Co=Error),Co}function Iy(){return Uo||(Uo=!0,ko=EvalError),ko}function Ry(){return Bo||(Bo=!0,xo=RangeError),xo}function Oy(){return jo||(jo=!0,Fo=ReferenceError),Fo}function Ql(){return Go||(Go=!0,Wo=SyntaxError),Wo}function xr(){return Vo||(Vo=!0,Ho=TypeError),Ho}function Ny(){return qo||(qo=!0,$o=URIError),$o}function Ly(){if(Yo)return hn;Yo=!0;var e=typeof Symbol<"u"&&Symbol,t=Ay();return hn=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},hn}function My(){if(Ko)return dn;Ko=!0;var e={__proto__:null,foo:{}},t=Object;return dn=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},dn}function Py(){if(Xo)return pn;Xo=!0;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,o="[object Function]",u=function(s,a){for(var l=[],c=0;c<s.length;c+=1)l[c]=s[c];for(var f=0;f<a.length;f+=1)l[f+s.length]=a[f];return l},n=function(s,a){for(var l=[],c=a,f=0;c<s.length;c+=1,f+=1)l[f]=s[c];return l},i=function(s,a){for(var l="",c=0;c<s.length;c+=1)l+=s[c],c+1<s.length&&(l+=a);return l};return pn=function(s){var a=this;if(typeof a!="function"||t.apply(a)!==o)throw new TypeError(e+a);for(var l=n(arguments,1),c,f=function(){if(this instanceof c){var y=a.apply(this,u(l,arguments));return Object(y)===y?y:this}return a.apply(s,u(l,arguments))},p=r(0,a.length-l.length),m=[],h=0;h<p;h++)m[h]="$"+h;if(c=Function("binder","return function ("+i(m,",")+"){ return binder.apply(this,arguments); }")(f),a.prototype){var g=function(){};g.prototype=a.prototype,c.prototype=new g,g.prototype=null}return c},pn}function No(){if(zo)return gn;zo=!0;var e=Py();return gn=Function.prototype.bind||e,gn}function Cy(){if(Qo)return bn;Qo=!0;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=No();return bn=r.call(e,t),bn}function yr(){if(Jo)return mn;Jo=!0;var e,t=Ty(),r=Iy(),o=Ry(),u=Oy(),n=Ql(),i=xr(),s=Ny(),a=Function,l=function(z){try{return a('"use strict"; return ('+z+").constructor;")()}catch{}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch{c=null}var f=function(){throw new i},p=c?(function(){try{return arguments.callee,f}catch{try{return c(arguments,"callee").get}catch{return f}}})():f,m=Ly()(),h=My()(),g=Object.getPrototypeOf||(h?function(z){return z.__proto__}:null),y={},w=typeof Uint8Array>"u"||!g?e:g(Uint8Array),b={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":m&&g?g([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":y,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":m&&g?g(g([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!m||!g?e:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!m||!g?e:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":m&&g?g(""[Symbol.iterator]()):e,"%Symbol%":m?Symbol:e,"%SyntaxError%":n,"%ThrowTypeError%":p,"%TypedArray%":w,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":s,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(g)try{null.error}catch(z){var E=g(g(z));b["%Error.prototype%"]=E}var T=function z(Y){var ne;if(Y==="%AsyncFunction%")ne=l("async function () {}");else if(Y==="%GeneratorFunction%")ne=l("function* () {}");else if(Y==="%AsyncGeneratorFunction%")ne=l("async function* () {}");else if(Y==="%AsyncGenerator%"){var W=z("%AsyncGeneratorFunction%");W&&(ne=W.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=z("%AsyncGenerator%");ee&&g&&(ne=g(ee.prototype))}return b[Y]=ne,ne},v={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=No(),S=Cy(),R=A.call(Function.call,Array.prototype.concat),C=A.call(Function.apply,Array.prototype.splice),M=A.call(Function.call,String.prototype.replace),F=A.call(Function.call,String.prototype.slice),O=A.call(Function.call,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,x=function(z){var Y=F(z,0,1),ne=F(z,-1);if(Y==="%"&&ne!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(ne==="%"&&Y!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var W=[];return M(z,H,function(ee,P,J,ve){W[W.length]=J?M(ve,j,"$1"):P||ee}),W},le=function(z,Y){var ne=z,W;if(S(v,ne)&&(W=v[ne],ne="%"+W[0]+"%"),S(b,ne)){var ee=b[ne];if(ee===y&&(ee=T(ne)),typeof ee>"u"&&!Y)throw new i("intrinsic "+z+" exists, but is not available. Please file an issue!");return{alias:W,name:ne,value:ee}}throw new n("intrinsic "+z+" does not exist!")};return mn=function(z,Y){if(typeof z!="string"||z.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Y!="boolean")throw new i('"allowMissing" argument must be a boolean');if(O(/^%?[^%]*%?$/,z)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var ne=x(z),W=ne.length>0?ne[0]:"",ee=le("%"+W+"%",Y),P=ee.name,J=ee.value,ve=!1,re=ee.alias;re&&(W=re[0],C(ne,R([0,1],re)));for(var we=1,K=!0;we<ne.length;we+=1){var U=ne[we],ie=F(U,0,1),$=F(U,-1);if((ie==='"'||ie==="'"||ie==="`"||$==='"'||$==="'"||$==="`")&&ie!==$)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!K)&&(ve=!0),W+="."+U,P="%"+W+"%",S(b,P))J=b[P];else if(J!=null){if(!(U in J)){if(!Y)throw new i("base intrinsic for "+z+" exists, but the property is not available.");return}if(c&&we+1>=ne.length){var X=c(J,U);K=!!X,K&&"get"in X&&!("originalValue"in X.get)?J=X.get:J=J[U]}else K=S(J,U),J=J[U];K&&!ve&&(b[P]=J)}}return J},mn}function Lo(){if(Zo)return yn;Zo=!0;var e=yr(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return yn=t,yn}function Jl(){if(es)return vn;es=!0;var e=yr(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return vn=t,vn}function Dy(){if(ts)return _n;ts=!0;var e=Lo(),t=Ql(),r=xr(),o=Jl();return _n=function(u,n,i){if(!u||typeof u!="object"&&typeof u!="function")throw new r("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,f=!!o&&o(u,n);if(e)e(u,n,{configurable:l===null&&f?f.configurable:!l,enumerable:s===null&&f?f.enumerable:!s,value:i,writable:a===null&&f?f.writable:!a});else if(c||!s&&!a&&!l)u[n]=i;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_n}function ky(){if(rs)return En;rs=!0;var e=Lo(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},En=t,En}function Uy(){if(ns)return wn;ns=!0;var e=yr(),t=Dy(),r=ky()(),o=Jl(),u=xr(),n=e("%Math.floor%");return wn=function(i,s){if(typeof i!="function")throw new u("`fn` is not a function");if(typeof s!="number"||s<0||s>4294967295||n(s)!==s)throw new u("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in i&&o){var f=o(i,"length");f&&!f.configurable&&(l=!1),f&&!f.writable&&(c=!1)}return(l||c||!a)&&(r?t(i,"length",s,!0,!0):t(i,"length",s)),i},wn}function xy(){if(is)return vr;is=!0;var e=No(),t=yr(),r=Uy(),o=xr(),u=t("%Function.prototype.apply%"),n=t("%Function.prototype.call%"),i=t("%Reflect.apply%",!0)||e.call(n,u),s=Lo(),a=t("%Math.max%");vr=function(c){if(typeof c!="function")throw new o("a function is required");var f=i(e,n,arguments);return r(f,1+a(0,c.length-(arguments.length-1)),!0)};var l=function(){return i(e,u,arguments)};return s?s(vr,"apply",{value:l}):vr.apply=l,vr}function By(){if(os)return Sn;os=!0;var e=yr(),t=xy(),r=t(e("String.prototype.indexOf"));return Sn=function(o,u){var n=e(o,!!u);return typeof n=="function"&&r(o,".prototype.")>-1?t(n):n},Sn}var Mo,Po,Co,Do,ko,Uo,xo,Bo,Fo,jo,Wo,Go,Ho,Vo,$o,qo,hn,Yo,dn,Ko,pn,Xo,gn,zo,bn,Qo,mn,Jo,yn,Zo,vn,es,_n,ts,En,rs,wn,ns,vr,is,Sn,os,Fy=rt(()=>{ue(),fe(),ce(),Mo={},Po=!1,Co={},Do=!1,ko={},Uo=!1,xo={},Bo=!1,Fo={},jo=!1,Wo={},Go=!1,Ho={},Vo=!1,$o={},qo=!1,hn={},Yo=!1,dn={},Ko=!1,pn={},Xo=!1,gn={},zo=!1,bn={},Qo=!1,mn={},Jo=!1,yn={},Zo=!1,vn={},es=!1,_n={},ts=!1,En={},rs=!1,wn={},ns=!1,vr={},is=!1,Sn={},os=!1});function ss(e){throw new Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function jy(){!Zt||!er||(Zt=!1,er.length?yt=er.concat(yt):Br=-1,yt.length&&Zl())}function Zl(){if(!Zt){var e=setTimeout(jy,0);Zt=!0;for(var t=yt.length;t;){for(er=yt,yt=[];++Br<t;)er&&er[Br].run();Br=-1,t=yt.length}er=null,Zt=!1,clearTimeout(e)}}function Wy(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];yt.push(new eu(e,t)),yt.length===1&&!Zt&&setTimeout(Zl,0)}function eu(e,t){this.fun=e,this.array=t}function Xe(){}function Gy(e){ss("_linkedBinding")}function Hy(e){ss("dlopen")}function Vy(){return[]}function $y(){return[]}function qy(e,t){if(!e)throw new Error(t||"assertion error")}function Yy(){return!1}function Ky(){return Dt.now()/1e3}function as(e){var t=Math.floor((Date.now()-Dt.now())*.001),r=Dt.now()*.001,o=Math.floor(r)+t,u=Math.floor(r%1*1e9);return e&&(o=o-e[0],u=u-e[1],u<0&&(o--,u+=Tn)),[o,u]}function Ht(){return us}function Xy(e){return[]}var yt,Zt,er,Br,tu,ru,nu,iu,ou,su,au,lu,uu,cu,fu,hu,du,pu,gu,bu,mu,yu,vu,_u,Eu,An,wu,Su,Au,Tu,Iu,Ru,Ou,Nu,Lu,Mu,Pu,Cu,Du,ku,Uu,xu,Bu,Fu,ju,Wu,Gu,Hu,Vu,$u,qu,Dt,ls,Tn,Yu,Ku,Xu,zu,Qu,Ju,Zu,ec,tc,rc,nc,us,ic=rt(()=>{ue(),fe(),ce(),yt=[],Zt=!1,Br=-1,eu.prototype.run=function(){this.fun.apply(null,this.array)},tu="browser",ru="x64",nu="browser",iu={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},ou=["/usr/bin/node"],su=[],au="v16.8.0",lu={},uu=function(e,t){console.warn((t?t+": ":"")+e)},cu=function(e){ss("binding")},fu=function(e){return 0},hu=function(){return"/"},du=function(e){},pu={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},gu=Xe,bu=[],mu={},yu=!1,vu={},_u=Xe,Eu=Xe,An=function(){return{}},wu=An,Su=An,Au=Xe,Tu=Xe,Iu=Xe,Ru={},Ou={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},Nu=Xe,Lu=Xe,Mu=Xe,Pu=Xe,Cu=Xe,Du=Xe,ku=Xe,Uu=void 0,xu=void 0,Bu=void 0,Fu=Xe,ju=2,Wu=1,Gu="/bin/usr/node",Hu=9229,Vu="node",$u=[],qu=Xe,Dt={now:typeof performance<"u"?performance.now.bind(performance):void 0,timing:typeof performance<"u"?performance.timing:void 0},Dt.now===void 0&&(ls=Date.now(),Dt.timing&&Dt.timing.navigationStart&&(ls=Dt.timing.navigationStart),Dt.now=()=>Date.now()-ls),Tn=1e9,as.bigint=function(e){var t=as(e);return typeof BigInt>"u"?t[0]*Tn+t[1]:BigInt(t[0]*Tn)+BigInt(t[1])},Yu=10,Ku={},Xu=0,zu=Ht,Qu=Ht,Ju=Ht,Zu=Ht,ec=Ht,tc=Xe,rc=Ht,nc=Ht,us={version:au,versions:lu,arch:ru,platform:nu,release:pu,_rawDebug:gu,moduleLoadList:bu,binding:cu,_linkedBinding:Gy,_events:Ku,_eventsCount:Xu,_maxListeners:Yu,on:Ht,addListener:zu,once:Qu,off:Ju,removeListener:Zu,removeAllListeners:ec,emit:tc,prependListener:rc,prependOnceListener:nc,listeners:Xy,domain:mu,_exiting:yu,config:vu,dlopen:Hy,uptime:Ky,_getActiveRequests:Vy,_getActiveHandles:$y,reallyExit:_u,_kill:Eu,cpuUsage:An,resourceUsage:wu,memoryUsage:Su,kill:Au,exit:Tu,openStdin:Iu,allowedNodeEnvironmentFlags:Ru,assert:qy,features:Ou,_fatalExceptions:Nu,setUncaughtExceptionCaptureCallback:Lu,hasUncaughtExceptionCaptureCallback:Yy,emitWarning:uu,nextTick:Wy,_tickCallback:Mu,_debugProcess:Pu,_debugEnd:Cu,_startProfilerIdleNotifier:Du,_stopProfilerIdleNotifier:ku,stdout:Uu,stdin:Bu,stderr:xu,abort:Fu,umask:fu,chdir:du,cwd:hu,env:iu,title:tu,argv:ou,execArgv:su,pid:ju,ppid:Wu,execPath:Gu,debugPort:Hu,hrtime:as,argv0:Vu,_preload_modules:$u,setSourceMapsEnabled:qu}});function zy(){if(cs)return In;cs=!0;var e=us;function t(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function r(n,i){for(var s="",a=0,l=-1,c=0,f,p=0;p<=n.length;++p){if(p<n.length)f=n.charCodeAt(p);else{if(f===47)break;f=47}if(f===47){if(!(l===p-1||c===1))if(l!==p-1&&c===2){if(s.length<2||a!==2||s.charCodeAt(s.length-1)!==46||s.charCodeAt(s.length-2)!==46){if(s.length>2){var m=s.lastIndexOf("/");if(m!==s.length-1){m===-1?(s="",a=0):(s=s.slice(0,m),a=s.length-1-s.lastIndexOf("/")),l=p,c=0;continue}}else if(s.length===2||s.length===1){s="",a=0,l=p,c=0;continue}}i&&(s.length>0?s+="/..":s="..",a=2)}else s.length>0?s+="/"+n.slice(l+1,p):s=n.slice(l+1,p),a=p-l-1;l=p,c=0}else f===46&&c!==-1?++c:c=-1}return s}function o(n,i){var s=i.dir||i.root,a=i.base||(i.name||"")+(i.ext||"");return s?s===i.root?s+a:s+n+a:a}var u={resolve:function(){for(var n="",i=!1,s,a=arguments.length-1;a>=-1&&!i;a--){var l;a>=0?l=arguments[a]:(s===void 0&&(s=e.cwd()),l=s),t(l),l.length!==0&&(n=l+"/"+n,i=l.charCodeAt(0)===47)}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(n){if(t(n),n.length===0)return".";var i=n.charCodeAt(0)===47,s=n.charCodeAt(n.length-1)===47;return n=r(n,!i),n.length===0&&!i&&(n="."),n.length>0&&s&&(n+="/"),i?"/"+n:n},isAbsolute:function(n){return t(n),n.length>0&&n.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var n,i=0;i<arguments.length;++i){var s=arguments[i];t(s),s.length>0&&(n===void 0?n=s:n+="/"+s)}return n===void 0?".":u.normalize(n)},relative:function(n,i){if(t(n),t(i),n===i||(n=u.resolve(n),i=u.resolve(i),n===i))return"";for(var s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var a=n.length,l=a-s,c=1;c<i.length&&i.charCodeAt(c)===47;++c);for(var f=i.length,p=f-c,m=l<p?l:p,h=-1,g=0;g<=m;++g){if(g===m){if(p>m){if(i.charCodeAt(c+g)===47)return i.slice(c+g+1);if(g===0)return i.slice(c+g)}else l>m&&(n.charCodeAt(s+g)===47?h=g:g===0&&(h=0));break}var y=n.charCodeAt(s+g),w=i.charCodeAt(c+g);if(y!==w)break;y===47&&(h=g)}var b="";for(g=s+h+1;g<=a;++g)(g===a||n.charCodeAt(g)===47)&&(b.length===0?b+="..":b+="/..");return b.length>0?b+i.slice(c+h):(c+=h,i.charCodeAt(c)===47&&++c,i.slice(c))},_makeLong:function(n){return n},dirname:function(n){if(t(n),n.length===0)return".";for(var i=n.charCodeAt(0),s=i===47,a=-1,l=!0,c=n.length-1;c>=1;--c)if(i=n.charCodeAt(c),i===47){if(!l){a=c;break}}else l=!1;return a===-1?s?"/":".":s&&a===1?"//":n.slice(0,a)},basename:function(n,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');t(n);var s=0,a=-1,l=!0,c;if(i!==void 0&&i.length>0&&i.length<=n.length){if(i.length===n.length&&i===n)return"";var f=i.length-1,p=-1;for(c=n.length-1;c>=0;--c){var m=n.charCodeAt(c);if(m===47){if(!l){s=c+1;break}}else p===-1&&(l=!1,p=c+1),f>=0&&(m===i.charCodeAt(f)?--f===-1&&(a=c):(f=-1,a=p))}return s===a?a=p:a===-1&&(a=n.length),n.slice(s,a)}else{for(c=n.length-1;c>=0;--c)if(n.charCodeAt(c)===47){if(!l){s=c+1;break}}else a===-1&&(l=!1,a=c+1);return a===-1?"":n.slice(s,a)}},extname:function(n){t(n);for(var i=-1,s=0,a=-1,l=!0,c=0,f=n.length-1;f>=0;--f){var p=n.charCodeAt(f);if(p===47){if(!l){s=f+1;break}continue}a===-1&&(l=!1,a=f+1),p===46?i===-1?i=f:c!==1&&(c=1):i!==-1&&(c=-1)}return i===-1||a===-1||c===0||c===1&&i===a-1&&i===s+1?"":n.slice(i,a)},format:function(n){if(n===null||typeof n!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof n);return o("/",n)},parse:function(n){t(n);var i={root:"",dir:"",base:"",ext:"",name:""};if(n.length===0)return i;var s=n.charCodeAt(0),a=s===47,l;a?(i.root="/",l=1):l=0;for(var c=-1,f=0,p=-1,m=!0,h=n.length-1,g=0;h>=l;--h){if(s=n.charCodeAt(h),s===47){if(!m){f=h+1;break}continue}p===-1&&(m=!1,p=h+1),s===46?c===-1?c=h:g!==1&&(g=1):c!==-1&&(g=-1)}return c===-1||p===-1||g===0||g===1&&c===p-1&&c===f+1?p!==-1&&(f===0&&a?i.base=i.name=n.slice(1,p):i.base=i.name=n.slice(f,p)):(f===0&&a?(i.name=n.slice(1,c),i.base=n.slice(1,p)):(i.name=n.slice(f,c),i.base=n.slice(f,p)),i.ext=n.slice(c,p)),f>0?i.dir=n.slice(0,f-1):a&&(i.dir="/"),i},sep:"/",delimiter:":",win32:null,posix:null};return u.posix=u,In=u,In}var In,cs,fs,Qy=rt(()=>{ue(),fe(),ce(),ic(),In={},cs=!1,fs=zy()}),oc={};dr(oc,{URL:()=>bc,Url:()=>fc,default:()=>ze,fileURLToPath:()=>ac,format:()=>hc,parse:()=>gc,pathToFileURL:()=>lc,resolve:()=>dc,resolveObject:()=>pc});function Jy(){if(ds)return Rn;ds=!0;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,o=e&&Map.prototype.forEach,u=typeof Set=="function"&&Set.prototype,n=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,i=u&&n&&typeof n.get=="function"?n.get:null,s=u&&Set.prototype.forEach,a=typeof WeakMap=="function"&&WeakMap.prototype,l=a?WeakMap.prototype.has:null,c=typeof WeakSet=="function"&&WeakSet.prototype,f=c?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype,m=p?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,g=Object.prototype.toString,y=Function.prototype.toString,w=String.prototype.match,b=String.prototype.slice,E=String.prototype.replace,T=String.prototype.toUpperCase,v=String.prototype.toLowerCase,A=RegExp.prototype.test,S=Array.prototype.concat,R=Array.prototype.join,C=Array.prototype.slice,M=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,H=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,j=typeof Symbol=="function"&&typeof Symbol.iterator=="object",x=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||!0)?Symbol.toStringTag:null,le=Object.prototype.propertyIsEnumerable,z=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(q){return q.__proto__}:null);function Y(q,oe){if(q===1/0||q===-1/0||q!==q||q&&q>-1e3&&q<1e3||A.call(/e/,oe))return oe;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof q=="number"){var Ne=q<0?-M(-q):M(q);if(Ne!==q){var Le=String(Ne),Ce=b.call(oe,Le.length+1);return E.call(Le,Oe,"$&_")+"."+E.call(E.call(Ce,/([0-9]{3})/g,"$&_"),/_$/,"")}}return E.call(oe,Oe,"$&_")}var ne=uc,W=ne.custom,ee=X(W)?W:null;Rn=function q(oe,Oe,Ne,Le){var Ce=Oe||{};if(se(Ce,"quoteStyle")&&Ce.quoteStyle!=="single"&&Ce.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(se(Ce,"maxStringLength")&&(typeof Ce.maxStringLength=="number"?Ce.maxStringLength<0&&Ce.maxStringLength!==1/0:Ce.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var vt=se(Ce,"customInspect")?Ce.customInspect:!0;if(typeof vt!="boolean"&&vt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(se(Ce,"indent")&&Ce.indent!==null&&Ce.indent!==" "&&!(parseInt(Ce.indent,10)===Ce.indent&&Ce.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(se(Ce,"numericSeparator")&&typeof Ce.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var _t=Ce.numericSeparator;if(typeof oe>"u")return"undefined";if(oe===null)return"null";if(typeof oe=="boolean")return oe?"true":"false";if(typeof oe=="string")return ae(oe,Ce);if(typeof oe=="number"){if(oe===0)return 1/0/oe>0?"0":"-0";var Qe=String(oe);return _t?Y(oe,Qe):Qe}if(typeof oe=="bigint"){var Et=String(oe)+"n";return _t?Y(oe,Et):Et}var Er=typeof Ce.depth>"u"?5:Ce.depth;if(typeof Ne>"u"&&(Ne=0),Ne>=Er&&Er>0&&typeof oe=="object")return ve(oe)?"[Array]":"[Object]";var wt=Z(Ce,Ne);if(typeof Le>"u")Le=[];else if(te(Le,oe)>=0)return"[Circular]";function ot(St,$t,or){if($t&&(Le=C.call(Le),Le.push($t)),or){var At={depth:Ce.depth};return se(Ce,"quoteStyle")&&(At.quoteStyle=Ce.quoteStyle),q(St,At,Ne+1,Le)}return q(St,Ce,Ne+1,Le)}if(typeof oe=="function"&&!we(oe)){var Wn=G(oe),wr=Ae(oe,ot);return"[Function"+(Wn?": "+Wn:" (anonymous)")+"]"+(wr.length>0?" { "+R.call(wr,", ")+" }":"")}if(X(oe)){var Fr=j?E.call(String(oe),/^(Symbol\(.*\))_[^)]*$/,"$1"):H.call(oe);return typeof oe=="object"&&!j?d(Fr):Fr}if(Ee(oe)){for(var L="<"+v.call(String(oe.nodeName)),k=oe.attributes||[],Se=0;Se<k.length;Se++)L+=" "+k[Se].name+"="+P(J(k[Se].value),"double",Ce);return L+=">",oe.childNodes&&oe.childNodes.length&&(L+="..."),L+="</"+v.call(String(oe.nodeName))+">",L}if(ve(oe)){if(oe.length===0)return"[]";var Te=Ae(oe,ot);return wt&&!B(Te)?"["+he(Te,wt)+"]":"[ "+R.call(Te,", ")+" ]"}if(K(oe)){var Re=Ae(oe,ot);return!("cause"in Error.prototype)&&"cause"in oe&&!le.call(oe,"cause")?"{ ["+String(oe)+"] "+R.call(S.call("[cause]: "+ot(oe.cause),Re),", ")+" }":Re.length===0?"["+String(oe)+"]":"{ ["+String(oe)+"] "+R.call(Re,", ")+" }"}if(typeof oe=="object"&&vt){if(ee&&typeof oe[ee]=="function"&&ne)return ne(oe,{depth:Er-Ne});if(vt!=="symbol"&&typeof oe.inspect=="function")return oe.inspect()}if(de(oe)){var He=[];return o&&o.call(oe,function(St,$t){He.push(ot($t,oe,!0)+" => "+ot(St,oe))}),I("Map",r.call(oe),He,wt)}if(V(oe)){var tt=[];return s&&s.call(oe,function(St){tt.push(ot(St,oe))}),I("Set",i.call(oe),tt,wt)}if(pe(oe))return _("WeakMap");if(be(oe))return _("WeakSet");if(_e(oe))return _("WeakRef");if(ie(oe))return d(ot(Number(oe)));if(Q(oe))return d(ot(F.call(oe)));if($(oe))return d(h.call(oe));if(U(oe))return d(ot(String(oe)));if(typeof window<"u"&&oe===window)return"{ [object Window] }";if(typeof globalThis<"u"&&oe===globalThis||typeof On<"u"&&oe===On)return"{ [object globalThis] }";if(!re(oe)&&!we(oe)){var pt=Ae(oe,ot),jr=z?z(oe)===Object.prototype:oe instanceof Object||oe.constructor===Object,Wr=oe instanceof Object?"":"null prototype",Gr=!jr&&x&&Object(oe)===oe&&x in oe?b.call(D(oe),8,-1):Wr?"Object":"",Gn=jr||typeof oe.constructor!="function"?"":oe.constructor.name?oe.constructor.name+" ":"",ir=Gn+(Gr||Wr?"["+R.call(S.call([],Gr||[],Wr||[]),": ")+"] ":"");return pt.length===0?ir+"{}":wt?ir+"{"+he(pt,wt)+"}":ir+"{ "+R.call(pt,", ")+" }"}return String(oe)};function P(q,oe,Oe){var Ne=(Oe.quoteStyle||oe)==="double"?'"':"'";return Ne+q+Ne}function J(q){return E.call(String(q),/"/g,""")}function ve(q){return D(q)==="[object Array]"&&(!x||!(typeof q=="object"&&x in q))}function re(q){return D(q)==="[object Date]"&&(!x||!(typeof q=="object"&&x in q))}function we(q){return D(q)==="[object RegExp]"&&(!x||!(typeof q=="object"&&x in q))}function K(q){return D(q)==="[object Error]"&&(!x||!(typeof q=="object"&&x in q))}function U(q){return D(q)==="[object String]"&&(!x||!(typeof q=="object"&&x in q))}function ie(q){return D(q)==="[object Number]"&&(!x||!(typeof q=="object"&&x in q))}function $(q){return D(q)==="[object Boolean]"&&(!x||!(typeof q=="object"&&x in q))}function X(q){if(j)return q&&typeof q=="object"&&q instanceof Symbol;if(typeof q=="symbol")return!0;if(!q||typeof q!="object"||!H)return!1;try{return H.call(q),!0}catch{}return!1}function Q(q){if(!q||typeof q!="object"||!F)return!1;try{return F.call(q),!0}catch{}return!1}var ye=Object.prototype.hasOwnProperty||function(q){return q in(this||On)};function se(q,oe){return ye.call(q,oe)}function D(q){return g.call(q)}function G(q){if(q.name)return q.name;var oe=w.call(y.call(q),/^function\s*([\w$]+)/);return oe?oe[1]:null}function te(q,oe){if(q.indexOf)return q.indexOf(oe);for(var Oe=0,Ne=q.length;Oe<Ne;Oe++)if(q[Oe]===oe)return Oe;return-1}function de(q){if(!r||!q||typeof q!="object")return!1;try{r.call(q);try{i.call(q)}catch{return!0}return q instanceof Map}catch{}return!1}function pe(q){if(!l||!q||typeof q!="object")return!1;try{l.call(q,l);try{f.call(q,f)}catch{return!0}return q instanceof WeakMap}catch{}return!1}function _e(q){if(!m||!q||typeof q!="object")return!1;try{return m.call(q),!0}catch{}return!1}function V(q){if(!i||!q||typeof q!="object")return!1;try{i.call(q);try{r.call(q)}catch{return!0}return q instanceof Set}catch{}return!1}function be(q){if(!f||!q||typeof q!="object")return!1;try{f.call(q,f);try{l.call(q,l)}catch{return!0}return q instanceof WeakSet}catch{}return!1}function Ee(q){return!q||typeof q!="object"?!1:typeof HTMLElement<"u"&&q instanceof HTMLElement?!0:typeof q.nodeName=="string"&&typeof q.getAttribute=="function"}function ae(q,oe){if(q.length>oe.maxStringLength){var Oe=q.length-oe.maxStringLength,Ne="... "+Oe+" more character"+(Oe>1?"s":"");return ae(b.call(q,0,oe.maxStringLength),oe)+Ne}var Le=E.call(E.call(q,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Me);return P(Le,"single",oe)}function Me(q){var oe=q.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[oe];return Oe?"\\"+Oe:"\\x"+(oe<16?"0":"")+T.call(oe.toString(16))}function d(q){return"Object("+q+")"}function _(q){return q+" { ? }"}function I(q,oe,Oe,Ne){var Le=Ne?he(Oe,Ne):R.call(Oe,", ");return q+" ("+oe+") {"+Le+"}"}function B(q){for(var oe=0;oe<q.length;oe++)if(te(q[oe],`
|
|
388
|
+
`)>=0)return!1;return!0}function Z(q,oe){var Oe;if(q.indent===" ")Oe=" ";else if(typeof q.indent=="number"&&q.indent>0)Oe=R.call(Array(q.indent+1)," ");else return null;return{base:Oe,prev:R.call(Array(oe+1),Oe)}}function he(q,oe){if(q.length===0)return"";var Oe=`
|
|
389
|
+
`+oe.prev+oe.base;return Oe+R.call(q,","+Oe)+`
|
|
390
|
+
`+oe.prev}function Ae(q,oe){var Oe=ve(q),Ne=[];if(Oe){Ne.length=q.length;for(var Le=0;Le<q.length;Le++)Ne[Le]=se(q,Le)?oe(q[Le],q):""}var Ce=typeof O=="function"?O(q):[],vt;if(j){vt={};for(var _t=0;_t<Ce.length;_t++)vt["$"+Ce[_t]]=Ce[_t]}for(var Qe in q)se(q,Qe)&&(Oe&&String(Number(Qe))===Qe&&Qe<q.length||j&&vt["$"+Qe]instanceof Symbol||(A.call(/[^\w$]/,Qe)?Ne.push(oe(Qe,q)+": "+oe(q[Qe],q)):Ne.push(Qe+": "+oe(q[Qe],q))));if(typeof O=="function")for(var Et=0;Et<Ce.length;Et++)le.call(q,Ce[Et])&&Ne.push("["+oe(Ce[Et])+"]: "+oe(q[Ce[Et]],q));return Ne}return Rn}function Zy(){if(ps)return Nn;ps=!0;var e=yr(),t=By(),r=Jy(),o=xr(),u=e("%WeakMap%",!0),n=e("%Map%",!0),i=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),a=t("WeakMap.prototype.has",!0),l=t("Map.prototype.get",!0),c=t("Map.prototype.set",!0),f=t("Map.prototype.has",!0),p=function(y,w){for(var b=y,E;(E=b.next)!==null;b=E)if(E.key===w)return b.next=E.next,E.next=y.next,y.next=E,E},m=function(y,w){var b=p(y,w);return b&&b.value},h=function(y,w,b){var E=p(y,w);E?E.value=b:y.next={key:w,next:y.next,value:b}},g=function(y,w){return!!p(y,w)};return Nn=function(){var y,w,b,E={assert:function(T){if(!E.has(T))throw new o("Side channel does not contain "+r(T))},get:function(T){if(u&&T&&(typeof T=="object"||typeof T=="function")){if(y)return i(y,T)}else if(n){if(w)return l(w,T)}else if(b)return m(b,T)},has:function(T){if(u&&T&&(typeof T=="object"||typeof T=="function")){if(y)return a(y,T)}else if(n){if(w)return f(w,T)}else if(b)return g(b,T);return!1},set:function(T,v){u&&T&&(typeof T=="object"||typeof T=="function")?(y||(y=new u),s(y,T,v)):n?(w||(w=new n),c(w,T,v)):(b||(b={key:{},next:null}),h(b,T,v))}};return E},Nn}function hs(){if(gs)return Ln;gs=!0;var e=String.prototype.replace,t=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Ln={default:r.RFC3986,formatters:{RFC1738:function(o){return e.call(o,t,"+")},RFC3986:function(o){return String(o)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},Ln}function sc(){if(bs)return Mn;bs=!0;var e=hs(),t=Object.prototype.hasOwnProperty,r=Array.isArray,o=(function(){for(var y=[],w=0;w<256;++w)y.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return y})(),u=function(y){for(;y.length>1;){var w=y.pop(),b=w.obj[w.prop];if(r(b)){for(var E=[],T=0;T<b.length;++T)typeof b[T]<"u"&&E.push(b[T]);w.obj[w.prop]=E}}},n=function(y,w){for(var b=w&&w.plainObjects?Object.create(null):{},E=0;E<y.length;++E)typeof y[E]<"u"&&(b[E]=y[E]);return b},i=function y(w,b,E){if(!b)return w;if(typeof b!="object"){if(r(w))w.push(b);else if(w&&typeof w=="object")(E&&(E.plainObjects||E.allowPrototypes)||!t.call(Object.prototype,b))&&(w[b]=!0);else return[w,b];return w}if(!w||typeof w!="object")return[w].concat(b);var T=w;return r(w)&&!r(b)&&(T=n(w,E)),r(w)&&r(b)?(b.forEach(function(v,A){if(t.call(w,A)){var S=w[A];S&&typeof S=="object"&&v&&typeof v=="object"?w[A]=y(S,v,E):w.push(v)}else w[A]=v}),w):Object.keys(b).reduce(function(v,A){var S=b[A];return t.call(v,A)?v[A]=y(v[A],S,E):v[A]=S,v},T)},s=function(y,w){return Object.keys(w).reduce(function(b,E){return b[E]=w[E],b},y)},a=function(y,w,b){var E=y.replace(/\+/g," ");if(b==="iso-8859-1")return E.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(E)}catch{return E}},l=1024,c=function(y,w,b,E,T){if(y.length===0)return y;var v=y;if(typeof y=="symbol"?v=Symbol.prototype.toString.call(y):typeof y!="string"&&(v=String(y)),b==="iso-8859-1")return escape(v).replace(/%u[0-9a-f]{4}/gi,function(O){return"%26%23"+parseInt(O.slice(2),16)+"%3B"});for(var A="",S=0;S<v.length;S+=l){for(var R=v.length>=l?v.slice(S,S+l):v,C=[],M=0;M<R.length;++M){var F=R.charCodeAt(M);if(F===45||F===46||F===95||F===126||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122||T===e.RFC1738&&(F===40||F===41)){C[C.length]=R.charAt(M);continue}if(F<128){C[C.length]=o[F];continue}if(F<2048){C[C.length]=o[192|F>>6]+o[128|F&63];continue}if(F<55296||F>=57344){C[C.length]=o[224|F>>12]+o[128|F>>6&63]+o[128|F&63];continue}M+=1,F=65536+((F&1023)<<10|R.charCodeAt(M)&1023),C[C.length]=o[240|F>>18]+o[128|F>>12&63]+o[128|F>>6&63]+o[128|F&63]}A+=C.join("")}return A},f=function(y){for(var w=[{obj:{o:y},prop:"o"}],b=[],E=0;E<w.length;++E)for(var T=w[E],v=T.obj[T.prop],A=Object.keys(v),S=0;S<A.length;++S){var R=A[S],C=v[R];typeof C=="object"&&C!==null&&b.indexOf(C)===-1&&(w.push({obj:v,prop:R}),b.push(C))}return u(w),y},p=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},m=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},h=function(y,w){return[].concat(y,w)},g=function(y,w){if(r(y)){for(var b=[],E=0;E<y.length;E+=1)b.push(w(y[E]));return b}return w(y)};return Mn={arrayToObject:n,assign:s,combine:h,compact:f,decode:a,encode:c,isBuffer:m,isRegExp:p,maybeMap:g,merge:i},Mn}function e0(){if(ms)return Pn;ms=!0;var e=Zy(),t=sc(),r=hs(),o=Object.prototype.hasOwnProperty,u={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,y){return g+"["+y+"]"},repeat:function(g){return g}},n=Array.isArray,i=Array.prototype.push,s=function(g,y){i.apply(g,n(y)?y:[y])},a=Date.prototype.toISOString,l=r.default,c={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,format:l,formatter:r.formatters[l],indices:!1,serializeDate:function(g){return a.call(g)},skipNulls:!1,strictNullHandling:!1},f=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},p={},m=function g(y,w,b,E,T,v,A,S,R,C,M,F,O,H,j,x,le,z){for(var Y=y,ne=z,W=0,ee=!1;(ne=ne.get(p))!==void 0&&!ee;){var P=ne.get(y);if(W+=1,typeof P<"u"){if(P===W)throw new RangeError("Cyclic object value");ee=!0}typeof ne.get(p)>"u"&&(W=0)}if(typeof C=="function"?Y=C(w,Y):Y instanceof Date?Y=O(Y):b==="comma"&&n(Y)&&(Y=t.maybeMap(Y,function(D){return D instanceof Date?O(D):D})),Y===null){if(v)return R&&!x?R(w,c.encoder,le,"key",H):w;Y=""}if(f(Y)||t.isBuffer(Y)){if(R){var J=x?w:R(w,c.encoder,le,"key",H);return[j(J)+"="+j(R(Y,c.encoder,le,"value",H))]}return[j(w)+"="+j(String(Y))]}var ve=[];if(typeof Y>"u")return ve;var re;if(b==="comma"&&n(Y))x&&R&&(Y=t.maybeMap(Y,R)),re=[{value:Y.length>0?Y.join(",")||null:void 0}];else if(n(C))re=C;else{var we=Object.keys(Y);re=M?we.sort(M):we}var K=S?w.replace(/\./g,"%2E"):w,U=E&&n(Y)&&Y.length===1?K+"[]":K;if(T&&n(Y)&&Y.length===0)return U+"[]";for(var ie=0;ie<re.length;++ie){var $=re[ie],X=typeof $=="object"&&typeof $.value<"u"?$.value:Y[$];if(!(A&&X===null)){var Q=F&&S?$.replace(/\./g,"%2E"):$,ye=n(Y)?typeof b=="function"?b(U,Q):U:U+(F?"."+Q:"["+Q+"]");z.set(y,W);var se=e();se.set(p,z),s(ve,g(X,ye,b,E,T,v,A,S,b==="comma"&&x&&n(Y)?null:R,C,M,F,O,H,j,x,le,se))}}return ve},h=function(g){if(!g)return c;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.encodeDotInKeys<"u"&&typeof g.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=g.charset||c.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var w=r.default;if(typeof g.format<"u"){if(!o.call(r.formatters,g.format))throw new TypeError("Unknown format option provided.");w=g.format}var b=r.formatters[w],E=c.filter;(typeof g.filter=="function"||n(g.filter))&&(E=g.filter);var T;if(g.arrayFormat in u?T=g.arrayFormat:"indices"in g?T=g.indices?"indices":"repeat":T=c.arrayFormat,"commaRoundTrip"in g&&typeof g.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var v=typeof g.allowDots>"u"?g.encodeDotInKeys===!0?!0:c.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:c.addQueryPrefix,allowDots:v,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:c.allowEmptyArrays,arrayFormat:T,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:c.charsetSentinel,commaRoundTrip:g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?c.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:c.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:c.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:c.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:c.encodeValuesOnly,filter:E,format:w,formatter:b,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:c.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:c.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:c.strictNullHandling}};return Pn=function(g,y){var w=g,b=h(y),E,T;typeof b.filter=="function"?(T=b.filter,w=T("",w)):n(b.filter)&&(T=b.filter,E=T);var v=[];if(typeof w!="object"||w===null)return"";var A=u[b.arrayFormat],S=A==="comma"&&b.commaRoundTrip;E||(E=Object.keys(w)),b.sort&&E.sort(b.sort);for(var R=e(),C=0;C<E.length;++C){var M=E[C];b.skipNulls&&w[M]===null||s(v,m(w[M],M,A,S,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,R))}var F=v.join(b.delimiter),O=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?O+="utf8=%26%2310003%3B&":O+="utf8=%E2%9C%93&"),F.length>0?O+F:""},Pn}function t0(){if(ys)return Cn;ys=!0;var e=sc(),t=Object.prototype.hasOwnProperty,r=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},u=function(p){return p.replace(/&#(\d+);/g,function(m,h){return String.fromCharCode(parseInt(h,10))})},n=function(p,m){return p&&typeof p=="string"&&m.comma&&p.indexOf(",")>-1?p.split(","):p},i="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",a=function(p,m){var h={__proto__:null},g=m.ignoreQueryPrefix?p.replace(/^\?/,""):p;g=g.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=m.parameterLimit===1/0?void 0:m.parameterLimit,w=g.split(m.delimiter,y),b=-1,E,T=m.charset;if(m.charsetSentinel)for(E=0;E<w.length;++E)w[E].indexOf("utf8=")===0&&(w[E]===s?T="utf-8":w[E]===i&&(T="iso-8859-1"),b=E,E=w.length);for(E=0;E<w.length;++E)if(E!==b){var v=w[E],A=v.indexOf("]="),S=A===-1?v.indexOf("="):A+1,R,C;S===-1?(R=m.decoder(v,o.decoder,T,"key"),C=m.strictNullHandling?null:""):(R=m.decoder(v.slice(0,S),o.decoder,T,"key"),C=e.maybeMap(n(v.slice(S+1),m),function(F){return m.decoder(F,o.decoder,T,"value")})),C&&m.interpretNumericEntities&&T==="iso-8859-1"&&(C=u(C)),v.indexOf("[]=")>-1&&(C=r(C)?[C]:C);var M=t.call(h,R);M&&m.duplicates==="combine"?h[R]=e.combine(h[R],C):(!M||m.duplicates==="last")&&(h[R]=C)}return h},l=function(p,m,h,g){for(var y=g?m:n(m,h),w=p.length-1;w>=0;--w){var b,E=p[w];if(E==="[]"&&h.parseArrays)b=h.allowEmptyArrays&&(y===""||h.strictNullHandling&&y===null)?[]:[].concat(y);else{b=h.plainObjects?Object.create(null):{};var T=E.charAt(0)==="["&&E.charAt(E.length-1)==="]"?E.slice(1,-1):E,v=h.decodeDotInKeys?T.replace(/%2E/g,"."):T,A=parseInt(v,10);!h.parseArrays&&v===""?b={0:y}:!isNaN(A)&&E!==v&&String(A)===v&&A>=0&&h.parseArrays&&A<=h.arrayLimit?(b=[],b[A]=y):v!=="__proto__"&&(b[v]=y)}y=b}return y},c=function(p,m,h,g){if(p){var y=h.allowDots?p.replace(/\.([^.[]+)/g,"[$1]"):p,w=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,E=h.depth>0&&w.exec(y),T=E?y.slice(0,E.index):y,v=[];if(T){if(!h.plainObjects&&t.call(Object.prototype,T)&&!h.allowPrototypes)return;v.push(T)}for(var A=0;h.depth>0&&(E=b.exec(y))!==null&&A<h.depth;){if(A+=1,!h.plainObjects&&t.call(Object.prototype,E[1].slice(1,-1))&&!h.allowPrototypes)return;v.push(E[1])}if(E){if(h.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+h.depth+" and strictDepth is true");v.push("["+y.slice(E.index)+"]")}return l(v,m,h,g)}},f=function(p){if(!p)return o;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.decodeDotInKeys<"u"&&typeof p.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(p.decoder!==null&&typeof p.decoder<"u"&&typeof p.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var m=typeof p.charset>"u"?o.charset:p.charset,h=typeof p.duplicates>"u"?o.duplicates:p.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var g=typeof p.allowDots>"u"?p.decodeDotInKeys===!0?!0:o.allowDots:!!p.allowDots;return{allowDots:g,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:typeof p.allowPrototypes=="boolean"?p.allowPrototypes:o.allowPrototypes,allowSparse:typeof p.allowSparse=="boolean"?p.allowSparse:o.allowSparse,arrayLimit:typeof p.arrayLimit=="number"?p.arrayLimit:o.arrayLimit,charset:m,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:o.charsetSentinel,comma:typeof p.comma=="boolean"?p.comma:o.comma,decodeDotInKeys:typeof p.decodeDotInKeys=="boolean"?p.decodeDotInKeys:o.decodeDotInKeys,decoder:typeof p.decoder=="function"?p.decoder:o.decoder,delimiter:typeof p.delimiter=="string"||e.isRegExp(p.delimiter)?p.delimiter:o.delimiter,depth:typeof p.depth=="number"||p.depth===!1?+p.depth:o.depth,duplicates:h,ignoreQueryPrefix:p.ignoreQueryPrefix===!0,interpretNumericEntities:typeof p.interpretNumericEntities=="boolean"?p.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:typeof p.parameterLimit=="number"?p.parameterLimit:o.parameterLimit,parseArrays:p.parseArrays!==!1,plainObjects:typeof p.plainObjects=="boolean"?p.plainObjects:o.plainObjects,strictDepth:typeof p.strictDepth=="boolean"?!!p.strictDepth:o.strictDepth,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:o.strictNullHandling}};return Cn=function(p,m){var h=f(m);if(p===""||p===null||typeof p>"u")return h.plainObjects?Object.create(null):{};for(var g=typeof p=="string"?a(p,h):p,y=h.plainObjects?Object.create(null):{},w=Object.keys(g),b=0;b<w.length;++b){var E=w[b],T=c(E,g[E],h,typeof p=="string");y=e.merge(y,T,h)}return h.allowSparse===!0?y:e.compact(y)},Cn}function r0(){if(vs)return Dn;vs=!0;var e=e0(),t=t0(),r=hs();return Dn={formats:r,parse:t,stringify:e},Dn}function n0(){if(_s)return Vt;_s=!0;var e=Gt;function t(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var r=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,n=["<",">",'"',"`"," ","\r",`
|
|
391
|
+
`," "],i=["{","}","|","\\","^","`"].concat(n),s=["'"].concat(i),a=["%","/","?",";","#"].concat(s),l=["/","?","#"],c=255,f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},h={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r0();function w(v,A,S){if(v&&typeof v=="object"&&v instanceof t)return v;var R=new t;return R.parse(v,A,S),R}t.prototype.parse=function(v,A,S){if(typeof v!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof v);var R=v.indexOf("?"),C=R!==-1&&R<v.indexOf("#")?"?":"#",M=v.split(C),F=/\\/g;M[0]=M[0].replace(F,"/"),v=M.join(C);var O=v;if(O=O.trim(),!S&&v.split("#").length===1){var H=u.exec(O);if(H)return this.path=O,this.href=O,this.pathname=H[1],H[2]?(this.search=H[2],A?this.query=y.parse(this.search.substr(1)):this.query=this.search.substr(1)):A&&(this.search="",this.query={}),this}var j=r.exec(O);if(j){j=j[0];var x=j.toLowerCase();this.protocol=x,O=O.substr(j.length)}if(S||j||O.match(/^\/\/[^@/]+@[^@/]+/)){var le=O.substr(0,2)==="//";le&&!(j&&h[j])&&(O=O.substr(2),this.slashes=!0)}if(!h[j]&&(le||j&&!g[j])){for(var z=-1,Y=0;Y<l.length;Y++){var ne=O.indexOf(l[Y]);ne!==-1&&(z===-1||ne<z)&&(z=ne)}var W,ee;z===-1?ee=O.lastIndexOf("@"):ee=O.lastIndexOf("@",z),ee!==-1&&(W=O.slice(0,ee),O=O.slice(ee+1),this.auth=decodeURIComponent(W)),z=-1;for(var Y=0;Y<a.length;Y++){var ne=O.indexOf(a[Y]);ne!==-1&&(z===-1||ne<z)&&(z=ne)}z===-1&&(z=O.length),this.host=O.slice(0,z),O=O.slice(z),this.parseHost(),this.hostname=this.hostname||"";var P=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!P)for(var J=this.hostname.split(/\./),Y=0,ve=J.length;Y<ve;Y++){var re=J[Y];if(re&&!re.match(f)){for(var we="",K=0,U=re.length;K<U;K++)re.charCodeAt(K)>127?we+="x":we+=re[K];if(!we.match(f)){var ie=J.slice(0,Y),$=J.slice(Y+1),X=re.match(p);X&&(ie.push(X[1]),$.unshift(X[2])),$.length&&(O="/"+$.join(".")+O),this.hostname=ie.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=e.toASCII(this.hostname));var Q=this.port?":"+this.port:"",ye=this.hostname||"";this.host=ye+Q,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),O[0]!=="/"&&(O="/"+O))}if(!m[x])for(var Y=0,ve=s.length;Y<ve;Y++){var se=s[Y];if(O.indexOf(se)!==-1){var D=encodeURIComponent(se);D===se&&(D=escape(se)),O=O.split(se).join(D)}}var G=O.indexOf("#");G!==-1&&(this.hash=O.substr(G),O=O.slice(0,G));var te=O.indexOf("?");if(te!==-1?(this.search=O.substr(te),this.query=O.substr(te+1),A&&(this.query=y.parse(this.query)),O=O.slice(0,te)):A&&(this.search="",this.query={}),O&&(this.pathname=O),g[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Q=this.pathname||"",de=this.search||"";this.path=Q+de}return this.href=this.format(),this};function b(v){return typeof v=="string"&&(v=w(v)),v instanceof t?v.format():t.prototype.format.call(v)}t.prototype.format=function(){var v=this.auth||"";v&&(v=encodeURIComponent(v),v=v.replace(/%3A/i,":"),v+="@");var A=this.protocol||"",S=this.pathname||"",R=this.hash||"",C=!1,M="";this.host?C=v+this.host:this.hostname&&(C=v+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(C+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(M=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var F=this.search||M&&"?"+M||"";return A&&A.substr(-1)!==":"&&(A+=":"),this.slashes||(!A||g[A])&&C!==!1?(C="//"+(C||""),S&&S.charAt(0)!=="/"&&(S="/"+S)):C||(C=""),R&&R.charAt(0)!=="#"&&(R="#"+R),F&&F.charAt(0)!=="?"&&(F="?"+F),S=S.replace(/[?#]/g,function(O){return encodeURIComponent(O)}),F=F.replace("#","%23"),A+C+S+F+R};function E(v,A){return w(v,!1,!0).resolve(A)}t.prototype.resolve=function(v){return this.resolveObject(w(v,!1,!0)).format()};function T(v,A){return v?w(v,!1,!0).resolveObject(A):A}return t.prototype.resolveObject=function(v){if(typeof v=="string"){var A=new t;A.parse(v,!1,!0),v=A}for(var S=new t,R=Object.keys(this),C=0;C<R.length;C++){var M=R[C];S[M]=this[M]}if(S.hash=v.hash,v.href==="")return S.href=S.format(),S;if(v.slashes&&!v.protocol){for(var F=Object.keys(v),O=0;O<F.length;O++){var H=F[O];H!=="protocol"&&(S[H]=v[H])}return g[S.protocol]&&S.hostname&&!S.pathname&&(S.pathname="/",S.path=S.pathname),S.href=S.format(),S}if(v.protocol&&v.protocol!==S.protocol){if(!g[v.protocol]){for(var j=Object.keys(v),x=0;x<j.length;x++){var le=j[x];S[le]=v[le]}return S.href=S.format(),S}if(S.protocol=v.protocol,!v.host&&!h[v.protocol]){for(var ve=(v.pathname||"").split("/");ve.length&&!(v.host=ve.shift()););v.host||(v.host=""),v.hostname||(v.hostname=""),ve[0]!==""&&ve.unshift(""),ve.length<2&&ve.unshift(""),S.pathname=ve.join("/")}else S.pathname=v.pathname;if(S.search=v.search,S.query=v.query,S.host=v.host||"",S.auth=v.auth,S.hostname=v.hostname||v.host,S.port=v.port,S.pathname||S.search){var z=S.pathname||"",Y=S.search||"";S.path=z+Y}return S.slashes=S.slashes||v.slashes,S.href=S.format(),S}var ne=S.pathname&&S.pathname.charAt(0)==="/",W=v.host||v.pathname&&v.pathname.charAt(0)==="/",ee=W||ne||S.host&&v.pathname,P=ee,J=S.pathname&&S.pathname.split("/")||[],ve=v.pathname&&v.pathname.split("/")||[],re=S.protocol&&!g[S.protocol];if(re&&(S.hostname="",S.port=null,S.host&&(J[0]===""?J[0]=S.host:J.unshift(S.host)),S.host="",v.protocol&&(v.hostname=null,v.port=null,v.host&&(ve[0]===""?ve[0]=v.host:ve.unshift(v.host)),v.host=null),ee=ee&&(ve[0]===""||J[0]==="")),W)S.host=v.host||v.host===""?v.host:S.host,S.hostname=v.hostname||v.hostname===""?v.hostname:S.hostname,S.search=v.search,S.query=v.query,J=ve;else if(ve.length)J||(J=[]),J.pop(),J=J.concat(ve),S.search=v.search,S.query=v.query;else if(v.search!=null){if(re){S.host=J.shift(),S.hostname=S.host;var we=S.host&&S.host.indexOf("@")>0?S.host.split("@"):!1;we&&(S.auth=we.shift(),S.hostname=we.shift(),S.host=S.hostname)}return S.search=v.search,S.query=v.query,(S.pathname!==null||S.search!==null)&&(S.path=(S.pathname?S.pathname:"")+(S.search?S.search:"")),S.href=S.format(),S}if(!J.length)return S.pathname=null,S.search?S.path="/"+S.search:S.path=null,S.href=S.format(),S;for(var K=J.slice(-1)[0],U=(S.host||v.host||J.length>1)&&(K==="."||K==="..")||K==="",ie=0,$=J.length;$>=0;$--)K=J[$],K==="."?J.splice($,1):K===".."?(J.splice($,1),ie++):ie&&(J.splice($,1),ie--);if(!ee&&!P)for(;ie--;ie)J.unshift("..");ee&&J[0]!==""&&(!J[0]||J[0].charAt(0)!=="/")&&J.unshift(""),U&&J.join("/").substr(-1)!=="/"&&J.push("");var X=J[0]===""||J[0]&&J[0].charAt(0)==="/";if(re){S.hostname=X?"":J.length?J.shift():"",S.host=S.hostname;var we=S.host&&S.host.indexOf("@")>0?S.host.split("@"):!1;we&&(S.auth=we.shift(),S.hostname=we.shift(),S.host=S.hostname)}return ee=ee||S.host&&J.length,ee&&!X&&J.unshift(""),J.length>0?S.pathname=J.join("/"):(S.pathname=null,S.path=null),(S.pathname!==null||S.search!==null)&&(S.path=(S.pathname?S.pathname:"")+(S.search?S.search:"")),S.auth=v.auth||S.auth,S.slashes=S.slashes||v.slashes,S.href=S.format(),S},t.prototype.parseHost=function(){var v=this.host,A=o.exec(v);A&&(A=A[0],A!==":"&&(this.port=A.substr(1)),v=v.substr(0,v.length-A.length)),v&&(this.hostname=v)},Vt.parse=w,Vt.resolve=E,Vt.resolveObject=T,Vt.format=b,Vt.Url=t,Vt}function ac(e){if(typeof e=="string")e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if(e.protocol!=="file:")throw new Deno.errors.InvalidData("invalid url scheme");return kn?i0(e):o0(e)}function i0(e){let t=e.hostname,r=e.pathname;for(let o=0;o<r.length;o++)if(r[o]==="%"){let u=r.codePointAt(o+2)||32;if(r[o+1]==="2"&&u===102||r[o+1]==="5"&&u===99)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(r=r.replace(Ec,"\\"),r=decodeURIComponent(r),t!=="")return`\\\\${t}${r}`;{let o=r.codePointAt(1)|32,u=r[2];if(o<vc||o>_c||u!==":")throw new Deno.errors.InvalidData("file url path must be absolute");return r.slice(1)}}function o0(e){if(e.hostname!=="")throw new Deno.errors.InvalidData("invalid file url hostname");let t=e.pathname;for(let r=0;r<t.length;r++)if(t[r]==="%"){let o=t.codePointAt(r+2)||32;if(t[r+1]==="2"&&o===102)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(t)}function lc(e){let t=fs.resolve(e),r=e.charCodeAt(e.length-1);(r===yc||kn&&r===mc)&&t[t.length-1]!==fs.sep&&(t+="/");let o=new URL("file://");return t.includes("%")&&(t=t.replace(wc,"%25")),!kn&&t.includes("\\")&&(t=t.replace(Sc,"%5C")),t.includes(`
|
|
392
|
+
`)&&(t=t.replace(Ac,"%0A")),t.includes("\r")&&(t=t.replace(Tc,"%0D")),t.includes(" ")&&(t=t.replace(Ic,"%09")),o.pathname=t,o}var uc,Rn,ds,On,Nn,ps,Ln,gs,Mn,bs,Pn,ms,Cn,ys,Dn,vs,Vt,_s,ze,cc,fc,hc,dc,pc,gc,bc,mc,yc,vc,_c,kn,Ec,wc,Sc,Ac,Tc,Ic,s0=rt(()=>{ue(),fe(),ce(),Sy(),Fy(),Qy(),ic(),uc=Object.freeze(Object.create(null)),Rn={},ds=!1,On=typeof globalThis<"u"?globalThis:typeof self<"u"?self:global,Nn={},ps=!1,Ln={},gs=!1,Mn={},bs=!1,Pn={},ms=!1,Cn={},ys=!1,Dn={},vs=!1,Vt={},_s=!1,ze=n0(),ze.parse,ze.resolve,ze.resolveObject,ze.format,ze.Url,cc=typeof Deno<"u"?Deno.build.os==="windows"?"win32":Deno.build.os:void 0,ze.URL=typeof URL<"u"?URL:null,ze.pathToFileURL=lc,ze.fileURLToPath=ac,fc=ze.Url,hc=ze.format,dc=ze.resolve,pc=ze.resolveObject,gc=ze.parse,bc=ze.URL,mc=92,yc=47,vc=97,_c=122,kn=cc==="win32",Ec=/\//g,wc=/%/g,Sc=/\\/g,Ac=/\n/g,Tc=/\r/g,Ic=/\t/g}),a0=ge((e,t)=>{ue(),fe(),ce(),t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),Es=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=void 0,e.writev=o;var t=Jt(),r=($e(),Ue(Ve));function o(n,i){let s=new Array(n.length);for(let a=0;a<n.length;a++)typeof n[a].chunk=="string"?s[a]=r.Buffer.from(n[a].chunk,"utf8"):s[a]=n[a].chunk;this._write(r.Buffer.concat(s),"binary",i)}var u=class extends t.Duplex{socket;proxy;isSocketOpen;writeQueue;constructor(n,i,s){super({objectMode:!0}),this.proxy=i,this.socket=s,this.writeQueue=[],n.objectMode||(this._writev=o.bind(this)),this.isSocketOpen=!1,this.proxy.on("data",a=>{!this.destroyed&&this.readable&&this.push(a)})}_read(n){this.proxy.read(n)}_write(n,i,s){this.isSocketOpen?this.writeToProxy(n,i,s):this.writeQueue.push({chunk:n,encoding:i,cb:s})}_final(n){this.writeQueue=[],this.proxy.end(n)}_destroy(n,i){this.writeQueue=[],this.proxy.destroy(),i(n)}socketReady(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}writeToProxy(n,i,s){this.proxy.write(n,i)===!1?this.proxy.once("drain",s):s()}processWriteQueue(){for(;this.writeQueue.length>0;){let{chunk:n,encoding:i,cb:s}=this.writeQueue.shift();this.writeToProxy(n,i,s)}}};e.BufferedDuplex=u}),Un=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var r=($e(),Ue(Ve)),o=t(a0()),u=t(Mt()),n=Jt(),i=t(cn()),s=Es(),a=(0,u.default)("mqttjs:ws"),l=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];function c(w,b){let E=`${w.protocol}://${w.hostname}:${w.port}${w.path}`;return typeof w.transformWsUrl=="function"&&(E=w.transformWsUrl(E,w,b)),E}function f(w){let b=w;return w.port||(w.protocol==="wss"?b.port=443:b.port=80),w.path||(b.path="/"),w.wsOptions||(b.wsOptions={}),!i.default&&!w.forceNativeWebSocket&&w.protocol==="wss"&&l.forEach(E=>{Object.prototype.hasOwnProperty.call(w,E)&&!Object.prototype.hasOwnProperty.call(w.wsOptions,E)&&(b.wsOptions[E]=w[E])}),b}function p(w){let b=f(w);if(b.hostname||(b.hostname=b.host),!b.hostname){if(typeof document>"u")throw new Error("Could not determine host. Specify host manually.");let E=new URL(document.URL);b.hostname=E.hostname,b.port||(b.port=Number(E.port))}return b.objectMode===void 0&&(b.objectMode=!(b.binary===!0||b.binary===void 0)),b}function m(w,b,E){a("createWebSocket"),a(`protocol: ${E.protocolId} ${E.protocolVersion}`);let T=E.protocolId==="MQIsdp"&&E.protocolVersion===3?"mqttv3.1":"mqtt";a(`creating new Websocket for url: ${b} and protocol: ${T}`);let v;return E.createWebsocket?v=E.createWebsocket(b,[T],E):v=new o.default(b,[T],E.wsOptions),v}function h(w,b){let E=b.protocolId==="MQIsdp"&&b.protocolVersion===3?"mqttv3.1":"mqtt",T=c(b,w),v;return b.createWebsocket?v=b.createWebsocket(T,[E],b):v=new WebSocket(T,[E]),v.binaryType="arraybuffer",v}var g=(w,b)=>{a("streamBuilder");let E=f(b);E.hostname=E.hostname||E.host||"localhost";let T=c(E,w),v=m(w,T,E),A=o.default.createWebSocketStream(v,E.wsOptions);return A.url=T,v.on("close",()=>{A.destroy()}),A};e.streamBuilder=g;var y=(w,b)=>{a("browserStreamBuilder");let E,T=p(b).browserBufferSize||1024*512,v=b.browserBufferTimeout||1e3,A=!b.objectMode,S=h(w,b),R=M(b,x,le);b.objectMode||(R._writev=s.writev.bind(R)),R.on("close",()=>{S.close()});let C=typeof S.addEventListener<"u";S.readyState===S.OPEN?(E=R,E.socket=S):(E=new s.BufferedDuplex(b,R,S),C?S.addEventListener("open",F):S.onopen=F),C?(S.addEventListener("close",O),S.addEventListener("error",H),S.addEventListener("message",j)):(S.onclose=O,S.onerror=H,S.onmessage=j);function M(z,Y,ne){let W=new n.Transform({objectMode:z.objectMode});return W._write=Y,W._flush=ne,W}function F(){a("WebSocket onOpen"),E instanceof s.BufferedDuplex&&E.socketReady()}function O(z){a("WebSocket onClose",z),E.end(),E.destroy()}function H(z){a("WebSocket onError",z);let Y=new Error("WebSocket error");Y.event=z,E.destroy(Y)}async function j(z){if(!R||!R.readable||!R.writable)return;let{data:Y}=z;Y instanceof ArrayBuffer?Y=r.Buffer.from(Y):Y instanceof Blob?Y=r.Buffer.from(await new Response(Y).arrayBuffer()):Y=r.Buffer.from(Y,"utf8"),R.push(Y)}function x(z,Y,ne){if(S.bufferedAmount>T){setTimeout(x,v,z,Y,ne);return}A&&typeof z=="string"&&(z=r.Buffer.from(z,"utf8"));try{S.send(z)}catch(W){return ne(W)}ne()}function le(z){S.close(),z()}return E};e.browserStreamBuilder=y}),ws={};dr(ws,{Server:()=>je,Socket:()=>je,Stream:()=>je,_createServerHandle:()=>je,_normalizeArgs:()=>je,_setSimultaneousAccepts:()=>je,connect:()=>je,createConnection:()=>je,createServer:()=>je,default:()=>Rc,isIP:()=>je,isIPv4:()=>je,isIPv6:()=>je});function je(){throw new Error("Node.js net module is not supported by JSPM core outside of Node.js")}var Rc,Oc=rt(()=>{ue(),fe(),ce(),Rc={_createServerHandle:je,_normalizeArgs:je,_setSimultaneousAccepts:je,connect:je,createConnection:je,createServer:je,isIP:je,isIPv4:je,isIPv6:je,Server:je,Socket:je,Stream:je}}),Nc=ge((e,t)=>{ue(),fe(),ce(),t.exports={}}),Lc=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0});var r=t((Oc(),Ue(ws))),o=t(Mt()),u=t(Nc()),n=(0,o.default)("mqttjs:tcp"),i=(s,a)=>{if(a.port=a.port||1883,a.hostname=a.hostname||a.host||"localhost",a.socksProxy)return(0,u.default)(a.hostname,a.port,a.socksProxy,{timeout:a.socksTimeout});let{port:l,path:c}=a,f=a.hostname;return n("port %d and host %s",l,f),r.default.createConnection({port:l,host:f,path:c})};e.default=i}),Mc={};dr(Mc,{default:()=>Pc});var Pc,l0=rt(()=>{ue(),fe(),ce(),Pc={}}),Cc=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0});var r=(l0(),Ue(Mc)),o=t((Oc(),Ue(ws))),u=t(Mt()),n=t(Nc()),i=(0,u.default)("mqttjs:tls");function s(l){let{host:c,port:f,socksProxy:p,...m}=l;if(p!==void 0){let h=(0,n.default)(c,f,p,{timeout:l.socksTimeout});return(0,r.connect)({...m,socket:h})}return(0,r.connect)(l)}var a=(l,c)=>{c.port=c.port||8883,c.host=c.hostname||c.host||"localhost",o.default.isIP(c.host)===0&&(c.servername=c.host),c.rejectUnauthorized=c.rejectUnauthorized!==!1,delete c.path,i("port %d host %s rejectUnauthorized %b",c.port,c.host,c.rejectUnauthorized);let f=s(c);f.on("secureConnect",()=>{c.rejectUnauthorized&&!f.authorized?f.emit("error",new Error("TLS not authorized")):f.removeListener("error",p)});function p(m){c.rejectUnauthorized&&l.emit("error",m),f.end()}return f.on("error",p),f};e.default=a}),Dc=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=($e(),Ue(Ve)),r=Jt(),o=Es(),u,n,i;function s(){let p=new r.Transform;return p._write=(m,h,g)=>{u.send({data:m.buffer,success(){g()},fail(y){g(new Error(y))}})},p._flush=m=>{u.close({success(){m()}})},p}function a(p){p.hostname||(p.hostname="localhost"),p.path||(p.path="/"),p.wsOptions||(p.wsOptions={})}function l(p,m){let h=p.protocol==="wxs"?"wss":"ws",g=`${h}://${p.hostname}${p.path}`;return p.port&&p.port!==80&&p.port!==443&&(g=`${h}://${p.hostname}:${p.port}${p.path}`),typeof p.transformWsUrl=="function"&&(g=p.transformWsUrl(g,p,m)),g}function c(){u.onOpen(()=>{i.socketReady()}),u.onMessage(p=>{let{data:m}=p;m instanceof ArrayBuffer?m=t.Buffer.from(m):m=t.Buffer.from(m,"utf8"),n.push(m)}),u.onClose(()=>{i.emit("close"),i.end(),i.destroy()}),u.onError(p=>{let m=new Error(p.errMsg);i.destroy(m)})}var f=(p,m)=>{if(m.hostname=m.hostname||m.host,!m.hostname)throw new Error("Could not determine host. Specify host manually.");let h=m.protocolId==="MQIsdp"&&m.protocolVersion===3?"mqttv3.1":"mqtt";a(m);let g=l(m,p);u=wx.connectSocket({url:g,protocols:[h]}),n=s(),i=new o.BufferedDuplex(m,n,u),i._destroy=(w,b)=>{u.close({success(){b&&b(w)}})};let y=i.destroy;return i.destroy=(w,b)=>(i.destroy=y,setTimeout(()=>{u.close({fail(){i._destroy(w,b)}})},0),i),c(),i};e.default=f}),kc=ge(e=>{ue(),fe(),ce(),Object.defineProperty(e,"__esModule",{value:!0});var t=($e(),Ue(Ve)),r=Jt(),o=Es(),u,n,i,s=!1;function a(){let m=new r.Transform;return m._write=(h,g,y)=>{u.sendSocketMessage({data:h.buffer,success(){y()},fail(){y(new Error)}})},m._flush=h=>{u.closeSocket({success(){h()}})},m}function l(m){m.hostname||(m.hostname="localhost"),m.path||(m.path="/"),m.wsOptions||(m.wsOptions={})}function c(m,h){let g=m.protocol==="alis"?"wss":"ws",y=`${g}://${m.hostname}${m.path}`;return m.port&&m.port!==80&&m.port!==443&&(y=`${g}://${m.hostname}:${m.port}${m.path}`),typeof m.transformWsUrl=="function"&&(y=m.transformWsUrl(y,m,h)),y}function f(){s||(s=!0,u.onSocketOpen(()=>{i.socketReady()}),u.onSocketMessage(m=>{if(typeof m.data=="string"){let h=t.Buffer.from(m.data,"base64");n.push(h)}else{let h=new FileReader;h.addEventListener("load",()=>{if(h.result instanceof ArrayBuffer){n.push(t.Buffer.from(h.result));return}n.push(t.Buffer.from(h.result,"utf-8"))}),h.readAsArrayBuffer(m.data)}}),u.onSocketClose(()=>{i.end(),i.destroy()}),u.onSocketError(m=>{i.destroy(m)}))}var p=(m,h)=>{if(h.hostname=h.hostname||h.host,!h.hostname)throw new Error("Could not determine host. Specify host manually.");let g=h.protocolId==="MQIsdp"&&h.protocolVersion===3?"mqttv3.1":"mqtt";l(h);let y=c(h,m);return u=h.my,u.connectSocket({url:y,protocols:g}),n=a(),i=new o.BufferedDuplex(h,n,u),f(),i};e.default=p}),u0=ge(e=>{ue(),fe(),ce();var t=e&&e.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.connectAsync=c;var r=t(Mt()),o=t((s0(),Ue(oc))),u=t(Ro()),n=t(cn());typeof Be?.nextTick!="function"&&(Be.nextTick=setImmediate);var i=(0,r.default)("mqttjs"),s=null;function a(f){let p;if(f.auth)if(p=f.auth.match(/^(.+):(.+)$/),p){let[,m,h]=p;f.username=m,f.password=h}else f.username=f.auth}function l(f,p){if(i("connecting to an MQTT broker..."),typeof f=="object"&&!p&&(p=f,f=""),p=p||{},f&&typeof f=="string"){let g=o.default.parse(f,!0),y={};if(g.port!=null&&(y.port=Number(g.port)),y.host=g.hostname,y.query=g.query,y.auth=g.auth,y.protocol=g.protocol,y.path=g.path,p={...y,...p},!p.protocol)throw new Error("Missing protocol");p.protocol=p.protocol.replace(/:$/,"")}if(p.unixSocket=p.unixSocket||p.protocol?.includes("+unix"),p.unixSocket?p.protocol=p.protocol.replace("+unix",""):!p.protocol?.startsWith("ws")&&!p.protocol?.startsWith("wx")&&delete p.path,a(p),p.query&&typeof p.query.clientId=="string"&&(p.clientId=p.query.clientId),n.default||p.unixSocket?p.socksProxy=void 0:p.socksProxy===void 0&&typeof Be<"u"&&(p.socksProxy=Be.env.MQTTJS_SOCKS_PROXY),p.cert&&p.key)if(p.protocol){if(["mqtts","wss","wxs","alis"].indexOf(p.protocol)===-1)switch(p.protocol){case"mqtt":p.protocol="mqtts";break;case"ws":p.protocol="wss";break;case"wx":p.protocol="wxs";break;case"ali":p.protocol="alis";break;default:throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`)}}else throw new Error("Missing secure protocol key");if(s||(s={},!n.default&&!p.forceNativeWebSocket?(s.ws=Un().streamBuilder,s.wss=Un().streamBuilder,s.mqtt=Lc().default,s.tcp=Lc().default,s.ssl=Cc().default,s.tls=s.ssl,s.mqtts=Cc().default):(s.ws=Un().browserStreamBuilder,s.wss=Un().browserStreamBuilder,s.wx=Dc().default,s.wxs=Dc().default,s.ali=kc().default,s.alis=kc().default)),!s[p.protocol]){let g=["mqtts","wss"].indexOf(p.protocol)!==-1;p.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((y,w)=>g&&w%2===0?!1:typeof s[y]=="function")[0]}if(p.clean===!1&&!p.clientId)throw new Error("Missing clientId for unclean clients");p.protocol&&(p.defaultProtocol=p.protocol);function m(g){return p.servers&&((!g._reconnectCount||g._reconnectCount===p.servers.length)&&(g._reconnectCount=0),p.host=p.servers[g._reconnectCount].host,p.port=p.servers[g._reconnectCount].port,p.protocol=p.servers[g._reconnectCount].protocol?p.servers[g._reconnectCount].protocol:p.defaultProtocol,p.hostname=p.host,g._reconnectCount++),i("calling streambuilder for",p.protocol),s[p.protocol](g,p)}let h=new u.default(m,p);return h.on("error",()=>{}),h}function c(f,p,m=!0){return new Promise((h,g)=>{let y=l(f,p),w={connect:E=>{b(),h(y)},end:()=>{b(),h(y)},error:E=>{b(),y.end(),g(E)}};m===!1&&(w.close=()=>{w.error(new Error("Couldn't connect to server"))});function b(){Object.keys(w).forEach(E=>{y.off(E,w[E])})}Object.keys(w).forEach(E=>{y.on(E,w[E])})})}e.default=l}),Uc=ge(e=>{ue(),fe(),ce();var t=e&&e.__createBinding||(Object.create?function(m,h,g,y){y===void 0&&(y=g);var w=Object.getOwnPropertyDescriptor(h,g);(!w||("get"in w?!h.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return h[g]}}),Object.defineProperty(m,y,w)}:function(m,h,g,y){y===void 0&&(y=g),m[y]=h[g]}),r=e&&e.__setModuleDefault||(Object.create?function(m,h){Object.defineProperty(m,"default",{enumerable:!0,value:h})}:function(m,h){m.default=h}),o=e&&e.__importStar||(function(){var m=function(h){return m=Object.getOwnPropertyNames||function(g){var y=[];for(var w in g)Object.prototype.hasOwnProperty.call(g,w)&&(y[y.length]=w);return y},m(h)};return function(h){if(h&&h.__esModule)return h;var g={};if(h!=null)for(var y=m(h),w=0;w<y.length;w++)y[w]!=="default"&&t(g,h,y[w]);return r(g,h),g}})(),u=e&&e.__exportStar||function(m,h){for(var g in m)g!=="default"&&!Object.prototype.hasOwnProperty.call(h,g)&&t(h,m,g)},n=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=e.KeepaliveManager=e.UniqueMessageIdProvider=e.DefaultMessageIdProvider=e.Store=e.MqttClient=e.connectAsync=e.connect=e.Client=void 0;var i=n(Ro());e.MqttClient=i.default;var s=n(Hl());e.DefaultMessageIdProvider=s.default;var a=n(Ey());e.UniqueMessageIdProvider=a.default;var l=n(Ul());e.Store=l.default;var c=o(u0());e.connect=c.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return c.connectAsync}});var f=n(zl());e.KeepaliveManager=f.default,e.Client=i.default,u(Ro(),e),u(mr(),e),u(kl(),e);var p=ln();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return p.ReasonCodes}})}),c0=ge(e=>{ue(),fe(),ce();var t=e&&e.__createBinding||(Object.create?function(i,s,a,l){l===void 0&&(l=a);var c=Object.getOwnPropertyDescriptor(s,a);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[a]}}),Object.defineProperty(i,l,c)}:function(i,s,a,l){l===void 0&&(l=a),i[l]=s[a]}),r=e&&e.__setModuleDefault||(Object.create?function(i,s){Object.defineProperty(i,"default",{enumerable:!0,value:s})}:function(i,s){i.default=s}),o=e&&e.__importStar||(function(){var i=function(s){return i=Object.getOwnPropertyNames||function(a){var l=[];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(l[l.length]=c);return l},i(s)};return function(s){if(s&&s.__esModule)return s;var a={};if(s!=null)for(var l=i(s),c=0;c<l.length;c++)l[c]!=="default"&&t(a,s,l[c]);return r(a,s),a}})(),u=e&&e.__exportStar||function(i,s){for(var a in i)a!=="default"&&!Object.prototype.hasOwnProperty.call(s,a)&&t(s,i,a)};Object.defineProperty(e,"__esModule",{value:!0});var n=o(Uc());e.default=n,u(Uc(),e)});const f0=c0();class xc{instanceId;url;_client=null;_status=Ze.DISCONNECTED;_subscriptions=new Map;_eventListeners={connect:new Set,disconnect:new Set,reconnect:new Set,error:new Set};_options;constructor(t,r,o){if(!t)throw new Error("MqttClient: instanceId 不能为空");if(!r)throw new Error("MqttClient: url 不能为空");if(!o.clientId)throw new Error("MqttClient: options.clientId 不能为空");this.instanceId=t,this.url=r,this._options={...o,keepalive:o.keepalive??en.keepalive,connectTimeout:o.connectTimeout??en.connectTimeout,reconnectPeriod:o.reconnectPeriod??en.reconnectPeriod,clean:o.clean??en.clean}}get status(){return this._status}connect(){this._status===Ze.CONNECTED||this._status===Ze.CONNECTING||(this._status=Ze.CONNECTING,this._client=f0.connect(this.url,this._options),this._bindClientEvents())}disconnect(){if(!this._client){this._status=Ze.DISCONNECTED;return}this._status=Ze.DISCONNECTING,this._client.end(!1,{},()=>{this._status=Ze.DISCONNECTED,this._emitEvent(Bt.DISCONNECT)})}subscribe(t,r){const o=Array.isArray(t)?t:[t];return o.forEach(u=>{this._subscriptions.has(u)||(this._subscriptions.set(u,new Set),this._client&&this._status===Ze.CONNECTED&&this._client.subscribe(u)),this._subscriptions.get(u).add(r)}),()=>this.unsubscribe(o)}unsubscribe(t){(Array.isArray(t)?t:[t]).forEach(o=>{this._subscriptions.delete(o),this._client&&this._status===Ze.CONNECTED&&this._client.unsubscribe(o)})}publish(t,r,o){return new Promise((u,n)=>{if(!this._client||this._status!==Ze.CONNECTED){n(new Error(`MqttClient [${this.instanceId}]: 尚未建立连接,无法发布消息`));return}const i={qos:o?.qos??0,retain:o?.retain??!1};this._client.publish(t,r,i,s=>{s?n(s):u()})})}on(t,r){this._eventListeners[t].add(r)}off(t,r){this._eventListeners[t].delete(r)}_bindClientEvents(){this._client&&(this._client.on("connect",t=>{this._status=Ze.CONNECTED,this._emitEvent(Bt.CONNECT)}),this._client.on("reconnect",()=>{this._status=Ze.RECONNECTING,this._emitEvent(Bt.RECONNECT)}),this._client.on("error",t=>{this._emitEvent(Bt.ERROR,t)}),this._client.on("close",()=>{this._status!==Ze.DISCONNECTING&&(this._status=Ze.DISCONNECTED)}),this._client.on("message",(t,r)=>{this._dispatchMessage(t,r)}))}_dispatchMessage(t,r){const o=this._subscriptions.get(t);o&&o.forEach(u=>u(t,r)),this._subscriptions.forEach((u,n)=>{n!==t&&this._matchTopic(n,t)&&u.forEach(i=>i(t,r))})}_matchTopic(t,r){const o=t.split("/"),u=r.split("/");for(let n=0;n<o.length;n++){const i=o[n];if(i==="#")return!0;if(i!=="+"&&i!==u[n])return!1}return o.length===u.length}_emitEvent(t,r){t===Bt.ERROR&&r?this._eventListeners.error.forEach(o=>o(r)):t===Bt.CONNECT?this._eventListeners.connect.forEach(o=>o()):t===Bt.DISCONNECT?this._eventListeners.disconnect.forEach(o=>o()):t===Bt.RECONNECT&&this._eventListeners.reconnect.forEach(o=>o())}}N("MqttClient",xc);class Bc{uuid=ip();_clients=new Map;create(t,r){if(this._clients.has(t))return console.warn(`MqttManager: 实例 ${t} 已存在,返回已注册的实例`),this._clients.get(t);const o=new xc(t,`ws://${location.host}/mqtt`,{clientId:`gct_mqtt_${_gct.store.userInfo.userId}_${t}_${this.uuid}`,...r});return o.connect(),this._clients.set(t,o),o}get(t){return this._clients.get(t)}has(t){return this._clients.has(t)}destroy(t){const r=this._clients.get(t);r&&(r.disconnect(),this._clients.delete(t))}destroyAll(){this._clients.forEach(t=>{t.disconnect()}),this._clients.clear()}}N("MqttManager",Bc);class Fc{i18n=Ks({legacy:!1,locale:"zh-CN",fallbackLocale:"en",messages:{en:{message:{hello:"hello world"}},ja:{message:{hello:"こんにちは、世界"}}}});locale="zh-CN";constructor(){this.init()}async init(){await this.loadLocales();const t=this.getMessageUrl({locale:this.locale});await this.loadMessages(t)}async loadLocales(){const t=await(await fetch("/gct-platform/api/i18n-config/list")).json();if(t.code===200){const r=t.data.find(o=>o.defaultLanguage);this.locale=r.languageTag}}async loadMessages(t,r=this.locale){const n=(await(await fetch(t)).text()).split(`
|
|
393
|
+
`).reduce((i,s)=>{const[a,...l]=s.split(":");return i[a]=l.join(":"),i},{});this.i18n.global.mergeLocaleMessage(r,n)}getMessageUrl(t){if("app"in t){const r=t.env==="dev"?`dev_${t.branch}`:t.env;return`minio/${t.app}/locale-js/${r}/${t.locale}__.json`}return`/minio/locale-js/${t.locale}__platform__.json`}}N("LocaleUtil",Fc);function jc(e){e.use(_gct.i18n)}const h0=[];class d0{router;constructor(){this.router=Xs({history:zs(),routes:h0})}async add(t){Array.isArray(t)?t.forEach(r=>this.add(r)):this.router.addRoute(t),await this.router.replace(this.router.currentRoute.value.fullPath)}}function p0(e){e.use(_gct.router)}class Wc{i18nUtil=new Fc;i18n=this.i18nUtil.i18n;storeUtil=new il;store=this.storeUtil.store;routerUtil=new d0;router=this.routerUtil.router;message;dictionary=new ia;env=new sl;mqtt=new Bc;register={};openUtil;async init(){await this.env.checkIsTestEnv(),await this.store.init()}}N("GctGlobal",Wc);function g0(){return qn(aa)}function b0(e){const t=qn("modal");return t&&e&&(t.ok=e),t}function m0(){const e=Hs({});return Vs(()=>{const t=r=>{r.data?.type==="IFRAME_PROPS"&&(e.value=r.data.props)};window.addEventListener("message",t),window.parent.postMessage({type:"IFRAME_READY"},"*"),$s(()=>{window.removeEventListener("message",t)})}),gt(()=>e.value)}function y0(){return gt(()=>window.$wujie?.props||{})}function v0(){return gt(()=>window.$wujie?.bus)}function Gc(e){return typeof e<"u"}function _0(e){const t=st(e||""),r=st(!1),o=st(!1);return Sr(t,u=>{Gc(u)&&(o.value=!0,r.value=Hc(u))},{immediate:!!e,flush:"sync"}),{clipboardRef:t,isSuccessRef:r,copiedRef:o}}function Hc(e,{target:t=document.body}={}){const r=document.createElement("textarea"),o=document.activeElement;r.value=e,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const u=document.getSelection();let n;u&&u.rangeCount>0&&(n=u.getRangeAt(0)),t.append(r),r.select(),r.selectionStart=0,r.selectionEnd=e.length;let i=!1;try{i=document.execCommand("copy")}catch(s){throw new Error(s)}return r.remove(),n&&u&&(u.removeAllRanges(),u.addRange(n)),o&&o.focus(),i}const tr={UNAUTHORIZED:401,FORBIDDEN:403,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504};class E0{handle(t){console.error(t)}}class w0{handle(t){console.error(t)}}class S0{handle(t){if(t.type===bt.AJAX){new Vc().handle(t);return}console.error(t)}}class Vc{handle(t){const r=this._extractStatusCode(t.message);if(r)switch(r){case tr.UNAUTHORIZED:this._handleUnauthorized();break;case tr.FORBIDDEN:this._handleForbidden();break;case tr.NOT_FOUND:this._handleNotFound();break;case tr.INTERNAL_SERVER_ERROR:case tr.BAD_GATEWAY:case tr.SERVICE_UNAVAILABLE:case tr.GATEWAY_TIMEOUT:this._handleServerError(r);break;default:this._handleGenericHttpError(t);break}else this._handleGenericHttpError(t)}_extractStatusCode(t){const r=t.match(/HTTP\s+(\d{3})|Business\s+Error\s+\[(\d+)\]/);return r?parseInt(r[1]||r[2],10):null}_handleGenericHttpError(t){t.message.includes("Business Error")?console.debug("Handling business error:",t.message):t.message.includes("Network")?console.debug("Handling network error:",t.message):console.debug("Handling HTTP error:",t.message)}_handleUnauthorized(){console.warn("Unauthorized access, redirecting to login...")}_handleForbidden(){console.warn("Access forbidden")}_handleNotFound(){console.warn("Resource not found")}_handleServerError(t){console.warn(`Server error: ${t}`)}}class Ss{static _strategies=new Map;static init(){this.registerStrategy(bt.SCRIPT,new E0),this.registerStrategy(bt.VUE,new w0),this.registerStrategy(bt.PROMISE,new S0),this.registerStrategy(bt.AJAX,new Vc)}static getStrategy(t){return this._strategies.get(t)}static registerStrategy(t,r){this._strategies.set(t,r)}}N("ErrorStrategyFactory",Ss);class ht{static _instance;constructor(){this._initializeStrategies()}static getInstance(){return ht._instance||(ht._instance=new ht),ht._instance}static init(){ht.getInstance()}static handleVueError(t,r,o){const u={type:bt.VUE,message:`Vue Error: ${t.message} | Info: ${o}`,stack:t.stack,timestamp:Date.now(),userAgent:navigator.userAgent};this._instance._processError(u)}static reportError(t,r=bt.SCRIPT){const o={type:r,message:t.message,stack:t.stack,timestamp:Date.now(),userAgent:navigator.userAgent};this._instance._processError(o)}_initializeStrategies(){Ss.init()}_processError(t){Ss.getStrategy(t.type)?.handle(t)}}N("ErrorHandler",ht);async function $c(e){ht.init(),e.config.errorHandler=(t,r,o)=>{ht.handleVueError(t,r,o)},e.config.warnHandler=(t,r,o)=>{console.warn(`Vue Warning: ${t}`),o&&console.warn("Trace:",o)},window.addEventListener("error",t=>{ht.reportError(new Error(t.message),bt.SCRIPT)}),window.addEventListener("unhandledrejection",t=>{ht.reportError(t.reason,bt.PROMISE)})}var rr=N("LoginSortTypeEnum",(e=>(e.SYSTEM="SYSTEM",e.THIRD_PARTY="THIRD_PARTY",e))(rr||{})),xe=N("LoginTypeEnum",(e=>(e.ACCOUNT="ACCOUNT",e.DOMAIN_ACCOUNT="DOMAIN_ACCOUNT",e.MOBILE="MOBILE",e.DINGDING="DINGDING",e.FEISHU="FEISHU",e.QIYEWEIXIN="QIYEWEIXIN",e))(xe||{})),A0=N("PassRule",(e=>(e.NUMBER="NUMBER",e.LOWERCASE="LOWERCASE",e.UPPERCASE="UPPERCASE",e.SPECHARS="SPECHARS",e))(A0||{})),T0=N("KickRuleEnum",(e=>(e.SAME_END="SAME_END",e.DIFFERENT_END="DIFFERENT_END",e))(T0||{})),As=N("DeployModeEnum",(e=>(e.STANDARD="STANDARD",e.INDEPENDENT_APP="INDEPENDENT_APP",e))(As||{}));const I0={[xe.ACCOUNT]:{icon:"icon-a-Accountnumber",color:"#0E81EC"},[xe.DOMAIN_ACCOUNT]:{icon:"icon-a-Domainaccount",color:"#FFAB06"},[xe.MOBILE]:{icon:"icon-a-Cellphone",color:"#6A70FE"},[xe.DINGDING]:{icon:"DingdingIcon"},[xe.FEISHU]:{icon:"FeishuIcon"},[xe.QIYEWEIXIN]:{icon:"QiyeweixinIcon"}},qc=N("SYSTEM_LOGIN_KEYS",[xe.ACCOUNT,xe.DOMAIN_ACCOUNT,xe.MOBILE]),Yc=N("OTHER_LOGIN_KEYS",[xe.DINGDING,xe.FEISHU,xe.QIYEWEIXIN]),xn=N("getLoginTypeOptions",e=>e?e.map(t=>({id:t,label:t,value:t,...I0[t]})):[]),R0=N("RELATION_FIELDS",[{label:"extString0_",value:"ext0",type:1},{label:"extString1_",value:"ext1",type:1},{label:"extString2_",value:"ext2",type:1},{label:"extString3_",value:"ext3",type:1},{label:"extString4_",value:"ext4",type:1},{label:"extInt5_",value:"ext5",type:0},{label:"extInt6_",value:"ext6",type:0},{label:"extInt7_",value:"ext7",type:0},{label:"extInt8_",value:"ext8",type:0},{label:"extInt9_",value:"ext9",type:0}]),O0=N("MENU_COLLAPSED_WIDTH",46),N0=N("MENU_WIDTH_RANGE",[100,1e3]),L0=N("THEME_COLORS",["#026AC8","#0DAA9C"]),M0=N("WATERMARK_INIT_DATA",{openWatermark:!1,watermarkContent:"custom",fontSize:16,color:"#000000",verticalAlign:"middle",textAlign:"center",text:"${username}",transparent:15,width:1600,height:1080}),Bn=ut({copyright:'© 2016-<span class="ownInput">${当前年份}</span> 冠骋信息技术(苏州)有限公司 版权所有',description:"",icon:"",loadingImage:"",logo:"",name:"冠骋云PaaS平台",thumbnail:"",version:"暂未支持"});function P0(e=!0){const t=()=>e?_api.platform.plat.postBase($n({...Bn},"version")):_api.apaas.plat.postBase($n({...Bn},"version"));function r(o,u=!0){const{value:n}=o;if(n)try{Object.assign(Bn,u?JSON.parse(n):n,{version:(void 0).version})}catch(i){console.warn(i)}}return{basicSetting:Bn,setBasicSetting:r,postBasicSetting:t}}const Ts=ut({deployMode:As.STANDARD}),C0=gt(()=>Ts.deployMode===As.INDEPENDENT_APP);function D0(e){const{value:t}=e;if(t)try{Object.assign(Ts,JSON.parse(t))}catch(r){console.warn(r)}}function k0(){return{deploySetting:Ts,setDeploySetting:D0,isIndependentApp:C0}}const Is=st([xe.ACCOUNT]),Rs=st([]),Os=st(xn(qc)),Ns=st(xn(Yc)),dt=ut({theme:"full",title:"欢迎登录冠骋云PaaS平台",subtitle:"让数字化赋能客户成功!",logo:"",banner:"",loginModeConfigs:[],openIDOAuthConfigs:[],sortJson:"",defaultAuthType:xe.ACCOUNT}),_r=ut(new Map([[xe.ACCOUNT,{address:"",authType:xe.ACCOUNT,relationField:"",enabled:0}],[xe.DOMAIN_ACCOUNT,{address:"",authType:xe.DOMAIN_ACCOUNT,relationField:"",domainSuffix:"",relationFieldName:"",enabled:0}],[xe.MOBILE,{smsServiceProvider:"",smsKey:"",smsKeySecret:"",smsTemplateCode:"",smsSignName:"",phoneNumb:"",smsSdkAppId:"",authType:xe.MOBILE,enabled:0}],[xe.DINGDING,{appId:"",authType:xe.DINGDING,secret:"",redirectURL:"",enabled:0}],[xe.FEISHU,{appId:"",authType:xe.FEISHU,secret:"",redirectURL:"",enabled:0}],[xe.QIYEWEIXIN,{appId:"",agentId:"",authType:xe.QIYEWEIXIN,secret:"",redirectURL:"",enabled:0,certFileName:""}]]));function U0(){return{loginSetting:dt,postLoginSetting:async()=>{[...Is.value,...Rs.value].forEach(o=>{const u=_r.get(o);u&&(u.enabled=1)}),dt.loginModeConfigs=qc.map(o=>_r.get(o)).filter(o=>o!==void 0),dt.openIDOAuthConfigs=Yc.map(o=>_r.get(o)).filter(o=>o!==void 0),dt.sortJson=JSON.stringify({[rr.SYSTEM]:Os.value.map(o=>o.id),[rr.THIRD_PARTY]:Ns.value.map(o=>o.id)}),await _api.platform.plat.postLogin(dt)},setLoginSetting:r=>{if(r&&r.value){const o=JSON.parse(r.value);for(const n in o)n in dt&&(dt[n]=o[n]);if($r(o,"sortJson")&&!Hn(o.sortJson)){const n=JSON.parse(o.sortJson);$r(n,rr.SYSTEM)&&(Os.value=xn(n[rr.SYSTEM])),$r(n,rr.THIRD_PARTY)&&(Ns.value=xn(n[rr.THIRD_PARTY]))}dt.loginModeConfigs?.forEach(n=>{_r.set(n.authType,{...n,enabled:0})});const u=dt.loginModeConfigs?.filter(n=>n.enabled).map(n=>n.authType)||[];u.push(xe.ACCOUNT),Is.value=[...new Set(u)],dt.openIDOAuthConfigs?.forEach(n=>{_r.set(n.authType,{...n,enabled:0})}),Rs.value=dt.openIDOAuthConfigs?.filter(n=>n.enabled).map(n=>n.authType)||[]}},loginModeAuthTypes:Is,openIDOAuthAuthTypes:Rs,sysLoginSort:Os,openIDOAuthAuthSort:Ns,loginModeConfig:_r}}const nr=ut({initialPassword:"123456",initialSignPassword:"12345678",enableIdentifier:1,enableDeleteAccount:1,enableDeleteUser:0,requiredFields:[],supportLoginFields:["username_"],extFieldConfigs:[],orgExtFieldConfigs:[]}),Ls=st([...R0]),Kc=st([]);function x0(e=!0){const t=async()=>{const o=JSON.parse(JSON.stringify(nr));e?await _api.platform.plat.postOrg(o):await _api.apaas.plat.postOrg(o)};function r(o){const{value:u}=o;if(u)try{const n=JSON.parse(u);for(const i in n)i=="supportLoginFields"&&(n.supportLoginFields=n.supportLoginFields.filter(s=>s!=="username_"));Object.assign(nr,n),nr.extFieldConfigs&&nr.extFieldConfigs.length&&nr.extFieldConfigs.forEach(i=>{Ls.value=Ls.value.filter(s=>(s.value==i.relationField&&Kc.value.push(s),s.value!==i.relationField))}),nr.extFieldConfigs=JSON.parse(JSON.stringify(n.extFieldConfigs))}catch(n){console.warn(n)}}return{orgSetting:nr,setOrgSetting:r,postOrgSetting:t,relationFields:Ls,relationFiledsCopy:Kc}}const Fn=ut({durationHour:2,durationMinute:0,enableChangePassword:1,enableChangeSignPassword:0,enableSignPassword:0,enableKickOut:1,enablePassphrase:1,signEnablePassphrase:1,enableLockAccount:1,expiryDate:30,signExpiryDate:30,firstTimeChangePassword:0,signFirstTimeChangePassword:0,lockTimeout:0,loginKickOutMode:"SAME_END",maxErrorTimes:2,passMinLength:6,signPassMinLength:6,passRule:["NUMBER"],signPassRule:["NUMBER"],signRepeatNum:1,repeatNum:1,timeUnit:"DAYS",signTimeUnit:"DAYS",noOpRetainHour:8,noOpRetainMinute:0,earlyAlarmMinute:5,earlyAlarmSecond:0,inapplicablePerson:[],lockHourTimeout:0,lockMinTimeout:5});function B0(e=!0){const t=async()=>{e?await _api.platform.plat.postSecurity(Fn):await _api.apaas.plat.postSecurity(Fn)};function r(o){const{value:u}=o;if(u)try{Object.assign(Fn,JSON.parse(u))}catch(n){console.warn(n)}}return{securitySetting:Fn,postSecuritySetting:t,setSecuritySetting:r}}const jn=ut({darkMode:"light",themeColor:"#026AC8",menuMode:"classic",menuWidth:232,menuCollapsible:!0,menuSearchable:!0,menuFilter:!1,showLogo:!0,showBreadcrumb:!1,showBreadcrumbIcon:!1,showTabs:!0,pageProgress:!0,pageLoading:!0,colorMode:"normal"}),Ms=st(!1),F0=O0,j0=N0,W0=L0,G0=()=>{jn.colorMode};Sr(()=>jn.colorMode,e=>{e&&G0()});function H0(){const e=async()=>{};function t(o){const{value:u}=o;if(u)try{Object.assign(jn,JSON.parse(u))}catch(n){console.warn(n)}}function r(){Ms.value=!Ms.value}return{themeSetting:jn,setThemeSetting:t,postThemeSetting:e,menuCollapsed:Ms,toggleMenuCollapsed:r,menuCollapsedWidth:F0,menuWidthRange:j0,themeColors:W0}}const Ps=ut({...M0});function V0(){const e=async()=>{const r=JSON.stringify(Ps);await _api.platform.plat.postWatermark({value:r})};function t(r){const{value:o}=r;if(o)try{Object.assign(Ps,JSON.parse(o))}catch(u){console.warn(u)}}return{watermarkSetting:Ps,postWatermarkSetting:e,setWatermarkSetting:t}}const Xc=ut({});function $0(e){Object.assign(Xc,e)}function q0(){return{projectSetting:Xc,setProjectConfig:$0}}const Y0=N("usePlatformConfigStore",sr("platform-config",()=>{const e=P0(),t=U0(),r=x0(),o=B0(),u=H0(),n=V0(),i=k0(),s=q0();async function a(){const c=await _api.platform.plat.getList(),f={};c&&c.length>0&&c.forEach(p=>{if(p.value)try{f[p.configEnum]=JSON.parse(p.value)}catch(m){console.warn(`${p.configEnum}配置解析失败`,m,p)}}),f[qe.BASIC]&&e.setBasicSetting(f[qe.BASIC]),f[qe.LOGIN]&&t.setLoginSetting(f[qe.LOGIN]),f[qe.ORGANIZATION]&&r.setOrgSetting(f[qe.ORGANIZATION]),f[qe.SECURITY]&&o.setSecuritySetting(f[qe.SECURITY]),f[qe.THEME]&&u.setThemeSetting(f[qe.THEME]),f[qe.WATERMARK]&&n.setWatermarkSetting(f[qe.WATERMARK]),f[qe.DEPLOY]&&i.setDeploySetting(f[qe.DEPLOY]),console.debug("平台配置初始化完成",f)}async function l(){const c=await _api.apaas.basicConfig.getDetail({configEnum:qe.THEME});c&&u.setThemeSetting(c)}return{init:a,renderInit:l,...e,...t,...r,...o,...u,...n,...i,...s}})),K0=N("useUserStore",sr("user",{state:()=>({userInfo:{},roleList:[],sessionTimeout:!1,lastUpdateTime:0,userPermissions:{}}),getters:{getUserInfo(e){return e.userInfo},getUserPermissions(e){return e.userPermissions}},actions:{async login(e,{hasError:t}={}){try{const r=await X0(e,t),{token:o,signWay:u}=r;return sessionStorage.setItem("signWay",u),ga(o),this.afterLoginAction()}catch(r){return Promise.reject(r)}},async getUserInfoAction(e){if(!Tr&&!e)return null;const t=await _api.platform.user.getInfo({headers:{Token:e}});return this.setUserInfo(t),this.userPermissions=(t?.platformManagerPermissions??[]).reduce((r,o)=>(r[o]=!0,r),{}),t},async afterLoginSingleApp(){},async afterLoginAction(){if(!Tr)return null},async logout(){await z0()},async setUserInfo(e){this.userInfo={...e,minioDomain:"/minio"},this.lastUpdateTime=new Date().getTime(),_gct.store.userInfo=this.userInfo},async updateUserInfo(e){const t={...this.userInfo,...e};this.setUserInfo(t)}}}));async function X0(e,{hasError:t=!0}={}){const r=await ui();return await _api.platform.login.postSign(e,{headers:{browser:r,"Auth-Code":e.authCode,hasError:t}})}async function z0(){const e=sessionStorage.getItem("currentPlatOrAppId"),t=_gct.env.getEnv(),r=await ui(),o={appId:e&&JSON.parse(e).appId,platform:e&&JSON.parse(e).type,env:t},u=za();await _api.platform.login.getSignOut(o,{headers:{browser:r,pagetag:u}})}const S_=N("useTenantStore",sr("tenant",{state:()=>({tenantId:"",tenantUserInfo:{},tenantUserPermissions:{}}),actions:{setTenant(e){this.tenantId=e},async getTenantUserInfoAction(){if(!this.tenantId)return;const e=await _api.platform.tenant.getUserInfo();return this.tenantUserInfo=e,e}}})),A_=N("usePermissionStore",sr("permission",{state:()=>({userPermissions:{appSuperAdmin:0,permissions:{}}}),getters:{hasAllPermissions(e){return!!e.userPermissions.appSuperAdmin||!!e.userPermissions.permissions["POINT.*"]}},actions:{getPermissionByKey(e,t){if(this.hasAllPermissions)return!0;if(!t)return this.userPermissions.permissions[e];const r=`${e}.${t}`,o=`${e}.*`;return this.userPermissions.permissions[r]||this.userPermissions.permissions[o]},async initPermission(){const e=await _api.apaas.designerCommon.getUserInfo();Object.assign(this.userPermissions,{...e,permissions:Object.fromEntries((e?.permissions??[]).map(t=>[t,!0]))})}}}));async function Q0(e){e.provide(aa,e),jc(e),p0(e)}async function J0(e){await $c(e),Qs.use(_a),await _gct.init();const t=Tr();t&&await K0().getUserInfoAction(t),await Y0().init()}function Z0(){if(window._gct){console.warn("核心包已安装,请勿重复安装!");return}console.info("核心包安装成功!"),window._gct=new Wc,Object.defineProperty(window._gct,"api",{get(){return Yn}}),Object.defineProperty(window,"_api",{get(){return Yn}})}Z0()})}}));
|