vviinn-widgets 2.227.0 → 2.227.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/cjs/{Rectangle-B7-dl4zr.js → Rectangle-H07XTbBV.js} +4 -4
- package/dist/cjs/{SecondaryActionIcon-CqnCQG1V.js → SecondaryActionIcon-CuF0tHdQ.js} +4 -4
- package/dist/cjs/{app-globals-Bhojy5Uj.js → app-globals-BQtOMRsH.js} +3 -3
- package/dist/cjs/{cropperUtils-HujLFYz-.js → cropperUtils-CwfFUt0o.js} +4 -4
- package/dist/cjs/{cssUrlHelper-wYUS6juZ.js → cssUrlHelper-CVKCRIcH.js} +4 -4
- package/dist/cjs/{exampleImage-DyZl-Zfz.js → exampleImage-CI2pSgNo.js} +3 -3
- package/dist/cjs/{index-Ddq5Gwq2.js → index-Bbvxilxc.js} +6 -6
- package/dist/cjs/{index-DD2wckQQ.js → index-CKUxPZjt.js} +4 -4
- package/dist/cjs/{index-XHzTQzNR.js → index-H0WaGD9i.js} +4 -4
- package/dist/cjs/{index-Bz6kK4Kq.js → index-Zfb460O_.js} +3 -3
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{openProductLink-B5aaa2i4.js → openProductLink-piJoG25a.js} +3 -3
- package/dist/cjs/{resultsPageUrl-DkgA_BG5.js → resultsPageUrl-Dehl_j2Q.js} +3 -3
- package/dist/cjs/{search.store-DO0B1GDy.js → search.store-DvhlFYrp.js} +6 -6
- package/dist/cjs/{store-ncQ0GnDP.js → store-rzr57Vi7.js} +3 -3
- package/dist/cjs/{swiper-element-iOnGr8Sh.js → swiper-element-0eESZpDs.js} +3 -3
- package/dist/cjs/vviinn-button_6.cjs.entry.js +11 -11
- package/dist/cjs/vviinn-camera_12.cjs.entry.js +15 -15
- package/dist/cjs/vviinn-carousel_10.cjs.entry.js +13 -13
- package/dist/cjs/vviinn-detected-object_2.cjs.entry.js +6 -6
- package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +15 -15
- package/dist/cjs/vviinn-text-search.cjs.entry.js +10 -10
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +9 -9
- package/dist/cjs/vviinn-widgets.cjs.js +5 -5
- package/dist/collection/Image/bounds.js +3 -3
- package/dist/collection/Image/error.js +3 -3
- package/dist/collection/Image/fromFile.js +3 -3
- package/dist/collection/Image/imageToB64.js +3 -3
- package/dist/collection/Image/index.js +3 -3
- package/dist/collection/Image/renderPromise.js +3 -3
- package/dist/collection/Image/renderTitleImage.js +3 -3
- package/dist/collection/Image/resizeImage.js +3 -3
- package/dist/collection/Image/responsive.js +3 -3
- package/dist/collection/Image/sizing.js +3 -3
- package/dist/collection/Image/toFile.js +3 -3
- package/dist/collection/a11y/announcements.js +3 -3
- package/dist/collection/a11y/aria-labels.js +3 -3
- package/dist/collection/a11y/index.js +3 -3
- package/dist/collection/analytics/GAnalytics.js +3 -3
- package/dist/collection/analytics/GeneralAnalytics.js +3 -3
- package/dist/collection/analytics/GtagAnalytics.js +3 -3
- package/dist/collection/campaign/Campaign.js +3 -3
- package/dist/collection/campaign/CampaignService.js +3 -3
- package/dist/collection/campaign/VCSCampaignService.js +3 -3
- package/dist/collection/campaign/VPRCampaignService.js +3 -3
- package/dist/collection/components/customized-slots.js +3 -3
- package/dist/collection/components/vviinn-button/vviinn-button.js +3 -3
- package/dist/collection/components/vviinn-camera/vviinn-camera.js +3 -3
- package/dist/collection/components/vviinn-carousel/constants.js +3 -3
- package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +3 -3
- package/dist/collection/components/vviinn-cropper/constants.js +3 -3
- package/dist/collection/components/vviinn-cropper/helpers/cropperOcrGate.js +3 -3
- package/dist/collection/components/vviinn-cropper/helpers/cropperUtils.js +3 -3
- package/dist/collection/components/vviinn-cropper/helpers/hasSelectedOcrFilter.js +3 -3
- package/dist/collection/components/vviinn-cropper/helpers/isCropBoxDataSimilar.js +3 -3
- package/dist/collection/components/vviinn-cropper/helpers/validateCropBoxData.js +3 -3
- package/dist/collection/components/vviinn-cropper/vviinn-cropper.js +3 -3
- package/dist/collection/components/vviinn-cropper/vviinn-detected-object/vviinn-detected-object.js +3 -3
- package/dist/collection/components/vviinn-error/index.js +3 -3
- package/dist/collection/components/vviinn-error/vviinn-error.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/RenderCustomButton.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/RenderFilterButton.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/RenderSearchInput.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/extractSelectedFilters.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/filterValueUtils.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/getFilterOptions.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/getIntervalLabel.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/getSelectedInterval.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/index.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/isSubFilterActive.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/modalPositioning.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/searchHelper.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/subFilterSelection.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/syncRequestFilters.js +3 -3
- package/dist/collection/components/vviinn-filters/helpers/triggerFilter.js +3 -3
- package/dist/collection/components/vviinn-filters/vviinn-extended-filters-button.js +3 -3
- package/dist/collection/components/vviinn-filters/vviinn-extended-filters.js +3 -3
- package/dist/collection/components/vviinn-filters/vviinn-filters.js +3 -3
- package/dist/collection/components/vviinn-filters/vviinn-selected-filters.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/ArrowIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/BasketIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/CameraActionIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/CameraIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/CheckCircleIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/ChevronIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/ChevronIconSmall.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/CrossIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/CrossSellingIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/DragDropImageIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/FavoriteIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/FavoriteIconPressed.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/FilterIconCheck.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/FilterIconClose.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/FiltersIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/GridViewIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/ImagePlaceholder.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/MicIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/MinusIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/NewCloseIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/PhotoFrameCorner.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/PlusIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/RoundCameraIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SearchIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SearchModalCameraIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SearchModalFullSearchIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SearchModalImageSearchIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SearchModalUploadIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SecondaryActionIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SimilarProductsIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/SparkIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/TextIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/TextSearchIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/UpdateIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/UploadActionIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/UploadActionIconVariant.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/VisualSearchIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/icons/WarningIcon.js +3 -3
- package/dist/collection/components/vviinn-icons/index.js +3 -3
- package/dist/collection/components/vviinn-image/vviinn-image.js +3 -3
- package/dist/collection/components/vviinn-image-selector/vviinn-image-selector.js +3 -3
- package/dist/collection/components/vviinn-modal/vviinn-modal.js +3 -3
- package/dist/collection/components/vviinn-overlay/vviinn-overlay.js +3 -3
- package/dist/collection/components/vviinn-overlayed-modal/vviinn-overlayed-modal.js +3 -3
- package/dist/collection/components/vviinn-preloader/vviinn-preloader.js +3 -3
- package/dist/collection/components/vviinn-privacy-badge/vviinn-privacy-badge.js +3 -3
- package/dist/collection/components/vviinn-product-card/helpers.js +3 -3
- package/dist/collection/components/vviinn-product-card/render-helpers.js +3 -3
- package/dist/collection/components/vviinn-product-card/stories/args.js +7 -4
- package/dist/collection/components/vviinn-product-card/stories/decorators.js +4 -4
- package/dist/collection/components/vviinn-product-card/vviinn-energy-label/vviinn-energy-label.js +3 -3
- package/dist/collection/components/vviinn-product-card/vviinn-product-card.js +3 -3
- package/dist/collection/components/vviinn-range-filter/vviinn-range-filter.js +3 -3
- package/dist/collection/components/vviinn-results/stories/ResultsTemplate.js +3 -3
- package/dist/collection/components/vviinn-results/vviinn-results.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/constants.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/cropper-manager.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/helpers.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/render-helpers.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/store.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/test-data.js +3 -3
- package/dist/collection/components/vviinn-shop-the-look/vviinn-shop-the-look.css +2 -2
- package/dist/collection/components/vviinn-shop-the-look/vviinn-shop-the-look.js +10 -10
- package/dist/collection/components/vviinn-skeleton/vviinn-skeleton.js +3 -3
- package/dist/collection/components/vviinn-slider/arrow.js +3 -3
- package/dist/collection/components/vviinn-slider/vviinn-slide/vviinn-slide.js +3 -3
- package/dist/collection/components/vviinn-slider/vviinn-slider.js +3 -3
- package/dist/collection/components/vviinn-suggestions/helpers.js +3 -3
- package/dist/collection/components/vviinn-suggestions/render-helpers.js +3 -3
- package/dist/collection/components/vviinn-suggestions/vviinn-suggestions.js +3 -3
- package/dist/collection/components/vviinn-teaser/vviinn-teaser.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/autoSuggestDebounce.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/handleSuggestionsKeyDown.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/index.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/initializeRecognition.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/permitSpeechRecognition.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/renderSuggestions.js +3 -3
- package/dist/collection/components/vviinn-text-search/helpers/speechTooltip.js +3 -3
- package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +3 -3
- package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +3 -3
- package/dist/collection/components/vviinn-vpr-button/stories/args.js +3 -3
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +3 -3
- package/dist/collection/components/vviinn-vpr-widget/stories/args.js +3 -3
- package/dist/collection/components/vviinn-vpr-widget/stories/decorators.js +3 -3
- package/dist/collection/components/vviinn-vpr-widget/token-helpers.js +3 -3
- package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +3 -3
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.css +0 -1
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +3 -3
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.css +0 -1
- package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +3 -3
- package/dist/collection/constants/exampleImage.js +3 -3
- package/dist/collection/cssParts/filters.js +3 -3
- package/dist/collection/cssParts/index.js +3 -3
- package/dist/collection/cssParts/product.js +3 -3
- package/dist/collection/cssParts/suggestions.js +3 -3
- package/dist/collection/dom/index.js +3 -3
- package/dist/collection/dom/intersectionObserver.js +3 -3
- package/dist/collection/error.js +3 -3
- package/dist/collection/file/index.js +3 -3
- package/dist/collection/filters/index.js +3 -3
- package/dist/collection/filters/testFixtures.js +3 -3
- package/dist/collection/geometry/Clip.js +3 -3
- package/dist/collection/geometry/Point.js +3 -3
- package/dist/collection/geometry/Rectangle.js +3 -3
- package/dist/collection/geometry/RectangleAlt.js +3 -3
- package/dist/collection/geometry/Sized.js +3 -3
- package/dist/collection/global.js +3 -3
- package/dist/collection/helpers/device/browserType.js +3 -3
- package/dist/collection/helpers/device/checkDeviceType.js +3 -3
- package/dist/collection/helpers/dragAndDrop/parseDroppedFile.js +3 -3
- package/dist/collection/helpers/navigation/openProductLink.js +3 -3
- package/dist/collection/helpers/url/getLastUrlPath.js +3 -3
- package/dist/collection/helpers/url/getLastUrlPath.test.js +3 -3
- package/dist/collection/helpers/url/resultsPageUrl.js +3 -3
- package/dist/collection/helpers/url/resultsPageUrl.test.js +3 -3
- package/dist/collection/index.js +3 -3
- package/dist/collection/interfaces/index.js +3 -3
- package/dist/collection/localStorage/index.js +3 -3
- package/dist/collection/locale/index.js +3 -3
- package/dist/collection/locale/resources.js +3 -3
- package/dist/collection/network/apiClient.js +3 -3
- package/dist/collection/network/request.js +3 -3
- package/dist/collection/network/utils.js +3 -3
- package/dist/collection/openApi/index.js +3 -3
- package/dist/collection/recommendation/index.js +3 -3
- package/dist/collection/searchSession/searchSession.js +3 -3
- package/dist/collection/sentry.js +3 -3
- package/dist/collection/store/file-processing.js +3 -3
- package/dist/collection/store/helpers/applyResponseFilters.js +3 -3
- package/dist/collection/store/helpers/searchSequence.js +3 -3
- package/dist/collection/store/image-processing.js +3 -3
- package/dist/collection/store/search.store.js +3 -3
- package/dist/collection/store/store.js +3 -3
- package/dist/collection/store/tracking.js +3 -3
- package/dist/collection/tracking/event.js +3 -3
- package/dist/collection/tracking/index.js +3 -3
- package/dist/collection/tracking/models.js +3 -3
- package/dist/collection/tracking/searchTracking.js +3 -3
- package/dist/collection/tracking/session.js +3 -3
- package/dist/collection/utils/collections/collectionUtils.test.js +3 -3
- package/dist/collection/utils/collections/collectionsUtils.js +3 -3
- package/dist/collection/utils/cssUrl/cssUrlHelper.js +3 -3
- package/dist/collection/utils/either.js +3 -3
- package/dist/collection/utils/enum/enumUtils.js +3 -3
- package/dist/collection/utils/number/index.js +3 -3
- package/dist/collection/utils/option/option.js +3 -3
- package/dist/collection/utils/semigroup/semigroupDiff.js +3 -3
- package/dist/collection/utils/string/encodeToBase64UTF8.js +3 -3
- package/dist/collection/utils/string/joinTruthy.js +3 -3
- package/dist/collection/utils/string/joinTruthy.test.js +3 -3
- package/dist/collection/utils/swiper/swiperUtils.js +3 -3
- package/dist/collection/utils/token/tokenUtils.js +3 -3
- package/dist/collection/video/settings.js +3 -3
- package/dist/collection/widget/constants.js +3 -3
- package/dist/collection/widget/types.js +3 -3
- package/dist/esm/{Rectangle-DYZUk1F3.js → Rectangle-B_oG2eyg.js} +4 -4
- package/dist/esm/{SecondaryActionIcon-C7llW1vz.js → SecondaryActionIcon-Diibgish.js} +4 -4
- package/dist/esm/{app-globals-K2sPgzSL.js → app-globals-5M4OE8Ib.js} +3 -3
- package/dist/esm/{cropperUtils-CexZ_yfb.js → cropperUtils-C09kJv1s.js} +4 -4
- package/dist/esm/{cssUrlHelper-C9a8Lgt6.js → cssUrlHelper-B9aUpUCs.js} +4 -4
- package/dist/esm/{exampleImage-OaNWTAPi.js → exampleImage-Ct4T-m61.js} +3 -3
- package/dist/esm/{index-CWTRysN5.js → index-BTZDkDXn.js} +6 -6
- package/dist/esm/{index-DRuRp4Bj.js → index-D383RmFU.js} +4 -4
- package/dist/esm/{index-FhFmxhnG.js → index-DAJ_Vnro.js} +3 -3
- package/dist/esm/{index-D9AV63U9.js → index-DLBHQNOR.js} +4 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{openProductLink-VT0ItZ7J.js → openProductLink-D8wvuxca.js} +3 -3
- package/dist/esm/{resultsPageUrl-Cc4vYYIH.js → resultsPageUrl-Do7coPt7.js} +3 -3
- package/dist/esm/{search.store-BkVbtzWE.js → search.store-BVrQTC-G.js} +6 -6
- package/dist/esm/{store-CFvXi0uP.js → store-Dw7Hd5-K.js} +3 -3
- package/dist/esm/{swiper-element-CNZyvcZk.js → swiper-element-pB8RrHSZ.js} +3 -3
- package/dist/esm/vviinn-button_6.entry.js +11 -11
- package/dist/esm/vviinn-camera_12.entry.js +15 -15
- package/dist/esm/vviinn-carousel_10.entry.js +13 -13
- package/dist/esm/vviinn-detected-object_2.entry.js +6 -6
- package/dist/esm/vviinn-shop-the-look.entry.js +15 -15
- package/dist/esm/vviinn-text-search.entry.js +10 -10
- package/dist/esm/vviinn-vps-button.entry.js +9 -9
- package/dist/esm/vviinn-widgets.js +6 -6
- package/dist/loader/cdn.js +3 -3
- package/dist/loader/index.cjs.js +3 -3
- package/dist/loader/index.es2017.js +3 -3
- package/dist/loader/index.js +3 -3
- package/dist/storybook/helpers/sharedArgTypes.js +3 -3
- package/dist/types/components/vviinn-product-card/stories/args.d.ts +3 -0
- package/dist/types/components/vviinn-shop-the-look/vviinn-shop-the-look.d.ts +5 -5
- package/dist/types/components.d.ts +2 -2
- package/dist/vviinn-widgets/index.esm.js +3 -3
- package/dist/vviinn-widgets/{p-1d1f5dc5.entry.js → p-160dba84.entry.js} +4 -4
- package/dist/vviinn-widgets/{p-e668a5af.entry.js → p-474de17c.entry.js} +4 -4
- package/dist/vviinn-widgets/p-4a8df7a5.entry.js +8 -0
- package/dist/vviinn-widgets/{p-10a1e757.entry.js → p-55b34826.entry.js} +4 -4
- package/dist/vviinn-widgets/p-5M4OE8Ib.js +8 -0
- package/dist/vviinn-widgets/{p-D-DCoH5E.js → p-BK-UtHEi.js} +4 -4
- package/dist/vviinn-widgets/{p-CLnNoPoc.js → p-BinO0Y25.js} +4 -4
- package/{www/build/p-D4gGbVSQ.js → dist/vviinn-widgets/p-Bv62lBTh.js} +4 -4
- package/dist/vviinn-widgets/{p-D5VwnX0v.js → p-Bx5RgG8R.js} +4 -4
- package/{www/build/p-BVr4JODj.js → dist/vviinn-widgets/p-C1kKyGWn.js} +4 -4
- package/{www/build/p-DFKrbabt.js → dist/vviinn-widgets/p-CJTKS7AD.js} +4 -4
- package/dist/vviinn-widgets/p-Ct4T-m61.js +8 -0
- package/dist/vviinn-widgets/{p-VT0ItZ7J.js → p-D8wvuxca.js} +3 -3
- package/{www/build/p-FhFmxhnG.js → dist/vviinn-widgets/p-DAJ_Vnro.js} +3 -3
- package/dist/vviinn-widgets/p-DaXOFJ9S.js +8 -0
- package/dist/vviinn-widgets/{p-Cc4vYYIH.js → p-Do7coPt7.js} +3 -3
- package/dist/vviinn-widgets/{p-CFvXi0uP.js → p-Dw7Hd5-K.js} +3 -3
- package/dist/vviinn-widgets/{p-f127bf93.entry.js → p-a831eb43.entry.js} +4 -4
- package/dist/vviinn-widgets/{p-1076dfba.entry.js → p-c9916098.entry.js} +4 -4
- package/{www/build/p-5a528ed3.entry.js → dist/vviinn-widgets/p-f5156f20.entry.js} +4 -4
- package/dist/vviinn-widgets/{p-CNZyvcZk.js → p-pB8RrHSZ.js} +3 -3
- package/dist/vviinn-widgets/{p-EQFA7gFB.js → p-zJ2la8de.js} +4 -4
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +4 -4
- package/package.json +1 -1
- package/www/build/index.esm.js +3 -3
- package/www/build/{p-1d1f5dc5.entry.js → p-160dba84.entry.js} +4 -4
- package/www/build/{p-e668a5af.entry.js → p-474de17c.entry.js} +4 -4
- package/www/build/p-4a8df7a5.entry.js +8 -0
- package/www/build/{p-10a1e757.entry.js → p-55b34826.entry.js} +4 -4
- package/www/build/p-5M4OE8Ib.js +8 -0
- package/www/build/{p-D-DCoH5E.js → p-BK-UtHEi.js} +4 -4
- package/www/build/{p-CLnNoPoc.js → p-BinO0Y25.js} +4 -4
- package/{dist/vviinn-widgets/p-D4gGbVSQ.js → www/build/p-Bv62lBTh.js} +4 -4
- package/www/build/{p-D5VwnX0v.js → p-Bx5RgG8R.js} +4 -4
- package/{dist/vviinn-widgets/p-BVr4JODj.js → www/build/p-C1kKyGWn.js} +4 -4
- package/{dist/vviinn-widgets/p-DFKrbabt.js → www/build/p-CJTKS7AD.js} +4 -4
- package/www/build/p-Ct4T-m61.js +8 -0
- package/www/build/{p-VT0ItZ7J.js → p-D8wvuxca.js} +3 -3
- package/{dist/vviinn-widgets/p-FhFmxhnG.js → www/build/p-DAJ_Vnro.js} +3 -3
- package/www/build/p-DaXOFJ9S.js +8 -0
- package/www/build/{p-Cc4vYYIH.js → p-Do7coPt7.js} +3 -3
- package/www/build/{p-CFvXi0uP.js → p-Dw7Hd5-K.js} +3 -3
- package/www/build/{p-f127bf93.entry.js → p-a831eb43.entry.js} +4 -4
- package/www/build/{p-1076dfba.entry.js → p-c9916098.entry.js} +4 -4
- package/{dist/vviinn-widgets/p-5a528ed3.entry.js → www/build/p-f5156f20.entry.js} +4 -4
- package/www/build/{p-0255cc44.js → p-fd10b8ec.js} +4 -4
- package/www/build/{p-CNZyvcZk.js → p-pB8RrHSZ.js} +3 -3
- package/www/build/{p-EQFA7gFB.js → p-zJ2la8de.js} +4 -4
- package/www/build/vviinn-widgets.esm.js +4 -4
- package/www/build/vviinn-widgets.js +3 -3
- package/dist/vviinn-widgets/p-6OgrnZJP.js +0 -8
- package/dist/vviinn-widgets/p-77b3c70d.entry.js +0 -8
- package/dist/vviinn-widgets/p-K2sPgzSL.js +0 -8
- package/dist/vviinn-widgets/p-OaNWTAPi.js +0 -8
- package/www/build/p-6OgrnZJP.js +0 -8
- package/www/build/p-77b3c70d.entry.js +0 -8
- package/www/build/p-K2sPgzSL.js +0 -8
- package/www/build/p-OaNWTAPi.js +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vviinn-widgets v2.227.
|
|
2
|
+
* vviinn-widgets v2.227.2
|
|
3
3
|
* Copyright 2020 Mediaopt
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
* License: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.
|
|
6
|
-
* Notice: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.
|
|
5
|
+
* License: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.2/LICENSE
|
|
6
|
+
* Notice: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.2/NOTICE
|
|
7
7
|
*/
|
|
8
|
-
import{g as t}from"./p-CFvXi0uP.js";var i,n={exports:{}},a=(i||(i=1,n.exports=function(){function t(t,i){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);i&&(a=a.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,a)}return n}function i(i){for(var a=1;a<arguments.length;a++){var e=null!=arguments[a]?arguments[a]:{};a%2?t(Object(e),!0).forEach((function(t){var a,s,h;a=i,h=e[t],(s=n(s=t))in a?Object.defineProperty(a,s,{value:h,enumerable:!0,configurable:!0,writable:!0}):a[s]=h})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):t(Object(e)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}))}return i}function n(t){var i=function(t,i){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,i);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function e(t,i){for(var a=0;a<i.length;a++){var e=i[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,n(e.key),e)}}function s(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,i){if(t){if("string"==typeof t)return h(t,i);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,i):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,i){(null==i||i>t.length)&&(i=t.length);for(var n=0,a=new Array(i);n<i;n++)a[n]=t[n];return a}var r="undefined"!=typeof window&&void 0!==window.document,o=r?window:{},c=!(!r||!o.document.documentElement)&&"ontouchstart"in o.document.documentElement,u=!!r&&"PointerEvent"in o,f="cropper",v="all",p="crop",l="move",d="zoom",m="e",b="w",w="s",M="n",g="ne",y="nw",k="se",C="sw",O="".concat(f,"-crop"),j="".concat(f,"-disabled"),x="".concat(f,"-hidden"),N="".concat(f,"-hide"),A="".concat(f,"-invisible"),z="".concat(f,"-modal"),D="".concat(f,"-move"),R="".concat(f,"Action"),E="".concat(f,"Preview"),T="crop",X="move",S="none",Y="crop",B="cropend",W="cropmove",P="cropstart",H="dblclick",$=u?"pointerdown":c?"touchstart":"mousedown",I=u?"pointermove":c?"touchmove":"mousemove",U=u?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",q="ready",L="resize",Z="wheel",F="zoom",G="image/jpeg",K=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,V=/^data:/,J=/^data:image\/jpeg;base64,/,Q=/^img|canvas$/i,_={viewMode:0,dragMode:T,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tt=Number.isNaN||o.isNaN;function it(t){return"number"==typeof t&&!tt(t)}var nt=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function et(t){return"object"===a(t)&&null!==t}var st=Object.prototype.hasOwnProperty;function ht(t){if(!et(t))return!1;try{var i=t.constructor,n=i.prototype;return i&&n&&st.call(n,"isPrototypeOf")}catch(t){return!1}}function rt(t){return"function"==typeof t}var ot=Array.prototype.slice;function ct(t){return Array.from?Array.from(t):ot.call(t)}function ut(t,i){return t&&rt(i)&&(Array.isArray(t)||it(t.length)?ct(t).forEach((function(n,a){i.call(t,n,a,t)})):et(t)&&Object.keys(t).forEach((function(n){i.call(t,t[n],n,t)}))),t}var ft=Object.assign||function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return et(t)&&n.length>0&&n.forEach((function(i){et(i)&&Object.keys(i).forEach((function(n){t[n]=i[n]}))})),t},vt=/\.\d*(?:0|9){12}\d*$/;function pt(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return vt.test(t)?Math.round(t*i)/i:t}var lt=/^width|height|left|top|marginLeft|marginTop$/;function dt(t,i){var n=t.style;ut(i,(function(t,i){lt.test(i)&&it(t)&&(t="".concat(t,"px")),n[i]=t}))}function mt(t,i){if(i)if(it(t.length))ut(t,(function(t){mt(t,i)}));else if(t.classList)t.classList.add(i);else{var n=t.className.trim();n?n.indexOf(i)<0&&(t.className="".concat(n," ").concat(i)):t.className=i}}function bt(t,i){i&&(it(t.length)?ut(t,(function(t){bt(t,i)})):t.classList?t.classList.remove(i):t.className.indexOf(i)>=0&&(t.className=t.className.replace(i,"")))}function wt(t,i,n){i&&(it(t.length)?ut(t,(function(t){wt(t,i,n)})):n?mt(t,i):bt(t,i))}var Mt=/([a-z\d])([A-Z])/g;function gt(t){return t.replace(Mt,"$1-$2").toLowerCase()}function yt(t,i){return et(t[i])?t[i]:t.dataset?t.dataset[i]:t.getAttribute("data-".concat(gt(i)))}function kt(t,i,n){et(n)?t[i]=n:t.dataset?t.dataset[i]=n:t.setAttribute("data-".concat(gt(i)),n)}var Ct=/\s\s*/,Ot=function(){var t=!1;if(r){var i=!1,n=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,i},set:function(t){i=t}});o.addEventListener("test",n,a),o.removeEventListener("test",n,a)}return t}();function jt(t,i,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},e=n;i.trim().split(Ct).forEach((function(i){if(!Ot){var s=t.listeners;s&&s[i]&&s[i][n]&&(e=s[i][n],delete s[i][n],0===Object.keys(s[i]).length&&delete s[i],0===Object.keys(s).length&&delete t.listeners)}t.removeEventListener(i,e,a)}))}function xt(t,i,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},e=n;i.trim().split(Ct).forEach((function(i){if(a.once&&!Ot){var s=t.listeners,h=void 0===s?{}:s;e=function(){delete h[i][n],t.removeEventListener(i,e,a);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];n.apply(t,r)},h[i]||(h[i]={}),h[i][n]&&t.removeEventListener(i,h[i][n],a),h[i][n]=e,t.listeners=h}t.addEventListener(i,e,a)}))}function Nt(t,i,n){var a;return rt(Event)&&rt(CustomEvent)?a=new CustomEvent(i,{detail:n,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(i,!0,!0,n),t.dispatchEvent(a)}function At(t){var i=t.getBoundingClientRect();return{left:i.left+(window.pageXOffset-document.documentElement.clientLeft),top:i.top+(window.pageYOffset-document.documentElement.clientTop)}}var zt=o.location,Dt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Rt(t){var i=t.match(Dt);return null!==i&&(i[1]!==zt.protocol||i[2]!==zt.hostname||i[3]!==zt.port)}function Et(t){var i="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+i}function Tt(t){var i=t.rotate,n=t.scaleX,a=t.scaleY,e=t.translateX,s=t.translateY,h=[];it(e)&&0!==e&&h.push("translateX(".concat(e,"px)")),it(s)&&0!==s&&h.push("translateY(".concat(s,"px)")),it(i)&&0!==i&&h.push("rotate(".concat(i,"deg)")),it(n)&&1!==n&&h.push("scaleX(".concat(n,")")),it(a)&&1!==a&&h.push("scaleY(".concat(a,")"));var r=h.length?h.join(" "):"none";return{WebkitTransform:r,msTransform:r,transform:r}}function Xt(t,n){var a=t.pageX,e=t.pageY,s={endX:a,endY:e};return n?s:i({startX:a,startY:e},s)}function St(t){var i=t.aspectRatio,n=t.height,a=t.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",s=nt(a),h=nt(n);if(s&&h){var r=n*i;"contain"===e&&r>a||"cover"===e&&r<a?n=a/i:a=n*i}else s?n=a/i:h&&(a=n*i);return{width:a,height:n}}var Yt=String.fromCharCode;var Bt=/^data:.*,/;function Wt(t){var i,n=new DataView(t);try{var a,e,s;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var h=n.byteLength,r=2;r+1<h;){if(255===n.getUint8(r)&&225===n.getUint8(r+1)){e=r;break}r+=1}if(e){var o=e+10;if("Exif"===function(t,i,n){var a="";n+=i;for(var e=i;e<n;e+=1)a+=Yt(t.getUint8(e));return a}(n,e+4,4)){var c=n.getUint16(o);if(((a=18761===c)||19789===c)&&42===n.getUint16(o+2,a)){var u=n.getUint32(o+4,a);u>=8&&(s=o+u)}}}if(s){var f,v,p=n.getUint16(s,a);for(v=0;v<p;v+=1)if(274===n.getUint16(f=s+12*v+2,a)){i=n.getUint16(f+=8,a),n.setUint16(f,1,a);break}}}catch(t){i=1}return i}var Pt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,i=this.options,n=this.container,a=this.cropper,e=Number(i.minContainerWidth),s=Number(i.minContainerHeight);mt(a,x),bt(t,x);var h={width:Math.max(n.offsetWidth,e>=0?e:200),height:Math.max(n.offsetHeight,s>=0?s:100)};this.containerData=h,dt(a,{width:h.width,height:h.height}),mt(t,x),bt(a,x)},initCanvas:function(){var t=this.containerData,i=this.imageData,n=this.options.viewMode,a=Math.abs(i.rotate)%180==90,e=a?i.naturalHeight:i.naturalWidth,s=a?i.naturalWidth:i.naturalHeight,h=e/s,r=t.width,o=t.height;t.height*h>t.width?3===n?r=t.height*h:o=t.width/h:3===n?o=t.width/h:r=t.height*h;var c={aspectRatio:h,naturalWidth:e,naturalHeight:s,width:r,height:o};this.canvasData=c,this.limited=1===n||2===n,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=ft({},c)},limitCanvas:function(t,i){var n=this.options,a=this.containerData,e=this.canvasData,s=this.cropBoxData,h=n.viewMode,r=e.aspectRatio,o=this.cropped&&s;if(t){var c=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;h>1?(c=Math.max(c,a.width),u=Math.max(u,a.height),3===h&&(u*r>c?c=u*r:u=c/r)):h>0&&(c?c=Math.max(c,o?s.width:0):u?u=Math.max(u,o?s.height:0):o&&((u=s.height)*r>(c=s.width)?c=u*r:u=c/r));var f=St({aspectRatio:r,width:c,height:u});u=f.height,e.minWidth=c=f.width,e.minHeight=u,e.maxWidth=1/0,e.maxHeight=1/0}if(i)if(h>(o?0:1)){var v=a.width-e.width,p=a.height-e.height;e.minLeft=Math.min(0,v),e.minTop=Math.min(0,p),e.maxLeft=Math.max(0,v),e.maxTop=Math.max(0,p),o&&this.limited&&(e.minLeft=Math.min(s.left,s.left+(s.width-e.width)),e.minTop=Math.min(s.top,s.top+(s.height-e.height)),e.maxLeft=s.left,e.maxTop=s.top,2===h&&(e.width>=a.width&&(e.minLeft=Math.min(0,v),e.maxLeft=Math.max(0,v)),e.height>=a.height&&(e.minTop=Math.min(0,p),e.maxTop=Math.max(0,p))))}else e.minLeft=-e.width,e.minTop=-e.height,e.maxLeft=a.width,e.maxTop=a.height},renderCanvas:function(t,i){var n=this.canvasData,a=this.imageData;if(i){var e=function(t){var i=t.width,n=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:n,height:i};var e=a%90*Math.PI/180,s=Math.sin(e),h=Math.cos(e),r=i*h+n*s,o=i*s+n*h;return a>90?{width:o,height:r}:{width:r,height:o}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),s=e.width,h=e.height,r=n.width*(s/n.naturalWidth),o=n.height*(h/n.naturalHeight);n.left-=(r-n.width)/2,n.top-=(o-n.height)/2,n.width=r,n.height=o,n.aspectRatio=s/h,n.naturalWidth=s,n.naturalHeight=h,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,dt(this.canvas,ft({width:n.width,height:n.height},Tt({translateX:n.left,translateY:n.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var i=this.canvasData,n=this.imageData,a=n.naturalWidth*(i.width/i.naturalWidth),e=n.naturalHeight*(i.height/i.naturalHeight);ft(n,{width:a,height:e,left:(i.width-a)/2,top:(i.height-e)/2}),dt(this.image,ft({width:n.width,height:n.height},Tt(ft({translateX:n.left,translateY:n.top},n)))),t&&this.output()},initCropBox:function(){var t=this.options,i=this.canvasData,n=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,e={width:i.width,height:i.height};n&&(i.height*n>i.width?e.height=e.width/n:e.width=e.height*n),this.cropBoxData=e,this.limitCropBox(!0,!0),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),e.width=Math.max(e.minWidth,e.width*a),e.height=Math.max(e.minHeight,e.height*a),e.left=i.left+(i.width-e.width)/2,e.top=i.top+(i.height-e.height)/2,e.oldLeft=e.left,e.oldTop=e.top,this.initialCropBoxData=ft({},e)},limitCropBox:function(t,i){var n=this.options,a=this.containerData,e=this.canvasData,s=this.cropBoxData,h=this.limited,r=n.aspectRatio;if(t){var o=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,u=h?Math.min(a.width,e.width,e.width+e.left,a.width-e.left):a.width,f=h?Math.min(a.height,e.height,e.height+e.top,a.height-e.top):a.height;o=Math.min(o,a.width),c=Math.min(c,a.height),r&&(o&&c?c*r>o?c=o/r:o=c*r:o?c=o/r:c&&(o=c*r),f*r>u?f=u/r:u=f*r),s.minWidth=Math.min(o,u),s.minHeight=Math.min(c,f),s.maxWidth=u,s.maxHeight=f}i&&(h?(s.minLeft=Math.max(0,e.left),s.minTop=Math.max(0,e.top),s.maxLeft=Math.min(a.width,e.left+e.width)-s.width,s.maxTop=Math.min(a.height,e.top+e.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=a.width-s.width,s.maxTop=a.height-s.height))},renderCropBox:function(){var t=this.options,i=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,t.movable&&t.cropBoxMovable&&kt(this.face,R,n.width>=i.width&&n.height>=i.height?l:v),dt(this.cropBox,ft({width:n.width,height:n.height},Tt({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Nt(this.element,Y,this.getData())}},Ht={initPreview:function(){var t=this.element,i=this.crossOrigin,n=this.options.preview,a=i?this.crossOriginUrl:this.url,e=t.alt||"The image to preview",s=document.createElement("img");if(i&&(s.crossOrigin=i),s.src=a,s.alt=e,this.viewBox.appendChild(s),this.viewBoxImage=s,n){var h=n;"string"==typeof n?h=t.ownerDocument.querySelectorAll(n):n.querySelector&&(h=[n]),this.previews=h,ut(h,(function(t){var n=document.createElement("img");kt(t,E,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),i&&(n.crossOrigin=i),n.src=a,n.alt=e,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(n)}))}},resetPreview:function(){ut(this.previews,(function(t){var i=yt(t,E);dt(t,{width:i.width,height:i.height}),t.innerHTML=i.html,function(t,i){if(et(t[i]))try{delete t[i]}catch(n){t[i]=void 0}else if(t.dataset)try{delete t.dataset[i]}catch(n){t.dataset[i]=void 0}else t.removeAttribute("data-".concat(gt(i)))}(t,E)}))},preview:function(){var t=this.imageData,i=this.canvasData,n=this.cropBoxData,a=n.width,e=n.height,s=t.width,h=t.height,r=n.left-i.left-t.left,o=n.top-i.top-t.top;this.cropped&&!this.disabled&&(dt(this.viewBoxImage,ft({width:s,height:h},Tt(ft({translateX:-r,translateY:-o},t)))),ut(this.previews,(function(i){var n=yt(i,E),c=n.width,u=n.height,f=c,v=u,p=1;a&&(v=e*(p=c/a)),e&&v>u&&(f=a*(p=u/e),v=u),dt(i,{width:f,height:v}),dt(i.getElementsByTagName("img")[0],ft({width:s*p,height:h*p},Tt(ft({translateX:-r*p,translateY:-o*p},t))))})))}},$t={bind:function(){var t=this.element,i=this.options,n=this.cropper;rt(i.cropstart)&&xt(t,P,i.cropstart),rt(i.cropmove)&&xt(t,W,i.cropmove),rt(i.cropend)&&xt(t,B,i.cropend),rt(i.crop)&&xt(t,Y,i.crop),rt(i.zoom)&&xt(t,F,i.zoom),xt(n,$,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&xt(n,Z,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&xt(n,H,this.onDblclick=this.dblclick.bind(this)),xt(t.ownerDocument,I,this.onCropMove=this.cropMove.bind(this)),xt(t.ownerDocument,U,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&xt(window,L,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,n=this.cropper;rt(i.cropstart)&&jt(t,P,i.cropstart),rt(i.cropmove)&&jt(t,W,i.cropmove),rt(i.cropend)&&jt(t,B,i.cropend),rt(i.crop)&&jt(t,Y,i.crop),rt(i.zoom)&&jt(t,F,i.zoom),jt(n,$,this.onCropStart),i.zoomable&&i.zoomOnWheel&&jt(n,Z,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&jt(n,H,this.onDblclick),jt(t.ownerDocument,I,this.onCropMove),jt(t.ownerDocument,U,this.onCropEnd),i.responsive&&jt(window,L,this.onResize)}},It={resize:function(){if(!this.disabled){var t,i,n=this.options,a=this.container,e=this.containerData,s=a.offsetWidth/e.width,h=a.offsetHeight/e.height,r=Math.abs(s-1)>Math.abs(h-1)?s:h;1!==r&&(n.restore&&(t=this.getCanvasData(),i=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(ut(t,(function(i,n){t[n]=i*r}))),this.setCropBoxData(ut(i,(function(t,n){i[n]=t*r})))))}},dblclick:function(){var t,i;this.disabled||this.options.dragMode===S||this.setDragMode((i=O,((t=this.dragBox).classList?t.classList.contains(i):t.className.indexOf(i)>-1)?X:T))},wheel:function(t){var i=this,n=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){i.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*n,t)))},cropStart:function(t){var i=t.buttons,n=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(it(i)&&1!==i||it(n)&&0!==n||t.ctrlKey))){var a,e=this.options,s=this.pointers;t.changedTouches?ut(t.changedTouches,(function(t){s[t.identifier]=Xt(t)})):s[t.pointerId||0]=Xt(t),a=Object.keys(s).length>1&&e.zoomable&&e.zoomOnTouch?d:yt(t.target,R),K.test(a)&&!1!==Nt(this.element,P,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===p&&(this.cropping=!0,mt(this.dragBox,z)))}},cropMove:function(t){var i=this.action;if(!this.disabled&&i){var n=this.pointers;t.preventDefault(),!1!==Nt(this.element,W,{originalEvent:t,action:i})&&(t.changedTouches?ut(t.changedTouches,(function(t){ft(n[t.identifier]||{},Xt(t,!0))})):ft(n[t.pointerId||0]||{},Xt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,n=this.pointers;t.changedTouches?ut(t.changedTouches,(function(t){delete n[t.identifier]})):delete n[t.pointerId||0],i&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,wt(this.dragBox,z,this.cropped&&this.options.modal)),Nt(this.element,B,{originalEvent:t,action:i}))}}},Ut={change:function(t){var n,a=this.canvasData,e=this.containerData,s=this.cropBoxData,h=this.pointers,r=this.action,o=this.options.aspectRatio,c=s.left,u=s.top,f=s.width,O=s.height,j=c+f,N=u+O,A=0,z=0,D=e.width,R=e.height,E=!0;!o&&t.shiftKey&&(o=f&&O?f/O:1),this.limited&&(z=s.minTop,D=(A=s.minLeft)+Math.min(e.width,a.width,a.left+a.width),R=z+Math.min(e.height,a.height,a.top+a.height));var T=h[Object.keys(h)[0]],X={x:T.endX-T.startX,y:T.endY-T.startY},S=function(t){switch(t){case m:j+X.x>D&&(X.x=D-j);break;case b:c+X.x<A&&(X.x=A-c);break;case M:u+X.y<z&&(X.y=z-u);break;case w:N+X.y>R&&(X.y=R-N)}};switch(r){case v:c+=X.x,u+=X.y;break;case m:if(X.x>=0&&(j>=D||o&&(u<=z||N>=R))){E=!1;break}S(m),(f+=X.x)<0&&(r=b,c-=f=-f),o&&(u+=(s.height-(O=f/o))/2);break;case M:if(X.y<=0&&(u<=z||o&&(c<=A||j>=D))){E=!1;break}S(M),u+=X.y,(O-=X.y)<0&&(r=w,u-=O=-O),o&&(c+=(s.width-(f=O*o))/2);break;case b:if(X.x<=0&&(c<=A||o&&(u<=z||N>=R))){E=!1;break}S(b),c+=X.x,(f-=X.x)<0&&(r=m,c-=f=-f),o&&(u+=(s.height-(O=f/o))/2);break;case w:if(X.y>=0&&(N>=R||o&&(c<=A||j>=D))){E=!1;break}S(w),(O+=X.y)<0&&(r=M,u-=O=-O),o&&(c+=(s.width-(f=O*o))/2);break;case g:if(o){if(X.y<=0&&(u<=z||j>=D)){E=!1;break}S(M),u+=X.y,f=(O-=X.y)*o}else S(M),S(m),X.x>=0?j<D?f+=X.x:X.y<=0&&u<=z&&(E=!1):f+=X.x,X.y<=0?u>z&&(O-=X.y,u+=X.y):(O-=X.y,u+=X.y);f<0&&O<0?(r=C,u-=O=-O,c-=f=-f):f<0?(r=y,c-=f=-f):O<0&&(r=k,u-=O=-O);break;case y:if(o){if(X.y<=0&&(u<=z||c<=A)){E=!1;break}S(M),u+=X.y,c+=s.width-(f=(O-=X.y)*o)}else S(M),S(b),X.x<=0?c>A?(f-=X.x,c+=X.x):X.y<=0&&u<=z&&(E=!1):(f-=X.x,c+=X.x),X.y<=0?u>z&&(O-=X.y,u+=X.y):(O-=X.y,u+=X.y);f<0&&O<0?(r=k,u-=O=-O,c-=f=-f):f<0?(r=g,c-=f=-f):O<0&&(r=C,u-=O=-O);break;case C:if(o){if(X.x<=0&&(c<=A||N>=R)){E=!1;break}S(b),c+=X.x,O=(f-=X.x)/o}else S(w),S(b),X.x<=0?c>A?(f-=X.x,c+=X.x):X.y>=0&&N>=R&&(E=!1):(f-=X.x,c+=X.x),X.y>=0?N<R&&(O+=X.y):O+=X.y;f<0&&O<0?(r=g,u-=O=-O,c-=f=-f):f<0?(r=k,c-=f=-f):O<0&&(r=y,u-=O=-O);break;case k:if(o){if(X.x>=0&&(j>=D||N>=R)){E=!1;break}S(m),O=(f+=X.x)/o}else S(w),S(m),X.x>=0?j<D?f+=X.x:X.y>=0&&N>=R&&(E=!1):f+=X.x,X.y>=0?N<R&&(O+=X.y):O+=X.y;f<0&&O<0?(r=y,u-=O=-O,c-=f=-f):f<0?(r=C,c-=f=-f):O<0&&(r=g,u-=O=-O);break;case l:this.move(X.x,X.y),E=!1;break;case d:this.zoom(function(t){var n=i({},t),a=0;return ut(t,(function(t,i){delete n[i],ut(n,(function(i){var n=Math.abs(t.startX-i.startX),e=Math.abs(t.startY-i.startY),s=Math.abs(t.endX-i.endX),h=Math.abs(t.endY-i.endY),r=Math.sqrt(n*n+e*e),o=(Math.sqrt(s*s+h*h)-r)/r;Math.abs(o)>Math.abs(a)&&(a=o)}))})),a}(h),t),E=!1;break;case p:if(!X.x||!X.y){E=!1;break}n=At(this.cropper),c=T.startX-n.left,u=T.startY-n.top,f=s.minWidth,O=s.minHeight,X.x>0?r=X.y>0?k:g:X.x<0&&(c-=f,r=X.y>0?C:y),X.y<0&&(u-=O),this.cropped||(bt(this.cropBox,x),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}E&&(s.width=f,s.height=O,s.left=c,s.top=u,this.action=r,this.renderCropBox()),ut(h,(function(t){t.startX=t.endX,t.startY=t.endY}))}},qt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&mt(this.dragBox,z),bt(this.cropBox,x),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ft({},this.initialImageData),this.canvasData=ft({},this.initialCanvasData),this.cropBoxData=ft({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ft(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),bt(this.dragBox,z),mt(this.cropBox,x)),this},replace:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ut(this.previews,(function(i){i.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,bt(this.cropper,j)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,mt(this.cropper,j)),this},destroy:function(){var t=this.element;return t[f]?(t[f]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,a=n.left,e=n.top;return this.moveTo(at(t)?t:a+Number(t),at(i)?i:e+Number(i))},moveTo:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,a=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(it(t)&&(n.left=t,a=!0),it(i)&&(n.top=i,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,i){var n=this.canvasData;return t=Number(t),this.zoomTo(n.width*(t=t<0?1/(1-t):1+t)/n.naturalWidth,null,i)},zoomTo:function(t,i,n){var a=this.options,e=this.canvasData,s=e.width,h=e.height,r=e.naturalWidth,o=e.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=r*t,u=o*t;if(!1===Nt(this.element,F,{ratio:t,oldRatio:s/r,originalEvent:n}))return this;if(n){var f=this.pointers,v=At(this.cropper),p=f&&Object.keys(f).length?function(t){var i=0,n=0,a=0;return ut(t,(function(t){i+=t.startX,n+=t.startY,a+=1})),{pageX:i/=a,pageY:n/=a}}(f):{pageX:n.pageX,pageY:n.pageY};e.left-=(p.pageX-v.left-e.left)/s*(c-s),e.top-=(p.pageY-v.top-e.top)/h*(u-h)}else ht(i)&&it(i.x)&&it(i.y)?(e.left-=(i.x-e.left)/s*(c-s),e.top-=(i.y-e.top)/h*(u-h)):(e.left-=(c-s)/2,e.top-=(u-h)/2);e.width=c,e.height=u,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return it(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,it(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(it(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.imageData,a=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(it(t)&&(n.scaleX=t,a=!0),it(i)&&(n.scaleY=i,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,a=this.imageData,e=this.canvasData,s=this.cropBoxData;if(this.ready&&this.cropped){var h=a.width/a.naturalWidth;if(ut(t={x:s.left-e.left,y:s.top-e.top,width:s.width,height:s.height},(function(i,n){t[n]=i/h})),i){var r=Math.round(t.y+t.height),o=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=o-t.x,t.height=r-t.y}}else t={x:0,y:0,width:0,height:0};return n.rotatable&&(t.rotate=a.rotate||0),n.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var i=this.options,n=this.imageData,a=this.canvasData,e={};if(this.ready&&!this.disabled&&ht(t)){var s=!1;i.rotatable&&it(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,s=!0),i.scalable&&(it(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,s=!0),it(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,s=!0)),s&&this.renderCanvas(!0,!0);var h=n.width/n.naturalWidth;it(t.x)&&(e.left=t.x*h+a.left),it(t.y)&&(e.top=t.y*h+a.top),it(t.width)&&(e.width=t.width*h),it(t.height)&&(e.height=t.height*h),this.setCropBoxData(e)}return this},getContainerData:function(){return this.ready?ft({},this.containerData):{}},getImageData:function(){return this.sized?ft({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&ut(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){i[n]=t[n]})),i},setCanvasData:function(t){var i=this.canvasData,n=i.aspectRatio;return this.ready&&!this.disabled&&ht(t)&&(it(t.left)&&(i.left=t.left),it(t.top)&&(i.top=t.top),it(t.width)?(i.width=t.width,i.height=t.width/n):it(t.height)&&(i.height=t.height,i.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,i=this.cropBoxData;return this.ready&&this.cropped&&(t={left:i.left,top:i.top,width:i.width,height:i.height}),t||{}},setCropBoxData:function(t){var i,n,a=this.cropBoxData,e=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&ht(t)&&(it(t.left)&&(a.left=t.left),it(t.top)&&(a.top=t.top),it(t.width)&&t.width!==a.width&&(i=!0,a.width=t.width),it(t.height)&&t.height!==a.height&&(n=!0,a.height=t.height),e&&(i?a.height=a.width/e:n&&(a.width=a.height*e)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,n=function(t,i,n,a){var e=i.aspectRatio,h=i.naturalWidth,r=i.naturalHeight,o=i.rotate,c=void 0===o?0:o,u=i.scaleX,f=void 0===u?1:u,v=i.scaleY,p=void 0===v?1:v,l=n.aspectRatio,d=n.naturalWidth,m=n.naturalHeight,b=a.fillColor,w=void 0===b?"transparent":b,M=a.imageSmoothingEnabled,g=void 0===M||M,y=a.imageSmoothingQuality,k=void 0===y?"low":y,C=a.maxWidth,O=void 0===C?1/0:C,j=a.maxHeight,x=void 0===j?1/0:j,N=a.minWidth,A=void 0===N?0:N,z=a.minHeight,D=void 0===z?0:z,R=document.createElement("canvas"),E=R.getContext("2d"),T=St({aspectRatio:l,width:O,height:x}),X=St({aspectRatio:l,width:A,height:D},"cover"),S=Math.min(T.width,Math.max(X.width,d)),Y=Math.min(T.height,Math.max(X.height,m)),B=St({aspectRatio:e,width:O,height:x}),W=St({aspectRatio:e,width:A,height:D},"cover"),P=Math.min(B.width,Math.max(W.width,h)),H=Math.min(B.height,Math.max(W.height,r)),$=[-P/2,-H/2,P,H];return R.width=pt(S),R.height=pt(Y),E.fillStyle=w,E.fillRect(0,0,S,Y),E.save(),E.translate(S/2,Y/2),E.rotate(c*Math.PI/180),E.scale(f,p),E.imageSmoothingEnabled=g,E.imageSmoothingQuality=k,E.drawImage.apply(E,[t].concat(s($.map((function(t){return Math.floor(pt(t))}))))),E.restore(),R}(this.image,this.imageData,i,t);if(!this.cropped)return n;var a=this.getData(t.rounded),e=a.x,h=a.y,r=a.width,o=a.height,c=n.width/Math.floor(i.naturalWidth);1!==c&&(e*=c,h*=c,r*=c,o*=c);var u=r/o,f=St({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),v=St({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=St({aspectRatio:u,width:t.width||(1!==c?n.width:r),height:t.height||(1!==c?n.height:o)}),l=p.width,d=p.height;l=Math.min(f.width,Math.max(v.width,l)),d=Math.min(f.height,Math.max(v.height,d));var m=document.createElement("canvas"),b=m.getContext("2d");m.width=pt(l),m.height=pt(d),b.fillStyle=t.fillColor||"transparent",b.fillRect(0,0,l,d);var w=t.imageSmoothingEnabled,M=t.imageSmoothingQuality;b.imageSmoothingEnabled=void 0===w||w,M&&(b.imageSmoothingQuality=M);var g,y,k,C,O,j,x=n.width,N=n.height,A=e,z=h;A<=-r||A>x?(A=0,g=0,k=0,O=0):A<=0?(k=-A,A=0,O=g=Math.min(x,r+A)):A<=x&&(k=0,O=g=Math.min(r,x-A)),g<=0||z<=-o||z>N?(z=0,y=0,C=0,j=0):z<=0?(C=-z,z=0,j=y=Math.min(N,o+z)):z<=N&&(C=0,j=y=Math.min(o,N-z));var D=[A,z,g,y];if(O>0&&j>0){var R=l/r;D.push(k*R,C*R,O*R,j*R)}return b.drawImage.apply(b,[n].concat(s(D.map((function(t){return Math.floor(pt(t))}))))),m},setAspectRatio:function(t){var i=this.options;return this.disabled||at(t)||(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,n=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var e=t===T,s=i.movable&&t===X;i.dragMode=t=e||s?t:S,kt(n,R,t),wt(n,O,e),wt(n,D,s),i.cropBoxMovable||(kt(a,R,t),wt(a,O,e),wt(a,D,s))}return this}},Lt=o.Cropper,Zt=function(){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),!i||!Q.test(i.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=i,this.options=ft({},_,ht(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return i=t,a=[{key:"noConflict",value:function(){return window.Cropper=Lt,t}},{key:"setDefaults",value:function(t){ft(_,ht(t)&&t)}}],(n=[{key:"init",value:function(){var t,i=this.element,n=i.tagName.toLowerCase();if(!i[f]){if(i[f]=this,"img"===n){if(this.isImg=!0,t=i.getAttribute("src")||"",this.originalUrl=t,!t)return;t=i.src}else"canvas"===n&&window.HTMLCanvasElement&&(t=i.toDataURL());this.load(t)}}},{key:"load",value:function(t){var i,n,a,e,s=this;if(t){this.url=t,this.imageData={};var h=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(V.test(t))J.test(t)?this.read((i=t.replace(Bt,""),n=atob(i),a=new ArrayBuffer(n.length),ut(e=new Uint8Array(a),(function(t,i){e[i]=n.charCodeAt(i)})),a)):this.clone();else{var o=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=c,o.onerror=c,o.ontimeout=c,o.onprogress=function(){o.getResponseHeader("content-type")!==G&&o.abort()},o.onload=function(){s.read(o.response)},o.onloadend=function(){s.reloading=!1,s.xhr=null},r.checkCrossOrigin&&Rt(t)&&h.crossOrigin&&(t=Et(t)),o.open("GET",t,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===h.crossOrigin,o.send()}else this.clone()}}},{key:"read",value:function(t){var i=this.options,n=this.imageData,a=Wt(t),e=0,s=1,h=1;if(a>1){this.url=function(t,i){for(var n=[],a=new Uint8Array(t);a.length>0;)n.push(Yt.apply(null,ct(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(i,";base64,").concat(btoa(n.join("")))}(t,G);var r=function(t){var i=0,n=1,a=1;switch(t){case 2:n=-1;break;case 3:i=-180;break;case 4:a=-1;break;case 5:i=90,a=-1;break;case 6:i=90;break;case 7:i=90,n=-1;break;case 8:i=-90}return{rotate:i,scaleX:n,scaleY:a}}(a);e=r.rotate,s=r.scaleX,h=r.scaleY}i.rotatable&&(n.rotate=e),i.scalable&&(n.scaleX=s,n.scaleY=h),this.clone()}},{key:"clone",value:function(){var t=this.element,i=this.url,n=t.crossOrigin,a=i;this.options.checkCrossOrigin&&Rt(i)&&(n||(n="anonymous"),a=Et(i)),this.crossOrigin=n,this.crossOriginUrl=a;var e=document.createElement("img");n&&(e.crossOrigin=n),e.src=a||i,e.alt=t.alt||"The image to crop",this.image=e,e.onload=this.start.bind(this),e.onerror=this.stop.bind(this),mt(e,N),t.parentNode.insertBefore(e,t.nextSibling)}},{key:"start",value:function(){var t=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=o.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(o.navigator.userAgent),a=function(i,n){ft(t.imageData,{naturalWidth:i,naturalHeight:n,aspectRatio:i/n}),t.initialImageData=ft({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!i.naturalWidth||n){var e=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=e,e.onload=function(){a(e.width,e.height),n||s.removeChild(e)},e.src=i.src,n||(e.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(e))}else a(i.naturalWidth,i.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,i=this.options,n=this.image,a=t.parentNode,e=document.createElement("div");e.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var s=e.querySelector(".".concat(f,"-container")),h=s.querySelector(".".concat(f,"-canvas")),r=s.querySelector(".".concat(f,"-drag-box")),o=s.querySelector(".".concat(f,"-crop-box")),c=o.querySelector(".".concat(f,"-face"));this.container=a,this.cropper=s,this.canvas=h,this.dragBox=r,this.cropBox=o,this.viewBox=s.querySelector(".".concat(f,"-view-box")),this.face=c,h.appendChild(n),mt(t,x),a.insertBefore(s,t.nextSibling),bt(n,N),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,mt(o,x),i.guides||mt(o.getElementsByClassName("".concat(f,"-dashed")),x),i.center||mt(o.getElementsByClassName("".concat(f,"-center")),x),i.background&&mt(s,"".concat(f,"-bg")),i.highlight||mt(c,A),i.cropBoxMovable&&(mt(c,D),kt(c,R,v)),i.cropBoxResizable||(mt(o.getElementsByClassName("".concat(f,"-line")),x),mt(o.getElementsByClassName("".concat(f,"-point")),x)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),rt(i.ready)&&xt(t,q,i.ready,{once:!0}),Nt(t,q)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),bt(this.element,x)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&e(i.prototype,n),a&&e(i,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n,a}();return ft(Zt.prototype,Pt,Ht,$t,It,Ut,qt),Zt}()),n.exports),e=t(a);
|
|
8
|
+
import{g as t}from"./p-Dw7Hd5-K.js";var i,n={exports:{}},a=(i||(i=1,n.exports=function(){function t(t,i){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);i&&(a=a.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),n.push.apply(n,a)}return n}function i(i){for(var a=1;a<arguments.length;a++){var e=null!=arguments[a]?arguments[a]:{};a%2?t(Object(e),!0).forEach((function(t){var a,s,h;a=i,h=e[t],(s=n(s=t))in a?Object.defineProperty(a,s,{value:h,enumerable:!0,configurable:!0,writable:!0}):a[s]=h})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):t(Object(e)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}))}return i}function n(t){var i=function(t,i){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,i);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===i?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function e(t,i){for(var a=0;a<i.length;a++){var e=i[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,n(e.key),e)}}function s(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,i){if(t){if("string"==typeof t)return h(t,i);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,i):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,i){(null==i||i>t.length)&&(i=t.length);for(var n=0,a=new Array(i);n<i;n++)a[n]=t[n];return a}var r="undefined"!=typeof window&&void 0!==window.document,o=r?window:{},c=!(!r||!o.document.documentElement)&&"ontouchstart"in o.document.documentElement,u=!!r&&"PointerEvent"in o,f="cropper",v="all",p="crop",l="move",d="zoom",m="e",b="w",w="s",M="n",g="ne",y="nw",k="se",O="sw",C="".concat(f,"-crop"),j="".concat(f,"-disabled"),x="".concat(f,"-hidden"),N="".concat(f,"-hide"),A="".concat(f,"-invisible"),D="".concat(f,"-modal"),z="".concat(f,"-move"),R="".concat(f,"Action"),E="".concat(f,"Preview"),T="crop",S="move",X="none",Y="crop",B="cropend",W="cropmove",H="cropstart",P="dblclick",$=u?"pointerdown":c?"touchstart":"mousedown",I=u?"pointermove":c?"touchmove":"mousemove",U=u?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",q="ready",K="resize",L="wheel",Z="zoom",G="image/jpeg",V=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,F=/^data:/,J=/^data:image\/jpeg;base64,/,Q=/^img|canvas$/i,_={viewMode:0,dragMode:T,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},tt=Number.isNaN||o.isNaN;function it(t){return"number"==typeof t&&!tt(t)}var nt=function(t){return t>0&&t<1/0};function at(t){return void 0===t}function et(t){return"object"===a(t)&&null!==t}var st=Object.prototype.hasOwnProperty;function ht(t){if(!et(t))return!1;try{var i=t.constructor,n=i.prototype;return i&&n&&st.call(n,"isPrototypeOf")}catch(t){return!1}}function rt(t){return"function"==typeof t}var ot=Array.prototype.slice;function ct(t){return Array.from?Array.from(t):ot.call(t)}function ut(t,i){return t&&rt(i)&&(Array.isArray(t)||it(t.length)?ct(t).forEach((function(n,a){i.call(t,n,a,t)})):et(t)&&Object.keys(t).forEach((function(n){i.call(t,t[n],n,t)}))),t}var ft=Object.assign||function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return et(t)&&n.length>0&&n.forEach((function(i){et(i)&&Object.keys(i).forEach((function(n){t[n]=i[n]}))})),t},vt=/\.\d*(?:0|9){12}\d*$/;function pt(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return vt.test(t)?Math.round(t*i)/i:t}var lt=/^width|height|left|top|marginLeft|marginTop$/;function dt(t,i){var n=t.style;ut(i,(function(t,i){lt.test(i)&&it(t)&&(t="".concat(t,"px")),n[i]=t}))}function mt(t,i){if(i)if(it(t.length))ut(t,(function(t){mt(t,i)}));else if(t.classList)t.classList.add(i);else{var n=t.className.trim();n?n.indexOf(i)<0&&(t.className="".concat(n," ").concat(i)):t.className=i}}function bt(t,i){i&&(it(t.length)?ut(t,(function(t){bt(t,i)})):t.classList?t.classList.remove(i):t.className.indexOf(i)>=0&&(t.className=t.className.replace(i,"")))}function wt(t,i,n){i&&(it(t.length)?ut(t,(function(t){wt(t,i,n)})):n?mt(t,i):bt(t,i))}var Mt=/([a-z\d])([A-Z])/g;function gt(t){return t.replace(Mt,"$1-$2").toLowerCase()}function yt(t,i){return et(t[i])?t[i]:t.dataset?t.dataset[i]:t.getAttribute("data-".concat(gt(i)))}function kt(t,i,n){et(n)?t[i]=n:t.dataset?t.dataset[i]=n:t.setAttribute("data-".concat(gt(i)),n)}var Ot=/\s\s*/,Ct=function(){var t=!1;if(r){var i=!1,n=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,i},set:function(t){i=t}});o.addEventListener("test",n,a),o.removeEventListener("test",n,a)}return t}();function jt(t,i,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},e=n;i.trim().split(Ot).forEach((function(i){if(!Ct){var s=t.listeners;s&&s[i]&&s[i][n]&&(e=s[i][n],delete s[i][n],0===Object.keys(s[i]).length&&delete s[i],0===Object.keys(s).length&&delete t.listeners)}t.removeEventListener(i,e,a)}))}function xt(t,i,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},e=n;i.trim().split(Ot).forEach((function(i){if(a.once&&!Ct){var s=t.listeners,h=void 0===s?{}:s;e=function(){delete h[i][n],t.removeEventListener(i,e,a);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];n.apply(t,r)},h[i]||(h[i]={}),h[i][n]&&t.removeEventListener(i,h[i][n],a),h[i][n]=e,t.listeners=h}t.addEventListener(i,e,a)}))}function Nt(t,i,n){var a;return rt(Event)&&rt(CustomEvent)?a=new CustomEvent(i,{detail:n,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(i,!0,!0,n),t.dispatchEvent(a)}function At(t){var i=t.getBoundingClientRect();return{left:i.left+(window.pageXOffset-document.documentElement.clientLeft),top:i.top+(window.pageYOffset-document.documentElement.clientTop)}}var Dt=o.location,zt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Rt(t){var i=t.match(zt);return null!==i&&(i[1]!==Dt.protocol||i[2]!==Dt.hostname||i[3]!==Dt.port)}function Et(t){var i="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+i}function Tt(t){var i=t.rotate,n=t.scaleX,a=t.scaleY,e=t.translateX,s=t.translateY,h=[];it(e)&&0!==e&&h.push("translateX(".concat(e,"px)")),it(s)&&0!==s&&h.push("translateY(".concat(s,"px)")),it(i)&&0!==i&&h.push("rotate(".concat(i,"deg)")),it(n)&&1!==n&&h.push("scaleX(".concat(n,")")),it(a)&&1!==a&&h.push("scaleY(".concat(a,")"));var r=h.length?h.join(" "):"none";return{WebkitTransform:r,msTransform:r,transform:r}}function St(t,n){var a=t.pageX,e=t.pageY,s={endX:a,endY:e};return n?s:i({startX:a,startY:e},s)}function Xt(t){var i=t.aspectRatio,n=t.height,a=t.width,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",s=nt(a),h=nt(n);if(s&&h){var r=n*i;"contain"===e&&r>a||"cover"===e&&r<a?n=a/i:a=n*i}else s?n=a/i:h&&(a=n*i);return{width:a,height:n}}var Yt=String.fromCharCode;var Bt=/^data:.*,/;function Wt(t){var i,n=new DataView(t);try{var a,e,s;if(255===n.getUint8(0)&&216===n.getUint8(1))for(var h=n.byteLength,r=2;r+1<h;){if(255===n.getUint8(r)&&225===n.getUint8(r+1)){e=r;break}r+=1}if(e){var o=e+10;if("Exif"===function(t,i,n){var a="";n+=i;for(var e=i;e<n;e+=1)a+=Yt(t.getUint8(e));return a}(n,e+4,4)){var c=n.getUint16(o);if(((a=18761===c)||19789===c)&&42===n.getUint16(o+2,a)){var u=n.getUint32(o+4,a);u>=8&&(s=o+u)}}}if(s){var f,v,p=n.getUint16(s,a);for(v=0;v<p;v+=1)if(274===n.getUint16(f=s+12*v+2,a)){i=n.getUint16(f+=8,a),n.setUint16(f,1,a);break}}}catch(t){i=1}return i}var Ht={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,i=this.options,n=this.container,a=this.cropper,e=Number(i.minContainerWidth),s=Number(i.minContainerHeight);mt(a,x),bt(t,x);var h={width:Math.max(n.offsetWidth,e>=0?e:200),height:Math.max(n.offsetHeight,s>=0?s:100)};this.containerData=h,dt(a,{width:h.width,height:h.height}),mt(t,x),bt(a,x)},initCanvas:function(){var t=this.containerData,i=this.imageData,n=this.options.viewMode,a=Math.abs(i.rotate)%180==90,e=a?i.naturalHeight:i.naturalWidth,s=a?i.naturalWidth:i.naturalHeight,h=e/s,r=t.width,o=t.height;t.height*h>t.width?3===n?r=t.height*h:o=t.width/h:3===n?o=t.width/h:r=t.height*h;var c={aspectRatio:h,naturalWidth:e,naturalHeight:s,width:r,height:o};this.canvasData=c,this.limited=1===n||2===n,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=ft({},c)},limitCanvas:function(t,i){var n=this.options,a=this.containerData,e=this.canvasData,s=this.cropBoxData,h=n.viewMode,r=e.aspectRatio,o=this.cropped&&s;if(t){var c=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;h>1?(c=Math.max(c,a.width),u=Math.max(u,a.height),3===h&&(u*r>c?c=u*r:u=c/r)):h>0&&(c?c=Math.max(c,o?s.width:0):u?u=Math.max(u,o?s.height:0):o&&((u=s.height)*r>(c=s.width)?c=u*r:u=c/r));var f=Xt({aspectRatio:r,width:c,height:u});u=f.height,e.minWidth=c=f.width,e.minHeight=u,e.maxWidth=1/0,e.maxHeight=1/0}if(i)if(h>(o?0:1)){var v=a.width-e.width,p=a.height-e.height;e.minLeft=Math.min(0,v),e.minTop=Math.min(0,p),e.maxLeft=Math.max(0,v),e.maxTop=Math.max(0,p),o&&this.limited&&(e.minLeft=Math.min(s.left,s.left+(s.width-e.width)),e.minTop=Math.min(s.top,s.top+(s.height-e.height)),e.maxLeft=s.left,e.maxTop=s.top,2===h&&(e.width>=a.width&&(e.minLeft=Math.min(0,v),e.maxLeft=Math.max(0,v)),e.height>=a.height&&(e.minTop=Math.min(0,p),e.maxTop=Math.max(0,p))))}else e.minLeft=-e.width,e.minTop=-e.height,e.maxLeft=a.width,e.maxTop=a.height},renderCanvas:function(t,i){var n=this.canvasData,a=this.imageData;if(i){var e=function(t){var i=t.width,n=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:n,height:i};var e=a%90*Math.PI/180,s=Math.sin(e),h=Math.cos(e),r=i*h+n*s,o=i*s+n*h;return a>90?{width:o,height:r}:{width:r,height:o}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),s=e.width,h=e.height,r=n.width*(s/n.naturalWidth),o=n.height*(h/n.naturalHeight);n.left-=(r-n.width)/2,n.top-=(o-n.height)/2,n.width=r,n.height=o,n.aspectRatio=s/h,n.naturalWidth=s,n.naturalHeight=h,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCanvas(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,dt(this.canvas,ft({width:n.width,height:n.height},Tt({translateX:n.left,translateY:n.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var i=this.canvasData,n=this.imageData,a=n.naturalWidth*(i.width/i.naturalWidth),e=n.naturalHeight*(i.height/i.naturalHeight);ft(n,{width:a,height:e,left:(i.width-a)/2,top:(i.height-e)/2}),dt(this.image,ft({width:n.width,height:n.height},Tt(ft({translateX:n.left,translateY:n.top},n)))),t&&this.output()},initCropBox:function(){var t=this.options,i=this.canvasData,n=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,e={width:i.width,height:i.height};n&&(i.height*n>i.width?e.height=e.width/n:e.width=e.height*n),this.cropBoxData=e,this.limitCropBox(!0,!0),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),e.width=Math.max(e.minWidth,e.width*a),e.height=Math.max(e.minHeight,e.height*a),e.left=i.left+(i.width-e.width)/2,e.top=i.top+(i.height-e.height)/2,e.oldLeft=e.left,e.oldTop=e.top,this.initialCropBoxData=ft({},e)},limitCropBox:function(t,i){var n=this.options,a=this.containerData,e=this.canvasData,s=this.cropBoxData,h=this.limited,r=n.aspectRatio;if(t){var o=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,u=h?Math.min(a.width,e.width,e.width+e.left,a.width-e.left):a.width,f=h?Math.min(a.height,e.height,e.height+e.top,a.height-e.top):a.height;o=Math.min(o,a.width),c=Math.min(c,a.height),r&&(o&&c?c*r>o?c=o/r:o=c*r:o?c=o/r:c&&(o=c*r),f*r>u?f=u/r:u=f*r),s.minWidth=Math.min(o,u),s.minHeight=Math.min(c,f),s.maxWidth=u,s.maxHeight=f}i&&(h?(s.minLeft=Math.max(0,e.left),s.minTop=Math.max(0,e.top),s.maxLeft=Math.min(a.width,e.left+e.width)-s.width,s.maxTop=Math.min(a.height,e.top+e.height)-s.height):(s.minLeft=0,s.minTop=0,s.maxLeft=a.width-s.width,s.maxTop=a.height-s.height))},renderCropBox:function(){var t=this.options,i=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.width<n.minWidth)&&(n.left=n.oldLeft),(n.height>n.maxHeight||n.height<n.minHeight)&&(n.top=n.oldTop),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),this.limitCropBox(!1,!0),n.left=Math.min(Math.max(n.left,n.minLeft),n.maxLeft),n.top=Math.min(Math.max(n.top,n.minTop),n.maxTop),n.oldLeft=n.left,n.oldTop=n.top,t.movable&&t.cropBoxMovable&&kt(this.face,R,n.width>=i.width&&n.height>=i.height?l:v),dt(this.cropBox,ft({width:n.width,height:n.height},Tt({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Nt(this.element,Y,this.getData())}},Pt={initPreview:function(){var t=this.element,i=this.crossOrigin,n=this.options.preview,a=i?this.crossOriginUrl:this.url,e=t.alt||"The image to preview",s=document.createElement("img");if(i&&(s.crossOrigin=i),s.src=a,s.alt=e,this.viewBox.appendChild(s),this.viewBoxImage=s,n){var h=n;"string"==typeof n?h=t.ownerDocument.querySelectorAll(n):n.querySelector&&(h=[n]),this.previews=h,ut(h,(function(t){var n=document.createElement("img");kt(t,E,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),i&&(n.crossOrigin=i),n.src=a,n.alt=e,n.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(n)}))}},resetPreview:function(){ut(this.previews,(function(t){var i=yt(t,E);dt(t,{width:i.width,height:i.height}),t.innerHTML=i.html,function(t,i){if(et(t[i]))try{delete t[i]}catch(n){t[i]=void 0}else if(t.dataset)try{delete t.dataset[i]}catch(n){t.dataset[i]=void 0}else t.removeAttribute("data-".concat(gt(i)))}(t,E)}))},preview:function(){var t=this.imageData,i=this.canvasData,n=this.cropBoxData,a=n.width,e=n.height,s=t.width,h=t.height,r=n.left-i.left-t.left,o=n.top-i.top-t.top;this.cropped&&!this.disabled&&(dt(this.viewBoxImage,ft({width:s,height:h},Tt(ft({translateX:-r,translateY:-o},t)))),ut(this.previews,(function(i){var n=yt(i,E),c=n.width,u=n.height,f=c,v=u,p=1;a&&(v=e*(p=c/a)),e&&v>u&&(f=a*(p=u/e),v=u),dt(i,{width:f,height:v}),dt(i.getElementsByTagName("img")[0],ft({width:s*p,height:h*p},Tt(ft({translateX:-r*p,translateY:-o*p},t))))})))}},$t={bind:function(){var t=this.element,i=this.options,n=this.cropper;rt(i.cropstart)&&xt(t,H,i.cropstart),rt(i.cropmove)&&xt(t,W,i.cropmove),rt(i.cropend)&&xt(t,B,i.cropend),rt(i.crop)&&xt(t,Y,i.crop),rt(i.zoom)&&xt(t,Z,i.zoom),xt(n,$,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&xt(n,L,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&xt(n,P,this.onDblclick=this.dblclick.bind(this)),xt(t.ownerDocument,I,this.onCropMove=this.cropMove.bind(this)),xt(t.ownerDocument,U,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&xt(window,K,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,n=this.cropper;rt(i.cropstart)&&jt(t,H,i.cropstart),rt(i.cropmove)&&jt(t,W,i.cropmove),rt(i.cropend)&&jt(t,B,i.cropend),rt(i.crop)&&jt(t,Y,i.crop),rt(i.zoom)&&jt(t,Z,i.zoom),jt(n,$,this.onCropStart),i.zoomable&&i.zoomOnWheel&&jt(n,L,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&jt(n,P,this.onDblclick),jt(t.ownerDocument,I,this.onCropMove),jt(t.ownerDocument,U,this.onCropEnd),i.responsive&&jt(window,K,this.onResize)}},It={resize:function(){if(!this.disabled){var t,i,n=this.options,a=this.container,e=this.containerData,s=a.offsetWidth/e.width,h=a.offsetHeight/e.height,r=Math.abs(s-1)>Math.abs(h-1)?s:h;1!==r&&(n.restore&&(t=this.getCanvasData(),i=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(ut(t,(function(i,n){t[n]=i*r}))),this.setCropBoxData(ut(i,(function(t,n){i[n]=t*r})))))}},dblclick:function(){var t,i;this.disabled||this.options.dragMode===X||this.setDragMode((i=C,((t=this.dragBox).classList?t.classList.contains(i):t.className.indexOf(i)>-1)?S:T))},wheel:function(t){var i=this,n=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){i.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*n,t)))},cropStart:function(t){var i=t.buttons,n=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(it(i)&&1!==i||it(n)&&0!==n||t.ctrlKey))){var a,e=this.options,s=this.pointers;t.changedTouches?ut(t.changedTouches,(function(t){s[t.identifier]=St(t)})):s[t.pointerId||0]=St(t),a=Object.keys(s).length>1&&e.zoomable&&e.zoomOnTouch?d:yt(t.target,R),V.test(a)&&!1!==Nt(this.element,H,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===p&&(this.cropping=!0,mt(this.dragBox,D)))}},cropMove:function(t){var i=this.action;if(!this.disabled&&i){var n=this.pointers;t.preventDefault(),!1!==Nt(this.element,W,{originalEvent:t,action:i})&&(t.changedTouches?ut(t.changedTouches,(function(t){ft(n[t.identifier]||{},St(t,!0))})):ft(n[t.pointerId||0]||{},St(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,n=this.pointers;t.changedTouches?ut(t.changedTouches,(function(t){delete n[t.identifier]})):delete n[t.pointerId||0],i&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,wt(this.dragBox,D,this.cropped&&this.options.modal)),Nt(this.element,B,{originalEvent:t,action:i}))}}},Ut={change:function(t){var n,a=this.canvasData,e=this.containerData,s=this.cropBoxData,h=this.pointers,r=this.action,o=this.options.aspectRatio,c=s.left,u=s.top,f=s.width,C=s.height,j=c+f,N=u+C,A=0,D=0,z=e.width,R=e.height,E=!0;!o&&t.shiftKey&&(o=f&&C?f/C:1),this.limited&&(D=s.minTop,z=(A=s.minLeft)+Math.min(e.width,a.width,a.left+a.width),R=D+Math.min(e.height,a.height,a.top+a.height));var T=h[Object.keys(h)[0]],S={x:T.endX-T.startX,y:T.endY-T.startY},X=function(t){switch(t){case m:j+S.x>z&&(S.x=z-j);break;case b:c+S.x<A&&(S.x=A-c);break;case M:u+S.y<D&&(S.y=D-u);break;case w:N+S.y>R&&(S.y=R-N)}};switch(r){case v:c+=S.x,u+=S.y;break;case m:if(S.x>=0&&(j>=z||o&&(u<=D||N>=R))){E=!1;break}X(m),(f+=S.x)<0&&(r=b,c-=f=-f),o&&(u+=(s.height-(C=f/o))/2);break;case M:if(S.y<=0&&(u<=D||o&&(c<=A||j>=z))){E=!1;break}X(M),u+=S.y,(C-=S.y)<0&&(r=w,u-=C=-C),o&&(c+=(s.width-(f=C*o))/2);break;case b:if(S.x<=0&&(c<=A||o&&(u<=D||N>=R))){E=!1;break}X(b),c+=S.x,(f-=S.x)<0&&(r=m,c-=f=-f),o&&(u+=(s.height-(C=f/o))/2);break;case w:if(S.y>=0&&(N>=R||o&&(c<=A||j>=z))){E=!1;break}X(w),(C+=S.y)<0&&(r=M,u-=C=-C),o&&(c+=(s.width-(f=C*o))/2);break;case g:if(o){if(S.y<=0&&(u<=D||j>=z)){E=!1;break}X(M),u+=S.y,f=(C-=S.y)*o}else X(M),X(m),S.x>=0?j<z?f+=S.x:S.y<=0&&u<=D&&(E=!1):f+=S.x,S.y<=0?u>D&&(C-=S.y,u+=S.y):(C-=S.y,u+=S.y);f<0&&C<0?(r=O,u-=C=-C,c-=f=-f):f<0?(r=y,c-=f=-f):C<0&&(r=k,u-=C=-C);break;case y:if(o){if(S.y<=0&&(u<=D||c<=A)){E=!1;break}X(M),u+=S.y,c+=s.width-(f=(C-=S.y)*o)}else X(M),X(b),S.x<=0?c>A?(f-=S.x,c+=S.x):S.y<=0&&u<=D&&(E=!1):(f-=S.x,c+=S.x),S.y<=0?u>D&&(C-=S.y,u+=S.y):(C-=S.y,u+=S.y);f<0&&C<0?(r=k,u-=C=-C,c-=f=-f):f<0?(r=g,c-=f=-f):C<0&&(r=O,u-=C=-C);break;case O:if(o){if(S.x<=0&&(c<=A||N>=R)){E=!1;break}X(b),c+=S.x,C=(f-=S.x)/o}else X(w),X(b),S.x<=0?c>A?(f-=S.x,c+=S.x):S.y>=0&&N>=R&&(E=!1):(f-=S.x,c+=S.x),S.y>=0?N<R&&(C+=S.y):C+=S.y;f<0&&C<0?(r=g,u-=C=-C,c-=f=-f):f<0?(r=k,c-=f=-f):C<0&&(r=y,u-=C=-C);break;case k:if(o){if(S.x>=0&&(j>=z||N>=R)){E=!1;break}X(m),C=(f+=S.x)/o}else X(w),X(m),S.x>=0?j<z?f+=S.x:S.y>=0&&N>=R&&(E=!1):f+=S.x,S.y>=0?N<R&&(C+=S.y):C+=S.y;f<0&&C<0?(r=y,u-=C=-C,c-=f=-f):f<0?(r=O,c-=f=-f):C<0&&(r=g,u-=C=-C);break;case l:this.move(S.x,S.y),E=!1;break;case d:this.zoom(function(t){var n=i({},t),a=0;return ut(t,(function(t,i){delete n[i],ut(n,(function(i){var n=Math.abs(t.startX-i.startX),e=Math.abs(t.startY-i.startY),s=Math.abs(t.endX-i.endX),h=Math.abs(t.endY-i.endY),r=Math.sqrt(n*n+e*e),o=(Math.sqrt(s*s+h*h)-r)/r;Math.abs(o)>Math.abs(a)&&(a=o)}))})),a}(h),t),E=!1;break;case p:if(!S.x||!S.y){E=!1;break}n=At(this.cropper),c=T.startX-n.left,u=T.startY-n.top,f=s.minWidth,C=s.minHeight,S.x>0?r=S.y>0?k:g:S.x<0&&(c-=f,r=S.y>0?O:y),S.y<0&&(u-=C),this.cropped||(bt(this.cropBox,x),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}E&&(s.width=f,s.height=C,s.left=c,s.top=u,this.action=r,this.renderCropBox()),ut(h,(function(t){t.startX=t.endX,t.startY=t.endY}))}},qt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&mt(this.dragBox,D),bt(this.cropBox,x),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=ft({},this.initialImageData),this.canvasData=ft({},this.initialCanvasData),this.cropBoxData=ft({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(ft(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),bt(this.dragBox,D),mt(this.cropBox,x)),this},replace:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ut(this.previews,(function(i){i.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,bt(this.cropper,j)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,mt(this.cropper,j)),this},destroy:function(){var t=this.element;return t[f]?(t[f]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,a=n.left,e=n.top;return this.moveTo(at(t)?t:a+Number(t),at(i)?i:e+Number(i))},moveTo:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.canvasData,a=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(it(t)&&(n.left=t,a=!0),it(i)&&(n.top=i,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,i){var n=this.canvasData;return t=Number(t),this.zoomTo(n.width*(t=t<0?1/(1-t):1+t)/n.naturalWidth,null,i)},zoomTo:function(t,i,n){var a=this.options,e=this.canvasData,s=e.width,h=e.height,r=e.naturalWidth,o=e.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=r*t,u=o*t;if(!1===Nt(this.element,Z,{ratio:t,oldRatio:s/r,originalEvent:n}))return this;if(n){var f=this.pointers,v=At(this.cropper),p=f&&Object.keys(f).length?function(t){var i=0,n=0,a=0;return ut(t,(function(t){i+=t.startX,n+=t.startY,a+=1})),{pageX:i/=a,pageY:n/=a}}(f):{pageX:n.pageX,pageY:n.pageY};e.left-=(p.pageX-v.left-e.left)/s*(c-s),e.top-=(p.pageY-v.top-e.top)/h*(u-h)}else ht(i)&&it(i.x)&&it(i.y)?(e.left-=(i.x-e.left)/s*(c-s),e.top-=(i.y-e.top)/h*(u-h)):(e.left-=(c-s)/2,e.top-=(u-h)/2);e.width=c,e.height=u,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return it(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,it(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(it(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=this.imageData,a=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(it(t)&&(n.scaleX=t,a=!0),it(i)&&(n.scaleY=i,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,a=this.imageData,e=this.canvasData,s=this.cropBoxData;if(this.ready&&this.cropped){var h=a.width/a.naturalWidth;if(ut(t={x:s.left-e.left,y:s.top-e.top,width:s.width,height:s.height},(function(i,n){t[n]=i/h})),i){var r=Math.round(t.y+t.height),o=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=o-t.x,t.height=r-t.y}}else t={x:0,y:0,width:0,height:0};return n.rotatable&&(t.rotate=a.rotate||0),n.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var i=this.options,n=this.imageData,a=this.canvasData,e={};if(this.ready&&!this.disabled&&ht(t)){var s=!1;i.rotatable&&it(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,s=!0),i.scalable&&(it(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,s=!0),it(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,s=!0)),s&&this.renderCanvas(!0,!0);var h=n.width/n.naturalWidth;it(t.x)&&(e.left=t.x*h+a.left),it(t.y)&&(e.top=t.y*h+a.top),it(t.width)&&(e.width=t.width*h),it(t.height)&&(e.height=t.height*h),this.setCropBoxData(e)}return this},getContainerData:function(){return this.ready?ft({},this.containerData):{}},getImageData:function(){return this.sized?ft({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&ut(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){i[n]=t[n]})),i},setCanvasData:function(t){var i=this.canvasData,n=i.aspectRatio;return this.ready&&!this.disabled&&ht(t)&&(it(t.left)&&(i.left=t.left),it(t.top)&&(i.top=t.top),it(t.width)?(i.width=t.width,i.height=t.width/n):it(t.height)&&(i.height=t.height,i.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,i=this.cropBoxData;return this.ready&&this.cropped&&(t={left:i.left,top:i.top,width:i.width,height:i.height}),t||{}},setCropBoxData:function(t){var i,n,a=this.cropBoxData,e=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&ht(t)&&(it(t.left)&&(a.left=t.left),it(t.top)&&(a.top=t.top),it(t.width)&&t.width!==a.width&&(i=!0,a.width=t.width),it(t.height)&&t.height!==a.height&&(n=!0,a.height=t.height),e&&(i?a.height=a.width/e:n&&(a.width=a.height*e)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,n=function(t,i,n,a){var e=i.aspectRatio,h=i.naturalWidth,r=i.naturalHeight,o=i.rotate,c=void 0===o?0:o,u=i.scaleX,f=void 0===u?1:u,v=i.scaleY,p=void 0===v?1:v,l=n.aspectRatio,d=n.naturalWidth,m=n.naturalHeight,b=a.fillColor,w=void 0===b?"transparent":b,M=a.imageSmoothingEnabled,g=void 0===M||M,y=a.imageSmoothingQuality,k=void 0===y?"low":y,O=a.maxWidth,C=void 0===O?1/0:O,j=a.maxHeight,x=void 0===j?1/0:j,N=a.minWidth,A=void 0===N?0:N,D=a.minHeight,z=void 0===D?0:D,R=document.createElement("canvas"),E=R.getContext("2d"),T=Xt({aspectRatio:l,width:C,height:x}),S=Xt({aspectRatio:l,width:A,height:z},"cover"),X=Math.min(T.width,Math.max(S.width,d)),Y=Math.min(T.height,Math.max(S.height,m)),B=Xt({aspectRatio:e,width:C,height:x}),W=Xt({aspectRatio:e,width:A,height:z},"cover"),H=Math.min(B.width,Math.max(W.width,h)),P=Math.min(B.height,Math.max(W.height,r)),$=[-H/2,-P/2,H,P];return R.width=pt(X),R.height=pt(Y),E.fillStyle=w,E.fillRect(0,0,X,Y),E.save(),E.translate(X/2,Y/2),E.rotate(c*Math.PI/180),E.scale(f,p),E.imageSmoothingEnabled=g,E.imageSmoothingQuality=k,E.drawImage.apply(E,[t].concat(s($.map((function(t){return Math.floor(pt(t))}))))),E.restore(),R}(this.image,this.imageData,i,t);if(!this.cropped)return n;var a=this.getData(t.rounded),e=a.x,h=a.y,r=a.width,o=a.height,c=n.width/Math.floor(i.naturalWidth);1!==c&&(e*=c,h*=c,r*=c,o*=c);var u=r/o,f=Xt({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),v=Xt({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=Xt({aspectRatio:u,width:t.width||(1!==c?n.width:r),height:t.height||(1!==c?n.height:o)}),l=p.width,d=p.height;l=Math.min(f.width,Math.max(v.width,l)),d=Math.min(f.height,Math.max(v.height,d));var m=document.createElement("canvas"),b=m.getContext("2d");m.width=pt(l),m.height=pt(d),b.fillStyle=t.fillColor||"transparent",b.fillRect(0,0,l,d);var w=t.imageSmoothingEnabled,M=t.imageSmoothingQuality;b.imageSmoothingEnabled=void 0===w||w,M&&(b.imageSmoothingQuality=M);var g,y,k,O,C,j,x=n.width,N=n.height,A=e,D=h;A<=-r||A>x?(A=0,g=0,k=0,C=0):A<=0?(k=-A,A=0,C=g=Math.min(x,r+A)):A<=x&&(k=0,C=g=Math.min(r,x-A)),g<=0||D<=-o||D>N?(D=0,y=0,O=0,j=0):D<=0?(O=-D,D=0,j=y=Math.min(N,o+D)):D<=N&&(O=0,j=y=Math.min(o,N-D));var z=[A,D,g,y];if(C>0&&j>0){var R=l/r;z.push(k*R,O*R,C*R,j*R)}return b.drawImage.apply(b,[n].concat(s(z.map((function(t){return Math.floor(pt(t))}))))),m},setAspectRatio:function(t){var i=this.options;return this.disabled||at(t)||(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,n=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var e=t===T,s=i.movable&&t===S;i.dragMode=t=e||s?t:X,kt(n,R,t),wt(n,C,e),wt(n,z,s),i.cropBoxMovable||(kt(a,R,t),wt(a,C,e),wt(a,z,s))}return this}},Kt=o.Cropper,Lt=function(){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,t),!i||!Q.test(i.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=i,this.options=ft({},_,ht(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return i=t,a=[{key:"noConflict",value:function(){return window.Cropper=Kt,t}},{key:"setDefaults",value:function(t){ft(_,ht(t)&&t)}}],(n=[{key:"init",value:function(){var t,i=this.element,n=i.tagName.toLowerCase();if(!i[f]){if(i[f]=this,"img"===n){if(this.isImg=!0,t=i.getAttribute("src")||"",this.originalUrl=t,!t)return;t=i.src}else"canvas"===n&&window.HTMLCanvasElement&&(t=i.toDataURL());this.load(t)}}},{key:"load",value:function(t){var i,n,a,e,s=this;if(t){this.url=t,this.imageData={};var h=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(F.test(t))J.test(t)?this.read((i=t.replace(Bt,""),n=atob(i),a=new ArrayBuffer(n.length),ut(e=new Uint8Array(a),(function(t,i){e[i]=n.charCodeAt(i)})),a)):this.clone();else{var o=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=c,o.onerror=c,o.ontimeout=c,o.onprogress=function(){o.getResponseHeader("content-type")!==G&&o.abort()},o.onload=function(){s.read(o.response)},o.onloadend=function(){s.reloading=!1,s.xhr=null},r.checkCrossOrigin&&Rt(t)&&h.crossOrigin&&(t=Et(t)),o.open("GET",t,!0),o.responseType="arraybuffer",o.withCredentials="use-credentials"===h.crossOrigin,o.send()}else this.clone()}}},{key:"read",value:function(t){var i=this.options,n=this.imageData,a=Wt(t),e=0,s=1,h=1;if(a>1){this.url=function(t,i){for(var n=[],a=new Uint8Array(t);a.length>0;)n.push(Yt.apply(null,ct(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(i,";base64,").concat(btoa(n.join("")))}(t,G);var r=function(t){var i=0,n=1,a=1;switch(t){case 2:n=-1;break;case 3:i=-180;break;case 4:a=-1;break;case 5:i=90,a=-1;break;case 6:i=90;break;case 7:i=90,n=-1;break;case 8:i=-90}return{rotate:i,scaleX:n,scaleY:a}}(a);e=r.rotate,s=r.scaleX,h=r.scaleY}i.rotatable&&(n.rotate=e),i.scalable&&(n.scaleX=s,n.scaleY=h),this.clone()}},{key:"clone",value:function(){var t=this.element,i=this.url,n=t.crossOrigin,a=i;this.options.checkCrossOrigin&&Rt(i)&&(n||(n="anonymous"),a=Et(i)),this.crossOrigin=n,this.crossOriginUrl=a;var e=document.createElement("img");n&&(e.crossOrigin=n),e.src=a||i,e.alt=t.alt||"The image to crop",this.image=e,e.onload=this.start.bind(this),e.onerror=this.stop.bind(this),mt(e,N),t.parentNode.insertBefore(e,t.nextSibling)}},{key:"start",value:function(){var t=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=o.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(o.navigator.userAgent),a=function(i,n){ft(t.imageData,{naturalWidth:i,naturalHeight:n,aspectRatio:i/n}),t.initialImageData=ft({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!i.naturalWidth||n){var e=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=e,e.onload=function(){a(e.width,e.height),n||s.removeChild(e)},e.src=i.src,n||(e.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(e))}else a(i.naturalWidth,i.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,i=this.options,n=this.image,a=t.parentNode,e=document.createElement("div");e.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var s=e.querySelector(".".concat(f,"-container")),h=s.querySelector(".".concat(f,"-canvas")),r=s.querySelector(".".concat(f,"-drag-box")),o=s.querySelector(".".concat(f,"-crop-box")),c=o.querySelector(".".concat(f,"-face"));this.container=a,this.cropper=s,this.canvas=h,this.dragBox=r,this.cropBox=o,this.viewBox=s.querySelector(".".concat(f,"-view-box")),this.face=c,h.appendChild(n),mt(t,x),a.insertBefore(s,t.nextSibling),bt(n,N),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,mt(o,x),i.guides||mt(o.getElementsByClassName("".concat(f,"-dashed")),x),i.center||mt(o.getElementsByClassName("".concat(f,"-center")),x),i.background&&mt(s,"".concat(f,"-bg")),i.highlight||mt(c,A),i.cropBoxMovable&&(mt(c,z),kt(c,R,v)),i.cropBoxResizable||(mt(o.getElementsByClassName("".concat(f,"-line")),x),mt(o.getElementsByClassName("".concat(f,"-point")),x)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),rt(i.ready)&&xt(t,q,i.ready,{once:!0}),Nt(t,q)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),bt(this.element,x)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&e(i.prototype,n),a&&e(i,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n,a}();return ft(Lt.prototype,Ht,Pt,$t,It,Ut,qt),Lt}()),n.exports),e=t(a);
|
|
9
9
|
/*!
|
|
10
10
|
* Cropper.js v1.6.2
|
|
11
11
|
* https://fengyuanchen.github.io/cropperjs
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* vviinn-widgets v2.227.
|
|
2
|
+
* vviinn-widgets v2.227.2
|
|
3
3
|
* Copyright 2020 Mediaopt
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
* License: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.
|
|
6
|
-
* Notice: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.
|
|
5
|
+
* License: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.2/LICENSE
|
|
6
|
+
* Notice: https://cdn.jsdelivr.net/npm/vviinn-widgets@2.227.2/NOTICE
|
|
7
7
|
*/
|
|
8
|
-
import{d as n}from"./p-CFvXi0uP.js";var r,t={},u={};function e(){return r||(r=1,function(n){var r=u&&u.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};function t(n){return n}function e(n){return function(){return n}}function o(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function i(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.dual=n.getEndomorphismMonoid=n.SK=n.hole=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.unsafeCoerce=n.apply=n.getRing=n.getSemiring=n.getMonoid=n.getSemigroup=n.getBooleanAlgebra=void 0,n.identity=t,n.constant=e,n.flip=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.length>1?n(r[1],r[0]):function(t){return n(t)(r[0])}}},n.flow=o,n.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},n.increment=function(n){return n+1},n.decrement=function(n){return n-1},n.absurd=i,n.tupled=function(n){return function(r){return n.apply(void 0,r)}},n.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},n.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},n.not=function(n){return function(r){return!n(r)}},n.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},n.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},n.getMonoid=function(r){var t=(0,n.getSemigroup)(r);return function(){return{concat:t().concat,empty:function(){return r.empty}}}},n.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},n.getRing=function(r){var t=(0,n.getSemiring)(r);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(n,t){return function(u){return r.sub(n(u),t(u))}}}},n.apply=function(n){return function(r){return r(n)}},n.unsafeCoerce=t,n.constTrue=e(!0),n.constFalse=e(!1),n.constNull=e(null),n.constUndefined=e(void 0),n.constVoid=n.constUndefined,n.hole=i,n.SK=function(n,r){return r},n.getEndomorphismMonoid=function(){return{concat:function(n,r){return o(n,r)},empty:t}},n.dual=function(n,t){var u="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return u(arguments)?t.apply(this,n):function(u){return t.apply(void 0,r([u],n,!1))}}}}(u)),u}var o,i,c={};function f(){return o||(o=1,function(n){var r=c&&c.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.flatMapReader=n.flatMapTask=n.flatMapIO=n.flatMapEither=n.flatMapOption=n.flatMapNullable=n.liftOption=n.liftNullable=n.fromReadonlyNonEmptyArray=n.has=n.emptyRecord=n.emptyReadonlyArray=n.tail=n.head=n.isNonEmpty=n.singleton=n.right=n.left=n.isRight=n.isLeft=n.some=n.none=n.isSome=n.isNone=void 0;var t=e();n.isNone=function(n){return"None"===n._tag},n.isSome=function(n){return"Some"===n._tag},n.none={_tag:"None"},n.some=function(n){return{_tag:"Some",value:n}},n.isLeft=function(n){return"Left"===n._tag},n.isRight=function(n){return"Right"===n._tag},n.left=function(n){return{_tag:"Left",left:n}},n.right=function(n){return{_tag:"Right",right:n}},n.singleton=function(n){return[n]},n.isNonEmpty=function(n){return n.length>0},n.head=function(n){return n[0]},n.tail=function(n){return n.slice(1)},n.emptyReadonlyArray=[],n.emptyRecord={},n.has=Object.prototype.hasOwnProperty,n.fromReadonlyNonEmptyArray=function(n){return r([n[0]],n.slice(1),!0)},n.liftNullable=function(r){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return r.fromEither(null==i?(0,n.left)(u.apply(void 0,e)):(0,n.right)(i))}}},n.liftOption=function(r){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return r.fromEither((0,n.isNone)(i)?(0,n.left)(u.apply(void 0,e)):(0,n.right)(i.value))}}},n.flatMapNullable=function(r,u){return(0,t.dual)(3,(function(t,e,o){return u.flatMap(t,(0,n.liftNullable)(r)(e,o))}))},n.flatMapOption=function(r,u){return(0,t.dual)(3,(function(t,e,o){return u.flatMap(t,(0,n.liftOption)(r)(e,o))}))},n.flatMapEither=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromEither(u(r))}))}))},n.flatMapIO=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromIO(u(r))}))}))},n.flatMapTask=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))},n.flatMapReader=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromReader(u(r))}))}))}}(c)),c}function a(){if(i)return t;i=1;var n=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=t&&t.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(t,"__esModule",{value:!0}),t.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},t.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},t.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},t.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},t.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}},t.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=function(n){return c.has.call(v,n)||(v[n]=a(o.tuple,n-1,[])),v[n]}(u),i=n.map(r[0],e),f=1;f<u;f++)i=n.ap(i,r[f]);return i}},t.sequenceS=function(n){return function(r){for(var t=Object.keys(r),u=t.length,e=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return a((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(t),o=n.map(r[t[0]],e),i=1;i<u;i++)o=n.ap(o,r[t[i]]);return o}};var o=e(),c=u(f());function a(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):a(n,r-1,e)}}var v={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};return t}var v,s={};function l(){if(v)return s;function n(n){return function(r,t){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}return v=1,Object.defineProperty(s,"__esModule",{value:!0}),s.chainFirst=function(r){var t=n(r);return function(n){return function(r){return t(r,n)}}},s.tap=n,s.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}},s}var p,m={};function d(){if(p)return m;p=1;var n=m&&m.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=m&&m.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(m,"__esModule",{value:!0}),m.fromOption=c,m.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?i.right(u):i.left(t(u)))}}},m.fromOptionK=a,m.chainOptionK=function(n,r){var t=a(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},m.fromEitherK=v,m.chainEitherK=function(n,r){var t=v(n);return function(n){return function(u){return r.chain(u,t(n))}}},m.chainFirstEitherK=function(n,r){var t=s(n,r);return function(n){return function(r){return t(r,n)}}},m.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?i.right(r):i.left(u(r)))}))}}},m.tapEither=s;var u=l(),o=e(),i=t(f());function c(n){return function(r){return function(t){return n.fromEither(i.isNone(t)?i.left(r()):i.right(t.value))}}}function a(n){var r=c(n);return function(n){var t=r(n);return function(n){return(0,o.flow)(n,t)}}}function v(n){return function(r){return(0,o.flow)(r,n.fromEither)}}function s(n,r){var t=v(n),e=(0,u.tap)(r);return function(n,r){return e(n,t(r))}}return m}var b,h={};function O(){if(b)return h;b=1,Object.defineProperty(h,"__esModule",{value:!0}),h.map=r,h.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},h.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},h.let=function(n){return function(r,t){return function(u){return n.map(u,(function(n){var u;return Object.assign({},n,((u={})[r]=t(n),u))}))}}},h.getFunctorComposition=function(t,u){var e=r(t,u);return{map:function(r,t){return(0,n.pipe)(r,e(t))}}},h.as=t,h.asUnit=function(n){var r=t(n);return function(n){return r(n,void 0)}};var n=e();function r(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}function t(n){return function(r,t){return n.map(r,(function(){return t}))}}return h}var R,I,j={},U={};function _(){return R||(R=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.eqDate=n.eqNumber=n.eqString=n.eqBoolean=n.eq=n.strictEqual=n.getStructEq=n.getTupleEq=n.Contravariant=n.getMonoid=n.getSemigroup=n.eqStrict=n.URI=n.contramap=n.tuple=n.struct=n.fromEquals=void 0;var r=e();n.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},n.struct=function(r){return(0,n.fromEquals)((function(n,t){for(var u in r)if(!r[u].equals(n[u],t[u]))return!1;return!0}))},n.tuple=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return(0,n.fromEquals)((function(n,t){return r.every((function(r,u){return r.equals(n[u],t[u])}))}))},n.contramap=function(r){return function(t){return(0,n.fromEquals)((function(n,u){return t.equals(r(n),r(u))}))}},n.URI="Eq",n.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};n.getSemigroup=function(){return{concat:function(r,t){return(0,n.fromEquals)((function(n,u){return r.equals(n,u)&&t.equals(n,u)}))}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:t}},n.Contravariant={URI:n.URI,contramap:function(t,u){return(0,r.pipe)(t,(0,n.contramap)(u))}},n.getTupleEq=n.tuple,n.getStructEq=n.struct,n.strictEqual=n.eqStrict.equals,n.eq=n.Contravariant,n.eqBoolean=n.eqStrict,n.eqString=n.eqStrict,n.eqNumber=n.eqStrict,n.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}}(U)),U}function g(){return I||(I=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ordDate=n.ordNumber=n.ordString=n.ordBoolean=n.ord=n.getDualOrd=n.getTupleOrd=n.between=n.clamp=n.max=n.min=n.geq=n.leq=n.gt=n.lt=n.equals=n.trivial=n.Contravariant=n.getMonoid=n.getSemigroup=n.URI=n.contramap=n.reverse=n.tuple=n.fromCompare=n.equalsDefault=void 0;var r=_(),t=e();n.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},n.fromCompare=function(r){return{equals:(0,n.equalsDefault)(r),compare:function(n,t){return n===t?0:r(n,t)}}},n.tuple=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return(0,n.fromCompare)((function(n,t){for(var u=0;u<r.length-1;u++){var e=r[u].compare(n[u],t[u]);if(0!==e)return e}return r[u].compare(n[u],t[u])}))},n.reverse=function(r){return(0,n.fromCompare)((function(n,t){return r.compare(t,n)}))},n.contramap=function(r){return function(t){return(0,n.fromCompare)((function(n,u){return t.compare(r(n),r(u))}))}},n.URI="Ord",n.getSemigroup=function(){return{concat:function(r,t){return(0,n.fromCompare)((function(n,u){var e=r.compare(n,u);return 0!==e?e:t.compare(n,u)}))}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:(0,n.fromCompare)((function(){return 0}))}},n.Contravariant={URI:n.URI,contramap:function(r,u){return(0,t.pipe)(r,(0,n.contramap)(u))}},n.trivial={equals:t.constTrue,compare:(0,t.constant)(0)},n.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},n.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},n.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},n.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},n.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},n.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},n.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},n.clamp=function(r){var t=(0,n.min)(r),u=(0,n.max)(r);return function(n,r){return function(e){return u(t(e,r),n)}}},n.between=function(r){var t=(0,n.lt)(r),u=(0,n.gt)(r);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},n.getTupleOrd=n.tuple,n.getDualOrd=n.reverse,n.ord=n.Contravariant;var u={equals:r.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};n.ordBoolean=u,n.ordString=u,n.ordNumber=u,n.ordDate=(0,t.pipe)(n.ordNumber,(0,n.contramap)((function(n){return n.valueOf()})))}(j)),j}var w,M,y={},E={};function P(){return w||(w=1,Object.defineProperty(E,"__esModule",{value:!0}),E.concatAll=E.endo=E.filterSecond=E.filterFirst=E.reverse=void 0,E.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},E.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},E.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},E.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},E.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}),E}function k(){return M||(M=1,function(n){var r=y&&y.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=y&&y.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=y&&y.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.semigroupProduct=n.semigroupSum=n.semigroupString=n.getFunctionSemigroup=n.semigroupAny=n.semigroupAll=n.getIntercalateSemigroup=n.getMeetSemigroup=n.getJoinSemigroup=n.getDualSemigroup=n.getStructSemigroup=n.getTupleSemigroup=n.getFirstSemigroup=n.getLastSemigroup=n.getObjectSemigroup=n.semigroupVoid=n.concatAll=n.last=n.first=n.intercalate=n.tuple=n.struct=n.reverse=n.constant=n.max=n.min=void 0,n.fold=function(r){var t=(0,n.concatAll)(r);return function(n,r){return void 0===r?t(n):t(n)(r)}};var o=e(),i=u(f()),c=u(P()),a=u(g());n.min=function(n){return{concat:a.min(n)}},n.max=function(n){return{concat:a.max(n)}},n.constant=function(n){return{concat:function(){return n}}},n.reverse=c.reverse,n.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)i.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},n.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},n.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},n.first=function(){return{concat:o.identity}},n.last=function(){return{concat:function(n,r){return r}}},n.concatAll=c.concatAll,n.semigroupVoid=(0,n.constant)(void 0),n.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},n.getLastSemigroup=n.last,n.getFirstSemigroup=n.first,n.getTupleSemigroup=n.tuple,n.getStructSemigroup=n.struct,n.getDualSemigroup=n.reverse,n.getJoinSemigroup=n.max,n.getMeetSemigroup=n.min,n.getIntercalateSemigroup=n.intercalate,n.semigroupAll={concat:function(n,r){return n&&r}},n.semigroupAny={concat:function(n,r){return n||r}},n.getFunctionSemigroup=o.getSemigroup,n.semigroupString={concat:function(n,r){return n+r}},n.semigroupSum={concat:function(n,r){return n+r}},n.semigroupProduct={concat:function(n,r){return n*r}}}(y)),y}var T,q={};function L(){return T||(T=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.right=n.left=n.flap=n.Functor=n.Bifunctor=n.URI=n.bimap=n.mapLeft=n.map=n.separated=void 0;var r=e(),t=O();n.separated=function(n,r){return{left:n,right:r}},n.map=function(r){return function(t){return(0,n.separated)((0,n.left)(t),r((0,n.right)(t)))}},n.mapLeft=function(r){return function(t){return(0,n.separated)(r((0,n.left)(t)),(0,n.right)(t))}},n.bimap=function(r,t){return function(u){return(0,n.separated)(r((0,n.left)(u)),t((0,n.right)(u)))}},n.URI="Separated",n.Bifunctor={URI:n.URI,mapLeft:function(t,u){return(0,r.pipe)(t,(0,n.mapLeft)(u))},bimap:function(t,u,e){return(0,r.pipe)(t,(0,n.bimap)(u,e))}},n.Functor={URI:n.URI,map:function(t,u){return(0,r.pipe)(t,(0,n.map)(u))}},n.flap=(0,t.flap)(n.Functor),n.left=function(n){return n.left},n.right=function(n){return n.right}}(q)),q}var S,x={};function A(){if(S)return x;S=1;var n=x&&x.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=x&&x.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=x&&x.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(x,"__esModule",{value:!0}),x.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},x.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},x.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(e){return t(e,(function(t){return r.map(n(t),(function(n){return n?u.some(t):u.none}))}))}}}};var u=t(f());return x}var N,z={};function C(){return N||(N=1,Object.defineProperty(z,"__esModule",{value:!0}),z.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}),z}var G=e();function J(n){return n}function X(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n}function F(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}}var H=function(n,r){var t="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return t(arguments)?r.apply(this,n):function(t){return r.apply(void 0,function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))}([t],n,!1))}}},Y=function(n){return"Some"===n._tag},B={_tag:"None"},D=function(n){return{_tag:"Left",left:n}},K=function(n){return{_tag:"Right",right:n}},Q=Object.prototype.hasOwnProperty,V=function(n,r){return H(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))};function W(n){return function(r){return function(t){return n.fromEither("None"===t._tag?D(r()):K(t.value))}}}var Z=D,$=K,nn=H(2,(function(n,r){return fn(n)?n:r(n.right)})),rn=function(n,r){return F(n,un(r))},tn="Either",un=function(n){return function(r){return fn(r)?r:$(n(r.right))}},en={URI:tn,map:rn},on={URI:tn,map:rn,ap:function(n,r){return F(n,function(n){return function(r){return fn(r)?r:fn(n)?n:$(r.right(n.right))}}(r))}},cn=W({URI:tn,fromEither:J}),fn=function(n){return"Left"===n._tag},an=function(n,r){return function(t){return fn(t)?n(t.left):r(t.right)}},vn=an,sn=function(n){return function(r){return null==r?Z(n):$(r)}},ln=nn,pn=B,mn=function(n){return{_tag:"Some",value:n}},dn=function(n){return{concat:function(r,t){return bn(r)?t:bn(t)?r:mn(n.concat(r.value,t.value))},empty:pn}},bn=function(n){return"None"===n._tag},hn=function(n){return null==n?pn:mn(n)};function On(n){return function(r){return n.map(r,$)}}function Rn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,en)}function In(n){return function(r){return function(t){return n.chain(t,an(r,n.of))}}}var jn,Un,_n,gn=function(n,r){return F(n,wn(r))},wn=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},Mn=function(n){return function(){return Promise.resolve(n)}},yn="Task",En={URI:yn,map:gn},Pn={URI:yn,map:gn,of:Mn,ap:function(n,r){return F(n,function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}}(r))},chain:H(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}}))},kn=On(En),Tn=Mn,qn=In(Pn),Ln=qn,Sn=function(n,r){return function(){return t=void 0,u=void 0,o=function(){var t;return function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(t=1,u&&(e=2&c[0]?u.return:c[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,c[1])).done)return e;switch(u=0,e&&(c=[2&c[0],e.value]),c[0]){case 0:case 1:e=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,u=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!e||c[1]>e[0]&&c[1]<e[3])){i.label=c[1];break}if(6===c[0]&&i.label<e[1]){i.label=e[1],e=c;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(c);break}e[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(n,i)}catch(n){c=[6,n],u=0}finally{t=e=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}}(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(K)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,D(r(t))];case 3:return[2]}}))},new((e=void 0)||(e=Promise))((function(n,r){function i(n){try{f(o.next(n))}catch(n){r(n)}}function c(n){try{f(o.throw(n))}catch(n){r(n)}}function f(r){var t;r.done?n(r.value):(t=r.value,t instanceof e?t:new e((function(n){n(t)}))).then(i,c)}f((o=o.apply(t,u||[])).next())}));var t,u,e,o}},xn=Rn(En),An=H(2,(jn=En,function(n,r){return jn.map(n,function(n){return function(r){return fn(r)?Z(n(r.left)):r}}(r))})),Nn=H(2,(Un=Pn,function(n,r){return Un.chain(n,(function(n){return fn(n)?Un.of(n):r(n.right)}))})),zn=V({fromTask:kn},{flatMap:Nn}),Cn=Nn,Gn=Nn,Jn={},Xn={};function Fn(){if(_n)return Xn;_n=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.getApplicativeMonoid=function(r){var t=(0,n.getApplySemigroup)(r);return function(n){return{concat:t(n).concat,empty:r.of(n.empty)}}},Xn.getApplicativeComposition=function(u,e){var o=(0,t.getFunctorComposition)(u,e).map,i=(0,n.ap)(u,e);return{map:o,of:function(n){return u.of(e.of(n))},ap:function(n,t){return(0,r.pipe)(n,i(t))}}};var n=a(),r=e(),t=O();return Xn}var Hn,Yn,Bn,Dn={},Kn={},Qn={};function Vn(){return Hn||(Hn=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.and=n.or=n.not=n.Contravariant=n.getMonoidAll=n.getSemigroupAll=n.getMonoidAny=n.getSemigroupAny=n.URI=n.contramap=void 0;var r=e();n.contramap=function(n){return function(t){return(0,r.flow)(n,t)}},n.URI="Predicate",n.getSemigroupAny=function(){return{concat:function(t,u){return(0,r.pipe)(t,(0,n.or)(u))}}},n.getMonoidAny=function(){return{concat:(0,n.getSemigroupAny)().concat,empty:r.constFalse}},n.getSemigroupAll=function(){return{concat:function(t,u){return(0,r.pipe)(t,(0,n.and)(u))}}},n.getMonoidAll=function(){return{concat:(0,n.getSemigroupAll)().concat,empty:r.constTrue}},n.Contravariant={URI:n.URI,contramap:function(t,u){return(0,r.pipe)(t,(0,n.contramap)(u))}},n.not=function(n){return function(r){return!n(r)}},n.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},n.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}}(Qn)),Qn}function Wn(){return Yn||(Yn=1,function(n){var r=Kn&&Kn.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=Kn&&Kn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=Kn&&Kn.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.throwError=n.Witherable=n.wilt=n.wither=n.Traversable=n.sequence=n.traverse=n.Filterable=n.partitionMap=n.partition=n.filterMap=n.filter=n.Compactable=n.separate=n.compact=n.Extend=n.extend=n.Alternative=n.guard=n.Zero=n.zero=n.Alt=n.alt=n.altW=n.orElse=n.Foldable=n.reduceRight=n.foldMap=n.reduce=n.Monad=n.Chain=n.flatMap=n.Applicative=n.Apply=n.ap=n.Pointed=n.of=n.asUnit=n.as=n.Functor=n.map=n.getMonoid=n.getOrd=n.getEq=n.getShow=n.URI=n.getRight=n.getLeft=n.some=n.none=void 0,n.getLastMonoid=n.getFirstMonoid=n.getApplyMonoid=n.getApplySemigroup=n.option=n.mapNullable=n.chainFirst=n.chain=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apS=n.bind=n.let=n.bindTo=n.Do=n.exists=n.toUndefined=n.toNullable=n.chainNullableK=n.fromNullableK=n.tryCatchK=n.tryCatch=n.fromNullable=n.chainFirstEitherK=n.chainEitherK=n.fromEitherK=n.duplicate=n.tapEither=n.tap=n.flatten=n.apSecond=n.apFirst=n.flap=n.getOrElse=n.getOrElseW=n.fold=n.match=n.foldW=n.matchW=n.isNone=n.isSome=n.FromEither=n.fromEither=n.MonadThrow=void 0,n.fromPredicate=function(r){return function(t){return r(t)?(0,n.some)(t):n.none}},n.elem=function r(t){return function(u,e){if(void 0===e){var o=r(t);return function(n){return o(u,n)}}return!(0,n.isNone)(e)&&t.equals(u,e.value)}},n.getRefinement=function(r){return function(t){return(0,n.isSome)(r(t))}};var o=Fn(),i=a(),c=u(l()),v=d(),s=e(),p=O(),m=u(f()),b=Vn(),h=k(),R=L(),I=A(),j=C();n.none=m.none,n.some=m.some,n.getLeft=function(r){return"Right"===r._tag?n.none:(0,n.some)(r.left)},n.getRight=function(r){return"Left"===r._tag?n.none:(0,n.some)(r.right)};var U=function(r,t){return(0,s.pipe)(r,(0,n.map)(t))},_=function(r,t){return(0,s.pipe)(r,(0,n.ap)(t))},g=function(r,t,u){return(0,s.pipe)(r,(0,n.reduce)(t,u))},w=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,s.pipe)(n,t(r))}},M=function(r,t,u){return(0,s.pipe)(r,(0,n.reduceRight)(t,u))},y=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,s.pipe)(n,t(r))}},E=function(r,t){return(0,s.pipe)(r,(0,n.alt)(t))},P=function(r,t){return(0,s.pipe)(r,(0,n.filter)(t))},T=function(r,t){return(0,s.pipe)(r,(0,n.filterMap)(t))},q=function(r,t){return(0,s.pipe)(r,(0,n.extend)(t))},S=function(r,t){return(0,s.pipe)(r,(0,n.partition)(t))},x=function(r,t){return(0,s.pipe)(r,(0,n.partitionMap)(t))};n.URI="Option",n.getShow=function(r){return{show:function(t){return(0,n.isNone)(t)?"none":"some(".concat(r.show(t.value),")")}}},n.getEq=function(r){return{equals:function(t,u){return t===u||((0,n.isNone)(t)?(0,n.isNone)(u):!(0,n.isNone)(u)&&r.equals(t.value,u.value))}}},n.getOrd=function(r){return{equals:(0,n.getEq)(r).equals,compare:function(t,u){return t===u?0:(0,n.isSome)(t)?(0,n.isSome)(u)?r.compare(t.value,u.value):1:-1}}},n.getMonoid=function(r){return{concat:function(t,u){return(0,n.isNone)(t)?u:(0,n.isNone)(u)?t:(0,n.some)(r.concat(t.value,u.value))},empty:n.none}},n.map=function(r){return function(t){return(0,n.isNone)(t)?n.none:(0,n.some)(r(t.value))}},n.Functor={URI:n.URI,map:U},n.as=(0,s.dual)(2,(0,p.as)(n.Functor)),n.asUnit=(0,p.asUnit)(n.Functor),n.of=n.some,n.Pointed={URI:n.URI,of:n.of},n.ap=function(r){return function(t){return(0,n.isNone)(t)||(0,n.isNone)(r)?n.none:(0,n.some)(t.value(r.value))}},n.Apply={URI:n.URI,map:U,ap:_},n.Applicative={URI:n.URI,map:U,ap:_,of:n.of},n.flatMap=(0,s.dual)(2,(function(r,t){return(0,n.isNone)(r)?n.none:t(r.value)})),n.Chain={URI:n.URI,map:U,ap:_,chain:n.flatMap},n.Monad={URI:n.URI,map:U,ap:_,of:n.of,chain:n.flatMap},n.reduce=function(r,t){return function(u){return(0,n.isNone)(u)?r:t(r,u.value)}},n.foldMap=function(r){return function(t){return function(u){return(0,n.isNone)(u)?r.empty:t(u.value)}}},n.reduceRight=function(r,t){return function(u){return(0,n.isNone)(u)?r:t(u.value,r)}},n.Foldable={URI:n.URI,reduce:g,foldMap:w,reduceRight:M},n.orElse=(0,s.dual)(2,(function(r,t){return(0,n.isNone)(r)?t():r})),n.altW=n.orElse,n.alt=n.orElse,n.Alt={URI:n.URI,map:U,alt:E},n.zero=function(){return n.none},n.Zero={URI:n.URI,zero:n.zero},n.guard=(0,j.guard)(n.Zero,n.Pointed),n.Alternative={URI:n.URI,map:U,ap:_,of:n.of,alt:E,zero:n.zero},n.extend=function(r){return function(t){return(0,n.isNone)(t)?n.none:(0,n.some)(r(t))}},n.Extend={URI:n.URI,map:U,extend:q},n.compact=(0,n.flatMap)(s.identity);var N=(0,R.separated)(n.none,n.none);n.separate=function(r){return(0,n.isNone)(r)?N:(0,R.separated)((0,n.getLeft)(r.value),(0,n.getRight)(r.value))},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.filter=function(r){return function(t){return(0,n.isNone)(t)?n.none:r(t.value)?t:n.none}},n.filterMap=function(r){return function(t){return(0,n.isNone)(t)?n.none:r(t.value)}},n.partition=function(n){return function(r){return(0,R.separated)(P(r,(0,b.not)(n)),P(r,n))}},n.partitionMap=function(r){return(0,s.flow)((0,n.map)(r),n.separate)},n.Filterable={URI:n.URI,map:U,compact:n.compact,separate:n.separate,filter:P,filterMap:T,partition:S,partitionMap:x},n.traverse=function(r){return function(t){return function(u){return(0,n.isNone)(u)?r.of(n.none):r.map(t(u.value),n.some)}}},n.sequence=function(r){return function(t){return(0,n.isNone)(t)?r.of(n.none):r.map(t.value,n.some)}},n.Traversable={URI:n.URI,map:U,reduce:g,foldMap:w,reduceRight:M,traverse:y,sequence:n.sequence};var z=(0,I.witherDefault)(n.Traversable,n.Compactable),G=(0,I.wiltDefault)(n.Traversable,n.Compactable);n.wither=function(n){var r=z(n);return function(n){return function(t){return r(t,n)}}},n.wilt=function(n){var r=G(n);return function(n){return function(t){return r(t,n)}}},n.Witherable={URI:n.URI,map:U,reduce:g,foldMap:w,reduceRight:M,traverse:y,sequence:n.sequence,compact:n.compact,separate:n.separate,filter:P,filterMap:T,partition:S,partitionMap:x,wither:z,wilt:G},n.throwError=function(){return n.none},n.MonadThrow={URI:n.URI,map:U,ap:_,of:n.of,chain:n.flatMap,throwError:n.throwError},n.fromEither=n.getRight,n.FromEither={URI:n.URI,fromEither:n.fromEither},n.isSome=m.isSome,n.isNone=function(n){return"None"===n._tag},n.matchW=function(r,t){return function(u){return(0,n.isNone)(u)?r():t(u.value)}},n.foldW=n.matchW,n.match=n.matchW,n.fold=n.match,n.getOrElseW=function(r){return function(t){return(0,n.isNone)(t)?r():t.value}},n.getOrElse=n.getOrElseW,n.flap=(0,p.flap)(n.Functor),n.apFirst=(0,i.apFirst)(n.Apply),n.apSecond=(0,i.apSecond)(n.Apply),n.flatten=n.compact,n.tap=(0,s.dual)(2,c.tap(n.Chain)),n.tapEither=(0,s.dual)(2,(0,v.tapEither)(n.FromEither,n.Chain)),n.duplicate=(0,n.extend)(s.identity),n.fromEitherK=(0,v.fromEitherK)(n.FromEither),n.chainEitherK=(0,v.chainEitherK)(n.FromEither,n.Chain),n.chainFirstEitherK=n.tapEither,n.fromNullable=function(r){return null==r?n.none:(0,n.some)(r)},n.tryCatch=function(r){try{return(0,n.some)(r())}catch(r){return n.none}},n.tryCatchK=function(r){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,n.tryCatch)((function(){return r.apply(void 0,t)}))}},n.fromNullableK=function(r){return(0,s.flow)(r,n.fromNullable)},n.chainNullableK=function(r){return function(t){return(0,n.isNone)(t)?n.none:(0,n.fromNullable)(r(t.value))}},n.toNullable=(0,n.match)(s.constNull,s.identity),n.toUndefined=(0,n.match)(s.constUndefined,s.identity),n.exists=function(r){return function(t){return!(0,n.isNone)(t)&&r(t.value)}},n.Do=(0,n.of)(m.emptyRecord),n.bindTo=(0,p.bindTo)(n.Functor),n.let=(0,p.let)(n.Functor),n.bind=c.bind(n.Chain),n.apS=(0,i.apS)(n.Apply),n.ApT=(0,n.of)(m.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(r){return function(t){var u=r(0,m.head(t));if((0,n.isNone)(u))return n.none;for(var e=[u.value],o=1;o<t.length;o++){var i=r(o,t[o]);if((0,n.isNone)(i))return n.none;e.push(i.value)}return(0,n.some)(e)}},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return m.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(s.identity),n.chain=n.flatMap,n.chainFirst=n.tap,n.mapNullable=n.chainNullableK,n.option={URI:n.URI,map:U,of:n.of,ap:_,chain:n.flatMap,reduce:g,foldMap:w,reduceRight:M,traverse:y,sequence:n.sequence,zero:n.zero,alt:E,extend:q,compact:n.compact,separate:n.separate,filter:P,filterMap:T,partition:S,partitionMap:x,wither:z,wilt:G,throwError:n.throwError},n.getApplySemigroup=(0,i.getApplySemigroup)(n.Apply),n.getApplyMonoid=(0,o.getApplicativeMonoid)(n.Applicative),n.getFirstMonoid=function(){return(0,n.getMonoid)((0,h.first)())},n.getLastMonoid=function(){return(0,n.getMonoid)((0,h.last)())}}(Kn)),Kn}function Zn(){if(Bn)return Dn;Bn=1;var n=Dn&&Dn.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=Dn&&Dn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=Dn&&Dn.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.compact=f,Dn.separate=a,Dn.getCompactableComposition=function(n,r){return{map:(0,o.getFunctorComposition)(n,r).map,compact:f(n,r),separate:a(n,r,r)}};var u=e(),o=O(),i=Wn(),c=t(L());function f(n,r){return function(t){return n.map(t,r.compact)}}function a(n,r,t){var e=f(n,r),a=(0,o.map)(n,t);return function(n){return c.separated(e((0,u.pipe)(n,a(i.getLeft))),e((0,u.pipe)(n,a(i.getRight))))}}return Dn}var $n,nr,rr={},tr={};function ur(){return $n||($n=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.tailRec=void 0,tr.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}),tr}function er(){return nr||(nr=1,function(n){var r=rr&&rr.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=rr&&rr.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=rr&&rr.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.match=n.foldW=n.matchW=n.isRight=n.isLeft=n.fromOption=n.fromPredicate=n.FromEither=n.MonadThrow=n.throwError=n.ChainRec=n.Extend=n.extend=n.Alt=n.alt=n.altW=n.Bifunctor=n.mapLeft=n.bimap=n.Traversable=n.sequence=n.traverse=n.Foldable=n.reduceRight=n.foldMap=n.reduce=n.Monad=n.Chain=n.Applicative=n.Apply=n.ap=n.apW=n.Pointed=n.of=n.asUnit=n.as=n.Functor=n.map=n.getAltValidation=n.getApplicativeValidation=n.getWitherable=n.getFilterable=n.getCompactable=n.getSemigroup=n.getEq=n.getShow=n.URI=n.flatMap=n.right=n.left=void 0,n.either=n.stringifyJSON=n.chainFirstW=n.chainFirst=n.chain=n.chainW=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apSW=n.apS=n.bindW=n.bind=n.let=n.bindTo=n.Do=n.exists=n.toUnion=n.chainNullableK=n.fromNullableK=n.tryCatchK=n.tryCatch=n.fromNullable=n.orElse=n.orElseW=n.swap=n.filterOrElseW=n.filterOrElse=n.flatMapOption=n.flatMapNullable=n.liftOption=n.liftNullable=n.chainOptionKW=n.chainOptionK=n.fromOptionK=n.duplicate=n.flatten=n.flattenW=n.tap=n.apSecondW=n.apSecond=n.apFirstW=n.apFirst=n.flap=n.getOrElse=n.getOrElseW=n.fold=void 0,n.getValidationMonoid=n.getValidationSemigroup=n.getApplyMonoid=n.getApplySemigroup=void 0,n.toError=function(n){try{return n instanceof Error?n:new Error(String(n))}catch(n){return new Error}},n.elem=function r(t){return function(u,e){if(void 0===e){var o=r(t);return function(n){return o(u,n)}}return!(0,n.isLeft)(e)&&t.equals(u,e.right)}},n.parseJSON=function(r,t){return(0,n.tryCatch)((function(){return JSON.parse(r)}),t)},n.getValidation=function(r){var t=(0,n.getApplicativeValidation)(r).ap,u=(0,n.getAltValidation)(r).alt;return{URI:n.URI,_E:void 0,map:I,of:n.of,chain:n.flatMap,bimap:M,mapLeft:y,reduce:U,foldMap:_,reduceRight:g,extend:P,traverse:w,sequence:n.sequence,chainRec:k,throwError:n.throwError,ap:t,alt:u}};var o=Fn(),i=a(),c=u(l()),v=ur(),s=d(),p=e(),m=O(),b=u(f()),h=L(),R=A();n.left=b.left,n.right=b.right,n.flatMap=(0,p.dual)(2,(function(r,t){return(0,n.isLeft)(r)?r:t(r.right)}));var I=function(r,t){return(0,p.pipe)(r,(0,n.map)(t))},j=function(r,t){return(0,p.pipe)(r,(0,n.ap)(t))},U=function(r,t,u){return(0,p.pipe)(r,(0,n.reduce)(t,u))},_=function(r){return function(t,u){var e=(0,n.foldMap)(r);return(0,p.pipe)(t,e(u))}},g=function(r,t,u){return(0,p.pipe)(r,(0,n.reduceRight)(t,u))},w=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,p.pipe)(n,t(r))}},M=function(r,t,u){return(0,p.pipe)(r,(0,n.bimap)(t,u))},y=function(r,t){return(0,p.pipe)(r,(0,n.mapLeft)(t))},E=function(r,t){return(0,p.pipe)(r,(0,n.alt)(t))},P=function(r,t){return(0,p.pipe)(r,(0,n.extend)(t))},k=function(r,t){return(0,v.tailRec)(t(r),(function(r){return(0,n.isLeft)(r)?(0,n.right)((0,n.left)(r.left)):(0,n.isLeft)(r.right)?(0,n.left)(t(r.right.left)):(0,n.right)((0,n.right)(r.right.right))}))};n.URI="Either",n.getShow=function(r,t){return{show:function(u){return(0,n.isLeft)(u)?"left(".concat(r.show(u.left),")"):"right(".concat(t.show(u.right),")")}}},n.getEq=function(r,t){return{equals:function(u,e){return u===e||((0,n.isLeft)(u)?(0,n.isLeft)(e)&&r.equals(u.left,e.left):(0,n.isRight)(e)&&t.equals(u.right,e.right))}}},n.getSemigroup=function(r){return{concat:function(t,u){return(0,n.isLeft)(u)?t:(0,n.isLeft)(t)?u:(0,n.right)(r.concat(t.right,u.right))}}},n.getCompactable=function(r){var t=(0,n.left)(r.empty);return{URI:n.URI,_E:void 0,compact:function(r){return(0,n.isLeft)(r)?r:"None"===r.right._tag?t:(0,n.right)(r.right.value)},separate:function(r){return(0,n.isLeft)(r)?(0,h.separated)(r,r):(0,n.isLeft)(r.right)?(0,h.separated)((0,n.right)(r.right.left),t):(0,h.separated)(t,(0,n.right)(r.right.right))}}},n.getFilterable=function(r){var t=(0,n.left)(r.empty),u=(0,n.getCompactable)(r);return{URI:n.URI,_E:void 0,map:I,compact:u.compact,separate:u.separate,filter:function(r,u){return(0,n.isLeft)(r)||u(r.right)?r:t},filterMap:function(r,u){if((0,n.isLeft)(r))return r;var e=u(r.right);return"None"===e._tag?t:(0,n.right)(e.value)},partition:function(r,u){return(0,n.isLeft)(r)?(0,h.separated)(r,r):u(r.right)?(0,h.separated)(t,(0,n.right)(r.right)):(0,h.separated)((0,n.right)(r.right),t)},partitionMap:function(r,u){if((0,n.isLeft)(r))return(0,h.separated)(r,r);var e=u(r.right);return(0,n.isLeft)(e)?(0,h.separated)((0,n.right)(e.left),t):(0,h.separated)(t,(0,n.right)(e.right))}}},n.getWitherable=function(r){var t=(0,n.getFilterable)(r),u=(0,n.getCompactable)(r);return{URI:n.URI,_E:void 0,map:I,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:w,sequence:n.sequence,reduce:U,foldMap:_,reduceRight:g,wither:(0,R.witherDefault)(n.Traversable,u),wilt:(0,R.wiltDefault)(n.Traversable,u)}},n.getApplicativeValidation=function(r){return{URI:n.URI,_E:void 0,map:I,ap:function(t,u){return(0,n.isLeft)(t)?(0,n.isLeft)(u)?(0,n.left)(r.concat(t.left,u.left)):t:(0,n.isLeft)(u)?u:(0,n.right)(t.right(u.right))},of:n.of}},n.getAltValidation=function(r){return{URI:n.URI,_E:void 0,map:I,alt:function(t,u){if((0,n.isRight)(t))return t;var e=u();return(0,n.isLeft)(e)?(0,n.left)(r.concat(t.left,e.left)):e}}},n.map=function(r){return function(t){return(0,n.isLeft)(t)?t:(0,n.right)(r(t.right))}},n.Functor={URI:n.URI,map:I},n.as=(0,p.dual)(2,(0,m.as)(n.Functor)),n.asUnit=(0,m.asUnit)(n.Functor),n.of=n.right,n.Pointed={URI:n.URI,of:n.of},n.apW=function(r){return function(t){return(0,n.isLeft)(t)?t:(0,n.isLeft)(r)?r:(0,n.right)(t.right(r.right))}},n.ap=n.apW,n.Apply={URI:n.URI,map:I,ap:j},n.Applicative={URI:n.URI,map:I,ap:j,of:n.of},n.Chain={URI:n.URI,map:I,ap:j,chain:n.flatMap},n.Monad={URI:n.URI,map:I,ap:j,of:n.of,chain:n.flatMap},n.reduce=function(r,t){return function(u){return(0,n.isLeft)(u)?r:t(r,u.right)}},n.foldMap=function(r){return function(t){return function(u){return(0,n.isLeft)(u)?r.empty:t(u.right)}}},n.reduceRight=function(r,t){return function(u){return(0,n.isLeft)(u)?r:t(u.right,r)}},n.Foldable={URI:n.URI,reduce:U,foldMap:_,reduceRight:g},n.traverse=function(r){return function(t){return function(u){return(0,n.isLeft)(u)?r.of((0,n.left)(u.left)):r.map(t(u.right),n.right)}}},n.sequence=function(r){return function(t){return(0,n.isLeft)(t)?r.of((0,n.left)(t.left)):r.map(t.right,n.right)}},n.Traversable={URI:n.URI,map:I,reduce:U,foldMap:_,reduceRight:g,traverse:w,sequence:n.sequence},n.bimap=function(r,t){return function(u){return(0,n.isLeft)(u)?(0,n.left)(r(u.left)):(0,n.right)(t(u.right))}},n.mapLeft=function(r){return function(t){return(0,n.isLeft)(t)?(0,n.left)(r(t.left)):t}},n.Bifunctor={URI:n.URI,bimap:M,mapLeft:y},n.altW=function(r){return function(t){return(0,n.isLeft)(t)?r():t}},n.alt=n.altW,n.Alt={URI:n.URI,map:I,alt:E},n.extend=function(r){return function(t){return(0,n.isLeft)(t)?t:(0,n.right)(r(t))}},n.Extend={URI:n.URI,map:I,extend:P},n.ChainRec={URI:n.URI,map:I,ap:j,chain:n.flatMap,chainRec:k},n.throwError=n.left,n.MonadThrow={URI:n.URI,map:I,ap:j,of:n.of,chain:n.flatMap,throwError:n.throwError},n.FromEither={URI:n.URI,fromEither:p.identity},n.fromPredicate=(0,s.fromPredicate)(n.FromEither),n.fromOption=(0,s.fromOption)(n.FromEither),n.isLeft=b.isLeft,n.isRight=b.isRight,n.matchW=function(r,t){return function(u){return(0,n.isLeft)(u)?r(u.left):t(u.right)}},n.foldW=n.matchW,n.match=n.matchW,n.fold=n.match,n.getOrElseW=function(r){return function(t){return(0,n.isLeft)(t)?r(t.left):t.right}},n.getOrElse=n.getOrElseW,n.flap=(0,m.flap)(n.Functor),n.apFirst=(0,i.apFirst)(n.Apply),n.apFirstW=n.apFirst,n.apSecond=(0,i.apSecond)(n.Apply),n.apSecondW=n.apSecond,n.tap=(0,p.dual)(2,c.tap(n.Chain)),n.flattenW=(0,n.flatMap)(p.identity),n.flatten=n.flattenW,n.duplicate=(0,n.extend)(p.identity),n.fromOptionK=(0,s.fromOptionK)(n.FromEither),n.chainOptionK=(0,s.chainOptionK)(n.FromEither,n.Chain),n.chainOptionKW=n.chainOptionK;var T={fromEither:n.FromEither.fromEither};n.liftNullable=b.liftNullable(T),n.liftOption=b.liftOption(T);var q={flatMap:n.flatMap};n.flatMapNullable=b.flatMapNullable(T,q),n.flatMapOption=b.flatMapOption(T,q),n.filterOrElse=(0,s.filterOrElse)(n.FromEither,n.Chain),n.filterOrElseW=n.filterOrElse,n.swap=function(r){return(0,n.isLeft)(r)?(0,n.right)(r.left):(0,n.left)(r.right)},n.orElseW=function(r){return function(t){return(0,n.isLeft)(t)?r(t.left):t}},n.orElse=n.orElseW,n.fromNullable=function(r){return function(t){return null==t?(0,n.left)(r):(0,n.right)(t)}},n.tryCatch=function(r,t){try{return(0,n.right)(r())}catch(r){return(0,n.left)(t(r))}},n.tryCatchK=function(r,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,n.tryCatch)((function(){return r.apply(void 0,u)}),t)}},n.fromNullableK=function(r){var t=(0,n.fromNullable)(r);return function(n){return(0,p.flow)(n,t)}},n.chainNullableK=function(r){var t=(0,n.fromNullableK)(r);return function(r){return(0,n.flatMap)(t(r))}},n.toUnion=(0,n.foldW)(p.identity,p.identity),n.exists=function(r){return function(t){return!(0,n.isLeft)(t)&&r(t.right)}},n.Do=(0,n.of)(b.emptyRecord),n.bindTo=(0,m.bindTo)(n.Functor),n.let=(0,m.let)(n.Functor),n.bind=c.bind(n.Chain),n.bindW=n.bind,n.apS=(0,i.apS)(n.Apply),n.apSW=n.apS,n.ApT=(0,n.of)(b.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(r){return function(t){var u=r(0,b.head(t));if((0,n.isLeft)(u))return u;for(var e=[u.right],o=1;o<t.length;o++){var i=r(o,t[o]);if((0,n.isLeft)(i))return i;e.push(i.right)}return(0,n.right)(e)}},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return b.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(p.identity),n.chainW=n.flatMap,n.chain=n.flatMap,n.chainFirst=n.tap,n.chainFirstW=n.tap,n.stringifyJSON=function(r,t){return(0,n.tryCatch)((function(){var n=JSON.stringify(r);if("string"!=typeof n)throw new Error("Converting unsupported structure to JSON");return n}),t)},n.either={URI:n.URI,map:I,of:n.of,ap:j,chain:n.flatMap,reduce:U,foldMap:_,reduceRight:g,traverse:w,sequence:n.sequence,bimap:M,mapLeft:y,alt:E,extend:P,chainRec:k,throwError:n.throwError},n.getApplySemigroup=(0,i.getApplySemigroup)(n.Apply),n.getApplyMonoid=(0,o.getApplicativeMonoid)(n.Applicative),n.getValidationSemigroup=function(r,t){return(0,i.getApplySemigroup)((0,n.getApplicativeValidation)(r))(t)},n.getValidationMonoid=function(r,t){return(0,o.getApplicativeMonoid)((0,n.getApplicativeValidation)(r))(t)}}(rr)),rr}var or,ir={};function cr(){if(or)return ir;or=1;var n=ir&&ir.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=ir&&ir.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=ir&&ir.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(ir,"__esModule",{value:!0}),ir.right=f,ir.left=v,ir.rightF=s,ir.leftF=l,ir.fromNullable=p,ir.fromNullableK=m,ir.chainNullableK=function(n){var r=h(n),t=m(n);return function(n){var u=t(n);return function(n){return r(u(n))}}},ir.map=d,ir.ap=b,ir.chain=h,ir.flatMap=R,ir.alt=I,ir.bimap=j,ir.mapBoth=U,ir.mapLeft=_,ir.mapError=g,ir.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,o.match((function(u){return n.map(t(),o.mapLeft((function(n){return r.concat(u,n)})))}),f(n)))}}},ir.match=function(n){return function(r,t){return function(u){return n.map(u,o.match(r,t))}}},ir.matchE=w,ir.getOrElse=M,ir.orElse=y,ir.orElseFirst=function(n){var r=E(n);return function(n){return function(t){return r(t,n)}}},ir.tapError=E,ir.orLeft=function(n){return function(r){return function(t){return n.chain(t,o.match((function(t){return n.map(r(t),o.left)}),(function(r){return n.of(o.right(r))})))}}},ir.swap=P,ir.toUnion=function(n){return function(r){return n.map(r,o.toUnion)}},ir.getEitherM=function(n){var r=b(n),t=d(n),u=h(n),e=I(n),o=j(n),c=_(n),a=w(n),p=M(n),m=y(n);return{map:function(n,r){return(0,i.pipe)(n,t(r))},ap:function(n,t){return(0,i.pipe)(n,r(t))},of:f(n),chain:function(n,r){return(0,i.pipe)(n,u(r))},alt:function(n,r){return(0,i.pipe)(n,e(r))},bimap:function(n,r,t){return(0,i.pipe)(n,o(r,t))},mapLeft:function(n,r){return(0,i.pipe)(n,c(r))},fold:function(n,r,t){return(0,i.pipe)(n,a(r,t))},getOrElse:function(n,r){return(0,i.pipe)(n,p(r))},orElse:function(n,r){return(0,i.pipe)(n,m(r))},swap:P(n),rightM:s(n),leftM:l(n),left:v(n)}};var u=a(),o=t(er()),i=e(),c=O();function f(n){return(0,i.flow)(o.right,n.of)}function v(n){return(0,i.flow)(o.left,n.of)}function s(n){return function(r){return n.map(r,o.right)}}function l(n){return function(r){return n.map(r,o.left)}}function p(n){return function(r){return(0,i.flow)(o.fromNullable(r),n.of)}}function m(n){var r=p(n);return function(n){var t=r(n);return function(n){return(0,i.flow)(n,t)}}}function d(n){return(0,c.map)(n,o.Functor)}function b(n){return(0,u.ap)(n,o.Apply)}function h(n){var r=R(n);return function(n){return function(t){return r(t,n)}}}function R(n){return function(r,t){return n.chain(r,(function(r){return o.isLeft(r)?n.of(r):t(r.right)}))}}function I(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r():n.of(t)}))}}}function j(n){var r=U(n);return function(n,t){return function(u){return r(u,n,t)}}}function U(n){return function(r,t,u){return n.map(r,o.bimap(t,u))}}function _(n){var r=g(n);return function(n){return function(t){return r(t,n)}}}function g(n){return function(r,t){return n.map(r,o.mapLeft(t))}}function w(n){return function(r,t){return function(u){return n.chain(u,o.match(r,t))}}}function M(n){return function(r){return function(t){return n.chain(t,o.match(r,n.of))}}}function y(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r(t.left):n.of(t)}))}}}function E(n){var r=y(n);return function(t,u){return(0,i.pipe)(t,r((function(r){return n.map(u(r),(function(n){return o.isLeft(n)?n:o.left(r)}))})))}}function P(n){return function(r){return n.map(r,o.swap)}}return ir}var fr,ar={};function vr(){if(fr)return ar;fr=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.filter=c,ar.filterMap=f,ar.partition=a,ar.partitionMap=v,ar.getFilterableComposition=function(u,e){var o=(0,t.getFunctorComposition)(u,e).map,i=(0,n.compact)(u,e),s=(0,n.separate)(u,e,e),l=c(u,e),p=f(u,e),m=a(u,e),d=v(u,e);return{map:o,compact:i,separate:s,filter:function(n,t){return(0,r.pipe)(n,l(t))},filterMap:function(n,t){return(0,r.pipe)(n,p(t))},partition:function(n,t){return(0,r.pipe)(n,m(t))},partitionMap:function(n,t){return(0,r.pipe)(n,d(t))}}};var n=Zn(),r=e(),t=O(),u=Wn(),o=Vn(),i=L();function c(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function f(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function a(n,r){var t=c(n,r);return function(n){var r=t((0,o.not)(n)),u=t(n);return function(n){return(0,i.separated)(r(n),u(n))}}}function v(n,t){var e=f(n,t);return function(n){return function(t){return(0,i.separated)((0,r.pipe)(t,e((function(r){return(0,u.getLeft)(n(r))}))),(0,r.pipe)(t,e((function(r){return(0,u.getRight)(n(r))}))))}}}return ar}var sr,lr={};function pr(){if(sr)return lr;sr=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.fromIOK=function(n){return function(t){return(0,r.flow)(t,n.fromIO)}},lr.chainIOK=function(n,t){return function(u){var e=(0,r.flow)(u,n.fromIO);return function(n){return t.chain(n,e)}}},lr.chainFirstIOK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},lr.tapIO=t;var n=l(),r=e();function t(t,u){var e=(0,n.tap)(u);return function(n,u){return e(n,(0,r.flow)(u,t.fromIO))}}return lr}var mr,dr={};function br(){if(mr)return dr;mr=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.fromTaskK=function(n){return function(t){return(0,r.flow)(t,n.fromTask)}},dr.chainTaskK=function(n,t){return function(u){var e=(0,r.flow)(u,n.fromTask);return function(n){return t.chain(n,e)}}},dr.chainFirstTaskK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},dr.tapTask=t;var n=l(),r=e();function t(t,u){var e=(0,n.tap)(u);return function(n,u){return e(n,(0,r.flow)(u,t.fromTask))}}return dr}var hr,Or,Rr={};function Ir(){return hr||(hr=1,function(n){var r=Rr&&Rr.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=Rr&&Rr.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=Rr&&Rr.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.chainFirst=n.chain=n.sequenceSeqArray=n.traverseSeqArray=n.traverseSeqArrayWithIndex=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq=n.traverseReadonlyNonEmptyArrayWithIndexSeq=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apS=n.bind=n.let=n.bindTo=n.Do=n.never=n.FromTask=n.chainFirstIOK=n.chainIOK=n.fromIOK=n.tapIO=n.tap=n.flatMapIO=n.FromIO=n.MonadTask=n.fromTask=n.MonadIO=n.Monad=n.Chain=n.ApplicativeSeq=n.ApplySeq=n.ApplicativePar=n.apSecond=n.apFirst=n.ApplyPar=n.Pointed=n.flap=n.asUnit=n.as=n.Functor=n.URI=n.flatten=n.flatMap=n.of=n.ap=n.map=n.fromIO=void 0,n.getMonoid=n.getSemigroup=n.taskSeq=n.task=void 0,n.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}},n.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:n.never}};var o=Fn(),i=a(),c=u(l()),v=pr(),s=e(),p=O(),m=u(f());n.fromIO=function(n){return function(){return Promise.resolve().then(n)}};var d=function(r,t){return(0,s.pipe)(r,(0,n.map)(t))},b=function(r,t){return(0,s.pipe)(r,(0,n.ap)(t))},h=function(r,t){return(0,n.flatMap)(r,(function(r){return(0,s.pipe)(t,(0,n.map)(r))}))};n.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},n.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},n.of=function(n){return function(){return Promise.resolve(n)}},n.flatMap=(0,s.dual)(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}})),n.flatten=(0,n.flatMap)(s.identity),n.URI="Task",n.Functor={URI:n.URI,map:d},n.as=(0,s.dual)(2,(0,p.as)(n.Functor)),n.asUnit=(0,p.asUnit)(n.Functor),n.flap=(0,p.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.ApplyPar={URI:n.URI,map:d,ap:b},n.apFirst=(0,i.apFirst)(n.ApplyPar),n.apSecond=(0,i.apSecond)(n.ApplyPar),n.ApplicativePar={URI:n.URI,map:d,ap:b,of:n.of},n.ApplySeq={URI:n.URI,map:d,ap:h},n.ApplicativeSeq={URI:n.URI,map:d,ap:h,of:n.of},n.Chain={URI:n.URI,map:d,ap:b,chain:n.flatMap},n.Monad={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap},n.MonadIO={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap,fromIO:n.fromIO},n.fromTask=s.identity,n.MonadTask={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap,fromIO:n.fromIO,fromTask:n.fromTask},n.FromIO={URI:n.URI,fromIO:n.fromIO},n.flatMapIO=m.flatMapIO({fromIO:n.FromIO.fromIO},{flatMap:n.flatMap}),n.tap=(0,s.dual)(2,c.tap(n.Chain)),n.tapIO=(0,s.dual)(2,(0,v.tapIO)(n.FromIO,n.Chain)),n.fromIOK=(0,v.fromIOK)(n.FromIO),n.chainIOK=n.flatMapIO,n.chainFirstIOK=n.tapIO,n.FromTask={URI:n.URI,fromIO:n.fromIO,fromTask:n.fromTask},n.never=function(){return new Promise((function(){}))},n.Do=(0,n.of)(m.emptyRecord),n.bindTo=(0,p.bindTo)(n.Functor),n.let=(0,p.let)(n.Functor),n.bind=c.bind(n.Chain),n.apS=(0,i.apS)(n.ApplyPar),n.ApT=(0,n.of)(m.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return m.isNonEmpty(r)?t(r):n.ApT}},n.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return m.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,m.head(r))).then(m.singleton))}}},n.traverseReadonlyArrayWithIndexSeq=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndexSeq)(r);return function(r){return m.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(s.identity),n.traverseSeqArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq,n.traverseSeqArray=function(r){return(0,n.traverseReadonlyArrayWithIndexSeq)((function(n,t){return r(t)}))},n.sequenceSeqArray=(0,n.traverseSeqArray)(s.identity),n.chain=n.flatMap,n.chainFirst=n.tap,n.task={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap,fromIO:n.fromIO,fromTask:n.fromTask},n.taskSeq={URI:n.URI,map:d,of:n.of,ap:h,chain:n.flatMap,fromIO:n.fromIO,fromTask:n.fromTask},n.getSemigroup=(0,i.getApplySemigroup)(n.ApplySeq),n.getMonoid=(0,o.getApplicativeMonoid)(n.ApplicativeSeq)}(Rr)),Rr}function jr(){return Or||(Or=1,function(n){var r=Jn&&Jn.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=Jn&&Jn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=Jn&&Jn.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u},o=Jn&&Jn.__awaiter||function(n,r,t,u){return new(t||(t=Promise))((function(e,o){function i(n){try{f(u.next(n))}catch(n){o(n)}}function c(n){try{f(u.throw(n))}catch(n){o(n)}}function f(n){var r;n.done?e(n.value):(r=n.value,r instanceof t?r:new t((function(n){n(r)}))).then(i,c)}f((u=u.apply(n,r||[])).next())}))},i=Jn&&Jn.__generator||function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(t=1,u&&(e=2&c[0]?u.return:c[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,c[1])).done)return e;switch(u=0,e&&(c=[2&c[0],e.value]),c[0]){case 0:case 1:e=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,u=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!e||c[1]>e[0]&&c[1]<e[3])){i.label=c[1];break}if(6===c[0]&&i.label<e[1]){i.label=e[1],e=c;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(c);break}e[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(n,i)}catch(n){c=[6,n],u=0}finally{t=e=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.throwError=n.of=n.altW=n.alt=n.flatten=n.flattenW=n.flatMap=n.apW=n.ap=n.mapLeft=n.mapError=n.bimap=n.mapBoth=n.map=n.fromIOEitherK=n.chainTaskOptionK=n.chainTaskOptionKW=n.fromTaskOptionK=n.swap=n.orLeft=n.orElseFirstTaskK=n.orElseFirstIOK=n.tapError=n.orElseW=n.orElse=n.chainNullableK=n.fromNullableK=n.fromNullable=n.toUnion=n.tryCatchK=n.tryCatch=n.getOrElseW=n.getOrElse=n.foldW=n.matchEW=n.fold=n.matchE=n.matchW=n.match=n.fromTaskOption=n.fromIOEither=n.fromEither=n.fromTask=n.fromIO=n.leftIO=n.rightIO=n.leftTask=n.rightTask=n.right=n.left=void 0,n.fromEitherK=n.filterOrElseW=n.filterOrElse=n.fromPredicate=n.chainFirstEitherKW=n.chainFirstEitherK=n.chainEitherKW=n.chainEitherK=n.flatMapTaskOption=n.flatMapIOEither=n.flatMapTask=n.flatMapIO=n.flatMapEither=n.flatMapOption=n.flatMapNullable=n.liftOption=n.liftNullable=n.chainOptionKW=n.chainOptionK=n.fromOptionK=n.fromOption=n.Alt=n.Bifunctor=n.tapTask=n.tapIO=n.tapEither=n.tap=n.FromTask=n.FromIO=n.FromEither=n.MonadThrow=n.MonadTask=n.MonadIO=n.Monad=n.Chain=n.ApplicativeSeq=n.ApplySeq=n.ApplicativePar=n.apSecondW=n.apSecond=n.apFirstW=n.apFirst=n.ApplyPar=n.Pointed=n.flap=n.asUnit=n.as=n.Functor=n.getCompactable=n.URI=void 0,n.getSemigroup=n.getApplyMonoid=n.getApplySemigroup=n.taskEitherSeq=n.taskEither=n.orElseFirstW=n.orElseFirst=n.chainFirstW=n.chainFirst=n.chainW=n.chain=n.sequenceSeqArray=n.traverseSeqArray=n.traverseSeqArrayWithIndex=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq=n.traverseReadonlyNonEmptyArrayWithIndexSeq=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apSW=n.apS=n.bindW=n.bind=n.let=n.bindTo=n.Do=n.bracketW=n.bracket=n.chainIOEitherK=n.chainIOEitherKW=n.chainFirstTaskK=n.chainTaskK=n.fromTaskK=n.chainFirstIOK=n.chainIOK=n.fromIOK=void 0,n.getApplicativeTaskValidation=k,n.getAltTaskValidation=T,n.getFilterable=function(r){var t=m.getFilterable(r),u=(0,n.getCompactable)(r),e=(0,h.filter)(w.Functor,t),o=(0,h.filterMap)(w.Functor,t),i=(0,h.partition)(w.Functor,t),c=(0,h.partitionMap)(w.Functor,t);return{URI:n.URI,_E:void 0,map:M,compact:u.compact,separate:u.separate,filter:function(n,r){return(0,U.pipe)(n,e(r))},filterMap:function(n,r){return(0,U.pipe)(n,o(r))},partition:function(n,r){return(0,U.pipe)(n,i(r))},partitionMap:function(n,r){return(0,U.pipe)(n,c(r))}}},n.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?g.left(n):g.right(r))})))}))}}},n.getTaskValidation=function(r){var t=k(w.ApplicativePar,r),u=T(r);return{URI:n.URI,_E:void 0,map:M,ap:t.ap,of:n.of,chain:n.flatMap,bimap:n.mapBoth,mapLeft:n.mapError,alt:u.alt,fromIO:n.fromIO,fromTask:n.fromTask,throwError:n.throwError}};var c=Fn(),v=a(),s=u(l()),p=Zn(),m=u(er()),b=u(cr()),h=vr(),R=d(),I=pr(),j=br(),U=e(),_=O(),g=u(f()),w=u(Ir());n.left=b.left(w.Pointed),n.right=b.right(w.Pointed),n.rightTask=b.rightF(w.Functor),n.leftTask=b.leftF(w.Functor),n.rightIO=(0,U.flow)(w.fromIO,n.rightTask),n.leftIO=(0,U.flow)(w.fromIO,n.leftTask),n.fromIO=n.rightIO,n.fromTask=n.rightTask,n.fromEither=w.of,n.fromIOEither=w.fromIO,n.fromTaskOption=function(n){return w.map(m.fromOption(n))},n.match=b.match(w.Functor),n.matchW=n.match,n.matchE=b.matchE(w.Monad),n.fold=n.matchE,n.matchEW=n.matchE,n.foldW=n.matchEW,n.getOrElse=b.getOrElse(w.Monad),n.getOrElseW=n.getOrElse,n.tryCatch=function(n,r){return function(){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(g.right)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,g.left(r(t))];case 3:return[2]}}))}))}},n.tryCatchK=function(r,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,n.tryCatch)((function(){return r.apply(void 0,u)}),t)}},n.toUnion=b.toUnion(w.Functor),n.fromNullable=b.fromNullable(w.Pointed),n.fromNullableK=b.fromNullableK(w.Pointed),n.chainNullableK=b.chainNullableK(w.Monad),n.orElse=b.orElse(w.Monad),n.orElseW=n.orElse,n.tapError=(0,U.dual)(2,b.tapError(w.Monad)),n.orElseFirstIOK=function(r){return(0,n.tapError)((0,n.fromIOK)(r))},n.orElseFirstTaskK=function(r){return(0,n.tapError)((0,n.fromTaskK)(r))},n.orLeft=b.orLeft(w.Monad),n.swap=b.swap(w.Functor),n.fromTaskOptionK=function(r){var t=(0,n.fromTaskOption)(r);return function(n){return(0,U.flow)(n,t)}},n.chainTaskOptionKW=function(r){return function(t){return function(u){return(0,n.flatMap)(u,(0,n.fromTaskOptionK)(r)(t))}}},n.chainTaskOptionK=n.chainTaskOptionKW,n.fromIOEitherK=function(r){return(0,U.flow)(r,n.fromIOEither)};var M=function(r,t){return(0,U.pipe)(r,(0,n.map)(t))},y=function(r,t){return(0,U.pipe)(r,(0,n.ap)(t))},E=function(r,t){return(0,n.flatMap)(r,(function(r){return(0,U.pipe)(t,(0,n.map)(r))}))},P=function(r,t){return(0,U.pipe)(r,(0,n.alt)(t))};function k(r,t){var u=(0,v.ap)(r,m.getApplicativeValidation(t));return{URI:n.URI,_E:void 0,map:M,ap:function(n,r){return(0,U.pipe)(n,u(r))},of:n.of}}function T(r){var t=b.altValidation(w.Monad,r);return{URI:n.URI,_E:void 0,map:M,alt:function(n,r){return(0,U.pipe)(n,t(r))}}}n.map=b.map(w.Functor),n.mapBoth=(0,U.dual)(3,b.mapBoth(w.Functor)),n.bimap=n.mapBoth,n.mapError=(0,U.dual)(2,b.mapError(w.Functor)),n.mapLeft=n.mapError,n.ap=b.ap(w.ApplyPar),n.apW=n.ap,n.flatMap=(0,U.dual)(2,b.flatMap(w.Monad)),n.flattenW=(0,n.flatMap)(U.identity),n.flatten=n.flattenW,n.alt=b.alt(w.Monad),n.altW=n.alt,n.of=n.right,n.throwError=n.left,n.URI="TaskEither",n.getCompactable=function(r){var t=m.getCompactable(r);return{URI:n.URI,_E:void 0,compact:(0,p.compact)(w.Functor,t),separate:(0,p.separate)(w.Functor,t,m.Functor)}},n.Functor={URI:n.URI,map:M},n.as=(0,U.dual)(2,(0,_.as)(n.Functor)),n.asUnit=(0,_.asUnit)(n.Functor),n.flap=(0,_.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.ApplyPar={URI:n.URI,map:M,ap:y},n.apFirst=(0,v.apFirst)(n.ApplyPar),n.apFirstW=n.apFirst,n.apSecond=(0,v.apSecond)(n.ApplyPar),n.apSecondW=n.apSecond,n.ApplicativePar={URI:n.URI,map:M,ap:y,of:n.of},n.ApplySeq={URI:n.URI,map:M,ap:E},n.ApplicativeSeq={URI:n.URI,map:M,ap:E,of:n.of},n.Chain={URI:n.URI,map:M,ap:y,chain:n.flatMap},n.Monad={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of},n.MonadIO={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of,fromIO:n.fromIO},n.MonadTask={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of,fromIO:n.fromIO,fromTask:n.fromTask},n.MonadThrow={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of,throwError:n.throwError},n.FromEither={URI:n.URI,fromEither:n.fromEither},n.FromIO={URI:n.URI,fromIO:n.fromIO},n.FromTask={URI:n.URI,fromIO:n.fromIO,fromTask:n.fromTask},n.tap=(0,U.dual)(2,s.tap(n.Chain)),n.tapEither=(0,U.dual)(2,(0,R.tapEither)(n.FromEither,n.Chain)),n.tapIO=(0,U.dual)(2,(0,I.tapIO)(n.FromIO,n.Chain)),n.tapTask=(0,U.dual)(2,(0,j.tapTask)(n.FromTask,n.Chain)),n.Bifunctor={URI:n.URI,bimap:n.mapBoth,mapLeft:n.mapError},n.Alt={URI:n.URI,map:M,alt:P},n.fromOption=(0,R.fromOption)(n.FromEither),n.fromOptionK=(0,R.fromOptionK)(n.FromEither),n.chainOptionK=(0,R.chainOptionK)(n.FromEither,n.Chain),n.chainOptionKW=n.chainOptionK;var q={fromEither:n.FromEither.fromEither};n.liftNullable=g.liftNullable(q),n.liftOption=g.liftOption(q);var L={flatMap:n.flatMap},S={fromIO:n.FromIO.fromIO},x={fromTask:n.fromTask};n.flatMapNullable=g.flatMapNullable(q,L),n.flatMapOption=g.flatMapOption(q,L),n.flatMapEither=g.flatMapEither(q,L),n.flatMapIO=g.flatMapIO(S,L),n.flatMapTask=g.flatMapTask(x,L),n.flatMapIOEither=(0,U.dual)(2,(function(r,t){return(0,n.flatMap)(r,(0,n.fromIOEitherK)(t))})),n.flatMapTaskOption=(0,U.dual)(3,(function(r,t,u){return(0,n.flatMap)(r,(function(r){return(0,n.fromTaskOption)((function(){return u(r)}))(t(r))}))})),n.chainEitherK=n.flatMapEither,n.chainEitherKW=n.flatMapEither,n.chainFirstEitherK=n.tapEither,n.chainFirstEitherKW=n.tapEither,n.fromPredicate=(0,R.fromPredicate)(n.FromEither),n.filterOrElse=(0,R.filterOrElse)(n.FromEither,n.Chain),n.filterOrElseW=n.filterOrElse,n.fromEitherK=(0,R.fromEitherK)(n.FromEither),n.fromIOK=(0,I.fromIOK)(n.FromIO),n.chainIOK=n.flatMapIO,n.chainFirstIOK=n.tapIO,n.fromTaskK=(0,j.fromTaskK)(n.FromTask),n.chainTaskK=n.flatMapTask,n.chainFirstTaskK=n.tapTask,n.chainIOEitherKW=n.flatMapIOEither,n.chainIOEitherK=n.flatMapIOEither,n.bracket=function(r,t,u){return(0,n.bracketW)(r,t,u)},n.bracketW=function(r,t,u){return(0,n.flatMap)(r,(function(r){return w.flatMap(t(r),(function(t){return(0,n.flatMap)(u(r,t),(function(){return w.of(t)}))}))}))},n.Do=(0,n.of)(g.emptyRecord),n.bindTo=(0,_.bindTo)(n.Functor),n.let=(0,_.let)(n.Functor),n.bind=s.bind(n.Chain),n.bindW=n.bind,n.apS=(0,v.apS)(n.ApplyPar),n.apSW=n.apS,n.ApT=(0,n.of)(g.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,U.flow)(w.traverseReadonlyNonEmptyArrayWithIndex(n),w.map(m.traverseReadonlyNonEmptyArrayWithIndex(U.SK)))},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return g.isNonEmpty(r)?t(r):n.ApT}},n.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return g.tail(r).reduce((function(r,t,u){return r.then((function(e){return g.isLeft(e)?r:n(u+1,t)().then((function(n){return g.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,g.head(r))().then(m.map(g.singleton)))}}},n.traverseReadonlyArrayWithIndexSeq=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndexSeq)(r);return function(r){return g.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(U.identity),n.traverseSeqArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq,n.traverseSeqArray=function(r){return(0,n.traverseReadonlyArrayWithIndexSeq)((function(n,t){return r(t)}))},n.sequenceSeqArray=(0,n.traverseSeqArray)(U.identity),n.chain=n.flatMap,n.chainW=n.flatMap,n.chainFirst=n.tap,n.chainFirstW=n.tap,n.orElseFirst=n.tapError,n.orElseFirstW=n.tapError,n.taskEither={URI:n.URI,bimap:n.mapBoth,mapLeft:n.mapError,map:M,of:n.of,ap:y,chain:n.flatMap,alt:P,fromIO:n.fromIO,fromTask:n.fromTask,throwError:n.throwError},n.taskEitherSeq={URI:n.URI,bimap:n.mapBoth,mapLeft:n.mapError,map:M,of:n.of,ap:E,chain:n.flatMap,alt:P,fromIO:n.fromIO,fromTask:n.fromTask,throwError:n.throwError},n.getApplySemigroup=(0,v.getApplySemigroup)(n.ApplySeq),n.getApplyMonoid=(0,c.getApplicativeMonoid)(n.ApplicativeSeq),n.getSemigroup=function(n){return(0,v.getApplySemigroup)(w.ApplySeq)(m.getSemigroup(n))}}(Jn)),Jn}var Ur=jr();const _r=n=>({kind:"server",inner:n}),gr={kind:"client",inner:"Token not exist or empty",code:"invalid-token"},wr={kind:"client",inner:"Api path empty or missing",code:"empty-api-path"},Mr=dn({concat:function(n,r){return n+r},empty:""}),yr=r=>F(r?hn(r):dn({concat:J}).concat(hn(n.apiPath),hn("https://api.vviinn.com")),cn((()=>wr))),Er=(Pr={method:{concat:(n,r)=>{return F(Mr.concat(hn(n),hn(r)),(t=()=>"GET",function(n){return bn(n)?t():n.value}));var t}},body:{concat:function(n,r){return r}},headers:{concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}}},{concat:function(n,r){var t={};for(var u in Pr)Q.call(Pr,u)&&(t[u]=Pr[u].concat(n[u],r[u]));return t}});var Pr;const kr=$({method:"POST"}),Tr=un((([n,r])=>(n.set("Content-Type","application/json"),{headers:n,body:r}))),qr=n=>n.status>=200&&n.status<300?Ur.right(n):Ur.left(n),Lr=Er,Sr=(n,r)=>([t,u])=>{const e=new URL(n,t),o=Lr.concat(u,r);return G.pipe(((n,r={})=>G.pipe(((n,r={method:"GET"})=>Ur.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Ur.chain(qr),Ur.chain((n=>function(n){return Ur.fromTask((()=>n.json()))}(n)))))(e.toString(),o),Ur.mapLeft(_r))};var xr=a(),Ar=er();const Nr=xr.sequenceT(Ar.Apply),zr={equals:(n,r)=>n.left===r.left&&n.top===r.top&&n.height===r.height&&n.width===r.width},Cr=(n,r)=>G.pipe(Nr(yr(r),kr),Tn,Gn(Sr("visual-search",n))),Gr=(n,r)=>G.pipe(Nr(yr(r),kr),Tn,Gn(Sr("text-search",n))),Jr=(n,r)=>G.pipe(Nr(yr(r),kr),Tn,Gn(Sr("product-listing-page",n))),Xr=(n,r)=>G.pipe(Nr(yr(r),kr),Tn,Gn(Sr("auto-suggest",n)));var Fr=Wn();const Hr=n=>({left:0,top:0,width:n.width,height:n.height}),Yr=n=>r=>({left:r.left*n.width,top:r.top*n.height,width:r.width*n.width,height:r.height*n.height}),Br=n=>r=>({left:r.left/n.width,top:r.top/n.height,width:r.width/n.width,height:r.height/n.height}),Dr=n=>({left:n.left+.5*n.width,top:n.top+.5*n.height}),Kr=(n,r)=>{const{clientX:t,clientY:u}=n;return t>=r.left&&t<=r.right&&u>=r.top&&u<=r.bottom};export{yr as $,Nr as A,gr as B,Ir as C,Y as D,Ar as E,B as F,kn as G,An as H,xn as I,Cn as J,Gr as K,Tn as L,Tr as M,Gn as N,Fr as O,Jr as P,Xr as Q,Sn as R,zn as S,qn as T,Mn as U,Cr as V,Ln as W,Q as X,X as Y,Sr as Z,G as _,Br as a,kr as a0,on as a1,Ur as a2,Hr as b,Dr as c,zr as d,fn as e,vn as f,k as g,e as h,Kr as i,O as j,a as k,l,an as m,g as n,_ as o,C as p,A as q,f as r,Yr as s,d as t,L as u,F as v,ln as w,Z as x,$ as y,sn as z}
|
|
8
|
+
import{d as n}from"./p-Dw7Hd5-K.js";var r,t={},u={};function e(){return r||(r=1,function(n){var r=u&&u.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};function t(n){return n}function e(n){return function(){return n}}function o(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return function(){return r(n.apply(this,arguments))};case 3:return function(){return t(r(n.apply(this,arguments)))};case 4:return function(){return u(t(r(n.apply(this,arguments))))};case 5:return function(){return e(u(t(r(n.apply(this,arguments)))))};case 6:return function(){return o(e(u(t(r(n.apply(this,arguments))))))};case 7:return function(){return i(o(e(u(t(r(n.apply(this,arguments)))))))};case 8:return function(){return c(i(o(e(u(t(r(n.apply(this,arguments))))))))};case 9:return function(){return f(c(i(o(e(u(t(r(n.apply(this,arguments)))))))))}}}function i(){throw new Error("Called `absurd` function which should be uncallable")}Object.defineProperty(n,"__esModule",{value:!0}),n.dual=n.getEndomorphismMonoid=n.SK=n.hole=n.constVoid=n.constUndefined=n.constNull=n.constFalse=n.constTrue=n.unsafeCoerce=n.apply=n.getRing=n.getSemiring=n.getMonoid=n.getSemigroup=n.getBooleanAlgebra=void 0,n.identity=t,n.constant=e,n.flip=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return r.length>1?n(r[1],r[0]):function(t){return n(t)(r[0])}}},n.flow=o,n.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n},n.increment=function(n){return n+1},n.decrement=function(n){return n-1},n.absurd=i,n.tupled=function(n){return function(r){return n.apply(void 0,r)}},n.untupled=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return n(r)}},n.pipe=function(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}},n.not=function(n){return function(r){return!n(r)}},n.getBooleanAlgebra=function(n){return function(){return{meet:function(r,t){return function(u){return n.meet(r(u),t(u))}},join:function(r,t){return function(u){return n.join(r(u),t(u))}},zero:function(){return n.zero},one:function(){return n.one},implies:function(r,t){return function(u){return n.implies(r(u),t(u))}},not:function(r){return function(t){return n.not(r(t))}}}}},n.getSemigroup=function(n){return function(){return{concat:function(r,t){return function(u){return n.concat(r(u),t(u))}}}}},n.getMonoid=function(r){var t=(0,n.getSemigroup)(r);return function(){return{concat:t().concat,empty:function(){return r.empty}}}},n.getSemiring=function(n){return{add:function(r,t){return function(u){return n.add(r(u),t(u))}},zero:function(){return n.zero},mul:function(r,t){return function(u){return n.mul(r(u),t(u))}},one:function(){return n.one}}},n.getRing=function(r){var t=(0,n.getSemiring)(r);return{add:t.add,mul:t.mul,one:t.one,zero:t.zero,sub:function(n,t){return function(u){return r.sub(n(u),t(u))}}}},n.apply=function(n){return function(r){return r(n)}},n.unsafeCoerce=t,n.constTrue=e(!0),n.constFalse=e(!1),n.constNull=e(null),n.constUndefined=e(void 0),n.constVoid=n.constUndefined,n.hole=i,n.SK=function(n,r){return r},n.getEndomorphismMonoid=function(){return{concat:function(n,r){return o(n,r)},empty:t}},n.dual=function(n,t){var u="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return u(arguments)?t.apply(this,n):function(u){return t.apply(void 0,r([u],n,!1))}}}}(u)),u}var o,i,c={};function f(){return o||(o=1,function(n){var r=c&&c.__spreadArray||function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))};Object.defineProperty(n,"__esModule",{value:!0}),n.flatMapReader=n.flatMapTask=n.flatMapIO=n.flatMapEither=n.flatMapOption=n.flatMapNullable=n.liftOption=n.liftNullable=n.fromReadonlyNonEmptyArray=n.has=n.emptyRecord=n.emptyReadonlyArray=n.tail=n.head=n.isNonEmpty=n.singleton=n.right=n.left=n.isRight=n.isLeft=n.some=n.none=n.isSome=n.isNone=void 0;var t=e();n.isNone=function(n){return"None"===n._tag},n.isSome=function(n){return"Some"===n._tag},n.none={_tag:"None"},n.some=function(n){return{_tag:"Some",value:n}},n.isLeft=function(n){return"Left"===n._tag},n.isRight=function(n){return"Right"===n._tag},n.left=function(n){return{_tag:"Left",left:n}},n.right=function(n){return{_tag:"Right",right:n}},n.singleton=function(n){return[n]},n.isNonEmpty=function(n){return n.length>0},n.head=function(n){return n[0]},n.tail=function(n){return n.slice(1)},n.emptyReadonlyArray=[],n.emptyRecord={},n.has=Object.prototype.hasOwnProperty,n.fromReadonlyNonEmptyArray=function(n){return r([n[0]],n.slice(1),!0)},n.liftNullable=function(r){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return r.fromEither(null==i?(0,n.left)(u.apply(void 0,e)):(0,n.right)(i))}}},n.liftOption=function(r){return function(t,u){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var i=t.apply(void 0,e);return r.fromEither((0,n.isNone)(i)?(0,n.left)(u.apply(void 0,e)):(0,n.right)(i.value))}}},n.flatMapNullable=function(r,u){return(0,t.dual)(3,(function(t,e,o){return u.flatMap(t,(0,n.liftNullable)(r)(e,o))}))},n.flatMapOption=function(r,u){return(0,t.dual)(3,(function(t,e,o){return u.flatMap(t,(0,n.liftOption)(r)(e,o))}))},n.flatMapEither=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromEither(u(r))}))}))},n.flatMapIO=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromIO(u(r))}))}))},n.flatMapTask=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))},n.flatMapReader=function(n,r){return(0,t.dual)(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromReader(u(r))}))}))}}(c)),c}function a(){if(i)return t;i=1;var n=t&&t.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=t&&t.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=t&&t.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(t,"__esModule",{value:!0}),t.ap=function(n,r){return function(t){return function(u){return n.ap(n.map(u,(function(n){return function(t){return r.ap(n,t)}})),t)}}},t.apFirst=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(n){return function(){return n}})),r)}}},t.apSecond=function(n){return function(r){return function(t){return n.ap(n.map(t,(function(){return function(n){return n}})),r)}}},t.apS=function(n){return function(r,t){return function(u){return n.ap(n.map(u,(function(n){return function(t){var u;return Object.assign({},n,((u={})[r]=t,u))}})),t)}}},t.getApplySemigroup=function(n){return function(r){return{concat:function(t,u){return n.ap(n.map(t,(function(n){return function(t){return r.concat(n,t)}})),u)}}}},t.sequenceT=function(n){return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var u=r.length,e=function(n){return c.has.call(v,n)||(v[n]=a(o.tuple,n-1,[])),v[n]}(u),i=n.map(r[0],e),f=1;f<u;f++)i=n.ap(i,r[f]);return i}},t.sequenceS=function(n){return function(r){for(var t=Object.keys(r),u=t.length,e=function(n){var r=n.length;switch(r){case 1:return function(r){var t;return(t={})[n[0]]=r,t};case 2:return function(r){return function(t){var u;return(u={})[n[0]]=r,u[n[1]]=t,u}};case 3:return function(r){return function(t){return function(u){var e;return(e={})[n[0]]=r,e[n[1]]=t,e[n[2]]=u,e}}};case 4:return function(r){return function(t){return function(u){return function(e){var o;return(o={})[n[0]]=r,o[n[1]]=t,o[n[2]]=u,o[n[3]]=e,o}}}};case 5:return function(r){return function(t){return function(u){return function(e){return function(o){var i;return(i={})[n[0]]=r,i[n[1]]=t,i[n[2]]=u,i[n[3]]=e,i[n[4]]=o,i}}}}};default:return a((function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];for(var e={},o=0;o<r;o++)e[n[o]]=t[o];return e}),r-1,[])}}(t),o=n.map(r[t[0]],e),i=1;i<u;i++)o=n.ap(o,r[t[i]]);return o}};var o=e(),c=u(f());function a(n,r,t){return function(u){for(var e=Array(t.length+1),o=0;o<t.length;o++)e[o]=t[o];return e[t.length]=u,0===r?n.apply(null,e):a(n,r-1,e)}}var v={1:function(n){return[n]},2:function(n){return function(r){return[n,r]}},3:function(n){return function(r){return function(t){return[n,r,t]}}},4:function(n){return function(r){return function(t){return function(u){return[n,r,t,u]}}}},5:function(n){return function(r){return function(t){return function(u){return function(e){return[n,r,t,u,e]}}}}}};return t}var v,s={};function l(){if(v)return s;function n(n){return function(r,t){return n.chain(r,(function(r){return n.map(t(r),(function(){return r}))}))}}return v=1,Object.defineProperty(s,"__esModule",{value:!0}),s.chainFirst=function(r){var t=n(r);return function(n){return function(r){return t(r,n)}}},s.tap=n,s.bind=function(n){return function(r,t){return function(u){return n.chain(u,(function(u){return n.map(t(u),(function(n){var t;return Object.assign({},u,((t={})[r]=n,t))}))}))}}},s}var p,m={};function d(){if(p)return m;p=1;var n=m&&m.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=m&&m.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(m,"__esModule",{value:!0}),m.fromOption=c,m.fromPredicate=function(n){return function(r,t){return function(u){return n.fromEither(r(u)?i.right(u):i.left(t(u)))}}},m.fromOptionK=a,m.chainOptionK=function(n,r){var t=a(n);return function(n){var u=t(n);return function(n){return function(t){return r.chain(t,u(n))}}}},m.fromEitherK=v,m.chainEitherK=function(n,r){var t=v(n);return function(n){return function(u){return r.chain(u,t(n))}}},m.chainFirstEitherK=function(n,r){var t=s(n,r);return function(n){return function(r){return t(r,n)}}},m.filterOrElse=function(n,r){return function(t,u){return function(e){return r.chain(e,(function(r){return n.fromEither(t(r)?i.right(r):i.left(u(r)))}))}}},m.tapEither=s;var u=l(),o=e(),i=t(f());function c(n){return function(r){return function(t){return n.fromEither(i.isNone(t)?i.left(r()):i.right(t.value))}}}function a(n){var r=c(n);return function(n){var t=r(n);return function(n){return(0,o.flow)(n,t)}}}function v(n){return function(r){return(0,o.flow)(r,n.fromEither)}}function s(n,r){var t=v(n),e=(0,u.tap)(r);return function(n,r){return e(n,t(r))}}return m}var b,h={};function O(){if(b)return h;b=1,Object.defineProperty(h,"__esModule",{value:!0}),h.map=r,h.flap=function(n){return function(r){return function(t){return n.map(t,(function(n){return n(r)}))}}},h.bindTo=function(n){return function(r){return function(t){return n.map(t,(function(n){var t;return(t={})[r]=n,t}))}}},h.let=function(n){return function(r,t){return function(u){return n.map(u,(function(n){var u;return Object.assign({},n,((u={})[r]=t(n),u))}))}}},h.getFunctorComposition=function(t,u){var e=r(t,u);return{map:function(r,t){return(0,n.pipe)(r,e(t))}}},h.as=t,h.asUnit=function(n){var r=t(n);return function(n){return r(n,void 0)}};var n=e();function r(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}function t(n){return function(r,t){return n.map(r,(function(){return t}))}}return h}var R,I,j={},U={};function _(){return R||(R=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.eqDate=n.eqNumber=n.eqString=n.eqBoolean=n.eq=n.strictEqual=n.getStructEq=n.getTupleEq=n.Contravariant=n.getMonoid=n.getSemigroup=n.eqStrict=n.URI=n.contramap=n.tuple=n.struct=n.fromEquals=void 0;var r=e();n.fromEquals=function(n){return{equals:function(r,t){return r===t||n(r,t)}}},n.struct=function(r){return(0,n.fromEquals)((function(n,t){for(var u in r)if(!r[u].equals(n[u],t[u]))return!1;return!0}))},n.tuple=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return(0,n.fromEquals)((function(n,t){return r.every((function(r,u){return r.equals(n[u],t[u])}))}))},n.contramap=function(r){return function(t){return(0,n.fromEquals)((function(n,u){return t.equals(r(n),r(u))}))}},n.URI="Eq",n.eqStrict={equals:function(n,r){return n===r}};var t={equals:function(){return!0}};n.getSemigroup=function(){return{concat:function(r,t){return(0,n.fromEquals)((function(n,u){return r.equals(n,u)&&t.equals(n,u)}))}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:t}},n.Contravariant={URI:n.URI,contramap:function(t,u){return(0,r.pipe)(t,(0,n.contramap)(u))}},n.getTupleEq=n.tuple,n.getStructEq=n.struct,n.strictEqual=n.eqStrict.equals,n.eq=n.Contravariant,n.eqBoolean=n.eqStrict,n.eqString=n.eqStrict,n.eqNumber=n.eqStrict,n.eqDate={equals:function(n,r){return n.valueOf()===r.valueOf()}}}(U)),U}function g(){return I||(I=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.ordDate=n.ordNumber=n.ordString=n.ordBoolean=n.ord=n.getDualOrd=n.getTupleOrd=n.between=n.clamp=n.max=n.min=n.geq=n.leq=n.gt=n.lt=n.equals=n.trivial=n.Contravariant=n.getMonoid=n.getSemigroup=n.URI=n.contramap=n.reverse=n.tuple=n.fromCompare=n.equalsDefault=void 0;var r=_(),t=e();n.equalsDefault=function(n){return function(r,t){return r===t||0===n(r,t)}},n.fromCompare=function(r){return{equals:(0,n.equalsDefault)(r),compare:function(n,t){return n===t?0:r(n,t)}}},n.tuple=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return(0,n.fromCompare)((function(n,t){for(var u=0;u<r.length-1;u++){var e=r[u].compare(n[u],t[u]);if(0!==e)return e}return r[u].compare(n[u],t[u])}))},n.reverse=function(r){return(0,n.fromCompare)((function(n,t){return r.compare(t,n)}))},n.contramap=function(r){return function(t){return(0,n.fromCompare)((function(n,u){return t.compare(r(n),r(u))}))}},n.URI="Ord",n.getSemigroup=function(){return{concat:function(r,t){return(0,n.fromCompare)((function(n,u){var e=r.compare(n,u);return 0!==e?e:t.compare(n,u)}))}}},n.getMonoid=function(){return{concat:(0,n.getSemigroup)().concat,empty:(0,n.fromCompare)((function(){return 0}))}},n.Contravariant={URI:n.URI,contramap:function(r,u){return(0,t.pipe)(r,(0,n.contramap)(u))}},n.trivial={equals:t.constTrue,compare:(0,t.constant)(0)},n.equals=function(n){return function(r){return function(t){return t===r||0===n.compare(t,r)}}},n.lt=function(n){return function(r,t){return-1===n.compare(r,t)}},n.gt=function(n){return function(r,t){return 1===n.compare(r,t)}},n.leq=function(n){return function(r,t){return 1!==n.compare(r,t)}},n.geq=function(n){return function(r,t){return-1!==n.compare(r,t)}},n.min=function(n){return function(r,t){return r===t||n.compare(r,t)<1?r:t}},n.max=function(n){return function(r,t){return r===t||n.compare(r,t)>-1?r:t}},n.clamp=function(r){var t=(0,n.min)(r),u=(0,n.max)(r);return function(n,r){return function(e){return u(t(e,r),n)}}},n.between=function(r){var t=(0,n.lt)(r),u=(0,n.gt)(r);return function(n,r){return function(e){return!t(e,n)&&!u(e,r)}}},n.getTupleOrd=n.tuple,n.getDualOrd=n.reverse,n.ord=n.Contravariant;var u={equals:r.eqStrict.equals,compare:function(n,r){return n<r?-1:n>r?1:0}};n.ordBoolean=u,n.ordString=u,n.ordNumber=u,n.ordDate=(0,t.pipe)(n.ordNumber,(0,n.contramap)((function(n){return n.valueOf()})))}(j)),j}var w,M,y={},E={};function P(){return w||(w=1,Object.defineProperty(E,"__esModule",{value:!0}),E.concatAll=E.endo=E.filterSecond=E.filterFirst=E.reverse=void 0,E.reverse=function(n){return{concat:function(r,t){return n.concat(t,r)}}},E.filterFirst=function(n){return function(r){return{concat:function(t,u){return n(t)?r.concat(t,u):u}}}},E.filterSecond=function(n){return function(r){return{concat:function(t,u){return n(u)?r.concat(t,u):t}}}},E.endo=function(n){return function(r){return{concat:function(t,u){return r.concat(n(t),n(u))}}}},E.concatAll=function(n){return function(r){return function(t){return t.reduce((function(r,t){return n.concat(r,t)}),r)}}}),E}function k(){return M||(M=1,function(n){var r=y&&y.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=y&&y.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=y&&y.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.semigroupProduct=n.semigroupSum=n.semigroupString=n.getFunctionSemigroup=n.semigroupAny=n.semigroupAll=n.getIntercalateSemigroup=n.getMeetSemigroup=n.getJoinSemigroup=n.getDualSemigroup=n.getStructSemigroup=n.getTupleSemigroup=n.getFirstSemigroup=n.getLastSemigroup=n.getObjectSemigroup=n.semigroupVoid=n.concatAll=n.last=n.first=n.intercalate=n.tuple=n.struct=n.reverse=n.constant=n.max=n.min=void 0,n.fold=function(r){var t=(0,n.concatAll)(r);return function(n,r){return void 0===r?t(n):t(n)(r)}};var o=e(),i=u(f()),c=u(P()),a=u(g());n.min=function(n){return{concat:a.min(n)}},n.max=function(n){return{concat:a.max(n)}},n.constant=function(n){return{concat:function(){return n}}},n.reverse=c.reverse,n.struct=function(n){return{concat:function(r,t){var u={};for(var e in n)i.has.call(n,e)&&(u[e]=n[e].concat(r[e],t[e]));return u}}},n.tuple=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return{concat:function(r,t){return n.map((function(n,u){return n.concat(r[u],t[u])}))}}},n.intercalate=function(n){return function(r){return{concat:function(t,u){return r.concat(t,r.concat(n,u))}}}},n.first=function(){return{concat:o.identity}},n.last=function(){return{concat:function(n,r){return r}}},n.concatAll=c.concatAll,n.semigroupVoid=(0,n.constant)(void 0),n.getObjectSemigroup=function(){return{concat:function(n,r){return Object.assign({},n,r)}}},n.getLastSemigroup=n.last,n.getFirstSemigroup=n.first,n.getTupleSemigroup=n.tuple,n.getStructSemigroup=n.struct,n.getDualSemigroup=n.reverse,n.getJoinSemigroup=n.max,n.getMeetSemigroup=n.min,n.getIntercalateSemigroup=n.intercalate,n.semigroupAll={concat:function(n,r){return n&&r}},n.semigroupAny={concat:function(n,r){return n||r}},n.getFunctionSemigroup=o.getSemigroup,n.semigroupString={concat:function(n,r){return n+r}},n.semigroupSum={concat:function(n,r){return n+r}},n.semigroupProduct={concat:function(n,r){return n*r}}}(y)),y}var T,q={};function L(){return T||(T=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.right=n.left=n.flap=n.Functor=n.Bifunctor=n.URI=n.bimap=n.mapLeft=n.map=n.separated=void 0;var r=e(),t=O();n.separated=function(n,r){return{left:n,right:r}},n.map=function(r){return function(t){return(0,n.separated)((0,n.left)(t),r((0,n.right)(t)))}},n.mapLeft=function(r){return function(t){return(0,n.separated)(r((0,n.left)(t)),(0,n.right)(t))}},n.bimap=function(r,t){return function(u){return(0,n.separated)(r((0,n.left)(u)),t((0,n.right)(u)))}},n.URI="Separated",n.Bifunctor={URI:n.URI,mapLeft:function(t,u){return(0,r.pipe)(t,(0,n.mapLeft)(u))},bimap:function(t,u,e){return(0,r.pipe)(t,(0,n.bimap)(u,e))}},n.Functor={URI:n.URI,map:function(t,u){return(0,r.pipe)(t,(0,n.map)(u))}},n.flap=(0,t.flap)(n.Functor),n.left=function(n){return n.left},n.right=function(n){return n.right}}(q)),q}var S,x={};function A(){if(S)return x;S=1;var n=x&&x.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=x&&x.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=x&&x.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(x,"__esModule",{value:!0}),x.wiltDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.separate)}}},x.witherDefault=function(n,r){return function(t){var u=n.traverse(t);return function(n,e){return t.map(u(n,e),r.compact)}}},x.filterE=function(n){return function(r){var t=n.wither(r);return function(n){return function(e){return t(e,(function(t){return r.map(n(t),(function(n){return n?u.some(t):u.none}))}))}}}};var u=t(f());return x}var N,z={};function G(){return N||(N=1,Object.defineProperty(z,"__esModule",{value:!0}),z.guard=function(n,r){return function(t){return t?r.of(void 0):n.zero()}}),z}var C=e();function J(n){return n}function H(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n}function D(n,r,t,u,e,o,i,c,f){switch(arguments.length){case 1:return n;case 2:return r(n);case 3:return t(r(n));case 4:return u(t(r(n)));case 5:return e(u(t(r(n))));case 6:return o(e(u(t(r(n)))));case 7:return i(o(e(u(t(r(n))))));case 8:return c(i(o(e(u(t(r(n)))))));case 9:return f(c(i(o(e(u(t(r(n))))))));default:for(var a=arguments[0],v=1;v<arguments.length;v++)a=arguments[v](a);return a}}var K=function(n,r){var t="number"==typeof n?function(r){return r.length>=n}:n;return function(){var n=Array.from(arguments);return t(arguments)?r.apply(this,n):function(t){return r.apply(void 0,function(n,r,t){if(t||2===arguments.length)for(var u,e=0,o=r.length;e<o;e++)!u&&e in r||(u||(u=Array.prototype.slice.call(r,0,e)),u[e]=r[e]);return n.concat(u||Array.prototype.slice.call(r))}([t],n,!1))}}},X=function(n){return"Some"===n._tag},Y={_tag:"None"},B=function(n){return{_tag:"Left",left:n}},F=function(n){return{_tag:"Right",right:n}},Q=Object.prototype.hasOwnProperty,V=function(n,r){return K(2,(function(t,u){return r.flatMap(t,(function(r){return n.fromTask(u(r))}))}))};function W(n){return function(r){return function(t){return n.fromEither("None"===t._tag?B(r()):F(t.value))}}}var Z=B,$=F,nn=K(2,(function(n,r){return fn(n)?n:r(n.right)})),rn=function(n,r){return D(n,un(r))},tn="Either",un=function(n){return function(r){return fn(r)?r:$(n(r.right))}},en={URI:tn,map:rn},on={URI:tn,map:rn,ap:function(n,r){return D(n,function(n){return function(r){return fn(r)?r:fn(n)?n:$(r.right(n.right))}}(r))}},cn=W({URI:tn,fromEither:J}),fn=function(n){return"Left"===n._tag},an=function(n,r){return function(t){return fn(t)?n(t.left):r(t.right)}},vn=an,sn=function(n){return function(r){return null==r?Z(n):$(r)}},ln=nn,pn=Y,mn=function(n){return{_tag:"Some",value:n}},dn=function(n){return{concat:function(r,t){return bn(r)?t:bn(t)?r:mn(n.concat(r.value,t.value))},empty:pn}},bn=function(n){return"None"===n._tag},hn=function(n){return null==n?pn:mn(n)};function On(n){return function(r){return n.map(r,$)}}function Rn(n){return function(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.map(n,t)}))}}}(n,en)}function In(n){return function(r){return function(t){return n.chain(t,an(r,n.of))}}}var jn,Un,_n,gn=function(n,r){return D(n,wn(r))},wn=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},Mn=function(n){return function(){return Promise.resolve(n)}},yn="Task",En={URI:yn,map:gn},Pn={URI:yn,map:gn,of:Mn,ap:function(n,r){return D(n,function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}}(r))},chain:K(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}}))},kn=On(En),Tn=Mn,qn=In(Pn),Ln=qn,Sn=function(n,r){return function(){return t=void 0,u=void 0,o=function(){var t;return function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(t=1,u&&(e=2&c[0]?u.return:c[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,c[1])).done)return e;switch(u=0,e&&(c=[2&c[0],e.value]),c[0]){case 0:case 1:e=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,u=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!e||c[1]>e[0]&&c[1]<e[3])){i.label=c[1];break}if(6===c[0]&&i.label<e[1]){i.label=e[1],e=c;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(c);break}e[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(n,i)}catch(n){c=[6,n],u=0}finally{t=e=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}}(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(F)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,B(r(t))];case 3:return[2]}}))},new((e=void 0)||(e=Promise))((function(n,r){function i(n){try{f(o.next(n))}catch(n){r(n)}}function c(n){try{f(o.throw(n))}catch(n){r(n)}}function f(r){var t;r.done?n(r.value):(t=r.value,t instanceof e?t:new e((function(n){n(t)}))).then(i,c)}f((o=o.apply(t,u||[])).next())}));var t,u,e,o}},xn=Rn(En),An=K(2,(jn=En,function(n,r){return jn.map(n,function(n){return function(r){return fn(r)?Z(n(r.left)):r}}(r))})),Nn=K(2,(Un=Pn,function(n,r){return Un.chain(n,(function(n){return fn(n)?Un.of(n):r(n.right)}))})),zn=V({fromTask:kn},{flatMap:Nn}),Gn=Nn,Cn=Nn,Jn={},Hn={};function Dn(){if(_n)return Hn;_n=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.getApplicativeMonoid=function(r){var t=(0,n.getApplySemigroup)(r);return function(n){return{concat:t(n).concat,empty:r.of(n.empty)}}},Hn.getApplicativeComposition=function(u,e){var o=(0,t.getFunctorComposition)(u,e).map,i=(0,n.ap)(u,e);return{map:o,of:function(n){return u.of(e.of(n))},ap:function(n,t){return(0,r.pipe)(n,i(t))}}};var n=a(),r=e(),t=O();return Hn}var Kn,Xn,Yn,Bn={},Fn={},Qn={};function Vn(){return Kn||(Kn=1,function(n){Object.defineProperty(n,"__esModule",{value:!0}),n.and=n.or=n.not=n.Contravariant=n.getMonoidAll=n.getSemigroupAll=n.getMonoidAny=n.getSemigroupAny=n.URI=n.contramap=void 0;var r=e();n.contramap=function(n){return function(t){return(0,r.flow)(n,t)}},n.URI="Predicate",n.getSemigroupAny=function(){return{concat:function(t,u){return(0,r.pipe)(t,(0,n.or)(u))}}},n.getMonoidAny=function(){return{concat:(0,n.getSemigroupAny)().concat,empty:r.constFalse}},n.getSemigroupAll=function(){return{concat:function(t,u){return(0,r.pipe)(t,(0,n.and)(u))}}},n.getMonoidAll=function(){return{concat:(0,n.getSemigroupAll)().concat,empty:r.constTrue}},n.Contravariant={URI:n.URI,contramap:function(t,u){return(0,r.pipe)(t,(0,n.contramap)(u))}},n.not=function(n){return function(r){return!n(r)}},n.or=function(n){return function(r){return function(t){return r(t)||n(t)}}},n.and=function(n){return function(r){return function(t){return r(t)&&n(t)}}}}(Qn)),Qn}function Wn(){return Xn||(Xn=1,function(n){var r=Fn&&Fn.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=Fn&&Fn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=Fn&&Fn.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.throwError=n.Witherable=n.wilt=n.wither=n.Traversable=n.sequence=n.traverse=n.Filterable=n.partitionMap=n.partition=n.filterMap=n.filter=n.Compactable=n.separate=n.compact=n.Extend=n.extend=n.Alternative=n.guard=n.Zero=n.zero=n.Alt=n.alt=n.altW=n.orElse=n.Foldable=n.reduceRight=n.foldMap=n.reduce=n.Monad=n.Chain=n.flatMap=n.Applicative=n.Apply=n.ap=n.Pointed=n.of=n.asUnit=n.as=n.Functor=n.map=n.getMonoid=n.getOrd=n.getEq=n.getShow=n.URI=n.getRight=n.getLeft=n.some=n.none=void 0,n.getLastMonoid=n.getFirstMonoid=n.getApplyMonoid=n.getApplySemigroup=n.option=n.mapNullable=n.chainFirst=n.chain=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apS=n.bind=n.let=n.bindTo=n.Do=n.exists=n.toUndefined=n.toNullable=n.chainNullableK=n.fromNullableK=n.tryCatchK=n.tryCatch=n.fromNullable=n.chainFirstEitherK=n.chainEitherK=n.fromEitherK=n.duplicate=n.tapEither=n.tap=n.flatten=n.apSecond=n.apFirst=n.flap=n.getOrElse=n.getOrElseW=n.fold=n.match=n.foldW=n.matchW=n.isNone=n.isSome=n.FromEither=n.fromEither=n.MonadThrow=void 0,n.fromPredicate=function(r){return function(t){return r(t)?(0,n.some)(t):n.none}},n.elem=function r(t){return function(u,e){if(void 0===e){var o=r(t);return function(n){return o(u,n)}}return!(0,n.isNone)(e)&&t.equals(u,e.value)}},n.getRefinement=function(r){return function(t){return(0,n.isSome)(r(t))}};var o=Dn(),i=a(),c=u(l()),v=d(),s=e(),p=O(),m=u(f()),b=Vn(),h=k(),R=L(),I=A(),j=G();n.none=m.none,n.some=m.some,n.getLeft=function(r){return"Right"===r._tag?n.none:(0,n.some)(r.left)},n.getRight=function(r){return"Left"===r._tag?n.none:(0,n.some)(r.right)};var U=function(r,t){return(0,s.pipe)(r,(0,n.map)(t))},_=function(r,t){return(0,s.pipe)(r,(0,n.ap)(t))},g=function(r,t,u){return(0,s.pipe)(r,(0,n.reduce)(t,u))},w=function(r){var t=(0,n.foldMap)(r);return function(n,r){return(0,s.pipe)(n,t(r))}},M=function(r,t,u){return(0,s.pipe)(r,(0,n.reduceRight)(t,u))},y=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,s.pipe)(n,t(r))}},E=function(r,t){return(0,s.pipe)(r,(0,n.alt)(t))},P=function(r,t){return(0,s.pipe)(r,(0,n.filter)(t))},T=function(r,t){return(0,s.pipe)(r,(0,n.filterMap)(t))},q=function(r,t){return(0,s.pipe)(r,(0,n.extend)(t))},S=function(r,t){return(0,s.pipe)(r,(0,n.partition)(t))},x=function(r,t){return(0,s.pipe)(r,(0,n.partitionMap)(t))};n.URI="Option",n.getShow=function(r){return{show:function(t){return(0,n.isNone)(t)?"none":"some(".concat(r.show(t.value),")")}}},n.getEq=function(r){return{equals:function(t,u){return t===u||((0,n.isNone)(t)?(0,n.isNone)(u):!(0,n.isNone)(u)&&r.equals(t.value,u.value))}}},n.getOrd=function(r){return{equals:(0,n.getEq)(r).equals,compare:function(t,u){return t===u?0:(0,n.isSome)(t)?(0,n.isSome)(u)?r.compare(t.value,u.value):1:-1}}},n.getMonoid=function(r){return{concat:function(t,u){return(0,n.isNone)(t)?u:(0,n.isNone)(u)?t:(0,n.some)(r.concat(t.value,u.value))},empty:n.none}},n.map=function(r){return function(t){return(0,n.isNone)(t)?n.none:(0,n.some)(r(t.value))}},n.Functor={URI:n.URI,map:U},n.as=(0,s.dual)(2,(0,p.as)(n.Functor)),n.asUnit=(0,p.asUnit)(n.Functor),n.of=n.some,n.Pointed={URI:n.URI,of:n.of},n.ap=function(r){return function(t){return(0,n.isNone)(t)||(0,n.isNone)(r)?n.none:(0,n.some)(t.value(r.value))}},n.Apply={URI:n.URI,map:U,ap:_},n.Applicative={URI:n.URI,map:U,ap:_,of:n.of},n.flatMap=(0,s.dual)(2,(function(r,t){return(0,n.isNone)(r)?n.none:t(r.value)})),n.Chain={URI:n.URI,map:U,ap:_,chain:n.flatMap},n.Monad={URI:n.URI,map:U,ap:_,of:n.of,chain:n.flatMap},n.reduce=function(r,t){return function(u){return(0,n.isNone)(u)?r:t(r,u.value)}},n.foldMap=function(r){return function(t){return function(u){return(0,n.isNone)(u)?r.empty:t(u.value)}}},n.reduceRight=function(r,t){return function(u){return(0,n.isNone)(u)?r:t(u.value,r)}},n.Foldable={URI:n.URI,reduce:g,foldMap:w,reduceRight:M},n.orElse=(0,s.dual)(2,(function(r,t){return(0,n.isNone)(r)?t():r})),n.altW=n.orElse,n.alt=n.orElse,n.Alt={URI:n.URI,map:U,alt:E},n.zero=function(){return n.none},n.Zero={URI:n.URI,zero:n.zero},n.guard=(0,j.guard)(n.Zero,n.Pointed),n.Alternative={URI:n.URI,map:U,ap:_,of:n.of,alt:E,zero:n.zero},n.extend=function(r){return function(t){return(0,n.isNone)(t)?n.none:(0,n.some)(r(t))}},n.Extend={URI:n.URI,map:U,extend:q},n.compact=(0,n.flatMap)(s.identity);var N=(0,R.separated)(n.none,n.none);n.separate=function(r){return(0,n.isNone)(r)?N:(0,R.separated)((0,n.getLeft)(r.value),(0,n.getRight)(r.value))},n.Compactable={URI:n.URI,compact:n.compact,separate:n.separate},n.filter=function(r){return function(t){return(0,n.isNone)(t)?n.none:r(t.value)?t:n.none}},n.filterMap=function(r){return function(t){return(0,n.isNone)(t)?n.none:r(t.value)}},n.partition=function(n){return function(r){return(0,R.separated)(P(r,(0,b.not)(n)),P(r,n))}},n.partitionMap=function(r){return(0,s.flow)((0,n.map)(r),n.separate)},n.Filterable={URI:n.URI,map:U,compact:n.compact,separate:n.separate,filter:P,filterMap:T,partition:S,partitionMap:x},n.traverse=function(r){return function(t){return function(u){return(0,n.isNone)(u)?r.of(n.none):r.map(t(u.value),n.some)}}},n.sequence=function(r){return function(t){return(0,n.isNone)(t)?r.of(n.none):r.map(t.value,n.some)}},n.Traversable={URI:n.URI,map:U,reduce:g,foldMap:w,reduceRight:M,traverse:y,sequence:n.sequence};var z=(0,I.witherDefault)(n.Traversable,n.Compactable),C=(0,I.wiltDefault)(n.Traversable,n.Compactable);n.wither=function(n){var r=z(n);return function(n){return function(t){return r(t,n)}}},n.wilt=function(n){var r=C(n);return function(n){return function(t){return r(t,n)}}},n.Witherable={URI:n.URI,map:U,reduce:g,foldMap:w,reduceRight:M,traverse:y,sequence:n.sequence,compact:n.compact,separate:n.separate,filter:P,filterMap:T,partition:S,partitionMap:x,wither:z,wilt:C},n.throwError=function(){return n.none},n.MonadThrow={URI:n.URI,map:U,ap:_,of:n.of,chain:n.flatMap,throwError:n.throwError},n.fromEither=n.getRight,n.FromEither={URI:n.URI,fromEither:n.fromEither},n.isSome=m.isSome,n.isNone=function(n){return"None"===n._tag},n.matchW=function(r,t){return function(u){return(0,n.isNone)(u)?r():t(u.value)}},n.foldW=n.matchW,n.match=n.matchW,n.fold=n.match,n.getOrElseW=function(r){return function(t){return(0,n.isNone)(t)?r():t.value}},n.getOrElse=n.getOrElseW,n.flap=(0,p.flap)(n.Functor),n.apFirst=(0,i.apFirst)(n.Apply),n.apSecond=(0,i.apSecond)(n.Apply),n.flatten=n.compact,n.tap=(0,s.dual)(2,c.tap(n.Chain)),n.tapEither=(0,s.dual)(2,(0,v.tapEither)(n.FromEither,n.Chain)),n.duplicate=(0,n.extend)(s.identity),n.fromEitherK=(0,v.fromEitherK)(n.FromEither),n.chainEitherK=(0,v.chainEitherK)(n.FromEither,n.Chain),n.chainFirstEitherK=n.tapEither,n.fromNullable=function(r){return null==r?n.none:(0,n.some)(r)},n.tryCatch=function(r){try{return(0,n.some)(r())}catch(r){return n.none}},n.tryCatchK=function(r){return function(){for(var t=[],u=0;u<arguments.length;u++)t[u]=arguments[u];return(0,n.tryCatch)((function(){return r.apply(void 0,t)}))}},n.fromNullableK=function(r){return(0,s.flow)(r,n.fromNullable)},n.chainNullableK=function(r){return function(t){return(0,n.isNone)(t)?n.none:(0,n.fromNullable)(r(t.value))}},n.toNullable=(0,n.match)(s.constNull,s.identity),n.toUndefined=(0,n.match)(s.constUndefined,s.identity),n.exists=function(r){return function(t){return!(0,n.isNone)(t)&&r(t.value)}},n.Do=(0,n.of)(m.emptyRecord),n.bindTo=(0,p.bindTo)(n.Functor),n.let=(0,p.let)(n.Functor),n.bind=c.bind(n.Chain),n.apS=(0,i.apS)(n.Apply),n.ApT=(0,n.of)(m.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(r){return function(t){var u=r(0,m.head(t));if((0,n.isNone)(u))return n.none;for(var e=[u.value],o=1;o<t.length;o++){var i=r(o,t[o]);if((0,n.isNone)(i))return n.none;e.push(i.value)}return(0,n.some)(e)}},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return m.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(s.identity),n.chain=n.flatMap,n.chainFirst=n.tap,n.mapNullable=n.chainNullableK,n.option={URI:n.URI,map:U,of:n.of,ap:_,chain:n.flatMap,reduce:g,foldMap:w,reduceRight:M,traverse:y,sequence:n.sequence,zero:n.zero,alt:E,extend:q,compact:n.compact,separate:n.separate,filter:P,filterMap:T,partition:S,partitionMap:x,wither:z,wilt:C,throwError:n.throwError},n.getApplySemigroup=(0,i.getApplySemigroup)(n.Apply),n.getApplyMonoid=(0,o.getApplicativeMonoid)(n.Applicative),n.getFirstMonoid=function(){return(0,n.getMonoid)((0,h.first)())},n.getLastMonoid=function(){return(0,n.getMonoid)((0,h.last)())}}(Fn)),Fn}function Zn(){if(Yn)return Bn;Yn=1;var n=Bn&&Bn.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=Bn&&Bn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=Bn&&Bn.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.compact=f,Bn.separate=a,Bn.getCompactableComposition=function(n,r){return{map:(0,o.getFunctorComposition)(n,r).map,compact:f(n,r),separate:a(n,r,r)}};var u=e(),o=O(),i=Wn(),c=t(L());function f(n,r){return function(t){return n.map(t,r.compact)}}function a(n,r,t){var e=f(n,r),a=(0,o.map)(n,t);return function(n){return c.separated(e((0,u.pipe)(n,a(i.getLeft))),e((0,u.pipe)(n,a(i.getRight))))}}return Bn}var $n,nr,rr={},tr={};function ur(){return $n||($n=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.tailRec=void 0,tr.tailRec=function(n,r){for(var t=r(n);"Left"===t._tag;)t=r(t.left);return t.right}),tr}function er(){return nr||(nr=1,function(n){var r=rr&&rr.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=rr&&rr.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=rr&&rr.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.match=n.foldW=n.matchW=n.isRight=n.isLeft=n.fromOption=n.fromPredicate=n.FromEither=n.MonadThrow=n.throwError=n.ChainRec=n.Extend=n.extend=n.Alt=n.alt=n.altW=n.Bifunctor=n.mapLeft=n.bimap=n.Traversable=n.sequence=n.traverse=n.Foldable=n.reduceRight=n.foldMap=n.reduce=n.Monad=n.Chain=n.Applicative=n.Apply=n.ap=n.apW=n.Pointed=n.of=n.asUnit=n.as=n.Functor=n.map=n.getAltValidation=n.getApplicativeValidation=n.getWitherable=n.getFilterable=n.getCompactable=n.getSemigroup=n.getEq=n.getShow=n.URI=n.flatMap=n.right=n.left=void 0,n.either=n.stringifyJSON=n.chainFirstW=n.chainFirst=n.chain=n.chainW=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apSW=n.apS=n.bindW=n.bind=n.let=n.bindTo=n.Do=n.exists=n.toUnion=n.chainNullableK=n.fromNullableK=n.tryCatchK=n.tryCatch=n.fromNullable=n.orElse=n.orElseW=n.swap=n.filterOrElseW=n.filterOrElse=n.flatMapOption=n.flatMapNullable=n.liftOption=n.liftNullable=n.chainOptionKW=n.chainOptionK=n.fromOptionK=n.duplicate=n.flatten=n.flattenW=n.tap=n.apSecondW=n.apSecond=n.apFirstW=n.apFirst=n.flap=n.getOrElse=n.getOrElseW=n.fold=void 0,n.getValidationMonoid=n.getValidationSemigroup=n.getApplyMonoid=n.getApplySemigroup=void 0,n.toError=function(n){try{return n instanceof Error?n:new Error(String(n))}catch(n){return new Error}},n.elem=function r(t){return function(u,e){if(void 0===e){var o=r(t);return function(n){return o(u,n)}}return!(0,n.isLeft)(e)&&t.equals(u,e.right)}},n.parseJSON=function(r,t){return(0,n.tryCatch)((function(){return JSON.parse(r)}),t)},n.getValidation=function(r){var t=(0,n.getApplicativeValidation)(r).ap,u=(0,n.getAltValidation)(r).alt;return{URI:n.URI,_E:void 0,map:I,of:n.of,chain:n.flatMap,bimap:M,mapLeft:y,reduce:U,foldMap:_,reduceRight:g,extend:P,traverse:w,sequence:n.sequence,chainRec:k,throwError:n.throwError,ap:t,alt:u}};var o=Dn(),i=a(),c=u(l()),v=ur(),s=d(),p=e(),m=O(),b=u(f()),h=L(),R=A();n.left=b.left,n.right=b.right,n.flatMap=(0,p.dual)(2,(function(r,t){return(0,n.isLeft)(r)?r:t(r.right)}));var I=function(r,t){return(0,p.pipe)(r,(0,n.map)(t))},j=function(r,t){return(0,p.pipe)(r,(0,n.ap)(t))},U=function(r,t,u){return(0,p.pipe)(r,(0,n.reduce)(t,u))},_=function(r){return function(t,u){var e=(0,n.foldMap)(r);return(0,p.pipe)(t,e(u))}},g=function(r,t,u){return(0,p.pipe)(r,(0,n.reduceRight)(t,u))},w=function(r){var t=(0,n.traverse)(r);return function(n,r){return(0,p.pipe)(n,t(r))}},M=function(r,t,u){return(0,p.pipe)(r,(0,n.bimap)(t,u))},y=function(r,t){return(0,p.pipe)(r,(0,n.mapLeft)(t))},E=function(r,t){return(0,p.pipe)(r,(0,n.alt)(t))},P=function(r,t){return(0,p.pipe)(r,(0,n.extend)(t))},k=function(r,t){return(0,v.tailRec)(t(r),(function(r){return(0,n.isLeft)(r)?(0,n.right)((0,n.left)(r.left)):(0,n.isLeft)(r.right)?(0,n.left)(t(r.right.left)):(0,n.right)((0,n.right)(r.right.right))}))};n.URI="Either",n.getShow=function(r,t){return{show:function(u){return(0,n.isLeft)(u)?"left(".concat(r.show(u.left),")"):"right(".concat(t.show(u.right),")")}}},n.getEq=function(r,t){return{equals:function(u,e){return u===e||((0,n.isLeft)(u)?(0,n.isLeft)(e)&&r.equals(u.left,e.left):(0,n.isRight)(e)&&t.equals(u.right,e.right))}}},n.getSemigroup=function(r){return{concat:function(t,u){return(0,n.isLeft)(u)?t:(0,n.isLeft)(t)?u:(0,n.right)(r.concat(t.right,u.right))}}},n.getCompactable=function(r){var t=(0,n.left)(r.empty);return{URI:n.URI,_E:void 0,compact:function(r){return(0,n.isLeft)(r)?r:"None"===r.right._tag?t:(0,n.right)(r.right.value)},separate:function(r){return(0,n.isLeft)(r)?(0,h.separated)(r,r):(0,n.isLeft)(r.right)?(0,h.separated)((0,n.right)(r.right.left),t):(0,h.separated)(t,(0,n.right)(r.right.right))}}},n.getFilterable=function(r){var t=(0,n.left)(r.empty),u=(0,n.getCompactable)(r);return{URI:n.URI,_E:void 0,map:I,compact:u.compact,separate:u.separate,filter:function(r,u){return(0,n.isLeft)(r)||u(r.right)?r:t},filterMap:function(r,u){if((0,n.isLeft)(r))return r;var e=u(r.right);return"None"===e._tag?t:(0,n.right)(e.value)},partition:function(r,u){return(0,n.isLeft)(r)?(0,h.separated)(r,r):u(r.right)?(0,h.separated)(t,(0,n.right)(r.right)):(0,h.separated)((0,n.right)(r.right),t)},partitionMap:function(r,u){if((0,n.isLeft)(r))return(0,h.separated)(r,r);var e=u(r.right);return(0,n.isLeft)(e)?(0,h.separated)((0,n.right)(e.left),t):(0,h.separated)(t,(0,n.right)(e.right))}}},n.getWitherable=function(r){var t=(0,n.getFilterable)(r),u=(0,n.getCompactable)(r);return{URI:n.URI,_E:void 0,map:I,compact:t.compact,separate:t.separate,filter:t.filter,filterMap:t.filterMap,partition:t.partition,partitionMap:t.partitionMap,traverse:w,sequence:n.sequence,reduce:U,foldMap:_,reduceRight:g,wither:(0,R.witherDefault)(n.Traversable,u),wilt:(0,R.wiltDefault)(n.Traversable,u)}},n.getApplicativeValidation=function(r){return{URI:n.URI,_E:void 0,map:I,ap:function(t,u){return(0,n.isLeft)(t)?(0,n.isLeft)(u)?(0,n.left)(r.concat(t.left,u.left)):t:(0,n.isLeft)(u)?u:(0,n.right)(t.right(u.right))},of:n.of}},n.getAltValidation=function(r){return{URI:n.URI,_E:void 0,map:I,alt:function(t,u){if((0,n.isRight)(t))return t;var e=u();return(0,n.isLeft)(e)?(0,n.left)(r.concat(t.left,e.left)):e}}},n.map=function(r){return function(t){return(0,n.isLeft)(t)?t:(0,n.right)(r(t.right))}},n.Functor={URI:n.URI,map:I},n.as=(0,p.dual)(2,(0,m.as)(n.Functor)),n.asUnit=(0,m.asUnit)(n.Functor),n.of=n.right,n.Pointed={URI:n.URI,of:n.of},n.apW=function(r){return function(t){return(0,n.isLeft)(t)?t:(0,n.isLeft)(r)?r:(0,n.right)(t.right(r.right))}},n.ap=n.apW,n.Apply={URI:n.URI,map:I,ap:j},n.Applicative={URI:n.URI,map:I,ap:j,of:n.of},n.Chain={URI:n.URI,map:I,ap:j,chain:n.flatMap},n.Monad={URI:n.URI,map:I,ap:j,of:n.of,chain:n.flatMap},n.reduce=function(r,t){return function(u){return(0,n.isLeft)(u)?r:t(r,u.right)}},n.foldMap=function(r){return function(t){return function(u){return(0,n.isLeft)(u)?r.empty:t(u.right)}}},n.reduceRight=function(r,t){return function(u){return(0,n.isLeft)(u)?r:t(u.right,r)}},n.Foldable={URI:n.URI,reduce:U,foldMap:_,reduceRight:g},n.traverse=function(r){return function(t){return function(u){return(0,n.isLeft)(u)?r.of((0,n.left)(u.left)):r.map(t(u.right),n.right)}}},n.sequence=function(r){return function(t){return(0,n.isLeft)(t)?r.of((0,n.left)(t.left)):r.map(t.right,n.right)}},n.Traversable={URI:n.URI,map:I,reduce:U,foldMap:_,reduceRight:g,traverse:w,sequence:n.sequence},n.bimap=function(r,t){return function(u){return(0,n.isLeft)(u)?(0,n.left)(r(u.left)):(0,n.right)(t(u.right))}},n.mapLeft=function(r){return function(t){return(0,n.isLeft)(t)?(0,n.left)(r(t.left)):t}},n.Bifunctor={URI:n.URI,bimap:M,mapLeft:y},n.altW=function(r){return function(t){return(0,n.isLeft)(t)?r():t}},n.alt=n.altW,n.Alt={URI:n.URI,map:I,alt:E},n.extend=function(r){return function(t){return(0,n.isLeft)(t)?t:(0,n.right)(r(t))}},n.Extend={URI:n.URI,map:I,extend:P},n.ChainRec={URI:n.URI,map:I,ap:j,chain:n.flatMap,chainRec:k},n.throwError=n.left,n.MonadThrow={URI:n.URI,map:I,ap:j,of:n.of,chain:n.flatMap,throwError:n.throwError},n.FromEither={URI:n.URI,fromEither:p.identity},n.fromPredicate=(0,s.fromPredicate)(n.FromEither),n.fromOption=(0,s.fromOption)(n.FromEither),n.isLeft=b.isLeft,n.isRight=b.isRight,n.matchW=function(r,t){return function(u){return(0,n.isLeft)(u)?r(u.left):t(u.right)}},n.foldW=n.matchW,n.match=n.matchW,n.fold=n.match,n.getOrElseW=function(r){return function(t){return(0,n.isLeft)(t)?r(t.left):t.right}},n.getOrElse=n.getOrElseW,n.flap=(0,m.flap)(n.Functor),n.apFirst=(0,i.apFirst)(n.Apply),n.apFirstW=n.apFirst,n.apSecond=(0,i.apSecond)(n.Apply),n.apSecondW=n.apSecond,n.tap=(0,p.dual)(2,c.tap(n.Chain)),n.flattenW=(0,n.flatMap)(p.identity),n.flatten=n.flattenW,n.duplicate=(0,n.extend)(p.identity),n.fromOptionK=(0,s.fromOptionK)(n.FromEither),n.chainOptionK=(0,s.chainOptionK)(n.FromEither,n.Chain),n.chainOptionKW=n.chainOptionK;var T={fromEither:n.FromEither.fromEither};n.liftNullable=b.liftNullable(T),n.liftOption=b.liftOption(T);var q={flatMap:n.flatMap};n.flatMapNullable=b.flatMapNullable(T,q),n.flatMapOption=b.flatMapOption(T,q),n.filterOrElse=(0,s.filterOrElse)(n.FromEither,n.Chain),n.filterOrElseW=n.filterOrElse,n.swap=function(r){return(0,n.isLeft)(r)?(0,n.right)(r.left):(0,n.left)(r.right)},n.orElseW=function(r){return function(t){return(0,n.isLeft)(t)?r(t.left):t}},n.orElse=n.orElseW,n.fromNullable=function(r){return function(t){return null==t?(0,n.left)(r):(0,n.right)(t)}},n.tryCatch=function(r,t){try{return(0,n.right)(r())}catch(r){return(0,n.left)(t(r))}},n.tryCatchK=function(r,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,n.tryCatch)((function(){return r.apply(void 0,u)}),t)}},n.fromNullableK=function(r){var t=(0,n.fromNullable)(r);return function(n){return(0,p.flow)(n,t)}},n.chainNullableK=function(r){var t=(0,n.fromNullableK)(r);return function(r){return(0,n.flatMap)(t(r))}},n.toUnion=(0,n.foldW)(p.identity,p.identity),n.exists=function(r){return function(t){return!(0,n.isLeft)(t)&&r(t.right)}},n.Do=(0,n.of)(b.emptyRecord),n.bindTo=(0,m.bindTo)(n.Functor),n.let=(0,m.let)(n.Functor),n.bind=c.bind(n.Chain),n.bindW=n.bind,n.apS=(0,i.apS)(n.Apply),n.apSW=n.apS,n.ApT=(0,n.of)(b.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(r){return function(t){var u=r(0,b.head(t));if((0,n.isLeft)(u))return u;for(var e=[u.right],o=1;o<t.length;o++){var i=r(o,t[o]);if((0,n.isLeft)(i))return i;e.push(i.right)}return(0,n.right)(e)}},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return b.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(p.identity),n.chainW=n.flatMap,n.chain=n.flatMap,n.chainFirst=n.tap,n.chainFirstW=n.tap,n.stringifyJSON=function(r,t){return(0,n.tryCatch)((function(){var n=JSON.stringify(r);if("string"!=typeof n)throw new Error("Converting unsupported structure to JSON");return n}),t)},n.either={URI:n.URI,map:I,of:n.of,ap:j,chain:n.flatMap,reduce:U,foldMap:_,reduceRight:g,traverse:w,sequence:n.sequence,bimap:M,mapLeft:y,alt:E,extend:P,chainRec:k,throwError:n.throwError},n.getApplySemigroup=(0,i.getApplySemigroup)(n.Apply),n.getApplyMonoid=(0,o.getApplicativeMonoid)(n.Applicative),n.getValidationSemigroup=function(r,t){return(0,i.getApplySemigroup)((0,n.getApplicativeValidation)(r))(t)},n.getValidationMonoid=function(r,t){return(0,o.getApplicativeMonoid)((0,n.getApplicativeValidation)(r))(t)}}(rr)),rr}var or,ir={};function cr(){if(or)return ir;or=1;var n=ir&&ir.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),r=ir&&ir.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),t=ir&&ir.__importStar||function(t){if(t&&t.__esModule)return t;var u={};if(null!=t)for(var e in t)"default"!==e&&Object.prototype.hasOwnProperty.call(t,e)&&n(u,t,e);return r(u,t),u};Object.defineProperty(ir,"__esModule",{value:!0}),ir.right=f,ir.left=v,ir.rightF=s,ir.leftF=l,ir.fromNullable=p,ir.fromNullableK=m,ir.chainNullableK=function(n){var r=h(n),t=m(n);return function(n){var u=t(n);return function(n){return r(u(n))}}},ir.map=d,ir.ap=b,ir.chain=h,ir.flatMap=R,ir.alt=I,ir.bimap=j,ir.mapBoth=U,ir.mapLeft=_,ir.mapError=g,ir.altValidation=function(n,r){return function(t){return function(u){return n.chain(u,o.match((function(u){return n.map(t(),o.mapLeft((function(n){return r.concat(u,n)})))}),f(n)))}}},ir.match=function(n){return function(r,t){return function(u){return n.map(u,o.match(r,t))}}},ir.matchE=w,ir.getOrElse=M,ir.orElse=y,ir.orElseFirst=function(n){var r=E(n);return function(n){return function(t){return r(t,n)}}},ir.tapError=E,ir.orLeft=function(n){return function(r){return function(t){return n.chain(t,o.match((function(t){return n.map(r(t),o.left)}),(function(r){return n.of(o.right(r))})))}}},ir.swap=P,ir.toUnion=function(n){return function(r){return n.map(r,o.toUnion)}},ir.getEitherM=function(n){var r=b(n),t=d(n),u=h(n),e=I(n),o=j(n),c=_(n),a=w(n),p=M(n),m=y(n);return{map:function(n,r){return(0,i.pipe)(n,t(r))},ap:function(n,t){return(0,i.pipe)(n,r(t))},of:f(n),chain:function(n,r){return(0,i.pipe)(n,u(r))},alt:function(n,r){return(0,i.pipe)(n,e(r))},bimap:function(n,r,t){return(0,i.pipe)(n,o(r,t))},mapLeft:function(n,r){return(0,i.pipe)(n,c(r))},fold:function(n,r,t){return(0,i.pipe)(n,a(r,t))},getOrElse:function(n,r){return(0,i.pipe)(n,p(r))},orElse:function(n,r){return(0,i.pipe)(n,m(r))},swap:P(n),rightM:s(n),leftM:l(n),left:v(n)}};var u=a(),o=t(er()),i=e(),c=O();function f(n){return(0,i.flow)(o.right,n.of)}function v(n){return(0,i.flow)(o.left,n.of)}function s(n){return function(r){return n.map(r,o.right)}}function l(n){return function(r){return n.map(r,o.left)}}function p(n){return function(r){return(0,i.flow)(o.fromNullable(r),n.of)}}function m(n){var r=p(n);return function(n){var t=r(n);return function(n){return(0,i.flow)(n,t)}}}function d(n){return(0,c.map)(n,o.Functor)}function b(n){return(0,u.ap)(n,o.Apply)}function h(n){var r=R(n);return function(n){return function(t){return r(t,n)}}}function R(n){return function(r,t){return n.chain(r,(function(r){return o.isLeft(r)?n.of(r):t(r.right)}))}}function I(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r():n.of(t)}))}}}function j(n){var r=U(n);return function(n,t){return function(u){return r(u,n,t)}}}function U(n){return function(r,t,u){return n.map(r,o.bimap(t,u))}}function _(n){var r=g(n);return function(n){return function(t){return r(t,n)}}}function g(n){return function(r,t){return n.map(r,o.mapLeft(t))}}function w(n){return function(r,t){return function(u){return n.chain(u,o.match(r,t))}}}function M(n){return function(r){return function(t){return n.chain(t,o.match(r,n.of))}}}function y(n){return function(r){return function(t){return n.chain(t,(function(t){return o.isLeft(t)?r(t.left):n.of(t)}))}}}function E(n){var r=y(n);return function(t,u){return(0,i.pipe)(t,r((function(r){return n.map(u(r),(function(n){return o.isLeft(n)?n:o.left(r)}))})))}}function P(n){return function(r){return n.map(r,o.swap)}}return ir}var fr,ar={};function vr(){if(fr)return ar;fr=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.filter=c,ar.filterMap=f,ar.partition=a,ar.partitionMap=v,ar.getFilterableComposition=function(u,e){var o=(0,t.getFunctorComposition)(u,e).map,i=(0,n.compact)(u,e),s=(0,n.separate)(u,e,e),l=c(u,e),p=f(u,e),m=a(u,e),d=v(u,e);return{map:o,compact:i,separate:s,filter:function(n,t){return(0,r.pipe)(n,l(t))},filterMap:function(n,t){return(0,r.pipe)(n,p(t))},partition:function(n,t){return(0,r.pipe)(n,m(t))},partitionMap:function(n,t){return(0,r.pipe)(n,d(t))}}};var n=Zn(),r=e(),t=O(),u=Wn(),o=Vn(),i=L();function c(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filter(n,t)}))}}}function f(n,r){return function(t){return function(u){return n.map(u,(function(n){return r.filterMap(n,t)}))}}}function a(n,r){var t=c(n,r);return function(n){var r=t((0,o.not)(n)),u=t(n);return function(n){return(0,i.separated)(r(n),u(n))}}}function v(n,t){var e=f(n,t);return function(n){return function(t){return(0,i.separated)((0,r.pipe)(t,e((function(r){return(0,u.getLeft)(n(r))}))),(0,r.pipe)(t,e((function(r){return(0,u.getRight)(n(r))}))))}}}return ar}var sr,lr={};function pr(){if(sr)return lr;sr=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.fromIOK=function(n){return function(t){return(0,r.flow)(t,n.fromIO)}},lr.chainIOK=function(n,t){return function(u){var e=(0,r.flow)(u,n.fromIO);return function(n){return t.chain(n,e)}}},lr.chainFirstIOK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},lr.tapIO=t;var n=l(),r=e();function t(t,u){var e=(0,n.tap)(u);return function(n,u){return e(n,(0,r.flow)(u,t.fromIO))}}return lr}var mr,dr={};function br(){if(mr)return dr;mr=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.fromTaskK=function(n){return function(t){return(0,r.flow)(t,n.fromTask)}},dr.chainTaskK=function(n,t){return function(u){var e=(0,r.flow)(u,n.fromTask);return function(n){return t.chain(n,e)}}},dr.chainFirstTaskK=function(n,r){var u=t(n,r);return function(n){return function(r){return u(r,n)}}},dr.tapTask=t;var n=l(),r=e();function t(t,u){var e=(0,n.tap)(u);return function(n,u){return e(n,(0,r.flow)(u,t.fromTask))}}return dr}var hr,Or,Rr={};function Ir(){return hr||(hr=1,function(n){var r=Rr&&Rr.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=Rr&&Rr.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=Rr&&Rr.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u};Object.defineProperty(n,"__esModule",{value:!0}),n.chainFirst=n.chain=n.sequenceSeqArray=n.traverseSeqArray=n.traverseSeqArrayWithIndex=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq=n.traverseReadonlyNonEmptyArrayWithIndexSeq=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apS=n.bind=n.let=n.bindTo=n.Do=n.never=n.FromTask=n.chainFirstIOK=n.chainIOK=n.fromIOK=n.tapIO=n.tap=n.flatMapIO=n.FromIO=n.MonadTask=n.fromTask=n.MonadIO=n.Monad=n.Chain=n.ApplicativeSeq=n.ApplySeq=n.ApplicativePar=n.apSecond=n.apFirst=n.ApplyPar=n.Pointed=n.flap=n.asUnit=n.as=n.Functor=n.URI=n.flatten=n.flatMap=n.of=n.ap=n.map=n.fromIO=void 0,n.getMonoid=n.getSemigroup=n.taskSeq=n.task=void 0,n.delay=function(n){return function(r){return function(){return new Promise((function(t){setTimeout((function(){Promise.resolve().then(r).then(t)}),n)}))}}},n.getRaceMonoid=function(){return{concat:function(n,r){return function(){return Promise.race([Promise.resolve().then(n),Promise.resolve().then(r)])}},empty:n.never}};var o=Dn(),i=a(),c=u(l()),v=pr(),s=e(),p=O(),m=u(f());n.fromIO=function(n){return function(){return Promise.resolve().then(n)}};var d=function(r,t){return(0,s.pipe)(r,(0,n.map)(t))},b=function(r,t){return(0,s.pipe)(r,(0,n.ap)(t))},h=function(r,t){return(0,n.flatMap)(r,(function(r){return(0,s.pipe)(t,(0,n.map)(r))}))};n.map=function(n){return function(r){return function(){return Promise.resolve().then(r).then(n)}}},n.ap=function(n){return function(r){return function(){return Promise.all([Promise.resolve().then(r),Promise.resolve().then(n)]).then((function(n){return(0,n[0])(n[1])}))}}},n.of=function(n){return function(){return Promise.resolve(n)}},n.flatMap=(0,s.dual)(2,(function(n,r){return function(){return Promise.resolve().then(n).then((function(n){return r(n)()}))}})),n.flatten=(0,n.flatMap)(s.identity),n.URI="Task",n.Functor={URI:n.URI,map:d},n.as=(0,s.dual)(2,(0,p.as)(n.Functor)),n.asUnit=(0,p.asUnit)(n.Functor),n.flap=(0,p.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.ApplyPar={URI:n.URI,map:d,ap:b},n.apFirst=(0,i.apFirst)(n.ApplyPar),n.apSecond=(0,i.apSecond)(n.ApplyPar),n.ApplicativePar={URI:n.URI,map:d,ap:b,of:n.of},n.ApplySeq={URI:n.URI,map:d,ap:h},n.ApplicativeSeq={URI:n.URI,map:d,ap:h,of:n.of},n.Chain={URI:n.URI,map:d,ap:b,chain:n.flatMap},n.Monad={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap},n.MonadIO={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap,fromIO:n.fromIO},n.fromTask=s.identity,n.MonadTask={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap,fromIO:n.fromIO,fromTask:n.fromTask},n.FromIO={URI:n.URI,fromIO:n.fromIO},n.flatMapIO=m.flatMapIO({fromIO:n.FromIO.fromIO},{flatMap:n.flatMap}),n.tap=(0,s.dual)(2,c.tap(n.Chain)),n.tapIO=(0,s.dual)(2,(0,v.tapIO)(n.FromIO,n.Chain)),n.fromIOK=(0,v.fromIOK)(n.FromIO),n.chainIOK=n.flatMapIO,n.chainFirstIOK=n.tapIO,n.FromTask={URI:n.URI,fromIO:n.fromIO,fromTask:n.fromTask},n.never=function(){return new Promise((function(){}))},n.Do=(0,n.of)(m.emptyRecord),n.bindTo=(0,p.bindTo)(n.Functor),n.let=(0,p.let)(n.Functor),n.bind=c.bind(n.Chain),n.apS=(0,i.apS)(n.ApplyPar),n.ApT=(0,n.of)(m.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(n){return function(r){return function(){return Promise.all(r.map((function(r,t){return Promise.resolve().then((function(){return n(t,r)()}))})))}}},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return m.isNonEmpty(r)?t(r):n.ApT}},n.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return m.tail(r).reduce((function(r,t,u){return r.then((function(r){return Promise.resolve().then(n(u+1,t)).then((function(n){return r.push(n),r}))}))}),Promise.resolve().then(n(0,m.head(r))).then(m.singleton))}}},n.traverseReadonlyArrayWithIndexSeq=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndexSeq)(r);return function(r){return m.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(s.identity),n.traverseSeqArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq,n.traverseSeqArray=function(r){return(0,n.traverseReadonlyArrayWithIndexSeq)((function(n,t){return r(t)}))},n.sequenceSeqArray=(0,n.traverseSeqArray)(s.identity),n.chain=n.flatMap,n.chainFirst=n.tap,n.task={URI:n.URI,map:d,of:n.of,ap:b,chain:n.flatMap,fromIO:n.fromIO,fromTask:n.fromTask},n.taskSeq={URI:n.URI,map:d,of:n.of,ap:h,chain:n.flatMap,fromIO:n.fromIO,fromTask:n.fromTask},n.getSemigroup=(0,i.getApplySemigroup)(n.ApplySeq),n.getMonoid=(0,o.getApplicativeMonoid)(n.ApplicativeSeq)}(Rr)),Rr}function jr(){return Or||(Or=1,function(n){var r=Jn&&Jn.__createBinding||(Object.create?function(n,r,t,u){void 0===u&&(u=t);var e=Object.getOwnPropertyDescriptor(r,t);e&&!("get"in e?!r.__esModule:e.writable||e.configurable)||(e={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(n,u,e)}:function(n,r,t,u){void 0===u&&(u=t),n[u]=r[t]}),t=Jn&&Jn.__setModuleDefault||(Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r}),u=Jn&&Jn.__importStar||function(n){if(n&&n.__esModule)return n;var u={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&r(u,n,e);return t(u,n),u},o=Jn&&Jn.__awaiter||function(n,r,t,u){return new(t||(t=Promise))((function(e,o){function i(n){try{f(u.next(n))}catch(n){o(n)}}function c(n){try{f(u.throw(n))}catch(n){o(n)}}function f(n){var r;n.done?e(n.value):(r=n.value,r instanceof t?r:new t((function(n){n(r)}))).then(i,c)}f((u=u.apply(n,r||[])).next())}))},i=Jn&&Jn.__generator||function(n,r){var t,u,e,o,i={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(t=1,u&&(e=2&c[0]?u.return:c[0]?u.throw||((e=u.return)&&e.call(u),0):u.next)&&!(e=e.call(u,c[1])).done)return e;switch(u=0,e&&(c=[2&c[0],e.value]),c[0]){case 0:case 1:e=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,u=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((e=(e=i.trys).length>0&&e[e.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!e||c[1]>e[0]&&c[1]<e[3])){i.label=c[1];break}if(6===c[0]&&i.label<e[1]){i.label=e[1],e=c;break}if(e&&i.label<e[2]){i.label=e[2],i.ops.push(c);break}e[2]&&i.ops.pop(),i.trys.pop();continue}c=r.call(n,i)}catch(n){c=[6,n],u=0}finally{t=e=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}};Object.defineProperty(n,"__esModule",{value:!0}),n.throwError=n.of=n.altW=n.alt=n.flatten=n.flattenW=n.flatMap=n.apW=n.ap=n.mapLeft=n.mapError=n.bimap=n.mapBoth=n.map=n.fromIOEitherK=n.chainTaskOptionK=n.chainTaskOptionKW=n.fromTaskOptionK=n.swap=n.orLeft=n.orElseFirstTaskK=n.orElseFirstIOK=n.tapError=n.orElseW=n.orElse=n.chainNullableK=n.fromNullableK=n.fromNullable=n.toUnion=n.tryCatchK=n.tryCatch=n.getOrElseW=n.getOrElse=n.foldW=n.matchEW=n.fold=n.matchE=n.matchW=n.match=n.fromTaskOption=n.fromIOEither=n.fromEither=n.fromTask=n.fromIO=n.leftIO=n.rightIO=n.leftTask=n.rightTask=n.right=n.left=void 0,n.fromEitherK=n.filterOrElseW=n.filterOrElse=n.fromPredicate=n.chainFirstEitherKW=n.chainFirstEitherK=n.chainEitherKW=n.chainEitherK=n.flatMapTaskOption=n.flatMapIOEither=n.flatMapTask=n.flatMapIO=n.flatMapEither=n.flatMapOption=n.flatMapNullable=n.liftOption=n.liftNullable=n.chainOptionKW=n.chainOptionK=n.fromOptionK=n.fromOption=n.Alt=n.Bifunctor=n.tapTask=n.tapIO=n.tapEither=n.tap=n.FromTask=n.FromIO=n.FromEither=n.MonadThrow=n.MonadTask=n.MonadIO=n.Monad=n.Chain=n.ApplicativeSeq=n.ApplySeq=n.ApplicativePar=n.apSecondW=n.apSecond=n.apFirstW=n.apFirst=n.ApplyPar=n.Pointed=n.flap=n.asUnit=n.as=n.Functor=n.getCompactable=n.URI=void 0,n.getSemigroup=n.getApplyMonoid=n.getApplySemigroup=n.taskEitherSeq=n.taskEither=n.orElseFirstW=n.orElseFirst=n.chainFirstW=n.chainFirst=n.chainW=n.chain=n.sequenceSeqArray=n.traverseSeqArray=n.traverseSeqArrayWithIndex=n.sequenceArray=n.traverseArray=n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq=n.traverseReadonlyNonEmptyArrayWithIndexSeq=n.traverseReadonlyArrayWithIndex=n.traverseReadonlyNonEmptyArrayWithIndex=n.ApT=n.apSW=n.apS=n.bindW=n.bind=n.let=n.bindTo=n.Do=n.bracketW=n.bracket=n.chainIOEitherK=n.chainIOEitherKW=n.chainFirstTaskK=n.chainTaskK=n.fromTaskK=n.chainFirstIOK=n.chainIOK=n.fromIOK=void 0,n.getApplicativeTaskValidation=k,n.getAltTaskValidation=T,n.getFilterable=function(r){var t=m.getFilterable(r),u=(0,n.getCompactable)(r),e=(0,h.filter)(w.Functor,t),o=(0,h.filterMap)(w.Functor,t),i=(0,h.partition)(w.Functor,t),c=(0,h.partitionMap)(w.Functor,t);return{URI:n.URI,_E:void 0,map:M,compact:u.compact,separate:u.separate,filter:function(n,r){return(0,U.pipe)(n,e(r))},filterMap:function(n,r){return(0,U.pipe)(n,o(r))},partition:function(n,r){return(0,U.pipe)(n,i(r))},partitionMap:function(n,r){return(0,U.pipe)(n,c(r))}}},n.taskify=function(n){return function(){var r=Array.prototype.slice.call(arguments);return function(){return new Promise((function(t){n.apply(null,r.concat((function(n,r){return t(null!=n?g.left(n):g.right(r))})))}))}}},n.getTaskValidation=function(r){var t=k(w.ApplicativePar,r),u=T(r);return{URI:n.URI,_E:void 0,map:M,ap:t.ap,of:n.of,chain:n.flatMap,bimap:n.mapBoth,mapLeft:n.mapError,alt:u.alt,fromIO:n.fromIO,fromTask:n.fromTask,throwError:n.throwError}};var c=Dn(),v=a(),s=u(l()),p=Zn(),m=u(er()),b=u(cr()),h=vr(),R=d(),I=pr(),j=br(),U=e(),_=O(),g=u(f()),w=u(Ir());n.left=b.left(w.Pointed),n.right=b.right(w.Pointed),n.rightTask=b.rightF(w.Functor),n.leftTask=b.leftF(w.Functor),n.rightIO=(0,U.flow)(w.fromIO,n.rightTask),n.leftIO=(0,U.flow)(w.fromIO,n.leftTask),n.fromIO=n.rightIO,n.fromTask=n.rightTask,n.fromEither=w.of,n.fromIOEither=w.fromIO,n.fromTaskOption=function(n){return w.map(m.fromOption(n))},n.match=b.match(w.Functor),n.matchW=n.match,n.matchE=b.matchE(w.Monad),n.fold=n.matchE,n.matchEW=n.matchE,n.foldW=n.matchEW,n.getOrElse=b.getOrElse(w.Monad),n.getOrElseW=n.getOrElse,n.tryCatch=function(n,r){return function(){return o(void 0,void 0,void 0,(function(){var t;return i(this,(function(u){switch(u.label){case 0:return u.trys.push([0,2,,3]),[4,n().then(g.right)];case 1:return[2,u.sent()];case 2:return t=u.sent(),[2,g.left(r(t))];case 3:return[2]}}))}))}},n.tryCatchK=function(r,t){return function(){for(var u=[],e=0;e<arguments.length;e++)u[e]=arguments[e];return(0,n.tryCatch)((function(){return r.apply(void 0,u)}),t)}},n.toUnion=b.toUnion(w.Functor),n.fromNullable=b.fromNullable(w.Pointed),n.fromNullableK=b.fromNullableK(w.Pointed),n.chainNullableK=b.chainNullableK(w.Monad),n.orElse=b.orElse(w.Monad),n.orElseW=n.orElse,n.tapError=(0,U.dual)(2,b.tapError(w.Monad)),n.orElseFirstIOK=function(r){return(0,n.tapError)((0,n.fromIOK)(r))},n.orElseFirstTaskK=function(r){return(0,n.tapError)((0,n.fromTaskK)(r))},n.orLeft=b.orLeft(w.Monad),n.swap=b.swap(w.Functor),n.fromTaskOptionK=function(r){var t=(0,n.fromTaskOption)(r);return function(n){return(0,U.flow)(n,t)}},n.chainTaskOptionKW=function(r){return function(t){return function(u){return(0,n.flatMap)(u,(0,n.fromTaskOptionK)(r)(t))}}},n.chainTaskOptionK=n.chainTaskOptionKW,n.fromIOEitherK=function(r){return(0,U.flow)(r,n.fromIOEither)};var M=function(r,t){return(0,U.pipe)(r,(0,n.map)(t))},y=function(r,t){return(0,U.pipe)(r,(0,n.ap)(t))},E=function(r,t){return(0,n.flatMap)(r,(function(r){return(0,U.pipe)(t,(0,n.map)(r))}))},P=function(r,t){return(0,U.pipe)(r,(0,n.alt)(t))};function k(r,t){var u=(0,v.ap)(r,m.getApplicativeValidation(t));return{URI:n.URI,_E:void 0,map:M,ap:function(n,r){return(0,U.pipe)(n,u(r))},of:n.of}}function T(r){var t=b.altValidation(w.Monad,r);return{URI:n.URI,_E:void 0,map:M,alt:function(n,r){return(0,U.pipe)(n,t(r))}}}n.map=b.map(w.Functor),n.mapBoth=(0,U.dual)(3,b.mapBoth(w.Functor)),n.bimap=n.mapBoth,n.mapError=(0,U.dual)(2,b.mapError(w.Functor)),n.mapLeft=n.mapError,n.ap=b.ap(w.ApplyPar),n.apW=n.ap,n.flatMap=(0,U.dual)(2,b.flatMap(w.Monad)),n.flattenW=(0,n.flatMap)(U.identity),n.flatten=n.flattenW,n.alt=b.alt(w.Monad),n.altW=n.alt,n.of=n.right,n.throwError=n.left,n.URI="TaskEither",n.getCompactable=function(r){var t=m.getCompactable(r);return{URI:n.URI,_E:void 0,compact:(0,p.compact)(w.Functor,t),separate:(0,p.separate)(w.Functor,t,m.Functor)}},n.Functor={URI:n.URI,map:M},n.as=(0,U.dual)(2,(0,_.as)(n.Functor)),n.asUnit=(0,_.asUnit)(n.Functor),n.flap=(0,_.flap)(n.Functor),n.Pointed={URI:n.URI,of:n.of},n.ApplyPar={URI:n.URI,map:M,ap:y},n.apFirst=(0,v.apFirst)(n.ApplyPar),n.apFirstW=n.apFirst,n.apSecond=(0,v.apSecond)(n.ApplyPar),n.apSecondW=n.apSecond,n.ApplicativePar={URI:n.URI,map:M,ap:y,of:n.of},n.ApplySeq={URI:n.URI,map:M,ap:E},n.ApplicativeSeq={URI:n.URI,map:M,ap:E,of:n.of},n.Chain={URI:n.URI,map:M,ap:y,chain:n.flatMap},n.Monad={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of},n.MonadIO={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of,fromIO:n.fromIO},n.MonadTask={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of,fromIO:n.fromIO,fromTask:n.fromTask},n.MonadThrow={URI:n.URI,map:M,ap:y,chain:n.flatMap,of:n.of,throwError:n.throwError},n.FromEither={URI:n.URI,fromEither:n.fromEither},n.FromIO={URI:n.URI,fromIO:n.fromIO},n.FromTask={URI:n.URI,fromIO:n.fromIO,fromTask:n.fromTask},n.tap=(0,U.dual)(2,s.tap(n.Chain)),n.tapEither=(0,U.dual)(2,(0,R.tapEither)(n.FromEither,n.Chain)),n.tapIO=(0,U.dual)(2,(0,I.tapIO)(n.FromIO,n.Chain)),n.tapTask=(0,U.dual)(2,(0,j.tapTask)(n.FromTask,n.Chain)),n.Bifunctor={URI:n.URI,bimap:n.mapBoth,mapLeft:n.mapError},n.Alt={URI:n.URI,map:M,alt:P},n.fromOption=(0,R.fromOption)(n.FromEither),n.fromOptionK=(0,R.fromOptionK)(n.FromEither),n.chainOptionK=(0,R.chainOptionK)(n.FromEither,n.Chain),n.chainOptionKW=n.chainOptionK;var q={fromEither:n.FromEither.fromEither};n.liftNullable=g.liftNullable(q),n.liftOption=g.liftOption(q);var L={flatMap:n.flatMap},S={fromIO:n.FromIO.fromIO},x={fromTask:n.fromTask};n.flatMapNullable=g.flatMapNullable(q,L),n.flatMapOption=g.flatMapOption(q,L),n.flatMapEither=g.flatMapEither(q,L),n.flatMapIO=g.flatMapIO(S,L),n.flatMapTask=g.flatMapTask(x,L),n.flatMapIOEither=(0,U.dual)(2,(function(r,t){return(0,n.flatMap)(r,(0,n.fromIOEitherK)(t))})),n.flatMapTaskOption=(0,U.dual)(3,(function(r,t,u){return(0,n.flatMap)(r,(function(r){return(0,n.fromTaskOption)((function(){return u(r)}))(t(r))}))})),n.chainEitherK=n.flatMapEither,n.chainEitherKW=n.flatMapEither,n.chainFirstEitherK=n.tapEither,n.chainFirstEitherKW=n.tapEither,n.fromPredicate=(0,R.fromPredicate)(n.FromEither),n.filterOrElse=(0,R.filterOrElse)(n.FromEither,n.Chain),n.filterOrElseW=n.filterOrElse,n.fromEitherK=(0,R.fromEitherK)(n.FromEither),n.fromIOK=(0,I.fromIOK)(n.FromIO),n.chainIOK=n.flatMapIO,n.chainFirstIOK=n.tapIO,n.fromTaskK=(0,j.fromTaskK)(n.FromTask),n.chainTaskK=n.flatMapTask,n.chainFirstTaskK=n.tapTask,n.chainIOEitherKW=n.flatMapIOEither,n.chainIOEitherK=n.flatMapIOEither,n.bracket=function(r,t,u){return(0,n.bracketW)(r,t,u)},n.bracketW=function(r,t,u){return(0,n.flatMap)(r,(function(r){return w.flatMap(t(r),(function(t){return(0,n.flatMap)(u(r,t),(function(){return w.of(t)}))}))}))},n.Do=(0,n.of)(g.emptyRecord),n.bindTo=(0,_.bindTo)(n.Functor),n.let=(0,_.let)(n.Functor),n.bind=s.bind(n.Chain),n.bindW=n.bind,n.apS=(0,v.apS)(n.ApplyPar),n.apSW=n.apS,n.ApT=(0,n.of)(g.emptyReadonlyArray),n.traverseReadonlyNonEmptyArrayWithIndex=function(n){return(0,U.flow)(w.traverseReadonlyNonEmptyArrayWithIndex(n),w.map(m.traverseReadonlyNonEmptyArrayWithIndex(U.SK)))},n.traverseReadonlyArrayWithIndex=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndex)(r);return function(r){return g.isNonEmpty(r)?t(r):n.ApT}},n.traverseReadonlyNonEmptyArrayWithIndexSeq=function(n){return function(r){return function(){return g.tail(r).reduce((function(r,t,u){return r.then((function(e){return g.isLeft(e)?r:n(u+1,t)().then((function(n){return g.isLeft(n)?n:(e.right.push(n.right),e)}))}))}),n(0,g.head(r))().then(m.map(g.singleton)))}}},n.traverseReadonlyArrayWithIndexSeq=function(r){var t=(0,n.traverseReadonlyNonEmptyArrayWithIndexSeq)(r);return function(r){return g.isNonEmpty(r)?t(r):n.ApT}},n.traverseArrayWithIndex=n.traverseReadonlyArrayWithIndex,n.traverseArray=function(r){return(0,n.traverseReadonlyArrayWithIndex)((function(n,t){return r(t)}))},n.sequenceArray=(0,n.traverseArray)(U.identity),n.traverseSeqArrayWithIndex=n.traverseReadonlyArrayWithIndexSeq,n.traverseSeqArray=function(r){return(0,n.traverseReadonlyArrayWithIndexSeq)((function(n,t){return r(t)}))},n.sequenceSeqArray=(0,n.traverseSeqArray)(U.identity),n.chain=n.flatMap,n.chainW=n.flatMap,n.chainFirst=n.tap,n.chainFirstW=n.tap,n.orElseFirst=n.tapError,n.orElseFirstW=n.tapError,n.taskEither={URI:n.URI,bimap:n.mapBoth,mapLeft:n.mapError,map:M,of:n.of,ap:y,chain:n.flatMap,alt:P,fromIO:n.fromIO,fromTask:n.fromTask,throwError:n.throwError},n.taskEitherSeq={URI:n.URI,bimap:n.mapBoth,mapLeft:n.mapError,map:M,of:n.of,ap:E,chain:n.flatMap,alt:P,fromIO:n.fromIO,fromTask:n.fromTask,throwError:n.throwError},n.getApplySemigroup=(0,v.getApplySemigroup)(n.ApplySeq),n.getApplyMonoid=(0,c.getApplicativeMonoid)(n.ApplicativeSeq),n.getSemigroup=function(n){return(0,v.getApplySemigroup)(w.ApplySeq)(m.getSemigroup(n))}}(Jn)),Jn}var Ur=jr();const _r=n=>({kind:"server",inner:n}),gr={kind:"client",inner:"Token not exist or empty",code:"invalid-token"},wr={kind:"client",inner:"Api path empty or missing",code:"empty-api-path"},Mr=dn({concat:function(n,r){return n+r},empty:""}),yr=r=>D(r?hn(r):dn({concat:J}).concat(hn(n.apiPath),hn("https://api.vviinn.com")),cn((()=>wr))),Er=(Pr={method:{concat:(n,r)=>{return D(Mr.concat(hn(n),hn(r)),(t=()=>"GET",function(n){return bn(n)?t():n.value}));var t}},body:{concat:function(n,r){return r}},headers:{concat:(n,r)=>{const t=new Headers;return void 0!==n&&n.forEach(((n,r)=>t.append(r,n))),void 0!==r&&r.forEach(((n,r)=>t.append(r,n))),t}}},{concat:function(n,r){var t={};for(var u in Pr)Q.call(Pr,u)&&(t[u]=Pr[u].concat(n[u],r[u]));return t}});var Pr;const kr=$({method:"POST"}),Tr=un((([n,r])=>(n.set("Content-Type","application/json"),{headers:n,body:r}))),qr=n=>n.status>=200&&n.status<300?Ur.right(n):Ur.left(n),Lr=Er,Sr=(n,r)=>([t,u])=>{const e=new URL(n,t),o=Lr.concat(u,r);return C.pipe(((n,r={})=>C.pipe(((n,r={method:"GET"})=>Ur.tryCatch((()=>fetch(n,r)),(n=>n)))(n,r),Ur.chain(qr),Ur.chain((n=>function(n){return Ur.fromTask((()=>n.json()))}(n)))))(e.toString(),o),Ur.mapLeft(_r))};var xr=a(),Ar=er();const Nr=xr.sequenceT(Ar.Apply),zr={equals:(n,r)=>n.left===r.left&&n.top===r.top&&n.height===r.height&&n.width===r.width},Gr=(n,r)=>C.pipe(Nr(yr(r),kr),Tn,Cn(Sr("visual-search",n))),Cr=(n,r)=>C.pipe(Nr(yr(r),kr),Tn,Cn(Sr("text-search",n))),Jr=(n,r)=>C.pipe(Nr(yr(r),kr),Tn,Cn(Sr("product-listing-page",n))),Hr=(n,r)=>C.pipe(Nr(yr(r),kr),Tn,Cn(Sr("auto-suggest",n)));var Dr=Wn();const Kr=n=>({left:0,top:0,width:n.width,height:n.height}),Xr=n=>r=>({left:r.left*n.width,top:r.top*n.height,width:r.width*n.width,height:r.height*n.height}),Yr=n=>r=>({left:r.left/n.width,top:r.top/n.height,width:r.width/n.width,height:r.height/n.height}),Br=n=>({left:n.left+.5*n.width,top:n.top+.5*n.height}),Fr=(n,r)=>{const{clientX:t,clientY:u}=n;return t>=r.left&&t<=r.right&&u>=r.top&&u<=r.bottom};export{yr as $,Nr as A,gr as B,Ir as C,X as D,Ar as E,Y as F,kn as G,An as H,xn as I,Gn as J,Cr as K,Tn as L,Tr as M,Cn as N,Dr as O,Jr as P,Hr as Q,Sn as R,zn as S,qn as T,Mn as U,Gr as V,Ln as W,Q as X,H as Y,Sr as Z,C as _,Yr as a,kr as a0,on as a1,Ur as a2,Kr as b,Br as c,zr as d,fn as e,vn as f,k as g,e as h,Fr as i,O as j,a as k,l,an as m,g as n,_ as o,G as p,A as q,f as r,Xr as s,d as t,L as u,D as v,ln as w,Z as x,$ as y,sn as z}
|