@abtnode/blocklet-services 1.17.8-beta-20260106-113136-b3c09e14 → 1.17.8-beta-20260108-120904-21cb5fb6
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/api/util/blocklet-utils.js +9 -4
- package/dist/assets/{AdapterDayjs-DafRMFLg.js → AdapterDayjs-C1bdndja.js} +1 -1
- package/dist/assets/{Google-DRu937I3.js → Google-BI3aC5vK.js} +1 -1
- package/dist/assets/{access-control-cgo5Z15_.js → access-control-BL-PuDiR.js} +1 -1
- package/dist/assets/{actions-Dfiiwkit.js → actions-m1acuA78.js} +1 -1
- package/dist/assets/{add-component-core-BfzNEcS5.js → add-component-core-BzMN094F.js} +1 -1
- package/dist/assets/add-resource-BRF-rYME.js +1 -0
- package/dist/assets/{addon-qN24wAb4.js → addon-yDIBSjIk.js} +1 -1
- package/dist/assets/{advanced-1Vu6rcXU.js → advanced-DEE0XFtQ.js} +1 -1
- package/dist/assets/{aigne-D6MrXXCU.js → aigne-9evgyH7b.js} +1 -1
- package/dist/assets/api-B24x7kOD.js +1 -0
- package/dist/assets/{appearance-DOQHBg9p.js → appearance-C8B414U2.js} +1 -1
- package/dist/assets/{ar-BukCw0OI.js → ar-BHqjWgUQ.js} +2 -2
- package/dist/assets/{audit-logs-ISyoqJFp.js → audit-logs-qNutRhHx.js} +1 -1
- package/dist/assets/{authorize-B9RLEFal.js → authorize-CZSHuYdu.js} +1 -1
- package/dist/assets/{base-chart-DhxjAyBU.js → base-chart-DT--nPCU.js} +1 -1
- package/dist/assets/{base32-_D4eWUeh.js → base32-z3esjJBn.js} +1 -1
- package/dist/assets/{bind-account-CLIjYy96.js → bind-account-QxLU_sxt.js} +1 -1
- package/dist/assets/{branding-iwUveEf5.js → branding-Bk26INk9.js} +1 -1
- package/dist/assets/{branding-C81Kt22j.js → branding-_XszRU-Z.js} +1 -1
- package/dist/assets/branding-tR0gcoY_.js +1 -0
- package/dist/assets/bundle-avatar-2AQWR0ld.js +1 -0
- package/dist/assets/button-LwkniwV9.js +1 -0
- package/dist/assets/{click-to-copy-CMo42VnK.js → click-to-copy-Dk6ZAJOw.js} +1 -1
- package/dist/assets/{omit-CCIQ0Qdi.js → cloneDeep-rgNCMFod.js} +1 -1
- package/dist/assets/{collapse-B7gUzFaX.js → collapse-D72lnPa9.js} +1 -1
- package/dist/assets/{complete-CJ_buCAS.js → complete-CEvsz8uU.js} +2 -2
- package/dist/assets/{component-Dip3v1Iq.js → component-BrZ1DWiw.js} +2 -2
- package/dist/assets/{config-D5KnWqfn.js → config-6tpm84_l.js} +1 -1
- package/dist/assets/{config-D8XZj8JI.js → config-CwlqBQNt.js} +2 -2
- package/dist/assets/config-cdtQwn5t.js +53 -0
- package/dist/assets/{config-navigation-Ni0iczgA.js → config-navigation-CZ9V7otK.js} +2 -2
- package/dist/assets/{config-space-B6_f52sE.js → config-space-CZRqkXsR.js} +1 -1
- package/dist/assets/{confirm-Lb1MrAdS.js → confirm-Ch-CAgUO.js} +1 -1
- package/dist/assets/{connect-JAX_oP3o.js → connect-BNkv99fz.js} +1 -1
- package/dist/assets/connect-CadBIZOq.js +5 -0
- package/dist/assets/connect-i7rkK26L.js +1 -0
- package/dist/assets/connect-to-lX3lujSp.js +1 -0
- package/dist/assets/{content-layout-DmSBGGVm.js → content-layout-Dtfb5X6M.js} +1 -1
- package/dist/assets/{create-passport-svg-5AYzBKFb.js → create-passport-svg-DeDfPZeD.js} +1 -1
- package/dist/assets/{createClass-DXYd7BIe.js → createClass-07c4wbGU.js} +1 -1
- package/dist/assets/{dashboard-C0l2IWWH.js → dashboard-CmJOnF0g.js} +2 -2
- package/dist/assets/{de-Br0tDZam.js → de-QUGQFv2K.js} +1 -1
- package/dist/assets/{delete-confirm-tbfLqDBI.js → delete-confirm-DiU5PO2T.js} +1 -1
- package/dist/assets/{did-address-CsOJBoiY.js → did-address-Cq16cwTy.js} +1 -1
- package/dist/assets/{domain-CnhOsdmM.js → domain-DHqSA0zl.js} +1 -1
- package/dist/assets/{domain-action-card-BsdHbhEi.js → domain-action-card-BsNaII7k.js} +2 -2
- package/dist/assets/domains-BQ_Of9Oo.js +1 -0
- package/dist/assets/{email-Dt_DGuhf.js → email-DXdzQLls.js} +2 -2
- package/dist/assets/{empty-spinner-BYDonf35.js → empty-spinner-BClWI15N.js} +1 -1
- package/dist/assets/engine-D18zeIE7.js +1 -0
- package/dist/assets/{es-D_e0gGgp.js → es-C4w6cL07.js} +2 -2
- package/dist/assets/{exchange-passport-DztKvBat.js → exchange-passport-NOgYhNpm.js} +1 -1
- package/dist/assets/{form-DoC8uBcB.js → form-DhecYoSJ.js} +3 -3
- package/dist/assets/{form-text-input-XjloVwBd.js → form-text-input-BsCymY_c.js} +1 -1
- package/dist/assets/{form-wrapper-PT5ZzMQy.js → form-wrapper-pwkkz4we.js} +1 -1
- package/dist/assets/{fr-DXizOT4b.js → fr-Bq3UipEu.js} +2 -2
- package/dist/assets/{fuel-IaJHNPPW.js → fuel-DgzL5KSX.js} +1 -1
- package/dist/assets/{gen-access-key-BJlDqEhI.js → gen-access-key-BxnyhhCR.js} +1 -1
- package/dist/assets/{gen-simple-access-key-lyiUw0C-.js → gen-simple-access-key-BJI-4yOF.js} +1 -1
- package/dist/assets/get-safe-url-BVTaUfvO.js +1 -0
- package/dist/assets/{hi-D2FEb_Tx.js → hi-DGZy0DLh.js} +2 -2
- package/dist/assets/{home-Bs_5YPbK.js → home-Bibhtg_U.js} +1 -1
- package/dist/assets/{id-Dw9URVwP.js → id-DOzDilAf.js} +2 -2
- package/dist/assets/{iframe-Dqu4MSyW.js → iframe-CqiUrjUO.js} +1 -1
- package/dist/assets/{index-BDH_LtJL.js → index-0ZSFNH-D.js} +1 -1
- package/dist/assets/{index-1HKgA-fz.js → index-BB8sYq-N.js} +1 -1
- package/dist/assets/{index-BWDWEkUF.js → index-BSZ3mQac.js} +2 -2
- package/dist/assets/{index-Dfx19arA.js → index-BhpNA6ar.js} +1 -1
- package/dist/assets/{index-B4YCnemd.js → index-BnOC3Ium.js} +1 -1
- package/dist/assets/index-BszSKE9L.js +1 -0
- package/dist/assets/{index-vP1T6V7V.js → index-CHkWO9t3.js} +4 -4
- package/dist/assets/{index-BsohFwTm.js → index-CaQuyP_U.js} +1 -1
- package/dist/assets/{index-DT5AXPVB.js → index-Cdaohlhu.js} +7 -7
- package/dist/assets/{index-B10SG1vs.js → index-CdsI3g5U.js} +1 -1
- package/dist/assets/index-CsYL8tps.js +1 -0
- package/dist/assets/{index-CRAuhYSg.js → index-D-O_eFad.js} +1 -1
- package/dist/assets/{index-BNhv-9xy.js → index-D88DUiSg.js} +1 -1
- package/dist/assets/{index-TYwJnR0n.js → index-D8NN8LDz.js} +6 -6
- package/dist/assets/{index-CQgzjKgB.js → index-DI4CWTXR.js} +106 -106
- package/dist/assets/{index-BhhZ8IDZ.js → index-DUnMyyWn.js} +9 -9
- package/dist/assets/{index-BSZtxRM0.js → index-D_ckidZn.js} +2 -2
- package/dist/assets/{index-B_SjLIbT.js → index-DlifV2p1.js} +5 -5
- package/dist/assets/{index-dbYkWwF4.js → index-DzdHYw6g.js} +1 -1
- package/dist/assets/{index-Cq6z7yeF.js → index-Ge2WhAk1.js} +4 -4
- package/dist/assets/{index-Cp0b8q3A.js → index-KUC3HPt0.js} +1 -1
- package/dist/assets/index-POuATgdm.js +1 -0
- package/dist/assets/index-TBM4hzrY.js +81 -0
- package/dist/assets/{index-DhHvANH8.js → index-WjASWJcO.js} +4 -4
- package/dist/assets/{index-DctZHPFL.js → index-fC-FqmP3.js} +1 -1
- package/dist/assets/{index-BGhqVqit.js → index-gohmHhDq.js} +1 -1
- package/dist/assets/{index-CRZM3CKo.js → index-hBDzzv6I.js} +1 -1
- package/dist/assets/{index-BWL6HE0j.js → index-iX-pnOjy.js} +1 -1
- package/dist/assets/{index-B7_VUEoc.js → index-jILCQaR3.js} +1 -1
- package/dist/assets/{index-B6DWjLJS.js → index-m_xRKGyG.js} +8 -8
- package/dist/assets/{index-G6Vk78zE.js → index-mt_AKU_F.js} +2 -2
- package/dist/assets/{index-B0Q9wWG1.js → index-oucqu2vy.js} +1 -1
- package/dist/assets/{index-B4KKUWng.js → index-u9tqiWy4.js} +1 -1
- package/dist/assets/{index-BkePHcyK.js → index-uexcv8C-.js} +7 -7
- package/dist/assets/info-outline-rounded-BLwoUxyI.js +1 -0
- package/dist/assets/{invitation-CYFN9u5t.js → invitation-DSs7YT3_.js} +4 -4
- package/dist/assets/{invitations-jY13RXbI.js → invitations-DK7oD-E6.js} +1 -1
- package/dist/assets/{invite-D72FvaiG.js → invite-CdWfDz--.js} +1 -1
- package/dist/assets/{isURL-CJRImg0N.js → isURL-DMMDDAKA.js} +1 -1
- package/dist/assets/{issue-passport-BfqkJF3W.js → issue-passport-yIqheTA0.js} +1 -1
- package/dist/assets/{item-5ZWPft2s.js → item-BV3WfK17.js} +1 -1
- package/dist/assets/{ja-DBxpsmGJ.js → ja-DMq-YXDX.js} +2 -2
- package/dist/assets/{ko-CCAdSyce.js → ko-BrYbXurh.js} +2 -2
- package/dist/assets/{landing-page-DRtId3hN.js → landing-page-BDAr8Hmo.js} +1 -1
- package/dist/assets/{launch-result-message-MNpx7ysR.js → launch-result-message-C04PaKk0.js} +1 -1
- package/dist/assets/{layout-Be1KH57_.js → layout-DzZv-Jny.js} +1 -1
- package/dist/assets/{list-CQtiNSih.js → list-B6eMSw29.js} +1 -1
- package/dist/assets/{list-CHI1rCEg.js → list-BWd3aUjb.js} +2 -2
- package/dist/assets/{list-header-Cl3jykCe.js → list-header-wJF4c6BN.js} +1 -1
- package/dist/assets/localization-oLJXrcTA.js +1 -0
- package/dist/assets/{log-BfCFT05M.js → log-BskdQbRf.js} +1 -1
- package/dist/assets/logger-DhW79f4a.js +1 -0
- package/dist/assets/{login-BtsH3IvI.js → login-CfL0Uf6Y.js} +1 -1
- package/dist/assets/{login-oauth-callback-Ds4uYiRr.js → login-oauth-callback-_6XAZMOE.js} +1 -1
- package/dist/assets/{logo-uploader-lepUW_D7.js → logo-uploader-D5E5QaRF.js} +1 -1
- package/dist/assets/{lost-passport-BtN3h1ya.js → lost-passport-CUtEI06a.js} +1 -1
- package/dist/assets/omit-BeaKJrg9.js +1 -0
- package/dist/assets/{open-window-CNt8gsrN.js → open-window-Bi6zVDJd.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-7TbnqqKX.js → over-due-invoice-payment-B7FQEnNH.js} +1 -1
- package/dist/assets/{overview-Be3tncsL.js → overview-C7QghcRT.js} +1 -1
- package/dist/assets/{page-header-CHAwrgX-.js → page-header-BZv-tfgN.js} +1 -1
- package/dist/assets/passport-B_eTMTmZ.js +1 -0
- package/dist/assets/{passport-item-Bhbm8_m6.js → passport-item-D53yZ-cF.js} +1 -1
- package/dist/assets/{permission-BHvrn0M5.js → permission-DC8i_y8F.js} +1 -1
- package/dist/assets/preferences-DzDUGj-O.js +1 -0
- package/dist/assets/profile-embed-B3QUDkbU.js +1 -0
- package/dist/assets/{provider-icon-DQY2_LaP.js → provider-icon-D15U0Izg.js} +1 -1
- package/dist/assets/{pt-CrMGrBZ6.js → pt-Dl6732JN.js} +2 -2
- package/dist/assets/publish-resource-DCIlLUPS.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-D0JKrMDl.js → react-beautiful-dnd.esm-BwIgGfYj.js} +1 -1
- package/dist/assets/{react-stripe.esm-CVZErl8X.js → react-stripe.esm-5Snjx_mn.js} +1 -1
- package/dist/assets/{required-BQln5OcV.js → required-DHjZE3-Y.js} +1 -1
- package/dist/assets/{ru-up3R57Pv.js → ru-CVUeN9AX.js} +2 -2
- package/dist/assets/{runtime-npJC4gp_.js → runtime-BHekBabT.js} +1 -1
- package/dist/assets/{sanitize-C-shWbtD.js → sanitize-yX1j-ggS.js} +1 -1
- package/dist/assets/sdk-CJUhxOGJ.js +1 -0
- package/dist/assets/{section-jXB9AxBb.js → section-CenHBXqj.js} +1 -1
- package/dist/assets/{security-nSKpCl8B.js → security-BMslI5IZ.js} +3 -3
- package/dist/assets/{session-C2ZBRIpv.js → session-CZpDtsCZ.js} +1 -1
- package/dist/assets/{setup-krkSJpAg.js → setup-CCvGdFDO.js} +1 -1
- package/dist/assets/{shorten-label-C4py9TLA.js → shorten-label-DXFyDHDr.js} +1 -1
- package/dist/assets/{simple-select-i16Vwzvl.js → simple-select-DtCsUIHR.js} +1 -1
- package/dist/assets/{spaces-BdZ_Rv3s.js → spaces-D3H6AchN.js} +1 -1
- package/dist/assets/{start-y3zrboBQ.js → start-SeWUP0mo.js} +4 -4
- package/dist/assets/{starting-progress-DI-J-VlX.js → starting-progress-Y3UjFmoX.js} +1 -1
- package/dist/assets/{status-B8pB_mTB.js → status-MSXp_buG.js} +1 -1
- package/dist/assets/{step-actions-B1ufIDaK.js → step-actions-BNFJWVZI.js} +1 -1
- package/dist/assets/{studio-1jwq0HOw.js → studio-CRjDRBty.js} +1 -1
- package/dist/assets/{switch-CetbUrYR.js → switch-C49IloVU.js} +1 -1
- package/dist/assets/{switch-control-_85hc9FG.js → switch-control-npfWE_aC.js} +1 -1
- package/dist/assets/{table-tips-CMt22HEy.js → table-tips-DMrnJF8e.js} +1 -1
- package/dist/assets/{team-DDjNXwXE.js → team-YWd-FRKh.js} +8 -8
- package/dist/assets/{th-DdNj2Ao6.js → th-32eBNQes.js} +2 -2
- package/dist/assets/{traffic-mcbpWOFq.js → traffic-0IuWlrAD.js} +1 -1
- package/dist/assets/{transfer-C66c3bWd.js → transfer-DRS2VUAN.js} +1 -1
- package/dist/assets/{unsubscribe-Cvz0OKhq.js → unsubscribe-xDow2Z6m.js} +1 -1
- package/dist/assets/{use-app-logo-BuyF983S.js → use-app-logo-hIHAHSSI.js} +1 -1
- package/dist/assets/{use-mobile-BINJTzMb.js → use-mobile-Bz2ML4Gk.js} +1 -1
- package/dist/assets/{use-mobile-D5clNlrm.js → use-mobile-_vjPRYx2.js} +1 -1
- package/dist/assets/{use-server-logo-Pbr_UuiI.js → use-server-logo-Da86xnyt.js} +1 -1
- package/dist/assets/{use-window-close-B16QghYq.js → use-window-close-DUJmRIjM.js} +1 -1
- package/dist/assets/{useAsync-BVTh1KYj.js → useAsync-D0xh4Var.js} +1 -1
- package/dist/assets/{useAsync-ZGLJQow7.js → useAsync-D6IP8T2e.js} +1 -1
- package/dist/assets/{useAsyncRetry-BMmRgSGm.js → useAsyncRetry-B_bXUXWM.js} +1 -1
- package/dist/assets/{useLocalStorage-De-EuH_M.js → useLocalStorage-Brr2PSz9.js} +1 -1
- package/dist/assets/{user-center-DQSoqc_z.js → user-center-COnqQuqE.js} +6 -6
- package/dist/assets/{user-follower-TTyja_sV.js → user-follower-DVX8m-Zk.js} +1 -1
- package/dist/assets/{util-Ff3hwYmy.js → util-Dee1Ybp3.js} +1 -1
- package/dist/assets/{util-DuMKfKo8.js → util-GXkeqbBQ.js} +1 -1
- package/dist/assets/{vendor-arcblock-Cnwtqa7s.js → vendor-arcblock-BCP2x3BR.js} +1 -1
- package/dist/assets/{vendor-hooks-BQWlJm53.js → vendor-hooks-DQAdyHrE.js} +1 -1
- package/dist/assets/{vendor-mui-core-DnR6WYuU.js → vendor-mui-core-CKKG_1TN.js} +2 -2
- package/dist/assets/{vendor-mui-x-CQc01l4r.js → vendor-mui-x-DHGvg6Bj.js} +1 -1
- package/dist/assets/{vendor-utils-DCMKu06e.js → vendor-utils-CUs2ebe7.js} +17 -17
- package/dist/assets/{vendor-ux-B0gV9NvH.js → vendor-ux-DjXlxcvL.js} +115 -115
- package/dist/assets/{vi-HNh41Xxk.js → vi-DF8IinAc.js} +2 -2
- package/dist/assets/{wait-connect-CRZmfXOA.js → wait-connect-CLe9IfYi.js} +1 -1
- package/dist/assets/{wizard-B41kI39b.js → wizard-8Tk0iyxY.js} +1 -1
- package/dist/assets/wizard-components-C10frai0.js +52 -0
- package/dist/assets/wrap-locale-CxYp8fAf.js +1 -0
- package/dist/assets/{zh-BmX_fuoi.js → zh-BRjrClew.js} +1 -1
- package/dist/assets/{zh-MM5bvwO_.js → zh-ByJkLAV1.js} +2 -2
- package/dist/assets/{zh-tw-Dr5DyPwA.js → zh-tw-34G9tsUP.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +44 -44
- package/dist/assets/add-resource-CYRgZ1ps.js +0 -1
- package/dist/assets/api-DwxIBXZs.js +0 -1
- package/dist/assets/branding-myiZl37D.js +0 -1
- package/dist/assets/bundle-avatar-Cc_6nw01.js +0 -1
- package/dist/assets/button-D-lyR9BW.js +0 -1
- package/dist/assets/cloneDeep-BY8zW7hH.js +0 -1
- package/dist/assets/config-44sI5I0w.js +0 -53
- package/dist/assets/connect-0OZVqJvc.js +0 -1
- package/dist/assets/connect-B9GQZEi7.js +0 -5
- package/dist/assets/connect-to-Djgj6TLg.js +0 -1
- package/dist/assets/domains-DRP2VSvO.js +0 -1
- package/dist/assets/engine-BXGX_w-S.js +0 -1
- package/dist/assets/get-safe-url-BiNPujaX.js +0 -1
- package/dist/assets/index-B9LF8Bep.js +0 -1
- package/dist/assets/index-BmXPp3DU.js +0 -1
- package/dist/assets/index-CI_uwh_J.js +0 -81
- package/dist/assets/index-CbiyJRV7.js +0 -1
- package/dist/assets/info-outline-rounded-BIwvgXCK.js +0 -1
- package/dist/assets/localization-CKE-bHgd.js +0 -1
- package/dist/assets/logger-DU7baop2.js +0 -1
- package/dist/assets/passport-CkJ4B4CG.js +0 -1
- package/dist/assets/preferences-TFWtUYLy.js +0 -1
- package/dist/assets/profile-embed-B9f9hlSS.js +0 -1
- package/dist/assets/publish-resource-CyvkVMG_.js +0 -1
- package/dist/assets/sdk-CoWDgSLO.js +0 -1
- package/dist/assets/wizard-components-Bn72hVOe.js +0 -52
- package/dist/assets/wrap-locale-CF46rj6q.js +0 -1
|
@@ -63,15 +63,20 @@ async function getTrustedIssuers(blocklet, { sourceAppPid, trustAllFederated = f
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* 检测这个 blocklet 的子组件是否有 aigne 需求
|
|
66
|
+
* 1. 有组件设置了 requirements.aigne 为 true
|
|
67
|
+
* 2. 已经连接了 aigne hub
|
|
66
68
|
* @param {import('@blocklet/server-js').BlockletState} blocklet
|
|
67
69
|
* @returns {boolean}
|
|
68
70
|
*/
|
|
69
71
|
function hasAigneRequirement(blocklet) {
|
|
70
72
|
const children = blocklet.children || [];
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
const aigne = get(blocklet, 'settings.aigne', {});
|
|
74
|
+
|
|
75
|
+
const isAigneConnected = !!(aigne.url && aigne.key);
|
|
76
|
+
const hasChildWithAigneRequirement =
|
|
77
|
+
children.length > 0 && children.some((child) => get(child, 'meta.requirements.aigne', false));
|
|
78
|
+
|
|
79
|
+
return isAigneConnected || hasChildWithAigneRequirement;
|
|
75
80
|
}
|
|
76
81
|
|
|
77
82
|
module.exports = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{_ as lt}from"./vendor-mui-core-
|
|
1
|
+
import{_ as lt}from"./vendor-mui-core-CKKG_1TN.js";import{d as c}from"./vendor-hooks-DQAdyHrE.js";import{g as G}from"./vendor-react-CTtPmzVP.js";import{z as yt}from"./vendor-ux-DjXlxcvL.js";var b={exports:{}},pt=b.exports,rt;function Mt(){return rt||(rt=1,function(Y,z){(function(m,t){Y.exports=t()})(pt,function(){var m="week",t="year";return function(e,i,a){var r=i.prototype;r.week=function(s){if(s===void 0&&(s=null),s!==null)return this.add(7*(s-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var h=a(this).startOf(t).add(1,t).date(u),l=a(this).endOf(m);if(h.isBefore(l))return 1}var O=a(this).startOf(t).date(u).startOf(m).subtract(1,"millisecond"),$=this.diff(O,m,!0);return $<0?a(this).startOf("week").week():Math.ceil($)},r.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}})}(b)),b.exports}var Tt=Mt();const gt=G(Tt);var I={exports:{}},Dt=I.exports,st;function wt(){return st||(st=1,function(Y,z){(function(m,t){Y.exports=t()})(Dt,function(){var m={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,e=/\d/,i=/\d\d/,a=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,s={},u=function(n){return(n=+n)+(n>68?1900:2e3)},h=function(n){return function(o){this[n]=+o}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(n){(this.zone||(this.zone={})).offset=function(o){if(!o||o==="Z")return 0;var f=o.match(/([+-]|\d\d)/g),d=60*f[1]+(+f[2]||0);return d===0?0:f[0]==="+"?-d:d}(n)}],O=function(n){var o=s[n];return o&&(o.indexOf?o:o.s.concat(o.f))},$=function(n,o){var f,d=s.meridiem;if(d){for(var T=1;T<=24;T+=1)if(n.indexOf(d(T,0,o))>-1){f=T>12;break}}else f=n===(o?"pm":"PM");return f},ot={A:[r,function(n){this.afternoon=$(n,!1)}],a:[r,function(n){this.afternoon=$(n,!0)}],Q:[e,function(n){this.month=3*(n-1)+1}],S:[e,function(n){this.milliseconds=100*+n}],SS:[i,function(n){this.milliseconds=10*+n}],SSS:[/\d{3}/,function(n){this.milliseconds=+n}],s:[a,h("seconds")],ss:[a,h("seconds")],m:[a,h("minutes")],mm:[a,h("minutes")],H:[a,h("hours")],h:[a,h("hours")],HH:[a,h("hours")],hh:[a,h("hours")],D:[a,h("day")],DD:[i,h("day")],Do:[r,function(n){var o=s.ordinal,f=n.match(/\d+/);if(this.day=f[0],o)for(var d=1;d<=31;d+=1)o(d).replace(/\[|\]/g,"")===n&&(this.day=d)}],w:[a,h("week")],ww:[i,h("week")],M:[a,h("month")],MM:[i,h("month")],MMM:[r,function(n){var o=O("months"),f=(O("monthsShort")||o.map(function(d){return d.slice(0,3)})).indexOf(n)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[r,function(n){var o=O("months").indexOf(n)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,h("year")],YY:[i,function(n){this.year=u(n)}],YYYY:[/\d{4}/,h("year")],Z:l,ZZ:l};function ht(n){var o,f;o=n,f=s&&s.formats;for(var d=(n=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(C,x,M){var p=M&&M.toUpperCase();return x||f[M]||m[M]||f[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,L,j){return L||j.slice(1)})})).match(t),T=d.length,g=0;g<T;g+=1){var U=d[g],S=ot[U],D=S&&S[0],w=S&&S[1];d[g]=w?{regex:D,parser:w}:U.replace(/^\[|\]$/g,"")}return function(C){for(var x={},M=0,p=0;M<T;M+=1){var k=d[M];if(typeof k=="string")p+=k.length;else{var L=k.regex,j=k.parser,A=C.slice(p),v=L.exec(A)[0];j.call(x,v),C=C.replace(v,"")}}return function(P){var F=P.afternoon;if(F!==void 0){var y=P.hours;F?y<12&&(P.hours+=12):y===12&&(P.hours=0),delete P.afternoon}}(x),x}}return function(n,o,f){f.p.customParseFormat=!0,n&&n.parseTwoDigitYear&&(u=n.parseTwoDigitYear);var d=o.prototype,T=d.parse;d.parse=function(g){var U=g.date,S=g.utc,D=g.args;this.$u=S;var w=D[1];if(typeof w=="string"){var C=D[2]===!0,x=D[3]===!0,M=C||x,p=D[2];x&&(p=D[2]),s=this.$locale(),!C&&p&&(s=f.Ls[p]),this.$d=function(A,v,P,F){try{if(["x","X"].indexOf(v)>-1)return new Date((v==="X"?1e3:1)*A);var y=ht(v)(A),Z=y.year,W=y.month,ut=y.day,ft=y.hours,dt=y.minutes,ct=y.seconds,mt=y.milliseconds,tt=y.zone,et=y.week,N=new Date,_=ut||(Z||W?1:N.getDate()),q=Z||N.getFullYear(),H=0;Z&&!W||(H=W>0?W-1:N.getMonth());var B,R=ft||0,Q=dt||0,X=ct||0,J=mt||0;return tt?new Date(Date.UTC(q,H,_,R,Q,X,J+60*tt.offset*1e3)):P?new Date(Date.UTC(q,H,_,R,Q,X,J)):(B=new Date(q,H,_,R,Q,X,J),et&&(B=F(B).week(et).toDate()),B)}catch{return new Date("")}}(U,w,S,f),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),M&&U!=this.format(w)&&(this.$d=new Date("")),s={}}else if(w instanceof Array)for(var k=w.length,L=1;L<=k;L+=1){D[1]=w[L-1];var j=f.apply(this,D);if(j.isValid()){this.$d=j.$d,this.$L=j.$L,this.init();break}L===k&&(this.$d=new Date(""))}else T.call(this,g)}}})}(I)),I.exports}var Yt=wt();const Ot=G(Yt);var E={exports:{}},xt=E.exports,nt;function kt(){return nt||(nt=1,function(Y,z){(function(m,t){Y.exports=t()})(xt,function(){return function(m,t,e){t.prototype.isBetween=function(i,a,r,s){var u=e(i),h=e(a),l=(s=s||"()")[0]==="(",O=s[1]===")";return(l?this.isAfter(u,r):!this.isBefore(u,r))&&(O?this.isBefore(h,r):!this.isAfter(h,r))||(l?this.isBefore(u,r):!this.isAfter(u,r))&&(O?this.isAfter(h,r):!this.isBefore(h,r))}}})}(E)),E.exports}var Lt=kt();const zt=G(Lt);var V={exports:{}},St=V.exports,it;function Ct(){return it||(it=1,function(Y,z){(function(m,t){Y.exports=t()})(St,function(){return function(m,t){var e=t.prototype,i=e.format;e.format=function(a){var r=this,s=this.$locale();if(!this.isValid())return i.bind(this)(a);var u=this.$utils(),h=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(l){switch(l){case"Q":return Math.ceil((r.$M+1)/3);case"Do":return s.ordinal(r.$D);case"gggg":return r.weekYear();case"GGGG":return r.isoWeekYear();case"wo":return s.ordinal(r.week(),"W");case"w":case"ww":return u.s(r.week(),l==="w"?1:2,"0");case"W":case"WW":return u.s(r.isoWeek(),l==="W"?1:2,"0");case"k":case"kk":return u.s(String(r.$H===0?24:r.$H),l==="k"?1:2,"0");case"X":return Math.floor(r.$d.getTime()/1e3);case"x":return r.$d.getTime();case"z":return"["+r.offsetName()+"]";case"zzz":return"["+r.offsetName("long")+"]";default:return l}});return i.bind(this)(h)}}})}(V)),V.exports}var jt=Ct();const Pt=G(jt);c.extend(yt);c.extend(gt);c.extend(zt);c.extend(Pt);const vt={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},$t={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},K=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
|
|
2
2
|
`),at=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
|
|
3
3
|
`);class Bt{constructor({locale:z,formats:m}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=vt,this.setLocaleToValue=t=>{const e=this.getCurrentLocaleCode();return e===t.locale()?t:t.locale(e)},this.hasUTCPlugin=()=>typeof c.utc<"u",this.hasTimezonePlugin=()=>typeof c.tz<"u",this.isSame=(t,e,i)=>{const a=this.setTimezone(e,this.getTimezone(t));return t.format(i)===a.format(i)},this.cleanTimezone=t=>{switch(t){case"default":return;case"system":return c.tz.guess();default:return t}},this.createSystemDate=t=>{let e;if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const i=c.tz.guess();i==="UTC"?e=c(t):e=c.tz(t,i)}else e=c(t);return this.setLocaleToValue(e)},this.createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(K);return this.setLocaleToValue(c.utc(t))},this.createTZDate=(t,e)=>{if(!this.hasUTCPlugin())throw new Error(K);if(!this.hasTimezonePlugin())throw new Error(at);const i=t!==void 0&&!t.endsWith("Z");return this.setLocaleToValue(c(t).tz(this.cleanTimezone(e),i))},this.getLocaleFormats=()=>{const t=c.Ls,e=this.locale||"en";let i=t[e];return i===void 0&&(i=t.en),i.formats},this.adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const e=this.getTimezone(t);if(e!=="UTC"){const i=t.tz(this.cleanTimezone(e),!0);if(i.$offset===(t.$offset??0))return t;t.$offset=i.$offset}return t},this.date=(t,e="default")=>t===null?null:e==="UTC"?this.createUTCDate(t):e==="system"||e==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(t):this.createTZDate(t,e),this.getInvalidDate=()=>c(new Date("Invalid date")),this.getTimezone=t=>{if(this.hasTimezonePlugin()){const e=t.$x?.$timezone;if(e)return e}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"},this.setTimezone=(t,e)=>{if(this.getTimezone(t)===e)return t;if(e==="UTC"){if(!this.hasUTCPlugin())throw new Error(K);return t.utc()}if(e==="system")return t.local();if(!this.hasTimezonePlugin()){if(e==="default")return t;throw new Error(at)}return this.setLocaleToValue(c.tz(t,this.cleanTimezone(e)))},this.toJsDate=t=>t.toDate(),this.parse=(t,e)=>t===""?null:c(t,e,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=t=>{const e=this.getLocaleFormats(),i=a=>a.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(r,s,u)=>s||u.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(a,r,s)=>{const u=s&&s.toUpperCase();return r||e[s]||i(e[u])})},this.isValid=t=>t==null?!1:t.isValid(),this.format=(t,e)=>this.formatByString(t,this.formats[e]),this.formatByString=(t,e)=>this.setLocaleToValue(t).format(e),this.formatNumber=t=>t,this.isEqual=(t,e)=>t===null&&e===null?!0:t===null||e===null?!1:t.toDate().getTime()===e.toDate().getTime(),this.isSameYear=(t,e)=>this.isSame(t,e,"YYYY"),this.isSameMonth=(t,e)=>this.isSame(t,e,"YYYY-MM"),this.isSameDay=(t,e)=>this.isSame(t,e,"YYYY-MM-DD"),this.isSameHour=(t,e)=>t.isSame(e,"hour"),this.isAfter=(t,e)=>t>e,this.isAfterYear=(t,e)=>this.hasUTCPlugin()?!this.isSameYear(t,e)&&t.utc()>e.utc():t.isAfter(e,"year"),this.isAfterDay=(t,e)=>this.hasUTCPlugin()?!this.isSameDay(t,e)&&t.utc()>e.utc():t.isAfter(e,"day"),this.isBefore=(t,e)=>t<e,this.isBeforeYear=(t,e)=>this.hasUTCPlugin()?!this.isSameYear(t,e)&&t.utc()<e.utc():t.isBefore(e,"year"),this.isBeforeDay=(t,e)=>this.hasUTCPlugin()?!this.isSameDay(t,e)&&t.utc()<e.utc():t.isBefore(e,"day"),this.isWithinRange=(t,[e,i])=>t>=e&&t<=i,this.startOfYear=t=>this.adjustOffset(t.startOf("year")),this.startOfMonth=t=>this.adjustOffset(t.startOf("month")),this.startOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).startOf("week")),this.startOfDay=t=>this.adjustOffset(t.startOf("day")),this.endOfYear=t=>this.adjustOffset(t.endOf("year")),this.endOfMonth=t=>this.adjustOffset(t.endOf("month")),this.endOfWeek=t=>this.adjustOffset(this.setLocaleToValue(t).endOf("week")),this.endOfDay=t=>this.adjustOffset(t.endOf("day")),this.addYears=(t,e)=>this.adjustOffset(t.add(e,"year")),this.addMonths=(t,e)=>this.adjustOffset(t.add(e,"month")),this.addWeeks=(t,e)=>this.adjustOffset(t.add(e,"week")),this.addDays=(t,e)=>this.adjustOffset(t.add(e,"day")),this.addHours=(t,e)=>this.adjustOffset(t.add(e,"hour")),this.addMinutes=(t,e)=>this.adjustOffset(t.add(e,"minute")),this.addSeconds=(t,e)=>this.adjustOffset(t.add(e,"second")),this.getYear=t=>t.year(),this.getMonth=t=>t.month(),this.getDate=t=>t.date(),this.getHours=t=>t.hour(),this.getMinutes=t=>t.minute(),this.getSeconds=t=>t.second(),this.getMilliseconds=t=>t.millisecond(),this.setYear=(t,e)=>this.adjustOffset(t.set("year",e)),this.setMonth=(t,e)=>this.adjustOffset(t.set("month",e)),this.setDate=(t,e)=>this.adjustOffset(t.set("date",e)),this.setHours=(t,e)=>this.adjustOffset(t.set("hour",e)),this.setMinutes=(t,e)=>this.adjustOffset(t.set("minute",e)),this.setSeconds=(t,e)=>this.adjustOffset(t.set("second",e)),this.setMilliseconds=(t,e)=>this.adjustOffset(t.set("millisecond",e)),this.getDaysInMonth=t=>t.daysInMonth(),this.getWeekArray=t=>{const e=this.startOfWeek(this.startOfMonth(t)),i=this.endOfWeek(this.endOfMonth(t));let a=0,r=e;const s=[];for(;r<i;){const u=Math.floor(a/7);s[u]=s[u]||[],s[u].push(r),r=this.addDays(r,1),a+=1}return s},this.getWeekNumber=t=>t.week(),this.getYearRange=([t,e])=>{const i=this.startOfYear(t),a=this.endOfYear(e),r=[];let s=i;for(;this.isBefore(s,a);)r.push(s),s=this.addYears(s,1);return r},this.locale=z,this.formats=lt({},$t,m),c.extend(Ot)}getDayOfWeek(z){return z.day()+1}}export{Bt as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Ce,d as xe,g as ke,a as s,r as A}from"./vendor-react-CTtPmzVP.js";import{W as g}from"./vendor-mui-core-DnR6WYuU.js";import{an as wt,ao as Et,ap as St,a2 as R,t as Ct,aq as kt,d as Rt,ar as N,c as We}from"./vendor-utils-DCMKu06e.js";import{bV as _t}from"./index-CQgzjKgB.js";import{r as Ot}from"./cloneDeep-BY8zW7hH.js";var k={},$={};const Re=Ce(wt),Mt=Ce(Et),Ft=Ce(St);var Ie;function Bt(){if(Ie)return $;Ie=1,Object.defineProperty($,"__esModule",{value:!0}),$.flattenNames=void 0;var a=_t,e=h(a),t=Re,r=h(t),n=Mt,i=h(n),o=Ft,l=h(o);function h(c){return c&&c.__esModule?c:{default:c}}var p=$.flattenNames=function c(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=[];return(0,l.default)(u,function(f){Array.isArray(f)?c(f).map(function(v){return d.push(v)}):(0,i.default)(f)?(0,r.default)(f,function(v,b){v===!0&&d.push(b),d.push(b+"-"+v)}):(0,e.default)(f)&&d.push(f)}),d};return $.default=p,$}var L={},qe;function At(){if(qe)return L;qe=1,Object.defineProperty(L,"__esModule",{value:!0}),L.mergeClasses=void 0;var a=Re,e=i(a),t=Ot,r=i(t),n=Object.assign||function(l){for(var h=1;h<arguments.length;h++){var p=arguments[h];for(var c in p)Object.prototype.hasOwnProperty.call(p,c)&&(l[c]=p[c])}return l};function i(l){return l&&l.__esModule?l:{default:l}}var o=L.mergeClasses=function(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=h.default&&(0,r.default)(h.default)||{};return p.map(function(u){var d=h[u];return d&&(0,e.default)(d,function(f,v){c[v]||(c[v]={}),c[v]=n({},c[v],d[v])}),u}),c};return L.default=o,L}var j={},Ve;function Ht(){if(Ve)return j;Ve=1,Object.defineProperty(j,"__esModule",{value:!0}),j.autoprefix=void 0;var a=Re,e=r(a),t=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var h=arguments[l];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(o[p]=h[p])}return o};function r(o){return o&&o.__esModule?o:{default:o}}var n={borderRadius:function(l){return{msBorderRadius:l,MozBorderRadius:l,OBorderRadius:l,WebkitBorderRadius:l,borderRadius:l}},boxShadow:function(l){return{msBoxShadow:l,MozBoxShadow:l,OBoxShadow:l,WebkitBoxShadow:l,boxShadow:l}},userSelect:function(l){return{WebkitTouchCallout:l,KhtmlUserSelect:l,MozUserSelect:l,msUserSelect:l,WebkitUserSelect:l,userSelect:l}},flex:function(l){return{WebkitBoxFlex:l,MozBoxFlex:l,WebkitFlex:l,msFlex:l,flex:l}},flexBasis:function(l){return{WebkitFlexBasis:l,flexBasis:l}},justifyContent:function(l){return{WebkitJustifyContent:l,justifyContent:l}},transition:function(l){return{msTransition:l,MozTransition:l,OTransition:l,WebkitTransition:l,transition:l}},transform:function(l){return{msTransform:l,MozTransform:l,OTransform:l,WebkitTransform:l,transform:l}},absolute:function(l){var h=l&&l.split(" ");return{position:"absolute",top:h&&h[0],right:h&&h[1],bottom:h&&h[2],left:h&&h[3]}},extend:function(l,h){var p=h[l];return p||{extend:l}}},i=j.autoprefix=function(l){var h={};return(0,e.default)(l,function(p,c){var u={};(0,e.default)(p,function(d,f){var v=n[f];v?u=t({},u,v(d)):u[f]=d}),h[c]=u}),h};return j.default=i,j}var z={},Xe;function Pt(){if(Xe)return z;Xe=1,Object.defineProperty(z,"__esModule",{value:!0}),z.hover=void 0;var a=Object.assign||function(h){for(var p=1;p<arguments.length;p++){var c=arguments[p];for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(h[u]=c[u])}return h},e=xe(),t=r(e);function r(h){return h&&h.__esModule?h:{default:h}}function n(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function i(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function o(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var l=z.hover=function(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(u){o(d,u);function d(){var f,v,b,m;n(this,d);for(var E=arguments.length,O=Array(E),C=0;C<E;C++)O[C]=arguments[C];return m=(v=(b=i(this,(f=d.__proto__||Object.getPrototypeOf(d)).call.apply(f,[this].concat(O))),b),b.state={hover:!1},b.handleMouseOver=function(){return b.setState({hover:!0})},b.handleMouseOut=function(){return b.setState({hover:!1})},b.render=function(){return t.default.createElement(c,{onMouseOver:b.handleMouseOver,onMouseOut:b.handleMouseOut},t.default.createElement(p,a({},b.props,b.state)))},v),i(b,m)}return d}(t.default.Component)};return z.default=l,z}var G={},Ye;function Tt(){if(Ye)return G;Ye=1,Object.defineProperty(G,"__esModule",{value:!0}),G.active=void 0;var a=Object.assign||function(h){for(var p=1;p<arguments.length;p++){var c=arguments[p];for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(h[u]=c[u])}return h},e=xe(),t=r(e);function r(h){return h&&h.__esModule?h:{default:h}}function n(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function i(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function o(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var l=G.active=function(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(u){o(d,u);function d(){var f,v,b,m;n(this,d);for(var E=arguments.length,O=Array(E),C=0;C<E;C++)O[C]=arguments[C];return m=(v=(b=i(this,(f=d.__proto__||Object.getPrototypeOf(d)).call.apply(f,[this].concat(O))),b),b.state={active:!1},b.handleMouseDown=function(){return b.setState({active:!0})},b.handleMouseUp=function(){return b.setState({active:!1})},b.render=function(){return t.default.createElement(c,{onMouseDown:b.handleMouseDown,onMouseUp:b.handleMouseUp},t.default.createElement(p,a({},b.props,b.state)))},v),i(b,m)}return d}(t.default.Component)};return G.default=l,G}var fe={},Ke;function Nt(){if(Ke)return fe;Ke=1,Object.defineProperty(fe,"__esModule",{value:!0});var a=function(t,r){var n={},i=function(l){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n[l]=h};return t===0&&i("first-child"),t===r-1&&i("last-child"),(t===0||t%2===0)&&i("even"),Math.abs(t%2)===1&&i("odd"),i("nth-child",t),n};return fe.default=a,fe}var Ze;function Dt(){if(Ze)return k;Ze=1,Object.defineProperty(k,"__esModule",{value:!0}),k.ReactCSS=k.loop=k.handleActive=k.handleHover=k.hover=void 0;var a=Bt(),e=d(a),t=At(),r=d(t),n=Ht(),i=d(n),o=Pt(),l=d(o),h=Tt(),p=d(h),c=Nt(),u=d(c);function d(v){return v&&v.__esModule?v:{default:v}}k.hover=l.default,k.handleHover=l.default,k.handleActive=p.default,k.loop=u.default;var f=k.ReactCSS=function(b){for(var m=arguments.length,E=Array(m>1?m-1:0),O=1;O<m;O++)E[O-1]=arguments[O];var C=(0,e.default)(E),P=(0,r.default)(b,C);return(0,i.default)(P)};return k.default=f,k}var _e=Dt();const y=ke(_e);var $t=function(e,t,r,n,i){var o=i.clientWidth,l=i.clientHeight,h=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,p=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=h-(i.getBoundingClientRect().left+window.pageXOffset),u=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var d=void 0;if(u<0?d=0:u>l?d=1:d=Math.round(u*100/l)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var f=void 0;if(c<0?f=0:c>o?f=1:f=Math.round(c*100/o)/100,n!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null},we={},Lt=function(e,t,r,n){if(typeof document>"u"&&!n)return null;var i=n?new n:document.createElement("canvas");i.width=r*2,i.height=r*2;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,r,r),o.translate(r,r),o.fillRect(0,0,r,r),i.toDataURL()):null},jt=function(e,t,r,n){var i=e+"-"+t+"-"+r+(n?"-server":"");if(we[i])return we[i];var o=Lt(e,t,r,n);return we[i]=o,o},Je=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},oe=function(e){var t=e.white,r=e.grey,n=e.size,i=e.renderers,o=e.borderRadius,l=e.boxShadow,h=e.children,p=y({default:{grid:{borderRadius:o,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+jt(t,r,n,i.canvas)+") center left"}}});return A.isValidElement(h)?s.cloneElement(h,Je({},h.props,{style:Je({},h.props.style,p.grid)})):s.createElement("div",{style:p.grid})};oe.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var zt=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},Gt=function(){function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}}();function Ut(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}function Qe(a,e){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:a}function Wt(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(a,e):a.__proto__=e)}var Oe=function(a){Wt(e,a);function e(){var t,r,n,i;Ut(this,e);for(var o=arguments.length,l=Array(o),h=0;h<o;h++)l[h]=arguments[h];return i=(r=(n=Qe(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(l))),n),n.handleChange=function(p){var c=$t(p,n.props.hsl,n.props.direction,n.props.a,n.container);c&&typeof n.props.onChange=="function"&&n.props.onChange(c,p)},n.handleMouseDown=function(p){n.handleChange(p),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},r),Qe(n,i)}return Gt(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,n=this.props.rgb,i=y({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+n.r+","+n.g+","+n.b+`, 0) 0%,
|
|
1
|
+
import{e as Ce,d as xe,g as ke,a as s,r as A}from"./vendor-react-CTtPmzVP.js";import{W as g}from"./vendor-mui-core-CKKG_1TN.js";import{ao as wt,ap as Et,aq as St,a3 as R,t as Ct,ar as kt,d as Rt,as as N,c as We}from"./vendor-utils-CUs2ebe7.js";import{bW as _t}from"./index-DI4CWTXR.js";import{r as Ot}from"./cloneDeep-rgNCMFod.js";var k={},$={};const Re=Ce(wt),Mt=Ce(Et),Ft=Ce(St);var Ie;function Bt(){if(Ie)return $;Ie=1,Object.defineProperty($,"__esModule",{value:!0}),$.flattenNames=void 0;var a=_t,e=h(a),t=Re,r=h(t),n=Mt,i=h(n),o=Ft,l=h(o);function h(c){return c&&c.__esModule?c:{default:c}}var p=$.flattenNames=function c(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=[];return(0,l.default)(u,function(f){Array.isArray(f)?c(f).map(function(v){return d.push(v)}):(0,i.default)(f)?(0,r.default)(f,function(v,b){v===!0&&d.push(b),d.push(b+"-"+v)}):(0,e.default)(f)&&d.push(f)}),d};return $.default=p,$}var L={},qe;function At(){if(qe)return L;qe=1,Object.defineProperty(L,"__esModule",{value:!0}),L.mergeClasses=void 0;var a=Re,e=i(a),t=Ot,r=i(t),n=Object.assign||function(l){for(var h=1;h<arguments.length;h++){var p=arguments[h];for(var c in p)Object.prototype.hasOwnProperty.call(p,c)&&(l[c]=p[c])}return l};function i(l){return l&&l.__esModule?l:{default:l}}var o=L.mergeClasses=function(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=h.default&&(0,r.default)(h.default)||{};return p.map(function(u){var d=h[u];return d&&(0,e.default)(d,function(f,v){c[v]||(c[v]={}),c[v]=n({},c[v],d[v])}),u}),c};return L.default=o,L}var j={},Ve;function Ht(){if(Ve)return j;Ve=1,Object.defineProperty(j,"__esModule",{value:!0}),j.autoprefix=void 0;var a=Re,e=r(a),t=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var h=arguments[l];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(o[p]=h[p])}return o};function r(o){return o&&o.__esModule?o:{default:o}}var n={borderRadius:function(l){return{msBorderRadius:l,MozBorderRadius:l,OBorderRadius:l,WebkitBorderRadius:l,borderRadius:l}},boxShadow:function(l){return{msBoxShadow:l,MozBoxShadow:l,OBoxShadow:l,WebkitBoxShadow:l,boxShadow:l}},userSelect:function(l){return{WebkitTouchCallout:l,KhtmlUserSelect:l,MozUserSelect:l,msUserSelect:l,WebkitUserSelect:l,userSelect:l}},flex:function(l){return{WebkitBoxFlex:l,MozBoxFlex:l,WebkitFlex:l,msFlex:l,flex:l}},flexBasis:function(l){return{WebkitFlexBasis:l,flexBasis:l}},justifyContent:function(l){return{WebkitJustifyContent:l,justifyContent:l}},transition:function(l){return{msTransition:l,MozTransition:l,OTransition:l,WebkitTransition:l,transition:l}},transform:function(l){return{msTransform:l,MozTransform:l,OTransform:l,WebkitTransform:l,transform:l}},absolute:function(l){var h=l&&l.split(" ");return{position:"absolute",top:h&&h[0],right:h&&h[1],bottom:h&&h[2],left:h&&h[3]}},extend:function(l,h){var p=h[l];return p||{extend:l}}},i=j.autoprefix=function(l){var h={};return(0,e.default)(l,function(p,c){var u={};(0,e.default)(p,function(d,f){var v=n[f];v?u=t({},u,v(d)):u[f]=d}),h[c]=u}),h};return j.default=i,j}var z={},Xe;function Pt(){if(Xe)return z;Xe=1,Object.defineProperty(z,"__esModule",{value:!0}),z.hover=void 0;var a=Object.assign||function(h){for(var p=1;p<arguments.length;p++){var c=arguments[p];for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(h[u]=c[u])}return h},e=xe(),t=r(e);function r(h){return h&&h.__esModule?h:{default:h}}function n(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function i(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function o(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var l=z.hover=function(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(u){o(d,u);function d(){var f,v,b,m;n(this,d);for(var E=arguments.length,O=Array(E),C=0;C<E;C++)O[C]=arguments[C];return m=(v=(b=i(this,(f=d.__proto__||Object.getPrototypeOf(d)).call.apply(f,[this].concat(O))),b),b.state={hover:!1},b.handleMouseOver=function(){return b.setState({hover:!0})},b.handleMouseOut=function(){return b.setState({hover:!1})},b.render=function(){return t.default.createElement(c,{onMouseOver:b.handleMouseOver,onMouseOut:b.handleMouseOut},t.default.createElement(p,a({},b.props,b.state)))},v),i(b,m)}return d}(t.default.Component)};return z.default=l,z}var G={},Ye;function Tt(){if(Ye)return G;Ye=1,Object.defineProperty(G,"__esModule",{value:!0}),G.active=void 0;var a=Object.assign||function(h){for(var p=1;p<arguments.length;p++){var c=arguments[p];for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(h[u]=c[u])}return h},e=xe(),t=r(e);function r(h){return h&&h.__esModule?h:{default:h}}function n(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function i(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function o(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var l=G.active=function(p){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"span";return function(u){o(d,u);function d(){var f,v,b,m;n(this,d);for(var E=arguments.length,O=Array(E),C=0;C<E;C++)O[C]=arguments[C];return m=(v=(b=i(this,(f=d.__proto__||Object.getPrototypeOf(d)).call.apply(f,[this].concat(O))),b),b.state={active:!1},b.handleMouseDown=function(){return b.setState({active:!0})},b.handleMouseUp=function(){return b.setState({active:!1})},b.render=function(){return t.default.createElement(c,{onMouseDown:b.handleMouseDown,onMouseUp:b.handleMouseUp},t.default.createElement(p,a({},b.props,b.state)))},v),i(b,m)}return d}(t.default.Component)};return G.default=l,G}var fe={},Ke;function Nt(){if(Ke)return fe;Ke=1,Object.defineProperty(fe,"__esModule",{value:!0});var a=function(t,r){var n={},i=function(l){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;n[l]=h};return t===0&&i("first-child"),t===r-1&&i("last-child"),(t===0||t%2===0)&&i("even"),Math.abs(t%2)===1&&i("odd"),i("nth-child",t),n};return fe.default=a,fe}var Ze;function Dt(){if(Ze)return k;Ze=1,Object.defineProperty(k,"__esModule",{value:!0}),k.ReactCSS=k.loop=k.handleActive=k.handleHover=k.hover=void 0;var a=Bt(),e=d(a),t=At(),r=d(t),n=Ht(),i=d(n),o=Pt(),l=d(o),h=Tt(),p=d(h),c=Nt(),u=d(c);function d(v){return v&&v.__esModule?v:{default:v}}k.hover=l.default,k.handleHover=l.default,k.handleActive=p.default,k.loop=u.default;var f=k.ReactCSS=function(b){for(var m=arguments.length,E=Array(m>1?m-1:0),O=1;O<m;O++)E[O-1]=arguments[O];var C=(0,e.default)(E),P=(0,r.default)(b,C);return(0,i.default)(P)};return k.default=f,k}var _e=Dt();const y=ke(_e);var $t=function(e,t,r,n,i){var o=i.clientWidth,l=i.clientHeight,h=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,p=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,c=h-(i.getBoundingClientRect().left+window.pageXOffset),u=p-(i.getBoundingClientRect().top+window.pageYOffset);if(r==="vertical"){var d=void 0;if(u<0?d=0:u>l?d=1:d=Math.round(u*100/l)/100,t.a!==d)return{h:t.h,s:t.s,l:t.l,a:d,source:"rgb"}}else{var f=void 0;if(c<0?f=0:c>o?f=1:f=Math.round(c*100/o)/100,n!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null},we={},Lt=function(e,t,r,n){if(typeof document>"u"&&!n)return null;var i=n?new n:document.createElement("canvas");i.width=r*2,i.height=r*2;var o=i.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,i.width,i.height),o.fillStyle=t,o.fillRect(0,0,r,r),o.translate(r,r),o.fillRect(0,0,r,r),i.toDataURL()):null},jt=function(e,t,r,n){var i=e+"-"+t+"-"+r+(n?"-server":"");if(we[i])return we[i];var o=Lt(e,t,r,n);return we[i]=o,o},Je=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},oe=function(e){var t=e.white,r=e.grey,n=e.size,i=e.renderers,o=e.borderRadius,l=e.boxShadow,h=e.children,p=y({default:{grid:{borderRadius:o,boxShadow:l,absolute:"0px 0px 0px 0px",background:"url("+jt(t,r,n,i.canvas)+") center left"}}});return A.isValidElement(h)?s.cloneElement(h,Je({},h.props,{style:Je({},h.props.style,p.grid)})):s.createElement("div",{style:p.grid})};oe.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var zt=Object.assign||function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},Gt=function(){function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}}();function Ut(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}function Qe(a,e){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:a}function Wt(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(a,e):a.__proto__=e)}var Oe=function(a){Wt(e,a);function e(){var t,r,n,i;Ut(this,e);for(var o=arguments.length,l=Array(o),h=0;h<o;h++)l[h]=arguments[h];return i=(r=(n=Qe(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(l))),n),n.handleChange=function(p){var c=$t(p,n.props.hsl,n.props.direction,n.props.a,n.container);c&&typeof n.props.onChange=="function"&&n.props.onChange(c,p)},n.handleMouseDown=function(p){n.handleChange(p),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleChange),window.removeEventListener("mouseup",n.handleMouseUp)},r),Qe(n,i)}return Gt(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var r=this,n=this.props.rgb,i=y({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+n.r+","+n.g+","+n.b+`, 0) 0%,
|
|
2
2
|
rgba(`+n.r+","+n.g+","+n.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:n.a*100+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+n.r+","+n.g+","+n.b+`, 0) 0%,
|
|
3
3
|
rgba(`+n.r+","+n.g+","+n.b+", 1) 100%)"},pointer:{left:0,top:n.a*100+"%"}},overwrite:zt({},this.props.style)},{vertical:this.props.direction==="vertical",overwrite:!0});return s.createElement("div",{style:i.alpha},s.createElement("div",{style:i.checkboard},s.createElement(oe,{renderers:this.props.renderers})),s.createElement("div",{style:i.gradient}),s.createElement("div",{style:i.container,ref:function(l){return r.container=l},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},s.createElement("div",{style:i.pointer},this.props.pointer?s.createElement(this.props.pointer,this.props):s.createElement("div",{style:i.slider}))))}}]),e}(A.PureComponent||A.Component),It=function(){function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}}();function qt(a,e,t){return e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function Vt(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}function Xt(a,e){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:a}function Yt(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(a,e):a.__proto__=e)}var Kt=1,ft=38,Zt=40,Jt=[ft,Zt],Qt=function(e){return Jt.indexOf(e)>-1},er=function(e){return Number(String(e).replace(/%/g,""))},tr=1,w=function(a){Yt(e,a);function e(t){Vt(this,e);var r=Xt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(n){r.setUpdatedValue(n.target.value,n)},r.handleKeyDown=function(n){var i=er(n.target.value);if(!isNaN(i)&&Qt(n.keyCode)){var o=r.getArrowOffset(),l=n.keyCode===ft?i+o:i-o;r.setUpdatedValue(l,n)}},r.handleDrag=function(n){if(r.props.dragLabel){var i=Math.round(r.props.value+n.movementX);i>=0&&i<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(i),n)}},r.handleMouseDown=function(n){r.props.dragLabel&&(n.preventDefault(),r.handleDrag(n),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(t.value).toUpperCase(),blurValue:String(t.value).toUpperCase()},r.inputId="rc-editable-input-"+tr++,r}return It(e,[{key:"componentDidUpdate",value:function(r,n){this.props.value!==this.state.value&&(r.value!==this.props.value||n.value!==this.state.value)&&(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(r){return qt({},this.props.label,r)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||Kt}},{key:"setUpdatedValue",value:function(r,n){var i=this.props.label?this.getValueObjectWithLabel(r):r;this.props.onChange&&this.props.onChange(i,n),this.setState({value:r})}},{key:"render",value:function(){var r=this,n=y({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return s.createElement("div",{style:n.wrap},s.createElement("input",{id:this.inputId,style:n.input,ref:function(o){return r.input=o},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?s.createElement("label",{htmlFor:this.inputId,style:n.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),e}(A.PureComponent||A.Component),rr=function(e,t,r,n){var i=n.clientWidth,o=n.clientHeight,l=typeof e.pageX=="number"?e.pageX:e.touches[0].pageX,h=typeof e.pageY=="number"?e.pageY:e.touches[0].pageY,p=l-(n.getBoundingClientRect().left+window.pageXOffset),c=h-(n.getBoundingClientRect().top+window.pageYOffset);if(t==="vertical"){var u=void 0;if(c<0)u=359;else if(c>o)u=0;else{var d=-(c*100/o)+100;u=360*d/100}if(r.h!==u)return{h:u,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var f=void 0;if(p<0)f=0;else if(p>i)f=359;else{var v=p*100/i;f=360*v/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},nr=function(){function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}}();function ar(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function")}function et(a,e){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:a}function ir(a,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(a,e):a.__proto__=e)}var le=function(a){ir(e,a);function e(){var t,r,n,i;ar(this,e);for(var o=arguments.length,l=Array(o),h=0;h<o;h++)l[h]=arguments[h];return i=(r=(n=et(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(l))),n),n.handleChange=function(p){var c=rr(p,n.props.direction,n.props.hsl,n.container);c&&typeof n.props.onChange=="function"&&n.props.onChange(c,p)},n.handleMouseDown=function(p){n.handleChange(p),window.addEventListener("mousemove",n.handleChange),window.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},r),et(n,i)}return nr(e,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var r=this,n=this.props.direction,i=n===void 0?"horizontal":n,o=y({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:this.props.hsl.h*100/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-(this.props.hsl.h*100/360)+100+"%"}}},{vertical:i==="vertical"});return s.createElement("div",{style:o.hue},s.createElement("div",{className:"hue-"+i,style:o.container,ref:function(h){return r.container=h},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},s.createElement("style",null,`
|
|
4
4
|
.hue-horizontal {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{D as E,j as e,ak as l,y as h,bW as A,bX as g,bY as y,at as L,W as N}from"./vendor-mui-core-
|
|
1
|
+
import{D as E,j as e,ak as l,y as h,bW as A,bX as g,bY as y,at as L,W as N}from"./vendor-mui-core-CKKG_1TN.js";import{r as m}from"./vendor-react-CTtPmzVP.js";import{V as I,W as j}from"./vendor-ux-DjXlxcvL.js";import{A as b}from"./config-6tpm84_l.js";import{a as O}from"./page-header-BZv-tfgN.js";import{y as v,q as R,c as s,r as W}from"./index-DI4CWTXR.js";import{S as Y}from"./layout-DzZv-Jny.js";import{S as T}from"./step-actions-BNFJWVZI.js";import{S as D}from"./button-LwkniwV9.js";import"./vendor-utils-CUs2ebe7.js";import"./vendor-hooks-DQAdyHrE.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BCP2x3BR.js";import"./content-layout-Dtfb5X6M.js";import"./use-mobile-Bz2ML4Gk.js";function P({onNext:a=()=>{}}){const C=E(),{t:n,locale:p}=I(),[i,c]=m.useState(!1),[S,d]=m.useState(""),{blocklet:r}=v();m.useEffect(()=>{const t=R.findServiceFromMeta(r.meta,s.NODE_SERVICES.AUTH);d(t?.config?.whoCanAccess||s.WHO_CAN_ACCESS.ALL)},[r]);const f=async t=>{let o=s.ACCESS_POLICY_PUBLIC;t===s.WHO_CAN_ACCESS.ALL?o=s.ACCESS_POLICY_PUBLIC:t===s.WHO_CAN_ACCESS.INVITED?o=s.ACCESS_POLICY_INVITED_ONLY:t===s.WHO_CAN_ACCESS.OWNER?o=s.ACCESS_POLICY_OWNER_ONLY:t===s.WHO_CAN_ACCESS.ADMIN&&(o=s.ACCESS_POLICY_ADMIN_ONLY);try{c(!0),await W.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:s.SECURITY_RULE_DEFAULT_ID,accessPolicyId:o}}}),c(!1)}catch(_){c(!1),j.error(_.message)}},x=async t=>{i||(d(t.target.value),await f(t.target.value))},u={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:C.palette.text.secondary};return e.jsxs(k,{children:[e.jsx(l,{className:"header",children:e.jsx(O,{title:n("blocklet.config.access.title"),subTitle:n("blocklet.config.access.description")})}),e.jsx(l,{className:"form-container",children:e.jsx(h,{component:"fieldset",children:e.jsx(A,{name:"inherit",value:S,onChange:x,children:b.map(t=>e.jsxs(l,{sx:{mb:2,"&:last-child":{mb:0}},children:[e.jsx(g,{value:t.value,control:e.jsx(y,{size:"small",color:"primary"}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center",position:"relative"},children:[e.jsx(t.icon,{style:u}),e.jsx("span",{style:{marginTop:2},children:t.title[p]})]})}),e.jsx(l,{className:"tip",children:t.description[p]})]},t.value))})})}),e.jsx(T,{mt:8,disabled:i,blocklet:r,onStartNow:()=>a("complete"),children:e.jsx(D,{loading:i,variant:"contained",disabled:i,onClick:()=>a(),children:n("setup.continue")})})]})}P.propTypes={onNext:N.func};const k=L(Y)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
.header {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a,ak as E,I as C,a$ as M,aR as P,a3 as T,M as b,aO as v,aP as z,am as A,W as u}from"./vendor-mui-core-
|
|
1
|
+
import{j as a,ak as E,I as C,a$ as M,aR as P,a3 as T,M as b,aO as v,aP as z,am as A,W as u}from"./vendor-mui-core-CKKG_1TN.js";import{r as m}from"./vendor-react-CTtPmzVP.js";function B({actions:d=[],size:s="small",...f}){const[r,i]=m.useState(null),h=!!r,x=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}i(t.currentTarget)},e=t=>{try{t.stopPropagation(),t.preventDefault()}catch{}i(null)};return a.jsxs(E,{...f,children:[a.jsx(C,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:x,size:s,children:a.jsx(M,{fontSize:s})}),a.jsx(P,{id:"actions-menu","data-cy":"actions-menu",anchorEl:r,keepMounted:!0,open:h,onClose:e,slotProps:{paper:{}},children:d.map((t,o)=>{if(typeof t=="function")return t({close:e});if(t.separator)return a.jsx(T,{},`separator-${o}`);const{icon:y,text:j,render:n,onClick:g,disabled:I=!1,tip:c,...k}=t,l=n&&typeof n=="function"?n({close:e}):m.createElement(b,{...k,disabled:I,dense:!0,onClick:async p=>{p.stopPropagation(),await g?.(p),e()},key:o,"data-cy":`actions-menu-${o}`},a.jsx(v,{style:{minWidth:24,marginRight:8},children:y}),a.jsx(z,{primary:j}));return c?a.jsx(A,{title:c,children:a.jsx("span",{children:l})}):l})})]})}B.propTypes={actions:u.array,size:u.oneOf(["small","medium","large"])};export{B as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{W as B,j as l,a6 as Tt,at as tt,ak as te,D as $t,T as je,J as Yt,bX as ei,a5 as ti,I as No,cy as Ao,S as Do,cu as va,ba as ya,aP as Mo,F as ba,z as Hn,bv as xa,bw as wa,bx as Sa,bf as Ea,aZ as Bo,V as ka,aO as Ta,cP as ja,cQ as Oa,cq as Ca,cG as Ia,M as ni,am as Fo,aq as Ra,b6 as lt,c5 as Pa,c7 as La,a8 as $o,ad as Uo,aV as _a,aj as qo,Q as jn,Y as Na,ca as Wo,o as zo,aU as Aa,ar as Ht,cR as Da,cS as Ma,b4 as ki,U as Ti,ah as Ba,bg as Fa,O as $a,K as Ua,P as qa,ai as Wa,an as Vo,A as ji,aI as za,cT as Va}from"./vendor-mui-core-
|
|
1
|
+
import{W as B,j as l,a6 as Tt,at as tt,ak as te,D as $t,T as je,J as Yt,bX as ei,a5 as ti,I as No,cy as Ao,S as Do,cu as va,ba as ya,aP as Mo,F as ba,z as Hn,bv as xa,bw as wa,bx as Sa,bf as Ea,aZ as Bo,V as ka,aO as Ta,cP as ja,cQ as Oa,cq as Ca,cG as Ia,M as ni,am as Fo,aq as Ra,b6 as lt,c5 as Pa,c7 as La,a8 as $o,ad as Uo,aV as _a,aj as qo,Q as jn,Y as Na,ca as Wo,o as zo,aU as Aa,ar as Ht,cR as Da,cS as Ma,b4 as ki,U as Ti,ah as Ba,bg as Fa,O as $a,K as Ua,P as qa,ai as Wa,an as Vo,A as ji,aI as za,cT as Va}from"./vendor-mui-core-CKKG_1TN.js";import{r as q,g as ri,j as Ka,u as Ga,p as Ha,e as Xa,a as Ft,d as Ya,f as Rn,m as Ja}from"./vendor-react-CTtPmzVP.js";import{r as ii,S as Qa,s as Ko,A as Za}from"./item-BV3WfK17.js";import{F as vt,a_ as oi,a1 as Go,V as xt,K as yt,ay as el,W as Xn,bE as Oi,l as Qt,a3 as Ho,Y as Vn,bd as Xo,al as tl,b2 as nl,u as Fr,bF as rl}from"./vendor-ux-DjXlxcvL.js";import{Z as dn,q as Bt,c as il,bx as ol,by as Yn,bv as sl,bz as al,bA as ll,bB as Yo,bC as cl,bD as ul,bE as dl,ba as hl,z as fl,_ as pl,w as Jo,bF as ml,bG as gl,ay as vl,bH as yl,Y as Jn,bI as Qo,bq as Zo,k as Qn,b8 as Ci,bJ as bl,bo as xl,bK as wl,J as Xt,bL as Sl,bM as Pn,bN as Ii,bO as El}from"./index-DI4CWTXR.js";import{j as Ri,o as kl,T as Tl,L as jl,P as Ol}from"./vendor-arcblock-BCP2x3BR.js";import{u as Pi}from"./launch-result-message-C04PaKk0.js";import{a as $r}from"./page-header-BZv-tfgN.js";import{e as gt,B as Cl,z as rn,F as Zn,A as Li,a8 as es,a3 as Il,ad as Rl,x as Pl,o as sr,ae as Ll,ak as _l,al as Nl,am as Al,a as xn,an as Dl,b as Ml}from"./vendor-utils-CUs2ebe7.js";import{f as Ur}from"./index-DBs9Ljax.js";import{e as Bl}from"./engine-D18zeIE7.js";import{u as Fl,C as $l}from"./config-space-CZRqkXsR.js";import{R as Ln}from"./required-DHjZE3-Y.js";import{S as Ul}from"./index-jILCQaR3.js";import{s as ts,h as ql,w as Wl,f as zl,a as Vl,b as Kl,c as Gl,M as Hl}from"./index-oucqu2vy.js";import{p as On,a as Xl,b as Yl,u as ns,g as Jl,s as Ql}from"./vendor-hooks-DQAdyHrE.js";import{g as Zl}from"./get-safe-url-BVTaUfvO.js";import{r as rs,A as ec}from"./config-cdtQwn5t.js";import{r as tc}from"./index-_tncRnTu.js";import{r as nc}from"./cloneDeep-rgNCMFod.js";import{u as si}from"./useLocalStorage-Brr2PSz9.js";import{v as _i}from"./index-BSZ3mQac.js";import{u as rc}from"./session-CZpDtsCZ.js";import{W as ic}from"./did-address-Cq16cwTy.js";import{a as Ni}from"./api-B24x7kOD.js";import{v as oc,e as sc}from"./util-Dee1Ybp3.js";import{u as is}from"./use-mobile-_vjPRYx2.js";import{C as ac}from"./content-layout-Dtfb5X6M.js";import{C as lc,D as cc,a as uc}from"./connect-to-lX3lujSp.js";import{d as ar}from"./search-4YYphs0l.js";const Nf="blocklet-add-component-registry",Af="server-add-registry",Df=e=>`resource-${e}-add-registry`;function os(e){const{info:t}=dn();return q.useMemo(()=>!e||!e.docker?.image||e.docker?.image&&e.docker?.runBaseScript?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork,[e,t])}function ss({disabled:e=!1,children:t,onConfirm:r}){return q.useEffect(()=>{if(e)return()=>{};const i=s=>{s.code==="Enter"&&(s.metaKey===!0||s.ctrlKey===!0)&&(s.preventDefault(),s.stopPropagation(),r())};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[e,r]),t}ss.propTypes={disabled:B.bool,children:B.any.isRequired,onConfirm:B.func.isRequired};function as({onContinue:e,nextDisabled:t=!1,launching:r=!1,texts:i={listenName:"",launchingText:"",buttonNext:""},description:s=""}){const[n,o]=q.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx(dc,{children:l.jsxs(ss,{disabled:t,onConfirm:e,children:[l.jsx("div",{className:"eula-trigger",onClick:()=>o(a=>!a),children:i.listenName}),l.jsx(vt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:r?l.jsxs(l.Fragment,{children:[l.jsx(Tt,{size:14}),i.launchingText]}):i.buttonNext})]})}),l.jsx(oi,{open:n,title:i.listenName,onClose:()=>o(!1),children:s})]})}as.propTypes={onContinue:B.func.isRequired,nextDisabled:B.bool,launching:B.bool,description:B.any,texts:B.object};const dc=tt.div`
|
|
2
2
|
margin: 0 auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{J as v,j as l}from"./vendor-mui-core-CKKG_1TN.js";import{m as B,r}from"./vendor-react-CTtPmzVP.js";import{z as W,A}from"./vendor-utils-CUs2ebe7.js";import{V as L,a_ as O}from"./vendor-ux-DjXlxcvL.js";import{h as d,b as _,r as T}from"./vendor-hooks-DQAdyHrE.js";import{A as $,S as F}from"./add-component-core-BzMN094F.js";import{y as K,an as z}from"./index-DI4CWTXR.js";import"./lottie-web-4koyQiv_.js";import"./item-BV3WfK17.js";import"./index-DBs9Ljax.js";import"./delete-confirm-DiU5PO2T.js";import"./click-to-copy-Dk6ZAJOw.js";import"./confirm-Ch-CAgUO.js";import"./session-CZpDtsCZ.js";import"./get-safe-url-BVTaUfvO.js";import"./did-address-Cq16cwTy.js";import"./wait-connect-CLe9IfYi.js";import"./vendor-arcblock-BCP2x3BR.js";import"./launch-result-message-C04PaKk0.js";import"./page-header-BZv-tfgN.js";import"./engine-D18zeIE7.js";import"./config-space-CZRqkXsR.js";import"./spaces-D3H6AchN.js";import"./api-B24x7kOD.js";import"./required-DHjZE3-Y.js";import"./index-jILCQaR3.js";import"./Google-BI3aC5vK.js";import"./cloneDeep-rgNCMFod.js";import"./create-passport-svg-DeDfPZeD.js";import"./form-wrapper-pwkkz4we.js";import"./logo-uploader-D5E5QaRF.js";import"./collapse-D72lnPa9.js";import"./index-oucqu2vy.js";import"./config-cdtQwn5t.js";import"./isURL-DMMDDAKA.js";import"./section-CenHBXqj.js";import"./form-text-input-BsCymY_c.js";import"./edit.svg-CTE5eATX.js";import"./index-_tncRnTu.js";import"./useLocalStorage-Brr2PSz9.js";import"./index-BSZ3mQac.js";import"./util-Dee1Ybp3.js";import"./use-mobile-_vjPRYx2.js";import"./content-layout-Dtfb5X6M.js";import"./connect-to-lX3lujSp.js";import"./index-D88DUiSg.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-BB8sYq-N.js";import"./search-4YYphs0l.js";function $t(){const{t:u}=L(),{blocklet:h}=K(),{componentDid:s}=B(),w=v(t=>t.breakpoints.down("md")),e=new URL(window.location.href),f=e.searchParams.get("mode")==="dialog",n=e.searchParams.get("resourceType")||"",m=e.searchParams.get("resourceDid")||s,g=e.searchParams.get("store")||"",R=e.searchParams.get("showFromUrl")!=="false",y=e.searchParams.get("showResourcesSwitch")!=="false",C=e.searchParams.get("enableRunBackground")!=="false",S=e.searchParams.get("showCategory")!=="false",a=h?.meta?.did,i=g.split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[b,E]=r.useState(i.map(t=>({url:t,name:t.replace("https://","")}))),[P,D]=r.useState(null),[U,j]=r.useState("");r.useEffect(()=>{(async()=>{try{const t=await Promise.all(i.map(async o=>{const x=W(o,"/api/store.json"),{data:M}=await A.get(x);return{url:o,name:M.name}}));E(t||[])}catch(t){console.error(t)}})()},[i.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const t=z();return a&&t.connect(),()=>{a&&t.isConnected()&&t.disconnect()}},[a]),d(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const c=_(t=>{t.data?.event==="resourceDialog.select"&&t.data?.componentDid===s&&(D(t.data.data),j(t.data.storeUrl))});d(()=>{window.addEventListener("message",c)}),T(()=>{window.removeEventListener("message",c)});const p=({inDialog:t=!0}={})=>l.jsx($,{stores:b,selectedMeta:P,storeUrl:U,resourceType:n,resourceDid:m,mode:"embed",inDialog:t,storageKey:F(`${n}+${m}`),showResourcesSwitch:y,showFromUrl:R,enableRunBackground:C,showCategory:S});return f?l.jsx(O,{className:"resource-dialog",title:u("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:w?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:p()}):p({inDialog:!1})}export{$t as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,i as u}from"./vendor-react-CTtPmzVP.js";import{j as e,I as z,at as n,W as o}from"./vendor-mui-core-
|
|
1
|
+
import{r as a,i as u}from"./vendor-react-CTtPmzVP.js";import{j as e,I as z,at as n,W as o}from"./vendor-mui-core-CKKG_1TN.js";import{b9 as b,a$ as f,b0 as g}from"./vendor-ux-DjXlxcvL.js";import{X as j}from"./index-DI4CWTXR.js";import{t as k}from"./question-mark-circle.svg-GhTaklFN.js";const v=t=>a.createElement("svg",{width:21,height:20,viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg",...t},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797a8.98 8.98 0 0 1 2.227 1.439 7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 0 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86a11.7 11.7 0 0 0-.44 1.34 7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"}));function H({SessionContext:t,extraItems:c=[],showLocale:r=!0,showHelper:l=!0,showSessionManager:i=!0,sessionManagerProps:d={}}){const{session:m}=a.useContext(t),{locale:p}=a.useContext(b),h=u(),w=()=>{if(h.pathname.indexOf("/store")>-1){window.open("https://www.arcblock.io/content/docs/createblocklet","_blank");return}window.open("https://www.arcblock.io/content/docs/blocklet-developer","_blank")};return e.jsxs(e.Fragment,{children:[c.map((s,x)=>a.cloneElement(s,{key:x})),r&&e.jsx(A,{"data-cy":"locale-addon",icon:v,size:23,showText:!1,className:"locale-addon"}),e.jsx(j,{}),l&&e.jsx(z,{onClick:w,children:e.jsx(k,{})}),i&&e.jsx(M,{locale:p,session:m,size:24,showRole:!0,...d,showManageBlocklet:!1})]})}H.propTypes={SessionContext:o.object.isRequired,extraItems:o.array,showLocale:o.bool,showSessionManager:o.bool,showHelper:o.bool,sessionManagerProps:o.object};const M=n(g)`
|
|
2
2
|
.user-addon {
|
|
3
3
|
.user-avatar {
|
|
4
4
|
width: 28px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as B,g as Ue}from"./vendor-react-CTtPmzVP.js";import{j as $,a6 as ue,ak as P,Q as We,dK as Ve,T as ee,W as U,bX as Ke,a5 as He,bf as Ge,aZ as Ze,at as Oe,U as Ye,b6 as ne,z as Je,A as Qe,dL as Ae,bn as Q,a3 as K,dM as Xe,am as xe,bl as we}from"./vendor-mui-core-
|
|
1
|
+
import{r as B,g as Ue}from"./vendor-react-CTtPmzVP.js";import{j as $,a6 as ue,ak as P,Q as We,dK as Ve,T as ee,W as U,bX as Ke,a5 as He,bf as Ge,aZ as Ze,at as Oe,U as Ye,b6 as ne,z as Je,A as Qe,dL as Ae,bn as Q,a3 as K,dM as Xe,am as xe,bl as we}from"./vendor-mui-core-CKKG_1TN.js";import{Z as te,Y as et,w as Ce,q as tt,a3 as rt,cD as st,C as nt,cE as at,c as it,T as $e,G as Ee,ak as De,J as Y,cF as ot}from"./index-DI4CWTXR.js";import{w as fe,P as lt}from"./permission-DC8i_y8F.js";import{V as oe,F as Z,W as H,a_ as Ie,cU as J,cV as ct,bL as ae,n as ut,cW as ge,cX as ft,cY as dt,cZ as mt,j as ce,o as me,a1 as je,b9 as pt}from"./vendor-ux-DjXlxcvL.js";import{v as Te}from"./vendor-hooks-DQAdyHrE.js";import{C as be}from"./confirm-Ch-CAgUO.js";import{f as ie}from"./index-DBs9Ljax.js";import{u as ht}from"./useSetState-L-f8mSga.js";import{u as Le}from"./session-CZpDtsCZ.js";import{S as V}from"./section-CenHBXqj.js";import{C as gt}from"./click-to-copy-Dk6ZAJOw.js";import{b as qe}from"./team-YWd-FRKh.js";import{w as pe,af as yt}from"./vendor-utils-CUs2ebe7.js";import{v as bt}from"./index-BSZ3mQac.js";import{W as vt}from"./did-address-Cq16cwTy.js";import{V as _t}from"./status-MSXp_buG.js";import{F as ke}from"./form-text-input-BsCymY_c.js";import"./vendor-arcblock-BCP2x3BR.js";import"./lottie-web-4koyQiv_.js";import"./required-DHjZE3-Y.js";import"./isURL-DMMDDAKA.js";import"./use-app-logo-hIHAHSSI.js";import"./omit-BeaKJrg9.js";import"./index-0ZSFNH-D.js";import"./form-wrapper-pwkkz4we.js";import"./edit.svg-CTE5eATX.js";const xt=localStorage.getItem("enableDebug")==="true";function wt({teamDid:T,size:O="small",...I}){const{t:A}=oe(),{api:j}=te(),[x,h]=B.useState(!1),[l,y]=B.useState(null),p=()=>{h(!1),y(null)},f=async()=>{try{h(!0);const n=await j.clearCache({input:{teamDid:T}});H.success(A("blocklet.config.clearCache.success",{count:n.removed?.length||0}))}catch(n){H.error(ie(n))}finally{h(!1),y(null)}},e={title:A("blocklet.config.clearCache.title"),description:A("blocklet.config.clearCache.description"),confirm:A("common.confirm"),cancel:A("common.cancel"),onConfirm:f,onCancel:p};return $.jsxs("div",{...I,children:[$.jsxs(Z,{onClick:()=>y(e),color:"error",variant:"outlined",size:O,children:[x?$.jsx(ue,{size:16,style:{marginRight:5}}):null,A("blocklet.config.clearCache.action")]}),l&&$.jsx(be,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}function Pe({onChange:T=()=>{},disabled:O=!1,loading:I=!1,inService:A=!1}){const{t:j}=oe(),{api:x,session:h}=Le(),{blocklet:l}=et(),[y,p]=ht({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),f=()=>p({isConnectOpen:!1}),e=()=>{if(tt.isInProgress(l.status)){H.error(j("blocklet.error.isInProgress"));return}p({confirmDialogOpen:!0})};return $.jsxs($.Fragment,{children:[$.jsx(V,{title:j("blocklet.config.migrate.button"),desc:j("blocklet.config.migrate.description"),children:$.jsx(P,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:$.jsxs(We,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:O||I,onClick:e,children:[$.jsx(Ve,{style:{fontSize:"1.3em",marginRight:4}}),j("blocklet.config.migrate.button")]})})}),$.jsxs($.Fragment,{children:[y.isConnectOpen&&$.jsx(Ce,{popup:!0,open:y.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:x.get,checkTimeout:5*60*1e3,onSuccess:()=>{T(),A&&h.logout(),f()},extraParams:{appDid:l.appDid},messages:{title:j("setup.keyPair.title"),scan:j("setup.keyPair.scan"),confirm:j("setup.keyPair.confirm"),success:j("setup.keyPair.success")},onClose:f}),y.confirmDialogOpen&&$.jsx(be,{title:$.jsx(ee,{sx:{fontSize:"20px",fontWeight:"500"},children:j("blocklet.config.migrate.title")}),description:$.jsx(ee,{sx:{fontSize:"14px",color:"#9397A1"},children:j("blocklet.config.migrate.confirm")}),confirm:j("common.confirm"),cancel:j("common.cancel"),onConfirm:()=>p({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>p({confirmDialogOpen:!1})})]})]})}Pe.propTypes={onChange:U.func,disabled:U.bool,loading:U.bool,inService:U.bool};function Me({onCancel:T,onSuccess:O,onError:I=()=>{}}){const{api:A}=B.useContext(rt),[j,x]=B.useState(!1),{t:h,locale:l}=oe(),[y,p]=B.useState(""),[f,e]=B.useState(!1),[n,a]=B.useState(0),[r,t]=B.useState(""),{endpoint:o}=qe(),[s,i]=B.useState(!1),u=c=>{p(null),x(!0);try{t(c.result),a(_.length-1)}catch(m){const b=ie(m);p(b),I(m)}finally{x(!1)}},d=()=>{e(!0),a(1)},g=()=>{e(!1),a(0)},_=[{body:$.jsxs(P,{children:[$.jsx(ee,{children:h("team.transferApp.transferDialog.tips.progress")}),$.jsx(ee,{sx:{mt:3,mb:2},children:h("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:h("common.cancel"),confirm:h("team.transferApp.transferDialog.createTransferLink"),onCancel:T,onConfirm:d},{cancel:h("common.cancel"),confirm:h("team.transferApp.transferDialog.createTransferLink"),body:()=>$.jsx(Ce,{action:"transfer-app-owner",open:f,locale:l,checkFn:A.get,onClose:g,onSuccess:u,checkTimeout:5*60*1e3,extraParams:{},messages:{title:h("team.transferApp.connectDialog.title"),scan:h("team.transferApp.connectDialog.scan"),confirm:h("team.transferApp.connectDialog.confirm"),success:h("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const c=st({transferId:r.transferId,endpoint:o});return $.jsxs($.Fragment,{children:[$.jsx(P,{component:X,dangerouslySetInnerHTML:{__html:h("team.transferApp.transferDialog.createSuccessTip1")}}),$.jsx(P,{component:X,sx:{mt:2},children:$.jsx(X,{children:h("team.transferApp.transferDialog.createSuccessTip3")})}),$.jsxs(P,{children:[$.jsx(P,{component:X,sx:{mt:2},children:$.jsx(X,{children:h("team.transferApp.transferDialog.createSuccessTip2",{expireDate:nt(r.expireDate,l)})})}),$.jsx(P,{sx:{my:1},children:$.jsx(gt,{children:c})})]}),$.jsx("div",{children:$.jsx(Ke,{value:"end",control:$.jsx(He,{checked:s,onChange:m=>i(m.target.checked)}),label:h("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:h("common.confirm"),onConfirm:O}],v=_[n];return $.jsxs(Ie,{title:$.jsx(X,{className:"title",children:h("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:$.jsxs($.Fragment,{children:[v.cancel&&$.jsx(Z,{onClick:v.onCancel,color:"inherit",children:v.cancel}),$.jsxs(Z,{onClick:v.onConfirm,color:"error",disabled:j||n===_.length-1&&!s,variant:"contained",autoFocus:!0,children:[j&&$.jsx(ue,{size:16}),v.confirm]})]}),children:[$.jsx(Ge,{component:"div",children:typeof v.body=="function"?v.body():v.body}),!!y&&$.jsx(Ze,{severity:"error",variant:"icon",children:y})]})}Me.propTypes={onCancel:U.func.isRequired,onSuccess:U.func.isRequired,onError:U.func};const X=Oe.div`
|
|
2
2
|
font-size: 16px;
|
|
3
3
|
font-weight: bold;
|
|
4
4
|
&.title {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,ak as d,Q as p,at as x,W as u}from"./vendor-mui-core-
|
|
1
|
+
import{j as t,ak as d,Q as p,at as x,W as u}from"./vendor-mui-core-CKKG_1TN.js";import{r as o}from"./vendor-react-CTtPmzVP.js";import{b9 as g}from"./vendor-ux-DjXlxcvL.js";import{a as h}from"./page-header-BZv-tfgN.js";import{Y as b}from"./index-DI4CWTXR.js";import{A as j}from"./config-cdtQwn5t.js";import{S as k}from"./step-actions-BNFJWVZI.js";import{S}from"./layout-DzZv-Jny.js";import"./vendor-utils-CUs2ebe7.js";import"./vendor-hooks-DQAdyHrE.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BCP2x3BR.js";import"./isURL-DMMDDAKA.js";import"./section-CenHBXqj.js";import"./required-DHjZE3-Y.js";import"./form-wrapper-pwkkz4we.js";import"./form-text-input-BsCymY_c.js";import"./edit.svg-CTE5eATX.js";import"./wait-connect-CLe9IfYi.js";import"./get-safe-url-BVTaUfvO.js";import"./index-_tncRnTu.js";import"./index-DBs9Ljax.js";import"./use-mobile-Bz2ML4Gk.js";import"./content-layout-Dtfb5X6M.js";function y({onNext:s=()=>{},onPrevious:l=()=>{}}){const{t:r}=o.useContext(g),{blocklet:e}=b(),i=o.useMemo(()=>e?.meta?.requirements,[e]),n=o.useRef(null),[a,m]=o.useState(!1),f=async()=>{try{m(!0),(await n.current.onSubmit()||!i?.aigne)&&s()}catch(c){console.error("error",c)}finally{m(!1)}};return t.jsxs(C,{children:[t.jsx("div",{className:"header",children:t.jsx(h,{title:r("setting.aigne.config"),onClickBack:l})}),t.jsx(d,{className:"form-container",children:t.jsx(j,{orientation:"vertical",hideSubmitButton:!0,hideDivider:!0,ref:n,source:"setup",forceValidate:i?.aigne})}),t.jsxs(k,{blocklet:e,children:[!i?.aigne&&t.jsx(p,{className:"bottom-button-skip",sx:{mr:1},onClick:()=>s(),children:r("setup.skip")}),t.jsx(p,{className:"start-now bottom-button",loading:a,variant:"contained",disabled:a,onClick:f,children:r("setup.continue")})]})]})}y.propTypes={onNext:u.func,onPrevious:u.func};const C=x(S)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as a}from"./vendor-utils-CUs2ebe7.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{z as E,x as k}from"./vendor-utils-CUs2ebe7.js";import{Z as T,Y as j,c as M}from"./index-DI4CWTXR.js";import{r as e}from"./vendor-react-CTtPmzVP.js";import{V as B}from"./vendor-ux-DjXlxcvL.js";import{u as D}from"./use-mobile-_vjPRYx2.js";import{D as H,j as o,ak as w,a6 as I}from"./vendor-mui-core-CKKG_1TN.js";import"./vendor-arcblock-BCP2x3BR.js";import"./vendor-hooks-DQAdyHrE.js";import"./lottie-web-4koyQiv_.js";function K(){const{info:x,inService:g}=T(),{blocklet:y}=j(),{locale:u}=B(),f=e.useRef(null),r=H(),[L,R]=e.useState(0),m=D(),[t,S]=e.useState(!0),s=e.useRef(null);let a="";g?a=M.WELLKNOWN_SERVICE_PATH_PREFIX:a=x.routing.adminPath;const c=new URLSearchParams;g?c.set("appUrl",window.location.origin):c.set("authKey","__sst"),c.set("schemaKey",E(window.location.origin,a,`/api/theme?id=${encodeURIComponent(y.meta.did)}`));const l=e.useCallback(()=>{if(s.current){const n=k(JSON.parse(JSON.stringify(r)),["palette","typography","shape","direction","breakpoints","mixins","shadows","transitions","zIndex"]);s.current.contentWindow.postMessage({type:"SEND_THEME",payload:n},window.location.origin)}},[r]),d=e.useCallback(()=>{s.current&&s.current.contentWindow.postMessage({type:"SEND_LOCALE",payload:u},window.location.origin)},[u]);return e.useEffect(()=>{const n=i=>{i.origin===window.location.origin&&(i.data.type==="REQUEST_THEME"&&l(),i.data.type==="THEME_BUILDER_LOADED"&&(d(),S(!1)))};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[l,d]),e.useEffect(()=>{t===!1&&l()},[r,t,l]),e.useEffect(()=>{t===!1&&d()},[u,t,d]),e.useEffect(()=>{const n=document.querySelector("#arc__dashboard-main"),i=document.querySelector(".dashboard-content"),p=()=>{if(f.current){const{height:b}=n.getBoundingClientRect(),{top:C}=i.getBoundingClientRect(),{top:_}=f.current.getBoundingClientRect();let h=b-_+C-(m?108:164);m&&(h=Math.min(h,600)),R(h)}};return p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[m,r]),o.jsxs(o.Fragment,{children:[o.jsx(w,{ref:f}),t&&o.jsx(w,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px"},children:o.jsx(I,{})}),o.jsx("iframe",{title:"Theme Builder",ref:s,src:`${E(window.location.origin,a,"/hosted/theme-builder/")}?${c.toString()}`,style:{border:0,width:"100%",height:`${L}px`,display:t?"none":"block"}})]})}export{K as default};
|