@paperless/core 2.0.1-beta.151 → 2.0.1-beta.153
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/CHANGELOG.md +23 -0
- package/dist/{paperless/p-c879f50c.entry.js → build/p-0103e9ac.entry.js} +2 -2
- package/dist/build/{p-0740b690.entry.js → p-133e9259.entry.js} +2 -2
- package/dist/build/{p-71666551.entry.js → p-213bc400.entry.js} +2 -2
- package/dist/build/{p-e33a56c8.entry.js → p-219db898.entry.js} +2 -2
- package/dist/build/{p-cc3307b8.entry.js → p-2da67519.entry.js} +2 -2
- package/dist/build/{p-8981247d.entry.js → p-302eedc6.entry.js} +2 -2
- package/dist/build/p-308c37d9.js +2 -0
- package/dist/build/p-32f997e7.entry.js +2 -0
- package/dist/build/p-3d4c4b9e.entry.js +2 -0
- package/dist/build/p-3d4c4b9e.entry.js.map +1 -0
- package/dist/{paperless/p-add932d6.entry.js → build/p-4fb1f39b.entry.js} +2 -2
- package/dist/{paperless/p-5048c4c2.entry.js → build/p-50a816b0.entry.js} +2 -2
- package/dist/{paperless/p-8fcf3bb8.entry.js → build/p-7b7c60de.entry.js} +2 -2
- package/dist/build/{p-e2054751.entry.js → p-9e4cbacf.entry.js} +2 -2
- package/dist/build/p-ad3595e3.entry.js +3 -0
- package/dist/build/p-ad3595e3.entry.js.map +1 -0
- package/dist/build/p-b137cbd4.entry.js +2 -0
- package/dist/build/{p-d6828011.entry.js → p-bb7a5be7.entry.js} +2 -2
- package/dist/build/{p-2edd87f3.entry.js → p-c3558fb4.entry.js} +2 -2
- package/dist/build/{p-26a3990a.entry.js → p-c892b87a.entry.js} +2 -2
- package/dist/build/p-cropper.entry.esm.js.map +1 -1
- package/dist/build/{p-fa0234e9.entry.js → p-dc5fab19.entry.js} +2 -2
- package/dist/{paperless/p-0875bbbb.entry.js → build/p-e596d429.entry.js} +2 -2
- package/dist/build/{p-d4152f66.entry.js → p-fa78c45a.entry.js} +2 -2
- package/dist/build/p-range.entry.esm.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/index-BDuPp9vl.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-accordion.cjs.entry.js +2 -2
- package/dist/cjs/p-attachment.cjs.entry.js +6 -6
- package/dist/cjs/p-button-group.cjs.entry.js +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +1 -1
- package/dist/cjs/p-checkbox_4.cjs.entry.js +3 -3
- package/dist/cjs/p-content-slider.cjs.entry.js +2 -2
- package/dist/cjs/p-cropper.cjs.entry.js +6 -19
- package/dist/cjs/p-cropper.cjs.entry.js.map +1 -1
- package/dist/cjs/p-cropper.entry.cjs.js.map +1 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +2 -2
- package/dist/cjs/p-empty-state_9.cjs.entry.js +8 -8
- package/dist/cjs/p-field_2.cjs.entry.js +3 -3
- package/dist/cjs/p-label.cjs.entry.js +3 -3
- package/dist/cjs/p-listing.cjs.entry.js +2 -2
- package/dist/cjs/p-navbar.cjs.entry.js +1 -1
- package/dist/cjs/p-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/p-navigation-section.cjs.entry.js +1 -1
- package/dist/cjs/p-pagination_3.cjs.entry.js +4 -4
- package/dist/cjs/p-portal.cjs.entry.js +1 -1
- package/dist/cjs/p-range.cjs.entry.js +44 -0
- package/dist/cjs/p-range.cjs.entry.js.map +1 -0
- package/dist/cjs/p-range.entry.cjs.js.map +1 -0
- package/dist/cjs/p-select.cjs.entry.js +1 -1
- package/dist/cjs/p-toast.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/helpers/portal/portal.component.js +1 -1
- package/dist/collection/components/molecules/accordion/accordion.component.js +2 -2
- package/dist/collection/components/molecules/attachment/attachment.component.js +6 -6
- package/dist/collection/components/molecules/button-group/button-group.component.js +1 -1
- package/dist/collection/components/molecules/calendar/calendar.component.js +1 -1
- package/dist/collection/components/molecules/content-slider/content-slider.component.js +2 -2
- package/dist/collection/components/molecules/cropper/cropper.component.css +1 -0
- package/dist/collection/components/{deprecated/molecules → molecules}/cropper/cropper.component.js +8 -41
- package/dist/collection/components/molecules/cropper/cropper.component.js.map +1 -0
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +2 -2
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +3 -3
- package/dist/collection/components/molecules/empty-state/empty-state.component.js +2 -2
- package/dist/collection/components/molecules/field/field/field.component.js +3 -3
- package/dist/collection/components/molecules/label/label.component.js +3 -3
- package/dist/collection/components/molecules/navigation/item/navigation-item.component.js +2 -2
- package/dist/collection/components/molecules/navigation/section/navigation-section.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pages/pagination-pages.component.js +1 -1
- package/dist/collection/components/molecules/pagination/pagination/pagination.component.js +3 -3
- package/dist/collection/components/molecules/range/range.component.css +1 -0
- package/dist/collection/components/molecules/range/range.component.js +144 -0
- package/dist/collection/components/molecules/range/range.component.js.map +1 -0
- package/dist/collection/components/molecules/select/select.component.js +1 -1
- package/dist/collection/components/molecules/table/cell/table-cell.component.js +1 -1
- package/dist/collection/components/molecules/table/footer/table-footer.component.js +2 -2
- package/dist/collection/components/molecules/table/row/table-row.component.js +3 -3
- package/dist/collection/components/molecules/toast/toast.component.js +1 -1
- package/dist/collection/components/organisms/listing/listing.component.js +2 -2
- package/dist/collection/components/organisms/navbar/navbar.component.js +1 -1
- package/dist/components/{p-D07Uh9cR.js → p-6G9LqZu0.js} +3 -3
- package/dist/components/{p-D07Uh9cR.js.map → p-6G9LqZu0.js.map} +1 -1
- package/dist/components/{p-CU2NvmYF.js → p-B60b7s3F.js} +9 -9
- package/dist/components/{p-CU2NvmYF.js.map → p-B60b7s3F.js.map} +1 -1
- package/dist/components/{p-DQE2U_Lj.js → p-BPFWBp7T.js} +9 -9
- package/dist/components/{p-DQE2U_Lj.js.map → p-BPFWBp7T.js.map} +1 -1
- package/dist/components/{p-DfRQHBer.js → p-BuB74H5T.js} +3 -3
- package/dist/components/{p-DfRQHBer.js.map → p-BuB74H5T.js.map} +1 -1
- package/dist/components/{p-Du_Am2CT.js → p-C0ZWBE1t.js} +6 -6
- package/dist/components/{p-Du_Am2CT.js.map → p-C0ZWBE1t.js.map} +1 -1
- package/dist/components/{p-FA9hEJhK.js → p-C4qAvszO.js} +4 -4
- package/dist/components/{p-FA9hEJhK.js.map → p-C4qAvszO.js.map} +1 -1
- package/dist/components/{p-Dh_4gXYW.js → p-C6mKH4oI.js} +3 -3
- package/dist/components/{p-Dh_4gXYW.js.map → p-C6mKH4oI.js.map} +1 -1
- package/dist/components/{p-jSbWZMTW.js → p-CJPrTM14.js} +3 -3
- package/dist/components/{p-jSbWZMTW.js.map → p-CJPrTM14.js.map} +1 -1
- package/dist/components/{p-C7SA9Zu6.js → p-COcP6KwP.js} +5 -5
- package/dist/components/{p-C7SA9Zu6.js.map → p-COcP6KwP.js.map} +1 -1
- package/dist/components/{p-DnE_NWa3.js → p-CSK_X0tW.js} +9 -9
- package/dist/components/{p-DnE_NWa3.js.map → p-CSK_X0tW.js.map} +1 -1
- package/dist/components/{p-5BV5XA3F.js → p-CdJmhxHE.js} +5 -5
- package/dist/components/{p-5BV5XA3F.js.map → p-CdJmhxHE.js.map} +1 -1
- package/dist/components/{p-Bs_oUMiX.js → p-QH6YwDKn.js} +4 -4
- package/dist/components/{p-Bs_oUMiX.js.map → p-QH6YwDKn.js.map} +1 -1
- package/dist/components/{p-v8w9H3NB.js → p-S7p7V6sq.js} +4 -4
- package/dist/components/{p-v8w9H3NB.js.map → p-S7p7V6sq.js.map} +1 -1
- package/dist/components/p-__-g_hj0.js +69 -0
- package/dist/components/p-__-g_hj0.js.map +1 -0
- package/dist/components/p-accordion.js +2 -2
- package/dist/components/p-attachment.js +10 -10
- package/dist/components/p-button-group.js +1 -1
- package/dist/components/{p-DqpPnj1P.js → p-c2_LHyBE.js} +3 -3
- package/dist/components/{p-DqpPnj1P.js.map → p-c2_LHyBE.js.map} +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-content-slider.js +2 -2
- package/dist/components/p-cropper.js +15 -23
- package/dist/components/p-cropper.js.map +1 -1
- package/dist/components/p-datepicker.js +9 -9
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/p-empty-state.js +1 -1
- package/dist/components/p-field-container.js +1 -1
- package/dist/components/p-field.js +1 -1
- package/dist/components/p-helper.js +1 -1
- package/dist/components/p-label.js +3 -3
- package/dist/components/p-listing.js +2 -2
- package/dist/components/p-navbar.js +1 -1
- package/dist/components/p-navigation-item.js +2 -2
- package/dist/components/p-navigation-section.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-portal.js +1 -1
- package/dist/components/p-profile.js +2 -2
- package/dist/components/p-range.d.ts +11 -0
- package/dist/components/p-range.js +9 -0
- package/dist/components/p-range.js.map +1 -0
- package/dist/components/p-select.js +7 -7
- package/dist/components/p-table-cell.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table-header.js +1 -1
- package/dist/components/p-table-row.js +1 -1
- package/dist/components/p-table.js +14 -14
- package/dist/components/p-toast.js +1 -1
- package/dist/components/p-tooltip.js +1 -1
- package/dist/components/{p-B1sC2mve.js → p-z7y5Yxgj.js} +7 -7
- package/dist/components/{p-B1sC2mve.js.map → p-z7y5Yxgj.js.map} +1 -1
- package/dist/esm/index-DhGo7hbh.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-accordion.entry.js +2 -2
- package/dist/esm/p-attachment.entry.js +6 -6
- package/dist/esm/p-button-group.entry.js +1 -1
- package/dist/esm/p-calendar.entry.js +1 -1
- package/dist/esm/p-checkbox_4.entry.js +3 -3
- package/dist/esm/p-content-slider.entry.js +2 -2
- package/dist/esm/p-cropper.entry.js +6 -19
- package/dist/esm/p-cropper.entry.js.map +1 -1
- package/dist/esm/p-datepicker.entry.js +2 -2
- package/dist/esm/p-empty-state_9.entry.js +8 -8
- package/dist/esm/p-field_2.entry.js +3 -3
- package/dist/esm/p-label.entry.js +3 -3
- package/dist/esm/p-listing.entry.js +2 -2
- package/dist/esm/p-navbar.entry.js +1 -1
- package/dist/esm/p-navigation-item.entry.js +2 -2
- package/dist/esm/p-navigation-section.entry.js +1 -1
- package/dist/esm/p-pagination_3.entry.js +4 -4
- package/dist/esm/p-portal.entry.js +1 -1
- package/dist/esm/p-range.entry.js +42 -0
- package/dist/esm/p-range.entry.js.map +1 -0
- package/dist/esm/p-select.entry.js +1 -1
- package/dist/esm/p-toast.entry.js +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/{build/p-c879f50c.entry.js → paperless/p-0103e9ac.entry.js} +2 -2
- package/dist/paperless/{p-0740b690.entry.js → p-133e9259.entry.js} +2 -2
- package/dist/paperless/{p-71666551.entry.js → p-213bc400.entry.js} +2 -2
- package/dist/paperless/{p-e33a56c8.entry.js → p-219db898.entry.js} +2 -2
- package/dist/paperless/{p-cc3307b8.entry.js → p-2da67519.entry.js} +2 -2
- package/dist/paperless/{p-8981247d.entry.js → p-302eedc6.entry.js} +2 -2
- package/dist/paperless/p-32f997e7.entry.js +2 -0
- package/dist/paperless/p-3d4c4b9e.entry.js +2 -0
- package/dist/paperless/p-3d4c4b9e.entry.js.map +1 -0
- package/dist/{build/p-add932d6.entry.js → paperless/p-4fb1f39b.entry.js} +2 -2
- package/dist/{build/p-5048c4c2.entry.js → paperless/p-50a816b0.entry.js} +2 -2
- package/dist/{build/p-8fcf3bb8.entry.js → paperless/p-7b7c60de.entry.js} +2 -2
- package/dist/paperless/{p-e2054751.entry.js → p-9e4cbacf.entry.js} +2 -2
- package/dist/paperless/p-ad3595e3.entry.js +3 -0
- package/dist/paperless/p-ad3595e3.entry.js.map +1 -0
- package/dist/paperless/p-b137cbd4.entry.js +2 -0
- package/dist/paperless/{p-d6828011.entry.js → p-bb7a5be7.entry.js} +2 -2
- package/dist/paperless/{p-2edd87f3.entry.js → p-c3558fb4.entry.js} +2 -2
- package/dist/paperless/{p-26a3990a.entry.js → p-c892b87a.entry.js} +2 -2
- package/dist/paperless/p-cropper.entry.esm.js.map +1 -1
- package/dist/paperless/{p-fa0234e9.entry.js → p-dc5fab19.entry.js} +2 -2
- package/dist/{build/p-0875bbbb.entry.js → paperless/p-e596d429.entry.js} +2 -2
- package/dist/paperless/{p-d4152f66.entry.js → p-fa78c45a.entry.js} +2 -2
- package/dist/paperless/p-range.entry.esm.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/{deprecated/molecules → molecules}/cropper/cropper.component.d.ts +2 -6
- package/dist/types/components/molecules/range/range.component.d.ts +24 -0
- package/dist/types/components.d.ts +66 -10
- package/package.json +2 -2
- package/dist/build/p-2d60e194.js +0 -2
- package/dist/build/p-30f6e463.entry.js +0 -3
- package/dist/build/p-30f6e463.entry.js.map +0 -1
- package/dist/build/p-474a16ab.entry.js +0 -2
- package/dist/build/p-eef52967.entry.js +0 -2
- package/dist/collection/components/deprecated/molecules/cropper/cropper.component.css +0 -1
- package/dist/collection/components/deprecated/molecules/cropper/cropper.component.js.map +0 -1
- package/dist/paperless/p-30f6e463.entry.js +0 -3
- package/dist/paperless/p-30f6e463.entry.js.map +0 -1
- package/dist/paperless/p-474a16ab.entry.js +0 -2
- package/dist/paperless/p-eef52967.entry.js +0 -2
- /package/dist/build/{p-c879f50c.entry.js.map → p-0103e9ac.entry.js.map} +0 -0
- /package/dist/build/{p-0740b690.entry.js.map → p-133e9259.entry.js.map} +0 -0
- /package/dist/build/{p-71666551.entry.js.map → p-213bc400.entry.js.map} +0 -0
- /package/dist/build/{p-e33a56c8.entry.js.map → p-219db898.entry.js.map} +0 -0
- /package/dist/build/{p-cc3307b8.entry.js.map → p-2da67519.entry.js.map} +0 -0
- /package/dist/build/{p-8981247d.entry.js.map → p-302eedc6.entry.js.map} +0 -0
- /package/dist/build/{p-474a16ab.entry.js.map → p-32f997e7.entry.js.map} +0 -0
- /package/dist/build/{p-add932d6.entry.js.map → p-4fb1f39b.entry.js.map} +0 -0
- /package/dist/build/{p-5048c4c2.entry.js.map → p-50a816b0.entry.js.map} +0 -0
- /package/dist/build/{p-8fcf3bb8.entry.js.map → p-7b7c60de.entry.js.map} +0 -0
- /package/dist/build/{p-e2054751.entry.js.map → p-9e4cbacf.entry.js.map} +0 -0
- /package/dist/build/{p-eef52967.entry.js.map → p-b137cbd4.entry.js.map} +0 -0
- /package/dist/build/{p-d6828011.entry.js.map → p-bb7a5be7.entry.js.map} +0 -0
- /package/dist/build/{p-2edd87f3.entry.js.map → p-c3558fb4.entry.js.map} +0 -0
- /package/dist/build/{p-26a3990a.entry.js.map → p-c892b87a.entry.js.map} +0 -0
- /package/dist/build/{p-fa0234e9.entry.js.map → p-dc5fab19.entry.js.map} +0 -0
- /package/dist/build/{p-0875bbbb.entry.js.map → p-e596d429.entry.js.map} +0 -0
- /package/dist/build/{p-d4152f66.entry.js.map → p-fa78c45a.entry.js.map} +0 -0
- /package/dist/paperless/{p-c879f50c.entry.js.map → p-0103e9ac.entry.js.map} +0 -0
- /package/dist/paperless/{p-0740b690.entry.js.map → p-133e9259.entry.js.map} +0 -0
- /package/dist/paperless/{p-71666551.entry.js.map → p-213bc400.entry.js.map} +0 -0
- /package/dist/paperless/{p-e33a56c8.entry.js.map → p-219db898.entry.js.map} +0 -0
- /package/dist/paperless/{p-cc3307b8.entry.js.map → p-2da67519.entry.js.map} +0 -0
- /package/dist/paperless/{p-8981247d.entry.js.map → p-302eedc6.entry.js.map} +0 -0
- /package/dist/paperless/{p-474a16ab.entry.js.map → p-32f997e7.entry.js.map} +0 -0
- /package/dist/paperless/{p-add932d6.entry.js.map → p-4fb1f39b.entry.js.map} +0 -0
- /package/dist/paperless/{p-5048c4c2.entry.js.map → p-50a816b0.entry.js.map} +0 -0
- /package/dist/paperless/{p-8fcf3bb8.entry.js.map → p-7b7c60de.entry.js.map} +0 -0
- /package/dist/paperless/{p-e2054751.entry.js.map → p-9e4cbacf.entry.js.map} +0 -0
- /package/dist/paperless/{p-eef52967.entry.js.map → p-b137cbd4.entry.js.map} +0 -0
- /package/dist/paperless/{p-d6828011.entry.js.map → p-bb7a5be7.entry.js.map} +0 -0
- /package/dist/paperless/{p-2edd87f3.entry.js.map → p-c3558fb4.entry.js.map} +0 -0
- /package/dist/paperless/{p-26a3990a.entry.js.map → p-c892b87a.entry.js.map} +0 -0
- /package/dist/paperless/{p-fa0234e9.entry.js.map → p-dc5fab19.entry.js.map} +0 -0
- /package/dist/paperless/{p-0875bbbb.entry.js.map → p-e596d429.entry.js.map} +0 -0
- /package/dist/paperless/{p-d4152f66.entry.js.map → p-fa78c45a.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,h as a,H as e}from"./p-DhGo7hbh.js";import{c as r}from"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const o=".w-full{width:100%!important}.max-h-screen-safe{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}*{box-sizing:border-box}:host{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:100%;.safe-sidebar{padding-top:calc(env(safe-area-inset-top, 0) + 1rem)!important;&.show{--tw-translate-x:env(safe-area-inset-left,0)!important}}.safe-topbar{height:calc(env(safe-area-inset-top, 0) + 4rem);padding-top:calc(env(safe-area-inset-top, 0) + 1rem)!important}}@media (min-width:80rem){:host{width:15rem}}@media (min-width:105rem){:host{width:18rem}}@media (min-width:80rem){.layout-1280\\:w-60{width:15rem!important}}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.fixed{position:fixed!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.z-navbar{z-index:300!important}.z-navbar-backdrop{z-index:290!important}.z-navbar-topbar{z-index:280!important}.mt-auto{margin-top:auto!important}.flex{display:flex!important}.hidden{display:none!important}.h-screen{height:100vh!important}.w-60{width:15rem!important}.max-w-\\[16\\.5rem\\]{max-width:16.5rem!important}.-translate-x-full{--tw-translate-x:-100%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.items-stretch{align-items:stretch!important}.justify-between{justify-content:space-between!important}.gap-6{gap:1.5rem!important}.overflow-y-auto{overflow-y:auto!important}.border-0{border-width:0!important}.border-b{border-bottom-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-off-white-700{--tw-border-opacity:1!important;border-color:rgb(222 219 213/var(--tw-border-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.p-4{padding:1rem!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.will-change-transform{will-change:transform!important}@media (min-width:80rem){.layout-1280\\:relative{position:relative!important}.layout-1280\\:z-0{z-index:0!important}.layout-1280\\:flex{display:flex!important}.layout-1280\\:hidden{display:none!important}.layout-1280\\:h-full{height:100%!important}.layout-1280\\:max-w-none{max-width:none!important}.layout-1280\\:translate-x-0{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}}";const i=r(["bg-off-white-300","border-0 border-solid border-off-white-700","p-4"]);const n=r(["flex flex-col","fixed left-0 top-0 z-navbar h-screen w-60","w-full max-w-[16.5rem]","layout-1280:relative layout-1280:z-0 layout-1280:max-w-none layout-1280:h-full","gap-6","transition-all","will-change-transform","-translate-x-full transform-gpu layout-1280:translate-x-0","border-r","safe-sidebar"],{variants:{show:{false:null,true:"show"}}});const s=r(["flex w-full justify-between items-center","relative z-navbar-topbar","border-b","layout-1280:hidden","safe-topbar"]);const l=r(["z-navbar-backdrop layout-1280:hidden transition-opacity relative"],{variants:{show:{false:"opacity-0 pointer-events-none",true:"opacity-100"}}});const c=class{constructor(a){t(this,a)}_show=false;render(){return a(e,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,h as a,H as e}from"./p-DhGo7hbh.js";import{c as r}from"./p-CBWjHURv.js";import"./p-ChV9xqsO.js";const o=".w-full{width:100%!important}.max-h-screen-safe{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}*{box-sizing:border-box}:host{max-height:calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:100%;.safe-sidebar{padding-top:calc(env(safe-area-inset-top, 0) + 1rem)!important;&.show{--tw-translate-x:env(safe-area-inset-left,0)!important}}.safe-topbar{height:calc(env(safe-area-inset-top, 0) + 4rem);padding-top:calc(env(safe-area-inset-top, 0) + 1rem)!important}}@media (min-width:80rem){:host{width:15rem}}@media (min-width:105rem){:host{width:18rem}}@media (min-width:80rem){.layout-1280\\:w-60{width:15rem!important}}.pointer-events-none{pointer-events:none!important}.static{position:static!important}.fixed{position:fixed!important}.relative{position:relative!important}.left-0{left:0!important}.top-0{top:0!important}.z-navbar{z-index:300!important}.z-navbar-backdrop{z-index:290!important}.z-navbar-topbar{z-index:280!important}.mt-auto{margin-top:auto!important}.flex{display:flex!important}.hidden{display:none!important}.h-screen{height:100vh!important}.w-60{width:15rem!important}.max-w-\\[16\\.5rem\\]{max-width:16.5rem!important}.-translate-x-full{--tw-translate-x:-100%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.items-stretch{align-items:stretch!important}.justify-between{justify-content:space-between!important}.gap-6{gap:1.5rem!important}.overflow-y-auto{overflow-y:auto!important}.border-0{border-width:0!important}.border-b{border-bottom-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-off-white-700{--tw-border-opacity:1!important;border-color:rgb(222 219 213/var(--tw-border-opacity,1))!important}.bg-off-white-300{--tw-bg-opacity:1!important;background-color:rgb(248 247 244/var(--tw-bg-opacity,1))!important}.p-4{padding:1rem!important}.opacity-0{opacity:0!important}.opacity-100{opacity:1!important}.transition-all{transition-duration:.15s!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.transition-opacity{transition-duration:.15s!important;transition-property:opacity!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important}.will-change-transform{will-change:transform!important}@media (min-width:80rem){.layout-1280\\:relative{position:relative!important}.layout-1280\\:z-0{z-index:0!important}.layout-1280\\:flex{display:flex!important}.layout-1280\\:hidden{display:none!important}.layout-1280\\:h-full{height:100%!important}.layout-1280\\:max-w-none{max-width:none!important}.layout-1280\\:translate-x-0{--tw-translate-x:0px!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}}";const i=r(["bg-off-white-300","border-0 border-solid border-off-white-700","p-4"]);const n=r(["flex flex-col","fixed left-0 top-0 z-navbar h-screen w-60","w-full max-w-[16.5rem]","layout-1280:relative layout-1280:z-0 layout-1280:max-w-none layout-1280:h-full","gap-6","transition-all","will-change-transform","-translate-x-full transform-gpu layout-1280:translate-x-0","border-r","safe-sidebar"],{variants:{show:{false:null,true:"show"}}});const s=r(["flex w-full justify-between items-center","relative z-navbar-topbar","border-b","layout-1280:hidden","safe-topbar"]);const l=r(["z-navbar-backdrop layout-1280:hidden transition-opacity relative"],{variants:{show:{false:"opacity-0 pointer-events-none",true:"opacity-100"}}});const c=class{constructor(a){t(this,a)}_show=false;render(){return a(e,{key:"18b587d46cf90a64839a92b384c0c846956ab719"},a("p-backdrop",{key:"8fa1fc15cd2a3d73e184be1d8b05b00a2250a817",class:l({show:this._show}),scrollLock:this._show,onClicked:()=>this._show=false}),a("div",{key:"a86a6d8cb844535089dc0cfdd9e61be37f7a8aeb",class:n({class:i(),show:this._show})},a("div",{key:"27e0fe423120885f22f82baa172c7c5f1e2faeac",class:"flex w-full items-center justify-between layout-1280:hidden"},a("p-button",{key:"a4ae6f19e9b9efd87d2b68820d163f0a7837b93b",variant:"secondary",icon:"menu-arrow",iconFlip:"horizontal",iconOnly:true,size:"sm",onClick:()=>this._show=false})),a("div",{key:"62aa24be22303bb8e8fc88195156e44e30b8e07f",class:"flex w-full flex-col items-stretch"},a("slot",{key:"e65c24e1b4e01001e2b6753732c5ec6a8197e1c3",name:"company"})),a("div",{key:"baa3a8055ee5dbb8b282a5535f67e038f28ebd9f",class:"flex w-full flex-col gap-6 overflow-y-auto"},a("slot",{key:"bc92f1a07b22277de68818d350f33e4672a1ca0b",name:"content"})),a("div",{key:"1217fef6b02cf3d1ce2911bcffc65c7c5c71ed72",class:"mt-auto hidden w-full flex-col layout-1280:flex"},a("slot",{key:"58a67a78078fb20d1c25043dc9f8691c0626ad9a",name:"user"}))),a("div",{key:"c410a864a322a872def6619aceb7ef63134e30c5",class:s({class:i()})},a("p-button",{key:"310185ebc6282585eb23744a1dee1b2a24abd521",variant:"secondary",iconOnly:true,icon:"menu-arrow",size:"sm",onClick:()=>this._show=true}),a("slot",{key:"50ecdce5b9203c05b0bb84d8c05df1dd8384438b",name:"topbar"})))}handleCloseNavbar(){this._show=false}handleOpenNavbar(){this._show=true}};c.style=o;export{c as p_navbar};
|
|
2
|
+
//# sourceMappingURL=p-9e4cbacf.entry.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{r as t,c as s,h as i,H as e}from"./p-DhGo7hbh.js";const n=typeof window!=="undefined"&&typeof window.document!=="undefined";const h=n?window:{};const o=n?"ontouchstart"in h.document.documentElement:false;const r=n?"PointerEvent"in h:false;const a="cropper";const c=`${a}-canvas`;const l=`${a}-crosshair`;const f=`${a}-grid`;const u=`${a}-handle`;const d=`${a}-image`;const p=`${a}-selection`;const b=`${a}-shade`;const m=`${a}-viewer`;const g="select";const w="move";const v="scale";const $="rotate";const k="transform";const y="none";const x="n-resize";const z="e-resize";const M="s-resize";const C="w-resize";const A="ne-resize";const S="nw-resize";const j="se-resize";const O="sw-resize";const T="action";const E=o?"touchend touchcancel":"mouseup";const I=o?"touchmove":"mousemove";const N=o?"touchstart":"mousedown";const _=r?"pointerdown":N;const R=r?"pointermove":I;const X=r?"pointerup pointercancel":E;const Y="error";const P="keydown";const W="load";const D="wheel";const L="action";const H="actionend";const U="actionmove";const B="actionstart";const F="change";const G="transform";function K(t){return typeof t==="string"}const V=Number.isNaN||h.isNaN;function Z(t){return typeof t==="number"&&!V(t)}function q(t){return Z(t)&&t>0&&t<Infinity}function J(t){return typeof t==="undefined"}function Q(t){return typeof t==="object"&&t!==null}const{hasOwnProperty:tt}=Object.prototype;function st(t){if(!Q(t)){return false}try{const{constructor:s}=t;const{prototype:i}=s;return s&&i&&tt.call(i,"isPrototypeOf")}catch(t){return false}}function it(t){return typeof t==="function"}function et(t){return typeof t==="object"&&t!==null&&t.nodeType===1}const nt=/([a-z\d])([A-Z])/g;function ht(t){return String(t).replace(nt,"$1-$2").toLowerCase()}const ot=/-[A-z\d]/g;function rt(t){return t.replace(ot,(t=>t.slice(1).toUpperCase()))}const at=/\s\s*/;function ct(t,s,i,e){s.trim().split(at).forEach((s=>{t.removeEventListener(s,i,e)}))}function lt(t,s,i,e){s.trim().split(at).forEach((s=>{t.addEventListener(s,i,e)}))}function ft(t,s,i,e){lt(t,s,i,Object.assign(Object.assign({},e),{once:true}))}const ut={bubbles:true,cancelable:true,composed:true};function dt(t,s,i,e){return t.dispatchEvent(new CustomEvent(s,Object.assign(Object.assign(Object.assign({},ut),{detail:i}),e)))}const pt=Promise.resolve();function bt(t,s){return s?pt.then(t?s.bind(t):s):pt}function mt(t){const{documentElement:s}=t.ownerDocument;const i=t.getBoundingClientRect();return{left:i.left+(h.pageXOffset-s.clientLeft),top:i.top+(h.pageYOffset-s.clientTop)}}const gt=/deg|g?rad|turn$/i;function wt(t){const s=parseFloat(t)||0;if(s!==0){const[i="rad"]=String(t).match(gt)||[];switch(i.toLowerCase()){case"deg":return s/360*(Math.PI*2);case"grad":return s/400*(Math.PI*2);case"turn":return s*(Math.PI*2)}}return s}const vt="contain";const $t="cover";function kt(t,s=vt){const{aspectRatio:i}=t;let{width:e,height:n}=t;const h=q(e);const o=q(n);if(h&&o){const t=n*i;if(s===vt&&t>e||s===$t&&t<e){n=e/i}else{e=n*i}}else if(h){n=e/i}else if(o){e=n*i}return{width:e,height:n}}function yt(t,...s){if(s.length===0){return t}const[i,e,n,h,o,r]=t;const[a,c,l,f,u,d]=s[0];t=[i*a+n*c,e*a+h*c,i*l+n*f,e*l+h*f,i*u+n*d+o,e*u+h*d+r];return yt(t,...s.slice(1))}var xt=`:host([hidden]){display:none!important}`;const zt=/left|top|width|height/i;const Mt="open";const Ct=new WeakMap;const At=new WeakMap;const St=new Map;const jt=h.document&&Array.isArray(h.document.adoptedStyleSheets)&&"replaceSync"in h.CSSStyleSheet.prototype;class Ot extends HTMLElement{get $sharedStyle(){return`${this.themeColor?`:host{--theme-color: ${this.themeColor};}`:""}${xt}`}constructor(){var t,s;super();this.shadowRootMode=Mt;this.slottable=true;const i=(s=(t=Object.getPrototypeOf(this))===null||t===void 0?void 0:t.constructor)===null||s===void 0?void 0:s.$name;if(i){St.set(i,this.tagName.toLowerCase())}}static get observedAttributes(){return["shadow-root-mode","slottable","theme-color"]}attributeChangedCallback(t,s,i){if(Object.is(i,s)){return}const e=rt(t);const n=this[e];let h=i;switch(typeof n){case"boolean":h=i!==null&&i!=="false";break;case"number":h=Number(i);break}this[e]=h;switch(t){case"theme-color":{const t=At.get(this);const s=this.$sharedStyle;if(t&&s){if(jt){t.replaceSync(s)}else{t.textContent=s}}break}}}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}t=ht(t);switch(typeof i){case"boolean":if(i===true){if(!this.hasAttribute(t)){this.setAttribute(t,"")}}else{this.removeAttribute(t)}break;case"number":if(V(i)){i=""}else{i=String(i)}default:if(i){if(this.getAttribute(t)!==i){this.setAttribute(t,i)}}else{this.removeAttribute(t)}}}connectedCallback(){Object.getPrototypeOf(this).constructor.observedAttributes.forEach((t=>{const s=rt(t);let i=this[s];if(!J(i)){this.$propertyChangedCallback(s,undefined,i)}Object.defineProperty(this,s,{enumerable:true,configurable:true,get(){return i},set(t){const e=i;i=t;this.$propertyChangedCallback(s,e,t)}})}));const t=this.attachShadow({mode:this.shadowRootMode||Mt});if(!this.shadowRoot){Ct.set(this,t)}At.set(this,this.$addStyles(this.$sharedStyle));if(this.$style){this.$addStyles(this.$style)}if(this.$template){const s=document.createElement("template");s.innerHTML=this.$template;t.appendChild(s.content)}if(this.slottable){const s=document.createElement("slot");t.appendChild(s)}}disconnectedCallback(){if(At.has(this)){At.delete(this)}if(Ct.has(this)){Ct.delete(this)}}$getTagNameOf(t){var s;return(s=St.get(t))!==null&&s!==void 0?s:t}$setStyles(t){Object.keys(t).forEach((s=>{let i=t[s];if(Z(i)){if(i!==0&&zt.test(s)){i=`${i}px`}else{i=String(i)}}this.style[s]=i}));return this}$getShadowRoot(){return this.shadowRoot||Ct.get(this)}$addStyles(t){let s;const i=this.$getShadowRoot();if(jt){s=new CSSStyleSheet;s.replaceSync(t);i.adoptedStyleSheets=i.adoptedStyleSheets.concat(s)}else{s=document.createElement("style");s.textContent=t;i.appendChild(s)}return s}$emit(t,s,i){return dt(this,t,s,i)}$nextTick(t){return bt(this,t)}static $define(t,s){if(Q(t)){s=t;t=""}if(!t){t=this.$name||this.name}t=ht(t);if(n&&h.customElements&&!h.customElements.get(t)){customElements.define(t,this,s)}}}Ot.$version="2.0.0";var Tt=`:host{display:block;min-height:100px;min-width:200px;overflow:hidden;position:relative;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([background]){background-color:#fff;background-image:repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc),repeating-linear-gradient(45deg,#ccc 25%,transparent 0,transparent 75%,#ccc 0,#ccc);background-image:repeating-conic-gradient(#ccc 0 25%,#fff 0 50%);background-position:0 0,.5rem .5rem;background-size:1rem 1rem}:host([disabled]){pointer-events:none}:host([disabled]):after{bottom:0;content:"";cursor:not-allowed;display:block;left:0;pointer-events:none;position:absolute;right:0;top:0}`;class Et extends Ot{constructor(){super(...arguments);this.$onPointerDown=null;this.$onPointerMove=null;this.$onPointerUp=null;this.$onWheel=null;this.$wheeling=false;this.$pointers=new Map;this.$style=Tt;this.$action=y;this.background=false;this.disabled=false;this.scaleStep=.1;this.themeColor="#39f"}static get observedAttributes(){return super.observedAttributes.concat(["background","disabled","scale-step"])}connectedCallback(){super.connectedCallback();if(!this.disabled){this.$bind()}}disconnectedCallback(){if(!this.disabled){this.$unbind()}super.disconnectedCallback()}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"disabled":if(i){this.$unbind()}else{this.$bind()}break}}$bind(){if(!this.$onPointerDown){this.$onPointerDown=this.$handlePointerDown.bind(this);lt(this,_,this.$onPointerDown)}if(!this.$onPointerMove){this.$onPointerMove=this.$handlePointerMove.bind(this);lt(this.ownerDocument,R,this.$onPointerMove)}if(!this.$onPointerUp){this.$onPointerUp=this.$handlePointerUp.bind(this);lt(this.ownerDocument,X,this.$onPointerUp)}if(!this.$onWheel){this.$onWheel=this.$handleWheel.bind(this);lt(this,D,this.$onWheel,{passive:false,capture:true})}}$unbind(){if(this.$onPointerDown){ct(this,_,this.$onPointerDown);this.$onPointerDown=null}if(this.$onPointerMove){ct(this.ownerDocument,R,this.$onPointerMove);this.$onPointerMove=null}if(this.$onPointerUp){ct(this.ownerDocument,X,this.$onPointerUp);this.$onPointerUp=null}if(this.$onWheel){ct(this,D,this.$onWheel,{capture:true});this.$onWheel=null}}$handlePointerDown(t){const{buttons:s,button:i,type:e}=t;if(this.disabled||(e==="pointerdown"&&t.pointerType==="mouse"||e==="mousedown")&&(Z(s)&&s!==1||Z(i)&&i!==0||t.ctrlKey)){return}const{$pointers:n}=this;let h="";if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t,pageX:s,pageY:i})=>{n.set(t,{startX:s,startY:i,endX:s,endY:i})}))}else{const{pointerId:s=0,pageX:i,pageY:e}=t;n.set(s,{startX:i,startY:e,endX:i,endY:e})}if(n.size>1){h=k}else if(et(t.target)){h=t.target.action||t.target.getAttribute(T)||""}if(this.$emit(B,{action:h,relatedEvent:t})===false){return}t.preventDefault();this.$action=h;this.style.willChange="transform"}$handlePointerMove(t){const{$action:s,$pointers:i}=this;if(this.disabled||s===y||i.size===0){return}if(this.$emit(U,{action:s,relatedEvent:t})===false){return}t.preventDefault();if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t,pageX:s,pageY:e})=>{const n=i.get(t);if(n){Object.assign(n,{endX:s,endY:e})}}))}else{const{pointerId:s=0,pageX:e,pageY:n}=t;const h=i.get(s);if(h){Object.assign(h,{endX:e,endY:n})}}const e={action:s,relatedEvent:t};if(s===k){const s=new Map(i);let n=0;let h=0;let o=0;let r=0;let a=t.pageX;let c=t.pageY;i.forEach(((t,i)=>{s.delete(i);s.forEach((s=>{let i=s.startX-t.startX;let e=s.startY-t.startY;let l=s.endX-t.endX;let f=s.endY-t.endY;let u=0;let d=0;let p=0;let b=0;if(i===0){if(e<0){p=Math.PI*2}else if(e>0){p=Math.PI}}else if(i>0){p=Math.PI/2+Math.atan(e/i)}else if(i<0){p=Math.PI*1.5+Math.atan(e/i)}if(l===0){if(f<0){b=Math.PI*2}else if(f>0){b=Math.PI}}else if(l>0){b=Math.PI/2+Math.atan(f/l)}else if(l<0){b=Math.PI*1.5+Math.atan(f/l)}if(b>0||p>0){const i=b-p;const e=Math.abs(i);if(e>n){n=e;o=i;a=(t.startX+s.startX)/2;c=(t.startY+s.startY)/2}}i=Math.abs(i);e=Math.abs(e);l=Math.abs(l);f=Math.abs(f);if(i>0&&e>0){u=Math.sqrt(i*i+e*e)}else if(i>0){u=i}else if(e>0){u=e}if(l>0&&f>0){d=Math.sqrt(l*l+f*f)}else if(l>0){d=l}else if(f>0){d=f}if(u>0&&d>0){const i=(d-u)/u;const e=Math.abs(i);if(e>h){h=e;r=i;a=(t.startX+s.startX)/2;c=(t.startY+s.startY)/2}}}))}));const l=n>0;const f=h>0;if(l&&f){e.rotate=o;e.scale=r;e.centerX=a;e.centerY=c}else if(l){e.action=$;e.rotate=o;e.centerX=a;e.centerY=c}else if(f){e.action=v;e.scale=r;e.centerX=a;e.centerY=c}else{e.action=y}}else{const[t]=Array.from(i.values());Object.assign(e,t)}i.forEach((t=>{t.startX=t.endX;t.startY=t.endY}));if(e.action!==y){this.$emit(L,e,{cancelable:false})}}$handlePointerUp(t){const{$action:s,$pointers:i}=this;if(this.disabled||s===y){return}if(this.$emit(H,{action:s,relatedEvent:t})===false){return}t.preventDefault();if(t.changedTouches){Array.from(t.changedTouches).forEach((({identifier:t})=>{i.delete(t)}))}else{const{pointerId:s=0}=t;i.delete(s)}if(i.size===0){this.style.willChange="";this.$action=y}}$handleWheel(t){if(this.disabled){return}t.preventDefault();if(this.$wheeling){return}this.$wheeling=true;setTimeout((()=>{this.$wheeling=false}),50);const s=t.deltaY>0?-1:1;const i=s*this.scaleStep;this.$emit(L,{action:v,scale:i,relatedEvent:t},{cancelable:false})}$setAction(t){if(K(t)){this.$action=t}return this}$toCanvas(t){return new Promise(((s,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const e=document.createElement("canvas");let n=this.offsetWidth;let h=this.offsetHeight;let o=1;if(st(t)&&(q(t.width)||q(t.height))){({width:n,height:h}=kt({aspectRatio:n/h,width:t.width,height:t.height}));o=n/this.offsetWidth}e.width=n;e.height=h;const r=this.querySelector(this.$getTagNameOf(d));if(!r){s(e);return}r.$ready().then((i=>{const a=e.getContext("2d");if(a){const[s,c,l,f,u,d]=r.$getTransform();let p=u;let b=d;let m=i.naturalWidth;let g=i.naturalHeight;if(o!==1){p*=o;b*=o;m*=o;g*=o}const w=m/2;const v=g/2;a.fillStyle="transparent";a.fillRect(0,0,n,h);if(st(t)&&it(t.beforeDraw)){t.beforeDraw.call(this,a,e)}a.save();a.translate(w,v);a.transform(s,c,l,f,p,b);a.translate(-w,-v);a.drawImage(i,0,0,m,g);a.restore()}s(e)})).catch(i)}))}}Et.$name=c;Et.$version="2.0.0";var It=`:host{display:inline-block}img{display:block;height:100%;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}`;const Nt=new WeakMap;const _t=["alt","crossorigin","decoding","importance","loading","referrerpolicy","sizes","src","srcset"];class Rt extends Ot{constructor(){super(...arguments);this.$matrix=[1,0,0,1,0,0];this.$onLoad=null;this.$onCanvasAction=null;this.$onCanvasActionEnd=null;this.$onCanvasActionStart=null;this.$actionStartTarget=null;this.$style=It;this.$image=new Image;this.initialCenterSize="contain";this.rotatable=false;this.scalable=false;this.skewable=false;this.slottable=false;this.translatable=false}set $canvas(t){Nt.set(this,t)}get $canvas(){return Nt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(_t,["initial-center-size","rotatable","scalable","skewable","translatable"])}attributeChangedCallback(t,s,i){if(Object.is(i,s)){return}super.attributeChangedCallback(t,s,i);if(_t.includes(t)){this.$image.setAttribute(t,i)}}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"initialCenterSize":this.$nextTick((()=>{this.$center(i)}));break}}connectedCallback(){super.connectedCallback();const{$image:t}=this;const s=this.closest(this.$getTagNameOf(c));if(s){this.$canvas=s;this.$setStyles({display:"block",position:"absolute"});this.$onCanvasActionStart=t=>{var s,i;this.$actionStartTarget=(i=(s=t.detail)===null||s===void 0?void 0:s.relatedEvent)===null||i===void 0?void 0:i.target};this.$onCanvasActionEnd=()=>{this.$actionStartTarget=null};this.$onCanvasAction=this.$handleAction.bind(this);lt(s,B,this.$onCanvasActionStart);lt(s,H,this.$onCanvasActionEnd);lt(s,L,this.$onCanvasAction)}this.$onLoad=this.$handleLoad.bind(this);lt(t,W,this.$onLoad);this.$getShadowRoot().appendChild(t)}disconnectedCallback(){const{$image:t,$canvas:s}=this;if(s){if(this.$onCanvasActionStart){ct(s,B,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){ct(s,H,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasAction){ct(s,L,this.$onCanvasAction);this.$onCanvasAction=null}}if(t&&this.$onLoad){ct(t,W,this.$onLoad);this.$onLoad=null}this.$getShadowRoot().removeChild(t);super.disconnectedCallback()}$handleLoad(){const{$image:t}=this;this.$setStyles({width:t.naturalWidth,height:t.naturalHeight});if(this.$canvas){this.$center(this.initialCenterSize)}}$handleAction(t){if(this.hidden||!(this.rotatable||this.scalable||this.translatable)){return}const{$canvas:s}=this;const{detail:i}=t;if(i){const{relatedEvent:t}=i;let{action:e}=i;if(e===k&&(!this.rotatable||!this.scalable)){if(this.rotatable){e=$}else if(this.scalable){e=v}else{e=y}}switch(e){case w:if(this.translatable){let e=null;if(t){e=t.target.closest(this.$getTagNameOf(p))}if(!e){e=s.querySelector(this.$getTagNameOf(p))}if(e&&e.multiple&&!e.active){e=s.querySelector(`${this.$getTagNameOf(p)}[active]`)}if(!e||e.hidden||!e.movable||e.dynamic||!(this.$actionStartTarget&&e.contains(this.$actionStartTarget))){this.$move(i.endX-i.startX,i.endY-i.startY)}}break;case $:if(this.rotatable){if(t){const{x:s,y:e}=this.getBoundingClientRect();this.$rotate(i.rotate,t.clientX-s,t.clientY-e)}else{this.$rotate(i.rotate)}}break;case v:if(this.scalable){if(t){const s=t.target.closest(this.$getTagNameOf(p));if(!s||!s.zoomable||s.zoomable&&s.dynamic){const{x:s,y:e}=this.getBoundingClientRect();this.$zoom(i.scale,t.clientX-s,t.clientY-e)}}else{this.$zoom(i.scale)}}break;case k:if(this.rotatable&&this.scalable){const{rotate:s}=i;let{scale:e}=i;if(e<0){e=1/(1-e)}else{e+=1}const n=Math.cos(s);const h=Math.sin(s);const[o,r,a,c]=[n*e,h*e,-h*e,n*e];if(t){const s=this.getBoundingClientRect();const i=t.clientX-s.x;const e=t.clientY-s.y;const[n,h,l,f]=this.$matrix;const u=s.width/2;const d=s.height/2;const p=i-u;const b=e-d;const m=(p*f-l*b)/(n*f-l*h);const g=(b*n-h*p)/(n*f-l*h);this.$transform(o,r,a,c,m*(1-o)+g*a,g*(1-c)+m*r)}else{this.$transform(o,r,a,c,0,0)}}break}}}$ready(t){const{$image:s}=this;const i=new Promise(((t,i)=>{const e=new Error("Failed to load the image source");if(s.complete){if(s.naturalWidth>0&&s.naturalHeight>0){t(s)}else{i(e)}}else{const n=()=>{ct(s,Y,h);t(s)};const h=()=>{ct(s,W,n);i(e)};ft(s,W,n);ft(s,Y,h)}}));if(it(t)){i.then((s=>{t(s);return s}))}return i}$center(t){const{parentElement:s}=this;if(!s){return this}const i=s.getBoundingClientRect();const e=i.width;const n=i.height;const{x:h,y:o,width:r,height:a}=this.getBoundingClientRect();const c=h+r/2;const l=o+a/2;const f=i.x+e/2;const u=i.y+n/2;this.$move(f-c,u-l);if(t&&(r!==e||a!==n)){const s=e/r;const i=n/a;switch(t){case"cover":this.$scale(Math.max(s,i));break;case"contain":this.$scale(Math.min(s,i));break}}return this}$move(t,s=t){if(this.translatable&&Z(t)&&Z(s)){const[i,e,n,h]=this.$matrix;const o=(t*h-n*s)/(i*h-n*e);const r=(s*i-e*t)/(i*h-n*e);this.$translate(o,r)}return this}$moveTo(t,s=t){if(this.translatable&&Z(t)&&Z(s)){const[i,e,n,h]=this.$matrix;const o=(t*h-n*s)/(i*h-n*e);const r=(s*i-e*t)/(i*h-n*e);this.$setTransform(i,e,n,h,o,r)}return this}$rotate(t,s,i){if(this.rotatable){const e=wt(t);const n=Math.cos(e);const h=Math.sin(e);const[o,r,a,c]=[n,h,-h,n];if(Z(s)&&Z(i)){const[t,e,n,h]=this.$matrix;const{width:l,height:f}=this.getBoundingClientRect();const u=l/2;const d=f/2;const p=s-u;const b=i-d;const m=(p*h-n*b)/(t*h-n*e);const g=(b*t-e*p)/(t*h-n*e);this.$transform(o,r,a,c,m*(1-o)-g*a,g*(1-c)-m*r)}else{this.$transform(o,r,a,c,0,0)}}return this}$zoom(t,s,i){if(!this.scalable||t===0){return this}if(t<0){t=1/(1-t)}else{t+=1}if(Z(s)&&Z(i)){const[e,n,h,o]=this.$matrix;const{width:r,height:a}=this.getBoundingClientRect();const c=r/2;const l=a/2;const f=s-c;const u=i-l;const d=(f*o-h*u)/(e*o-h*n);const p=(u*e-n*f)/(e*o-h*n);this.$transform(t,0,0,t,d*(1-t),p*(1-t))}else{this.$scale(t)}return this}$scale(t,s=t){if(this.scalable){this.$transform(t,0,0,s,0,0)}return this}$skew(t,s=0){if(this.skewable){const i=wt(t);const e=wt(s);this.$transform(1,Math.tan(e),Math.tan(i),1,0,0)}return this}$translate(t,s=t){if(this.translatable&&Z(t)&&Z(s)){this.$transform(1,0,0,1,t,s)}return this}$transform(t,s,i,e,n,h){if(Z(t)&&Z(s)&&Z(i)&&Z(e)&&Z(n)&&Z(h)){return this.$setTransform(yt(this.$matrix,[t,s,i,e,n,h]))}return this}$setTransform(t,s,i,e,n,h){if(this.rotatable||this.scalable||this.skewable||this.translatable){if(Array.isArray(t)){[t,s,i,e,n,h]=t}if(Z(t)&&Z(s)&&Z(i)&&Z(e)&&Z(n)&&Z(h)){const o=[...this.$matrix];const r=[t,s,i,e,n,h];if(this.$emit(G,{matrix:r,oldMatrix:o})===false){return this}this.$matrix=r;this.style.transform=`matrix(${r.join(", ")})`}}return this}$getTransform(){return this.$matrix.slice()}$resetTransform(){return this.$setTransform([1,0,0,1,0,0])}}Rt.$name=d;Rt.$version="2.0.0";var Xt=`:host{display:block;height:0;left:0;outline:var(--theme-color) solid 1px;position:relative;top:0;width:0}:host([transparent]){outline-color:transparent}`;const Yt=new WeakMap;class Pt extends Ot{constructor(){super(...arguments);this.$onCanvasChange=null;this.$onCanvasActionEnd=null;this.$onCanvasActionStart=null;this.$style=Xt;this.x=0;this.y=0;this.width=0;this.height=0;this.slottable=false;this.themeColor="rgba(0, 0, 0, 0.65)"}set $canvas(t){Yt.set(this,t)}get $canvas(){return Yt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["height","width","x","y"])}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(c));if(t){this.$canvas=t;this.style.position="absolute";const s=t.querySelector(this.$getTagNameOf(p));if(s){this.$onCanvasActionStart=t=>{if(s.hidden&&t.detail.action===g){this.hidden=false}};this.$onCanvasActionEnd=t=>{if(s.hidden&&t.detail.action===g){this.hidden=true}};this.$onCanvasChange=t=>{const{x:i,y:e,width:n,height:h}=t.detail;this.$change(i,e,n,h);if(s.hidden||i===0&&e===0&&n===0&&h===0){this.hidden=true}};lt(t,B,this.$onCanvasActionStart);lt(t,H,this.$onCanvasActionEnd);lt(t,F,this.$onCanvasChange)}}this.$render()}disconnectedCallback(){const{$canvas:t}=this;if(t){if(this.$onCanvasActionStart){ct(t,B,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){ct(t,H,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasChange){ct(t,F,this.$onCanvasChange);this.$onCanvasChange=null}}super.disconnectedCallback()}$change(t,s,i=this.width,e=this.height){if(!Z(t)||!Z(s)||!Z(i)||!Z(e)||t===this.x&&s===this.y&&i===this.width&&e===this.height){return this}if(this.hidden){this.hidden=false}this.x=t;this.y=s;this.width=i;this.height=e;return this.$render()}$reset(){return this.$change(0,0,0,0)}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height,outlineWidth:h.innerWidth})}}Pt.$name=b;Pt.$version="2.0.0";var Wt=`:host{background-color:var(--theme-color);display:block}:host([action=move]),:host([action=select]){height:100%;left:0;position:absolute;top:0;width:100%}:host([action=move]){cursor:move}:host([action=select]){cursor:crosshair}:host([action$=-resize]){background-color:transparent;height:15px;position:absolute;width:15px}:host([action$=-resize]):after{background-color:var(--theme-color);content:"";display:block;height:5px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:5px}:host([action=n-resize]),:host([action=s-resize]){cursor:ns-resize;left:50%;transform:translateX(-50%);width:100%}:host([action=n-resize]){top:-8px}:host([action=s-resize]){bottom:-8px}:host([action=e-resize]),:host([action=w-resize]){cursor:ew-resize;height:100%;top:50%;transform:translateY(-50%)}:host([action=e-resize]){right:-8px}:host([action=w-resize]){left:-8px}:host([action=ne-resize]){cursor:nesw-resize;right:-8px;top:-8px}:host([action=nw-resize]){cursor:nwse-resize;left:-8px;top:-8px}:host([action=se-resize]){bottom:-8px;cursor:nwse-resize;right:-8px}:host([action=se-resize]):after{height:15px;width:15px}@media (pointer:coarse){:host([action=se-resize]):after{height:10px;width:10px}}@media (pointer:fine){:host([action=se-resize]):after{height:5px;width:5px}}:host([action=sw-resize]){bottom:-8px;cursor:nesw-resize;left:-8px}:host([plain]){background-color:transparent}`;class Dt extends Ot{constructor(){super(...arguments);this.$onCanvasCropEnd=null;this.$onCanvasCropStart=null;this.$style=Wt;this.action=y;this.plain=false;this.slottable=false;this.themeColor="rgba(51, 153, 255, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["action","plain"])}}Dt.$name=u;Dt.$version="2.0.0";var Lt=`:host{display:block;left:0;position:relative;right:0}:host([outlined]){outline:1px solid var(--theme-color)}:host([multiple]){outline:1px dashed hsla(0,0%,100%,.5)}:host([multiple]):after{bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0}:host([multiple][active]){outline-color:var(--theme-color);z-index:1}:host([multiple])>*{visibility:hidden}:host([multiple][active])>*{visibility:visible}:host([multiple][active]):after{display:none}`;const Ht=new WeakMap;class Ut extends Ot{constructor(){super(...arguments);this.$onCanvasAction=null;this.$onCanvasActionStart=null;this.$onCanvasActionEnd=null;this.$onDocumentKeyDown=null;this.$action="";this.$actionStartTarget=null;this.$changing=false;this.$style=Lt;this.$initialSelection={x:0,y:0,width:0,height:0};this.x=0;this.y=0;this.width=0;this.height=0;this.aspectRatio=NaN;this.initialAspectRatio=NaN;this.initialCoverage=NaN;this.active=false;this.linked=false;this.dynamic=false;this.movable=false;this.resizable=false;this.zoomable=false;this.multiple=false;this.keyboard=false;this.outlined=false;this.precise=false}set $canvas(t){Ht.set(this,t)}get $canvas(){return Ht.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["active","aspect-ratio","dynamic","height","initial-aspect-ratio","initial-coverage","keyboard","linked","movable","multiple","outlined","precise","resizable","width","x","y","zoomable"])}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);switch(t){case"x":case"y":case"width":case"height":if(!this.$changing){this.$nextTick((()=>{this.$change(this.x,this.y,this.width,this.height,this.aspectRatio,true)}))}break;case"aspectRatio":case"initialAspectRatio":this.$nextTick((()=>{this.$initSelection()}));break;case"initialCoverage":this.$nextTick((()=>{if(q(i)&&i<=1){this.$initSelection(true,true)}}));break;case"keyboard":this.$nextTick((()=>{if(this.$canvas){if(i){if(!this.$onDocumentKeyDown){this.$onDocumentKeyDown=this.$handleKeyDown.bind(this);lt(this.ownerDocument,P,this.$onDocumentKeyDown)}}else if(this.$onDocumentKeyDown){ct(this.ownerDocument,P,this.$onDocumentKeyDown);this.$onDocumentKeyDown=null}}}));break;case"multiple":this.$nextTick((()=>{if(this.$canvas){const t=this.$getSelections();if(i){t.forEach((t=>{t.active=false}));this.active=true;this.$emit(F,{x:this.x,y:this.y,width:this.width,height:this.height})}else{this.active=false;t.slice(1).forEach((t=>{this.$removeSelection(t)}))}}}));break;case"precise":this.$nextTick((()=>{this.$change(this.x,this.y)}));break;case"linked":if(i){this.dynamic=true}break}}connectedCallback(){super.connectedCallback();const t=this.closest(this.$getTagNameOf(c));if(t){this.$canvas=t;this.$setStyles({position:"absolute",transform:`translate(${this.x}px, ${this.y}px)`});if(!this.hidden){this.$render()}this.$initSelection(true);this.$onCanvasActionStart=this.$handleActionStart.bind(this);this.$onCanvasActionEnd=this.$handleActionEnd.bind(this);this.$onCanvasAction=this.$handleAction.bind(this);lt(t,B,this.$onCanvasActionStart);lt(t,H,this.$onCanvasActionEnd);lt(t,L,this.$onCanvasAction)}else{this.$render()}}disconnectedCallback(){const{$canvas:t}=this;if(t){if(this.$onCanvasActionStart){ct(t,B,this.$onCanvasActionStart);this.$onCanvasActionStart=null}if(this.$onCanvasActionEnd){ct(t,H,this.$onCanvasActionEnd);this.$onCanvasActionEnd=null}if(this.$onCanvasAction){ct(t,L,this.$onCanvasAction);this.$onCanvasAction=null}}super.disconnectedCallback()}$getSelections(){let t=[];if(this.parentElement){t=Array.from(this.parentElement.querySelectorAll(this.$getTagNameOf(p)))}return t}$initSelection(t=false,s=false){const{initialCoverage:i,parentElement:e}=this;if(q(i)&&e){const n=this.aspectRatio||this.initialAspectRatio;let h=(s?0:this.width)||e.offsetWidth*i;let o=(s?0:this.height)||e.offsetHeight*i;if(q(n)){({width:h,height:o}=kt({aspectRatio:n,width:h,height:o}))}this.$change(this.x,this.y,h,o);if(t){this.$center()}this.$initialSelection={x:this.x,y:this.y,width:this.width,height:this.height}}}$createSelection(){const t=this.cloneNode(true);if(this.hasAttribute("id")){t.removeAttribute("id")}t.initialCoverage=NaN;this.active=false;if(this.parentElement){this.parentElement.insertBefore(t,this.nextSibling)}return t}$removeSelection(t=this){if(this.parentElement){const s=this.$getSelections();if(s.length>1){const i=s.indexOf(t);const e=s[i+1]||s[i-1];if(e){t.active=false;this.parentElement.removeChild(t);e.active=true;e.$emit(F,{x:e.x,y:e.y,width:e.width,height:e.height})}}else{this.$clear()}}}$handleActionStart(t){var s,i;const e=(i=(s=t.detail)===null||s===void 0?void 0:s.relatedEvent)===null||i===void 0?void 0:i.target;this.$action="";this.$actionStartTarget=e;if(!this.hidden&&this.multiple&&!this.active&&e===this&&this.parentElement){this.$getSelections().forEach((t=>{t.active=false}));this.active=true;this.$emit(F,{x:this.x,y:this.y,width:this.width,height:this.height})}}$handleAction(t){const{currentTarget:s,detail:i}=t;if(!s||!i){return}const{relatedEvent:e}=i;let{action:n}=i;if(!n&&this.multiple){n=this.$action||(e===null||e===void 0?void 0:e.target.action);this.$action=n}if(!n||this.hidden&&n!==g||this.multiple&&!this.active&&n!==v){return}const h=i.endX-i.startX;const o=i.endY-i.startY;const{width:r,height:a}=this;let{aspectRatio:c}=this;if(!q(c)&&e.shiftKey){c=q(r)&&q(a)?r/a:1}switch(n){case g:if(h!==0&&o!==0){const{$canvas:t}=this;const e=mt(s);(this.multiple&&!this.hidden?this.$createSelection():this).$change(i.startX-e.left,i.startY-e.top,Math.abs(h),Math.abs(o),c);if(h<0){if(o<0){n=S}else if(o>0){n=O}}else if(h>0){if(o<0){n=A}else if(o>0){n=j}}if(t){t.$action=n}}break;case w:if(this.movable&&(this.dynamic||this.$actionStartTarget&&this.contains(this.$actionStartTarget))){this.$move(h,o)}break;case v:if(e&&this.zoomable&&(this.dynamic||this.contains(e.target))){const t=mt(s);this.$zoom(i.scale,e.pageX-t.left,e.pageY-t.top)}break;default:this.$resize(n,h,o,c)}}$handleActionEnd(){this.$action="";this.$actionStartTarget=null}$handleKeyDown(t){if(this.hidden||!this.keyboard||this.multiple&&!this.active||t.defaultPrevented){return}const{activeElement:s}=document;if(s&&(["INPUT","TEXTAREA"].includes(s.tagName)||["true","plaintext-only"].includes(s.contentEditable))){return}switch(t.key){case"Backspace":if(t.metaKey){t.preventDefault();this.$removeSelection()}break;case"Delete":t.preventDefault();this.$removeSelection();break;case"ArrowLeft":t.preventDefault();this.$move(-1,0);break;case"ArrowRight":t.preventDefault();this.$move(1,0);break;case"ArrowUp":t.preventDefault();this.$move(0,-1);break;case"ArrowDown":t.preventDefault();this.$move(0,1);break;case"+":t.preventDefault();this.$zoom(.1);break;case"-":t.preventDefault();this.$zoom(-.1);break}}$center(){const{parentElement:t}=this;if(!t){return this}const s=(t.offsetWidth-this.width)/2;const i=(t.offsetHeight-this.height)/2;return this.$change(s,i)}$move(t,s=t){return this.$moveTo(this.x+t,this.y+s)}$moveTo(t,s=t){if(!this.movable){return this}return this.$change(t,s)}$resize(t,s=0,i=0,e=this.aspectRatio){if(!this.resizable){return this}const n=q(e);const{$canvas:h}=this;let{x:o,y:r,width:a,height:c}=this;switch(t){case x:r+=i;c-=i;if(c<0){t=M;c=-c;r-=c}if(n){s=i*e;o+=s/2;a-=s;if(a<0){a=-a;o-=a}}break;case z:a+=s;if(a<0){t=C;a=-a;o-=a}if(n){i=s/e;r-=i/2;c+=i;if(c<0){c=-c;r-=c}}break;case M:c+=i;if(c<0){t=x;c=-c;r-=c}if(n){s=i*e;o-=s/2;a+=s;if(a<0){a=-a;o-=a}}break;case C:o+=s;a-=s;if(a<0){t=z;a=-a;o-=a}if(n){i=s/e;r+=i/2;c-=i;if(c<0){c=-c;r-=c}}break;case A:if(n){i=-s/e}r+=i;c-=i;a+=s;if(a<0&&c<0){t=O;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=S;a=-a;o-=a}else if(c<0){t=j;c=-c;r-=c}break;case S:if(n){i=s/e}o+=s;r+=i;a-=s;c-=i;if(a<0&&c<0){t=j;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=A;a=-a;o-=a}else if(c<0){t=O;c=-c;r-=c}break;case j:if(n){i=s/e}a+=s;c+=i;if(a<0&&c<0){t=S;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=O;a=-a;o-=a}else if(c<0){t=A;c=-c;r-=c}break;case O:if(n){i=-s/e}o+=s;a-=s;c+=i;if(a<0&&c<0){t=A;a=-a;c=-c;o-=a;r-=c}else if(a<0){t=j;a=-a;o-=a}else if(c<0){t=S;c=-c;r-=c}break}if(h){h.$setAction(t)}return this.$change(o,r,a,c)}$zoom(t,s,i){if(!this.zoomable||t===0){return this}if(t<0){t=1/(1-t)}else{t+=1}const{width:e,height:n}=this;const h=e*t;const o=n*t;let r=this.x;let a=this.y;if(Z(s)&&Z(i)){r-=(h-e)*((s-this.x)/e);a-=(o-n)*((i-this.y)/n)}else{r-=(h-e)/2;a-=(o-n)/2}return this.$change(r,a,h,o)}$change(t,s,i=this.width,e=this.height,n=this.aspectRatio,h=false){if(this.$changing||!Z(t)||!Z(s)||!Z(i)||!Z(e)||i<0||e<0){return this}if(q(n)){({width:i,height:e}=kt({aspectRatio:n,width:i,height:e},"cover"))}if(!this.precise){t=Math.round(t);s=Math.round(s);i=Math.round(i);e=Math.round(e)}if(t===this.x&&s===this.y&&i===this.width&&e===this.height&&Object.is(n,this.aspectRatio)&&!h){return this}if(this.hidden){this.hidden=false}if(this.$emit(F,{x:t,y:s,width:i,height:e})===false){return this}this.$changing=true;this.x=t;this.y=s;this.width=i;this.height=e;this.$changing=false;return this.$render()}$reset(){const{x:t,y:s,width:i,height:e}=this.$initialSelection;return this.$change(t,s,i,e)}$clear(){this.$change(0,0,0,0,NaN,true);this.hidden=true;return this}$render(){return this.$setStyles({transform:`translate(${this.x}px, ${this.y}px)`,width:this.width,height:this.height})}$toCanvas(t){return new Promise(((s,i)=>{if(!this.isConnected){i(new Error("The current element is not connected to the DOM."));return}const e=document.createElement("canvas");let{width:n,height:h}=this;let o=1;if(st(t)&&(q(t.width)||q(t.height))){({width:n,height:h}=kt({aspectRatio:n/h,width:t.width,height:t.height}));o=n/this.width}e.width=n;e.height=h;if(!this.$canvas){s(e);return}const r=this.$canvas.querySelector(this.$getTagNameOf(d));if(!r){s(e);return}r.$ready().then((i=>{const a=e.getContext("2d");if(a){const[s,c,l,f,u,d]=r.$getTransform();const p=-this.x;const b=-this.y;const m=(p*f-l*b)/(s*f-l*c);const g=(b*s-c*p)/(s*f-l*c);let w=s*m+l*g+u;let v=c*m+f*g+d;let $=i.naturalWidth;let k=i.naturalHeight;if(o!==1){w*=o;v*=o;$*=o;k*=o}const y=$/2;const x=k/2;a.fillStyle="transparent";a.fillRect(0,0,n,h);if(st(t)&&it(t.beforeDraw)){t.beforeDraw.call(this,a,e)}a.save();a.translate(y,x);a.transform(s,c,l,f,w,v);a.translate(-y,-x);a.drawImage(i,0,0,$,k);a.restore()}s(e)})).catch(i)}))}}Ut.$name=p;Ut.$version="2.0.0";var Bt=`:host{display:flex;flex-direction:column;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([bordered]){border:1px dashed var(--theme-color)}:host([covered]){bottom:0;left:0;position:absolute;right:0;top:0}:host>span{display:flex;flex:1}:host>span+span{border-top:1px dashed var(--theme-color)}:host>span>span{flex:1}:host>span>span+span{border-left:1px dashed var(--theme-color)}`;class Ft extends Ot{constructor(){super(...arguments);this.$style=Bt;this.bordered=false;this.columns=3;this.covered=false;this.rows=3;this.slottable=false;this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["bordered","columns","covered","rows"])}$propertyChangedCallback(t,s,i){if(Object.is(i,s)){return}super.$propertyChangedCallback(t,s,i);if(t==="rows"||t==="columns"){this.$nextTick((()=>{this.$render()}))}}connectedCallback(){super.connectedCallback();this.$render()}$render(){const t=this.$getShadowRoot();const s=document.createDocumentFragment();for(let t=0;t<this.rows;t+=1){const t=document.createElement("span");t.setAttribute("role","row");for(let s=0;s<this.columns;s+=1){const s=document.createElement("span");s.setAttribute("role","gridcell");t.appendChild(s)}s.appendChild(t)}if(t){t.innerHTML="";t.appendChild(s)}}}Ft.$name=f;Ft.$version="2.0.0";var Gt=`:host{display:inline-block;height:1em;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1em}:host:after,:host:before{background-color:var(--theme-color);content:"";display:block;position:absolute}:host:before{height:1px;left:0;top:50%;transform:translateY(-50%);width:100%}:host:after{height:100%;left:50%;top:0;transform:translateX(-50%);width:1px}:host([centered]){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}`;class Kt extends Ot{constructor(){super(...arguments);this.$style=Gt;this.centered=false;this.slottable=false;this.themeColor="rgba(238, 238, 238, 0.5)"}static get observedAttributes(){return super.observedAttributes.concat(["centered"])}}Kt.$name=l;Kt.$version="2.0.0";var Vt=`:host{display:block;height:100%;overflow:hidden;position:relative;width:100%}`;const Zt=new WeakMap;const qt=new WeakMap;const Jt=new WeakMap;const Qt=new WeakMap;const ts="both";const ss="horizontal";const is="vertical";const es="none";class ns extends Ot{constructor(){super(...arguments);this.$onSelectionChange=null;this.$onSourceImageLoad=null;this.$onSourceImageTransform=null;this.$scale=1;this.$style=Vt;this.resize=is;this.selection="";this.slottable=false}set $image(t){qt.set(this,t)}get $image(){return qt.get(this)}set $sourceImage(t){Qt.set(this,t)}get $sourceImage(){return Qt.get(this)}set $canvas(t){Zt.set(this,t)}get $canvas(){return Zt.get(this)}set $selection(t){Jt.set(this,t)}get $selection(){return Jt.get(this)}static get observedAttributes(){return super.observedAttributes.concat(["resize","selection"])}connectedCallback(){super.connectedCallback();let t=null;if(this.selection){t=this.ownerDocument.querySelector(this.selection)}else{t=this.closest(this.$getTagNameOf(p))}if(et(t)){this.$selection=t;this.$onSelectionChange=this.$handleSelectionChange.bind(this);lt(t,F,this.$onSelectionChange);const s=t.closest(this.$getTagNameOf(c));if(s){this.$canvas=s;const t=s.querySelector(this.$getTagNameOf(d));if(t){this.$sourceImage=t;this.$image=t.cloneNode(true);this.$getShadowRoot().appendChild(this.$image);this.$onSourceImageLoad=this.$handleSourceImageLoad.bind(this);this.$onSourceImageTransform=this.$handleSourceImageTransform.bind(this);lt(t.$image,W,this.$onSourceImageLoad);lt(t,G,this.$onSourceImageTransform)}}this.$render()}}disconnectedCallback(){const{$selection:t,$sourceImage:s}=this;if(t&&this.$onSelectionChange){ct(t,F,this.$onSelectionChange);this.$onSelectionChange=null}if(s&&this.$onSourceImageLoad){ct(s.$image,W,this.$onSourceImageLoad);this.$onSourceImageLoad=null}if(s&&this.$onSourceImageTransform){ct(s,G,this.$onSourceImageTransform);this.$onSourceImageTransform=null}super.disconnectedCallback()}$handleSelectionChange(t){this.$render(t.detail)}$handleSourceImageLoad(){const{$image:t,$sourceImage:s}=this;const i=t.getAttribute("src");const e=s.getAttribute("src");if(e&&e!==i){t.setAttribute("src",e);t.$ready((()=>{setTimeout((()=>{this.$render()}),50)}))}}$handleSourceImageTransform(t){this.$render(undefined,t.detail.matrix)}$render(t,s){const{$canvas:i,$selection:e}=this;if(!t&&!e.hidden){t=e}if(!t||t.x===0&&t.y===0&&t.width===0&&t.height===0){t={x:0,y:0,width:i.offsetWidth,height:i.offsetHeight}}const{x:n,y:h,width:o,height:r}=t;const a={};const{clientWidth:c,clientHeight:l}=this;let f=c;let u=l;let d=NaN;switch(this.resize){case ts:d=1;f=o;u=r;a.width=o;a.height=r;break;case ss:d=r>0?l/r:0;f=o*d;a.width=f;break;case is:d=o>0?c/o:0;u=r*d;a.height=u;break;case es:default:if(c>0){d=o>0?c/o:0}else if(l>0){d=r>0?l/r:0}}this.$scale=d;this.$setStyles(a);if(this.$sourceImage){this.$transformImageByOffset(s!==null&&s!==void 0?s:this.$sourceImage.$getTransform(),-n,-h)}}$transformImageByOffset(t,s,i){const{$image:e,$scale:n,$sourceImage:h}=this;if(h&&e&&n>=0){const[h,o,r,a,c,l]=t;const f=(s*a-r*i)/(h*a-r*o);const u=(i*h-o*s)/(h*a-r*o);const d=h*f+r*u+c;const p=o*f+a*u+l;e.$ready((t=>{this.$setStyles.call(e,{width:t.naturalWidth*n,height:t.naturalHeight*n})}));e.$setTransform(h,o,r,a,d*n,p*n)}}}ns.$name=m;ns.$version="2.0.0";
|
|
2
|
+
/*! Cropper.js v2.0.0 | (c) 2015-present Chen Fengyuan | MIT */Et.$define();Kt.$define();Ft.$define();Dt.$define();Rt.$define();Ut.$define();Pt.$define();ns.$define();const hs=".mb-6{margin-bottom:1.5rem!important}.flex{display:flex!important}.w-full{width:100%!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.justify-between{justify-content:space-between!important}*{box-sizing:border-box}:host{align-items:center;display:flex;flex-direction:column;gap:1.5rem;justify-content:space-between;margin-bottom:1.5rem;width:100%}.static{position:static!important}.hidden{display:none!important}.aspect-branding{aspect-ratio:23/24!important}.h-\\[17\\.5rem\\]{height:17.5rem!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.resize{resize:both!important}.rounded-full{border-radius:9999px!important}.border-0{border-width:0!important}.border-b{border-bottom-width:1px!important}.border-solid{border-style:solid!important}.border-off-white-700{--tw-border-opacity:1!important;border-color:rgb(222 219 213/var(--tw-border-opacity,1))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))!important}.px-14{padding-left:3.5rem!important;padding-right:3.5rem!important}@media (min-width:40rem){.tablet\\:max-w-xs{max-width:20rem!important}.tablet\\:px-1{padding-left:.25rem!important;padding-right:.25rem!important}}";const os=class{constructor(i){t(this,i);this.valueChange=s(this,"valueChange",3)}value;returnType="base64";valueChange;_imageRef;_selectionRef;_maxScale=0;_minScale=0;_resizeDebounceTimeout;_toCanvasDebounceTimeout;_loaded=false;_currentScale=0;onResize(){if(this._resizeDebounceTimeout){clearTimeout(this._resizeDebounceTimeout)}this._resizeDebounceTimeout=setTimeout((()=>{this._selectionRef.$center();this._imageRef.$center()}),200)}componentDidLoad(){setTimeout((()=>{this._loaded=true}),200)}render(){return i(e,{key:"bb9b47e33d788f83b69156e78754fdf77e60fbdc",class:"p-cropper"},this._loaded&&i("cropper-canvas",{key:"c9b38a906946c725192411a5c8aeea567194d85c",class:"h-[17.5rem] w-full border-0 border-b border-solid border-off-white-700 bg-white",onAction:()=>this._onAction()},i("cropper-image",{key:"375a75a54723a633f6f67370af7732c49e17d5ea",src:this.value,alt:"Picture",ref:t=>this._setImageRef(t),scalable:true,translatable:true,crossorigin:"anonymous"}),i("cropper-shade",{key:"44df9ab40e61982a3d9dcc06c8395e878153f527",class:"aspect-branding rounded-full","theme-color":"rgba(255, 255, 255, 0.5)",hidden:true}),i("cropper-selection",{key:"98a11dbabb8e7852a3ea4ec34a9d8e5b4a617192","initial-coverage":"0.7","aspect-ratio":"1",ref:t=>this._selectionRef=t}),i("cropper-handle",{key:"e8378de3cc52edeb6e3fa65cf4bf66050e36ee0a",action:"move",plain:true})),i("p-range",{key:"a6471a180232794da126365058f4befb949b7cee",class:"w-full px-14 tablet:max-w-xs tablet:px-1",value:this._currentScale,onValueChange:t=>this._onInput(t.detail)}))}_setImageRef(t){if(this._imageRef){return}this._imageRef=t;this._imageRef.$ready((t=>setTimeout((()=>this._setInitialState(t)),100)))}_setInitialState(t){let s=200/t.naturalHeight;if(t.naturalHeight>=t.naturalWidth){s=200/t.naturalWidth}this._minScale=s;this._maxScale=5;this._selectionRef.$resize("nw-resize",200,200,1);this._selectionRef.$center();this._toCanvas();this._setScale(s)}_onAction(){this._setCurrentScale();this._toCanvas()}_setScale(t,s=true,i=true){const e=this._imageRef.$getTransform();this._imageRef.$setTransform([t,0,0,t,e[4],e[5]]);if(s){this._imageRef.$center()}if(i){this._setCurrentScale()}}_setCurrentScale(){const t=this._imageRef.$getTransform();const s=t[0];if(s<this._minScale){this._setScale(this._minScale,true,false);this._currentScale=0;return}if(s>this._maxScale){this._setScale(this._maxScale,true,false);this._currentScale=100;return}if(s===this._minScale){this._currentScale=0;return}if(s===this._maxScale){this._currentScale=100;return}const i=this._maxScale-this._minScale;const e=s-this._minScale;const n=e/i*100;this._currentScale=n}_onInput(t){const s=this._imageRef.$getTransform();const i=s[0];const e=this._maxScale-this._minScale;const n=e*(t/100);if(n===i){return}this._setScale(n+this._minScale,false,false);this._currentScale=t;this._toCanvas()}_toCanvas(){if(this._toCanvasDebounceTimeout){clearTimeout(this._toCanvasDebounceTimeout)}this._toCanvasDebounceTimeout=setTimeout((async()=>{const t=await this._selectionRef.$toCanvas();if(this.returnType==="canvas"){this.valueChange.emit(t);return}const s=t.toDataURL("image/png");this.valueChange.emit(s)}),200)}};os.style=hs;export{os as p_cropper};
|
|
3
|
+
//# sourceMappingURL=p-ad3595e3.entry.js.map
|