@foxy.io/elements 1.24.0-beta.4 → 1.24.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +1 -1
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +13 -31
- package/dist/cdn/foxy-customer.js +7 -7
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +2 -2
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +4 -4
- package/dist/cdn/foxy-reports-table.js +5 -5
- package/dist/cdn/foxy-shipment-card.js +2 -2
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -2
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-479ad951.js → shared-099c1f57.js} +1 -1
- package/dist/cdn/{shared-c4240bc6.js → shared-0c0ee663.js} +1 -1
- package/dist/cdn/shared-1196b6a7.js +1 -0
- package/dist/cdn/shared-13fbea95.js +122 -0
- package/dist/cdn/{shared-8474bc4a.js → shared-27d21f4a.js} +1 -1
- package/dist/cdn/shared-2edcd981.js +1 -0
- package/dist/cdn/{shared-a92ae606.js → shared-31d8e3b8.js} +1 -1
- package/dist/cdn/shared-35728235.js +1 -0
- package/dist/cdn/shared-3b709ddc.js +29 -0
- package/dist/cdn/shared-3bcc07cd.js +1 -0
- package/dist/cdn/shared-3c2414d4.js +9 -0
- package/dist/cdn/{shared-31651a9c.js → shared-3f04e4cc.js} +1 -1
- package/dist/cdn/{shared-ba658670.js → shared-406ce9ad.js} +1 -1
- package/dist/cdn/{shared-6f84ac3e.js → shared-4b20fc75.js} +1 -1
- package/dist/cdn/shared-4c2e9064.js +15 -0
- package/dist/cdn/{shared-1d28220a.js → shared-5103c1b4.js} +1 -1
- package/dist/cdn/{shared-4674063d.js → shared-5784c088.js} +27 -27
- package/dist/cdn/shared-584174ff.js +1 -0
- package/dist/cdn/{shared-1b060170.js → shared-59fc6288.js} +1 -1
- package/dist/cdn/{shared-51d28e6d.js → shared-5a889c45.js} +1 -1
- package/dist/cdn/{shared-c7f2f1ab.js → shared-5cf7b194.js} +1 -1
- package/dist/cdn/{shared-9c626d58.js → shared-5db85492.js} +1 -1
- package/dist/cdn/shared-601f27b1.js +1 -0
- package/dist/cdn/{shared-36725fe3.js → shared-621b3283.js} +1 -1
- package/dist/cdn/shared-630a0ff2.js +1 -0
- package/dist/cdn/{shared-984fcdf5.js → shared-6daeb197.js} +3 -3
- package/dist/cdn/{shared-4c956a8e.js → shared-7723f756.js} +1 -1
- package/dist/cdn/{shared-4dc58b73.js → shared-773e7177.js} +1 -1
- package/dist/cdn/{shared-6dc64a17.js → shared-799dc083.js} +1 -1
- package/dist/cdn/{shared-e84fa0ea.js → shared-7a455b15.js} +1 -1
- package/dist/cdn/{shared-e6828dbf.js → shared-7abbc95c.js} +5 -5
- package/dist/cdn/shared-7f33a83a.js +12 -12
- package/dist/cdn/{shared-69a21b9d.js → shared-7fab31ac.js} +1 -1
- package/dist/cdn/shared-800ee6c0.js +1 -0
- package/dist/cdn/shared-8a9c64b2.js +1 -0
- package/dist/cdn/{shared-db21f6db.js → shared-8f922de8.js} +2 -2
- package/dist/cdn/{shared-e6997950.js → shared-9048eeb2.js} +1 -1
- package/dist/cdn/{shared-e10052d0.js → shared-9954ee26.js} +2 -2
- package/dist/cdn/{shared-4bbd600d.js → shared-9aa72495.js} +1 -1
- package/dist/cdn/shared-9b12aeac.js +1 -0
- package/dist/cdn/{shared-6abdfcf2.js → shared-9b486845.js} +1 -1
- package/dist/cdn/{shared-b3ac59eb.js → shared-ad80244a.js} +2 -2
- package/dist/cdn/{shared-c6c6ba69.js → shared-b446c140.js} +1 -1
- package/dist/cdn/shared-b7556b77.js +1 -0
- package/dist/cdn/{shared-30bebd39.js → shared-b87d1af0.js} +3 -3
- package/dist/cdn/{shared-0a248c0d.js → shared-ba93be6b.js} +1 -1
- package/dist/cdn/{shared-9caffb4d.js → shared-baeef007.js} +1 -1
- package/dist/cdn/{shared-64f98a0f.js → shared-bee111d6.js} +7 -2
- package/dist/cdn/shared-c76ef8d8.js +804 -0
- package/dist/cdn/{shared-65318cc1.js → shared-c839e147.js} +1 -1
- package/dist/cdn/{shared-4904bca4.js → shared-d1f5de89.js} +1 -1
- package/dist/cdn/{shared-a3c73e91.js → shared-d90dbae7.js} +1 -1
- package/dist/cdn/{shared-dccf0420.js → shared-ddac7722.js} +2 -2
- package/dist/cdn/{shared-e8e92fe3.js → shared-de3dae6c.js} +2 -2
- package/dist/cdn/shared-e006e82c.js +1 -0
- package/dist/cdn/shared-e2e2ca6a.js +1 -0
- package/dist/cdn/shared-e5239bec.js +212 -0
- package/dist/cdn/shared-e8a51c60.js +1 -0
- package/dist/cdn/shared-e8a85228.js +1 -0
- package/dist/cdn/{shared-17d0db7f.js → shared-eb8a0fdf.js} +3 -3
- package/dist/cdn/{shared-88e36564.js → shared-ef7f2d07.js} +26 -27
- package/dist/cdn/{shared-665d6cc4.js → shared-efaf8d49.js} +1 -1
- package/dist/cdn/{shared-ff992ead.js → shared-f0a9f3c2.js} +1 -1
- package/dist/cdn/{shared-379b37e6.js → shared-f21e5761.js} +7 -11
- package/dist/cdn/shared-f241722a.js +1 -0
- package/dist/cdn/{shared-b48a83b0.js → shared-f29acc38.js} +1 -1
- package/dist/cdn/{shared-e7c3b7b6.js → shared-f29d410a.js} +1 -1
- package/dist/cdn/{shared-bdb51db9.js → shared-f5bbb1e0.js} +1 -1
- package/dist/cdn/{shared-c97e0d6e.js → shared-fcfbfbdb.js} +1 -1
- package/dist/cdn/{shared-bafcab47.js → shared-fd40a40c.js} +3 -3
- package/dist/cdn/{shared-4b67d699.js → shared-fd96bcd1.js} +1 -1
- package/dist/cdn/{shared-dfe2602a.js → shared-ff7fd5fa.js} +1 -1
- package/dist/cdn/{shared-d14c2060.js → shared-fff03a45.js} +1 -1
- package/dist/cdn/translations/address-form/en.json +577 -0
- package/dist/cdn/translations/customer/en.json +653 -15
- package/dist/cdn/translations/customer-form/en.json +84 -15
- package/dist/cdn/translations/customer-portal/en.json +694 -32
- package/dist/cdn/translations/customer-portal-settings/en.json +9 -0
- package/dist/cdn/translations/transaction/en.json +79 -15
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +10 -0
- package/dist/elements/internal/InternalForm/InternalForm.js +48 -1
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalForm/index.d.ts +1 -0
- package/dist/elements/internal/InternalForm/index.js +1 -0
- package/dist/elements/internal/InternalForm/index.js.map +1 -1
- package/dist/elements/internal/InternalForm/types.d.ts +4 -0
- package/dist/elements/internal/InternalForm/types.js +2 -0
- package/dist/elements/internal/InternalForm/types.js.map +1 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +5 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +36 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.d.ts +1 -0
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js +11 -0
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js.map +1 -0
- package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -1
- package/dist/elements/public/AddressForm/AddressForm.js +53 -17
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AddressForm/countries.d.ts +1 -1
- package/dist/elements/public/AddressForm/countries.js +554 -251
- package/dist/elements/public/AddressForm/countries.js.map +1 -1
- package/dist/elements/public/Customer/Customer.d.ts +5 -2
- package/dist/elements/public/Customer/Customer.js +10 -0
- package/dist/elements/public/Customer/Customer.js.map +1 -1
- package/dist/elements/public/Customer/types.d.ts +1 -0
- package/dist/elements/public/Customer/types.js.map +1 -1
- package/dist/elements/public/CustomerApi/CustomerApi.d.ts +33 -2
- package/dist/elements/public/CustomerApi/CustomerApi.js +62 -11
- package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.d.ts +47 -15
- package/dist/elements/public/CustomerForm/CustomerForm.js +259 -155
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/CustomerForm/index.d.ts +6 -6
- package/dist/elements/public/CustomerForm/index.js +6 -6
- package/dist/elements/public/CustomerForm/index.js.map +1 -1
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/InternalCustomerFormLegalNoticeControl.d.ts +5 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/InternalCustomerFormLegalNoticeControl.js +23 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/InternalCustomerFormLegalNoticeControl.js.map +1 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/index.d.ts +4 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/index.js +6 -0
- package/dist/elements/public/CustomerForm/internal/InternalCustomerFormLegalNoticeControl/index.js.map +1 -0
- package/dist/elements/public/CustomerForm/types.d.ts +27 -7
- package/dist/elements/public/CustomerForm/types.js.map +1 -1
- package/dist/elements/public/CustomerPortal/CustomerPortal.js +12 -15
- package/dist/elements/public/CustomerPortal/CustomerPortal.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.d.ts +8 -11
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +9 -33
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.d.ts +14 -10
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +152 -16
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/index.d.ts +2 -0
- package/dist/elements/public/CustomerPortal/index.js +2 -2
- package/dist/elements/public/CustomerPortal/index.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js +14 -0
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/machine.js +10 -0
- package/dist/elements/public/CustomerPortalSettings/machine.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUp.d.ts +14 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUp.js +132 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUp.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUpChangeEvent.d.ts +4 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUpChangeEvent.js +6 -0
- package/dist/elements/public/CustomerPortalSettings/private/SignUp/SignUpChangeEvent.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettings/types.d.ts +4 -0
- package/dist/elements/public/CustomerPortalSettings/types.js.map +1 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +1 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -1
- package/dist/elements/public/FormDialog/FormDialog.d.ts +2 -0
- package/dist/elements/public/FormDialog/FormDialog.js +6 -0
- package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
- package/dist/elements/public/FormDialog/types.d.ts +3 -1
- package/dist/elements/public/FormDialog/types.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/NucleonElement/types.d.ts +1 -1
- package/dist/elements/public/NucleonElement/types.js.map +1 -1
- package/dist/mixins/themeable.js +16 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/types/hapi.d.ts +14 -0
- package/dist/types/hapi.js.map +1 -1
- package/dist/utils/parse-duration.js +2 -2
- package/dist/utils/parse-duration.js.map +1 -1
- package/package.json +13 -11
- package/dist/cdn/shared-09d4fbb8.js +0 -29
- package/dist/cdn/shared-1d08a5ad.js +0 -1
- package/dist/cdn/shared-1eac92fa.js +0 -1
- package/dist/cdn/shared-25f64060.js +0 -1
- package/dist/cdn/shared-307262a1.js +0 -15
- package/dist/cdn/shared-332f2997.js +0 -1
- package/dist/cdn/shared-39f3b48d.js +0 -1
- package/dist/cdn/shared-432c5183.js +0 -9
- package/dist/cdn/shared-4dee79d4.js +0 -1
- package/dist/cdn/shared-53061389.js +0 -1
- package/dist/cdn/shared-59042137.js +0 -201
- package/dist/cdn/shared-65ba8b39.js +0 -1
- package/dist/cdn/shared-77a4d8e8.js +0 -1
- package/dist/cdn/shared-7f5618ba.js +0 -1
- package/dist/cdn/shared-92f27a38.js +0 -1
- package/dist/cdn/shared-b0f534ef.js +0 -1
- package/dist/cdn/shared-be24dd36.js +0 -804
- package/dist/cdn/shared-bf62a65b.js +0 -1
- package/dist/cdn/shared-c2d3b32b.js +0 -1
- package/dist/cdn/shared-cf269a17.js +0 -1
- package/dist/cdn/shared-fe54babe.js +0 -1
- package/dist/cdn/shared-fef9ecc1.js +0 -122
- package/dist/elements/public/AddressForm/regions.d.ts +0 -1
- package/dist/elements/public/AddressForm/regions.js +0 -67
- package/dist/elements/public/AddressForm/regions.js.map +0 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.d.ts +0 -29
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js +0 -169
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js.map +0 -1
- /package/dist/cdn/{shared-64657919.js → shared-343d1fd7.js} +0 -0
- /package/dist/cdn/{shared-d6276c83.js → shared-3ab0306f.js} +0 -0
- /package/dist/cdn/{shared-e6f3e9f0.js → shared-bb05cfed.js} +0 -0
- /package/dist/cdn/{shared-99065f2a.js → shared-d7be11de.js} +0 -0
- /package/dist/cdn/{shared-0479553e.js → shared-f9180815.js} +0 -0
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?t(Object(i),!0).forEach((function(t){r(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function n(){n=function(t,e){return new r(t,void 0,e)};var t=RegExp.prototype,e=new WeakMap;function r(t,n,i){var a=new RegExp(t,n);return e.set(a,i||e.get(t)),o(a,r.prototype)}function a(t,n){var r=e.get(n);return Object.keys(r).reduce((function(e,n){return e[n]=t[r[n]],e}),Object.create(null))}return i(r,RegExp),r.prototype.exec=function(e){var n=t.exec.call(this,e);return n&&(n.groups=a(n,this)),n},r.prototype[Symbol.replace]=function(n,r){if("string"==typeof r){var i=e.get(this);return t[Symbol.replace].call(this,n,r.replace(/\$<([^>]+)>/g,(function(t,e){return"$"+i[e]})))}if("function"==typeof r){var o=this;return t[Symbol.replace].call(this,n,(function(){var t=arguments;return"object"!=typeof t[t.length-1]&&(t=[].slice.call(t)).push(a(t,o)),r.apply(this,t)}))}return t[Symbol.replace].call(this,n,r)},n.apply(this,arguments)}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t){var e={exports:{}};return t(e,e.exports),e.exports}function l(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}var f=u((function(t,e){var n="undefined"!=typeof self?self:s,r=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=d(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=d(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=u(t),e=l(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[u(t)]},h.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},h.prototype.set=function(t,e){this.map[u(t)]=l(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),f(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),f(t)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){var n,r,i=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},g.call(_.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var j=[301,302,303,307,308];w.redirect=function(t,e){if(-1===j.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function x(t,n){return new Promise((function(r,o){var a=new _(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new w(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}x.polyfill=!0,t.fetch||(t.fetch=x,t.Headers=h,t.Request=_,t.Response=w),e.Headers=h,e.Request=_,e.Response=w,e.fetch=x,Object.defineProperty(e,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e}));function h(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var p="object"==typeof global&&global&&global.Object===Object&&global,d="object"==typeof self&&self&&self.Object===Object&&self,y=p||d||Function("return this")(),v=y.Symbol,g=Object.prototype,b=g.hasOwnProperty,_=g.toString,m=v?v.toStringTag:void 0;var w=Object.prototype.toString;var j=v?v.toStringTag:void 0;function x(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":j&&j in Object(t)?function(t){var e=b.call(t,m),n=t[m];try{t[m]=void 0;var r=!0}catch(t){}var i=_.call(t);return r&&(e?t[m]=n:delete t[m]),i}(t):function(t){return w.call(t)}(t)}function O(t){return null!=t&&"object"==typeof t}function S(t){return"symbol"==typeof t||O(t)&&"[object Symbol]"==x(t)}
|
|
2
|
-
/*! *****************************************************************************
|
|
3
|
-
Copyright (c) Microsoft Corporation.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted.
|
|
7
|
-
|
|
8
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */var E=function(){return E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},E.apply(this,arguments)};function k(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function A(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(P(arguments[e]));return t}var R={};function D(t){return Object.keys(t)}function N(t,e,n){void 0===n&&(n=".");var r=C(t,n),i=C(e,n);return Z(i)?!!Z(r)&&i===r:Z(r)?r in i:D(r).every((function(t){return t in i&&N(r[t],i[t])}))}function I(t){try{return Z(t)||"number"==typeof t?""+t:t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function L(t,e){try{return K(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function C(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:K(t)?F(t):"string"!=typeof t?t:F(L(t,e));var n}function F(t){if(1===t.length)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function U(t,e){for(var n={},r=D(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function M(t,e,n){var r,i,o={};try{for(var a=A(D(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];n(u)&&(o[c]=e(u,c,t))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var $=function(t){return function(e){var n,r,i=e;try{for(var o=A(t),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function B(t){return t?Z(t)?[[t]]:z(D(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?B(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function z(t){var e;return(e=[]).concat.apply(e,T(t))}function V(t){return K(t)?t:[t]}function W(t){return void 0===t?[]:V(t)}function q(t,e,n){var r,i;if(Q(t))return t(e,n.data);var o={};try{for(var a=A(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];Q(u)?o[c]=u(e,n.data):o[c]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function H(t){return t instanceof Promise||!(null===t||!Q(t)&&"object"!=typeof t||!Q(t.then))}function G(t,e){var n,r,i=P([[],[]],2),o=i[0],a=i[1];try{for(var s=A(t),c=s.next();!c.done;c=s.next()){var u=c.value;e(u)?o.push(u):a.push(u)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}function J(t,e){return U(t.states,(function(t,n){if(t){var r=(Z(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:J(t,r)}}}))}function K(t){return Array.isArray(t)}function Q(t){return"function"==typeof t}function Z(t){return"string"==typeof t}function X(t,e){if(t)return Z(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:Q(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function Y(t){try{return"subscribe"in t&&Q(t.subscribe)}catch(t){return!1}}var tt,et,nt=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function rt(t){try{return"__xstatenode"in t}catch(t){return!1}}function it(t){return!!t&&"function"==typeof t.send}function ot(t,e){return Z(t)||"number"==typeof t?E({type:t},e):t}function at(t,e){if(!Z(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=ot(t);return E({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function st(t,e){return V(e).map((function(e){return void 0===e||"string"==typeof e||rt(e)?{target:e,event:t}:E(E({},e),{event:t})}))}function ct(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return e.predicate(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '"+e.type+"' is not implemented on machine '"+t.id+"'.");return s(n,r.data,a)}function ut(t){return"string"==typeof t?{type:t}:t}function lt(t,e,n){if("object"==typeof t)return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}!function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"}(tt||(tt={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(et||(et={}));var ft=tt.Start,ht=tt.Stop,pt=tt.Raise,dt=tt.Send,yt=tt.Cancel,vt=tt.NullEvent,gt=tt.Assign;tt.After,tt.DoneState;var bt=tt.Log,_t=tt.Init,mt=tt.Invoke;tt.ErrorExecution;var wt=tt.ErrorPlatform,jt=tt.ErrorCustom,xt=tt.Update,Ot=tt.Choose,St=tt.Pure,Et=at({type:_t});function kt(t,e){return e&&e[t]||void 0}function At(t,e){var n;if(Z(t)||"number"==typeof t){var r=kt(t,e);n=Q(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(Q(t))n={type:t.name||t.toString(),exec:t};else{if(Q(r=kt(t.type,e)))n=E(E({},t),{exec:r});else if(r){var i=r.type||t.type;n=E(E(E({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var Pt=function(t,e){return t?(K(t)?t:[t]).map((function(t){return At(t,e)})):[]};function Tt(t){var e=At(t);return E(E({id:Z(t)?t:e.id},e),{type:e.type})}function Rt(t){return Z(t)?{type:pt,event:t}:Dt(t,{to:et.Internal})}function Dt(t,e){return{to:e?e.to:void 0,type:dt,event:Q(t)?t:ot(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:Q(t)?t.name:I(t)}}function Nt(t,e){return Dt(t,E(E({},e),{to:et.Parent}))}function It(){return Nt(xt)}function Lt(t,e){return Dt(t,E(E({},e),{to:function(t,e,n){return n._event.origin}}))}var Ct=function(t,e){return{context:t,event:e}};function Ft(t,e){return void 0===t&&(t=Ct),{type:bt,label:e,expr:t}}var Ut=function(t){return{type:yt,sendId:t}};function Mt(t){var e=Tt(t);return{type:tt.Start,activity:e,exec:void 0}}function $t(t){var e=Q(t)?t:Tt(t);return{type:tt.Stop,activity:e,exec:void 0}}var Bt=function(t){return{type:gt,assignment:t}};function zt(t,e){var n=e?"#"+e:"";return tt.After+"("+t+")"+n}function Vt(t,e){var n=tt.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Wt(t,e){var n=tt.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function qt(t,e){var n=tt.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Ht(t){return{type:tt.Pure,get:t}}function Gt(t,e){return Dt((function(t,e){return e}),E(E({},e),{to:t}))}function Jt(t,e){return Nt((function(e,n,r){return{type:jt,data:Q(t)?t(e,n,r):t}}),E(E({},e),{to:et.Parent}))}function Kt(t){return{type:tt.Choose,conds:t}}function Qt(t,e,n,r,i){var o=P(G(i,(function(t){return t.type===gt})),2),a=o[0],s=o[1],c=a.length?function(t,e,n,r){return t?n.reduce((function(t,n){var i,o,a=n.assignment,s={state:r,action:n,_event:e},c={};if(Q(a))c=a(t,e.data,s);else try{for(var u=A(D(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=Q(h)?h(t,e.data,s):h}}catch(t){i={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return Object.assign({},t,c)}),t):t}(n,r,a,e):n,u=z(s.map((function(n){var i;switch(n.type){case pt:return{type:pt,_event:at(n.event)};case dt:var o=function(t,e,n,r){var i,o={_event:n},a=at(Q(t.event)?t.event(e,n.data,o):t.event);if(Z(t.delay)){var s=r&&r[t.delay];i=Q(s)?s(e,n.data,o):s}else i=Q(t.delay)?t.delay(e,n.data,o):t.delay;var c=Q(t.to)?t.to(e,n.data,o):t.to;return E(E({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case bt:return function(t,e,n){return E(E({},t),{value:Z(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case Ot:if(!(s=null===(i=n.conds.find((function(n){var i=X(n.cond,t.options.guards);return!i||ct(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=Qt(t,e,c,r,Pt(W(s),t.options.actions));return c=a[1],a[0];case St:var s;if(!(s=n.get(c,r.data)))return[];a=Qt(t,e,c,r,Pt(W(s),t.options.actions));return c=a[1],a[0];case ht:return function(t,e,n){var r=Q(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:tt.Stop,activity:i}}(n,c,r);default:return At(n,t.options.actions)}})));return[u,c]}var Zt=function(t){return"atomic"===t.type||"final"===t.type};function Xt(t){return D(t.states).map((function(e){return t.states[e]}))}function Yt(t){var e=[t];return Zt(t)?e:e.concat(z(Xt(t).map(Yt)))}function te(t,e){var n,r,i,o,a,s,c,u,l=ne(new Set(t)),f=new Set(e);try{for(var h=A(f),p=h.next();!p.done;p=h.next())for(var d=(x=p.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var y=ne(f);try{for(var v=A(f),g=v.next();!g.done;g=v.next()){if("compound"!==(x=g.value).type||y.get(x)&&y.get(x).length){if("parallel"===x.type)try{for(var b=(a=void 0,A(Xt(x))),_=b.next();!_.done;_=b.next()){var m=_.value;"history"!==m.type&&(f.has(m)||(f.add(m),l.get(m)?l.get(m).forEach((function(t){return f.add(t)})):m.initialStateNodes.forEach((function(t){return f.add(t)}))))}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}else l.get(x)?l.get(x).forEach((function(t){return f.add(t)})):x.initialStateNodes.forEach((function(t){return f.add(t)}))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var w=A(f),j=w.next();!j.done;j=w.next()){var x;for(d=(x=j.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}}catch(t){c={error:t}}finally{try{j&&!j.done&&(u=w.return)&&u.call(w)}finally{if(c)throw c.error}}return f}function ee(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(Zt(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=ee(t,e)})),i}function ne(t){var e,n,r=new Map;try{for(var i=A(t),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function re(t,e){return ee(t,ne(te([t],e)))}function ie(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function oe(t,e){return"compound"===e.type?Xt(e).some((function(e){return"final"===e.type&&ie(t,e)})):"parallel"===e.type&&Xt(e).every((function(e){return oe(t,e)}))}function ae(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(Z(t)||Z(e))return t===e;var n=D(t),r=D(e);return n.length===r.length&&n.every((function(n){return ae(t[n],e[n])}))}function se(t){return!Z(t)&&("value"in t&&"history"in t)}function ce(t,e){var n=t.exec;return E(E({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var ue=function(){function t(t){var e=this;this.actions=[],this.activities=R,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||R,this.meta=t.meta||{},this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,Object.defineProperty(this,"nextEvents",{get:function(){return t=e.configuration,z(T(new Set(t.map((function(t){return t.ownEvents})))));var t}})}return t.from=function(e,n){return e instanceof t?e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e:new t({value:e,context:n,_event:Et,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Et;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(t,e){var n=this;if(void 0===t&&(t=this.value),void 0===e&&(e="."),Z(t))return[t];var r=D(t);return r.concat.apply(r,T(r.map((function(r){return n.toStrings(t[r],e).map((function(t){return r+e+t}))}))))},t.prototype.toJSON=function(){var t=this;return t.configuration,t.transitions,k(t,["configuration","transitions"])},t.prototype.matches=function(t){return N(t,this.value)},t}(),le=function(t,e){return e(t)};function fe(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function he(t,e,n,r){var i,o=ut(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?q(t.data,n,r):void 0,c=a?function(t,e,n){var r=fe(e);r.deferred=!0,rt(t)&&(r.state=le(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):fe(t.id);return c.meta=t,c}function pe(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function de(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function ye(t){return E(E({type:mt},t),{toJSON:function(){t.onDone,t.onError;var e=k(t,["onDone","onError"]);return E(E({},e),{type:mt,src:de(t.src)})}})}var ve={},ge=function(t){return"#"===t[0]},be=function(){function t(e,n,r){var i=this;this.config=e,this.context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=this.options._parent,this.key=this.config.key||this.options._key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||T([this.machine.key],this.path).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&D(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?U(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,E(((r={})[o.id]=o,r),o.idMap)),o})):ve;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=A(Xt(e)),a=i.next();!a.done;a=i.next()){t(a.value)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(t){return""===t.event})):""in this.config.on),this.strict=!!this.config.strict,this.onEntry=W(this.config.entry||this.config.onEntry).map((function(t){return At(t)})),this.onExit=W(this.config.exit||this.config.onExit).map((function(t){return At(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=W(this.config.invoke).map((function(t,e){var n,r;if(rt(t))return i.machine.options.services=E(((n={})[t.id]=t,n),i.machine.options.services),ye({src:t.id,id:t.id});if(Z(t.src))return ye(E(E({},t),{id:t.id||t.src,src:t.src}));if(rt(t.src)||Q(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=E(((r={})[o]=t.src,r),i.machine.options.services),ye(E(E({id:o},t),{src:o}))}var a=t.src;return ye(E(E({id:a.type},t),{src:a}))})),this.activities=W(this.config.activities).concat(this.invoke).map((function(t){return Tt(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||Yt(this).forEach((function(t){return t.on}))},t.prototype.withConfig=function(e,n){void 0===n&&(n=this.context);var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,c=r.delays;return new t(this.config,{actions:E(E({},i),e.actions),activities:E(E({},o),e.activities),guards:E(E({},a),e.guards),services:E(E({},s),e.services),delays:E(E({},c),e.delays)},n)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:U(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},t.prototype.getDelayedTransitions=function(){var t=this,e=this.config.after;if(!e)return[];var n=function(e,n){var r=zt(Q(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(Dt(r,{delay:e})),t.onExit.push(Ut(r)),r};return(K(e)?e.map((function(t,e){var r=n(t.delay,e);return E(E({},t),{event:r})})):z(D(e).map((function(t,r){var i=e[t],o=Z(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return W(o).map((function(t){return E(E({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return E(E({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof ue?t.value:C(t,this.delimiter);if(Z(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=D(r);return o.map((function(t){return n.getStateNode(t)})).concat(o.reduce((function(t,e){var i=n.getStateNode(e).getStateNodes(r[e]);return t.concat(i)}),[]))},t.prototype.handles=function(t){var e=I(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(te([],this.getStateNodes(t.value)));return new ue(E(E({},t),{value:this.resolve(t.value),configuration:e,done:oe(e,this)}))},t.prototype.transitionLeafNode=function(t,e,n){var r=this.getStateNode(t).next(e,n);return r&&r.transitions.length?r:this.next(e,n)},t.prototype.transitionCompoundNode=function(t,e,n){var r=D(t),i=this.getStateNode(r[0])._transition(t[r[0]],e,n);return i&&i.transitions.length?i:this.next(e,n)},t.prototype.transitionParallelNode=function(t,e,n){var r,i,o={};try{for(var a=A(D(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];if(u){var l=this.getStateNode(c)._transition(u,e,n);l&&(o[c]=l)}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var f=D(o).map((function(t){return o[t]})),h=z(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=z(f.map((function(t){return t.entrySet}))),d=z(D(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:z(f.map((function(t){return t.exitSet}))),configuration:d,source:e,actions:z(D(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return Z(t)?this.transitionLeafNode(t,e,n):1===D(t).length?this.transitionCompoundNode(t,e,n):this.transitionParallelNode(t,e,n)},t.prototype.next=function(t,e){var n,r,i,o=this,a=e.name,s=[],c=[];try{for(var u=A(this.getCandidates(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=f.cond,p=f.in,d=t.context,y=!p||(Z(p)&&ge(p)?t.matches(C(this.getStateNodeById(p).path,this.delimiter)):N(C(p,this.delimiter),$(this.path.slice(0,-2))(t.value))),v=!1;try{v=!h||ct(this.machine,h,d,e,t)}catch(t){throw new Error("Unable to evaluate guard '"+(h.name||h.type)+"' in transition for event '"+a+"' in state node '"+this.id+"':\n"+t.message)}if(v&&y){void 0!==f.target&&(c=f.target),s.push.apply(s,T(f.actions)),i=f;break}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(i){if(!c.length)return{transitions:[i],entrySet:[],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var g=z(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),b=!!i.internal;return{transitions:[i],entrySet:b?[]:z(g.map((function(t){return o.nodesFromChild(t)}))),exitSet:b?[]:[this],configuration:g,source:t,actions:s}}},t.prototype.nodesFromChild=function(t){if(t.escapes(this))return[];for(var e=[],n=t;n&&n!==this;)e.push(n),n=n.parent;return e.push(this),e},t.prototype.escapes=function(t){if(this===t)return!1;for(var e=this.parent;e;){if(e===t)return!1;e=e.parent}return!0},t.prototype.getActions=function(t,e,n,r){var i,o,a,s,c=te([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?te(c,t.configuration):c;try{for(var l=A(u),f=l.next();!f.done;f=l.next()){ie(c,d=f.value)||t.entrySet.push(d)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}try{for(var h=A(c),p=h.next();!p.done;p=h.next()){var d;ie(u,d=p.value)&&!ie(t.exitSet,d.parent)||t.exitSet.push(d)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}t.source||(t.exitSet=[],t.entrySet.push(this));var y=z(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Vt(r.id,r.doneData),Vt(o.id,r.doneData?q(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&Xt(a).every((function(e){return oe(t.configuration,e)}))&&i.push(Vt(a.id)),i})));t.exitSet.sort((function(t,e){return e.order-t.order})),t.entrySet.sort((function(t,e){return t.order-e.order}));var v=new Set(t.entrySet),g=new Set(t.exitSet),b=P([z(Array.from(v).map((function(t){return T(t.activities.map((function(t){return Mt(t)})),t.onEntry)}))).concat(y.map(Rt)),z(Array.from(g).map((function(t){return T(t.onExit,t.activities.map((function(t){return $t(t)})))})))],2),_=b[0],m=b[1];return Pt(m.concat(t.actions).concat(_),this.machine.options.actions)},t.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,i,o=at(e);if(t instanceof ue)r=void 0===n?t:this.resolveState(ue.from(t,n));else{var a=Z(t)?this.resolve(F(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(ue.from(a,s))}if(this.strict&&!this.events.includes(o.name)&&(i=o.name,!/^(done|error)\./.test(i)))throw new Error("Machine '"+this.id+"' does not accept event '"+o.name+"'");var c=this._transition(r.value,r,o)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},u=te([],this.getStateNodes(r.value)),l=c.configuration.length?te(u,c.configuration):u;return c.configuration=T(l),this.resolveTransition(c,r,o)},t.prototype.resolveRaisedTransition=function(t,e,n){var r,i=t.actions;return(t=this.transition(t,e))._event=n,t.event=n.data,(r=t.actions).unshift.apply(r,T(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=Et),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?re(this.machine,s):void 0,u=e?e.historyValue?e.historyValue:t.source?this.machine.historyValue(e.value):void 0:void 0,l=e?e.context:r,f=this.getActions(t,l,n,e),h=e?E({},e.activities):{};try{for(var p=A(f),d=p.next();!d.done;d=p.next()){var y=d.value;y.type===ft?h[y.activity.id||y.activity.type]=y:y.type===ht&&(h[y.activity.id||y.activity.type]=!1)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}var v,g,b=P(Qt(this,e,l,n,f),2),_=b[0],m=b[1],w=P(G(_,(function(t){return t.type===pt||t.type===dt&&t.to===et.Internal})),2),j=w[0],x=w[1],O=_.filter((function(t){var e;return t.type===ft&&(null===(e=t.activity)||void 0===e?void 0:e.type)===mt})),S=O.reduce((function(t,e){return t[e.activity.id]=he(e.activity,a.machine,m,n),t}),e?E({},e.children):{}),k=c?t.configuration:e?e.configuration:[],T=k.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),R=oe(k,this),D=new ue({value:c||e.value,context:m,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(v=u,g=c,{current:g,states:J(v,g)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?x:[],activities:c?h:e?e.activities:{},meta:c?T:e?e.meta:void 0,events:[],configuration:k,transitions:t.transitions,children:S,done:R}),N=l!==m;D.changed=n.name===xt||N;var I=D.history;if(I&&delete I.history,!c)return D;var L=D;if(!R)for((this._transient||s.some((function(t){return t._transient})))&&(L=this.resolveRaisedTransition(L,{type:vt},n));j.length;){var C=j.shift();L=this.resolveRaisedTransition(L,C._event,n)}var F=L.changed||(I?!!L.actions.length||N||typeof I.value!=typeof L.value||!ae(L.value,I.value):void 0);return L.changed=F,L.history=I,L},t.prototype.getStateNode=function(t){if(ge(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '"+t+"' from '"+this.id+"'; no child states exist.");var e=this.states[t];if(!e)throw new Error("Child state '"+t+"' does not exist on '"+this.id+"'");return e},t.prototype.getStateNodeById=function(t){var e=ge(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#"+e+"' does not exist on machine '"+this.id+"'");return n},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&ge(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=L(t,this.delimiter).slice(),n=this;e.length;){var r=e.shift();if(!r.length)break;n=n.getStateNode(r)}return n},t.prototype.resolve=function(t){var e,n=this;if(!t)return this.initialStateValue||ve;switch(this.type){case"parallel":return U(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):ve}));case"compound":if(Z(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return D(t).length?U(t,(function(t,e){return t?n.getStateNode(e).resolve(t):ve})):this.initialStateValue||{};default:return t||ve}},t.prototype.getResolvedPath=function(t){if(ge(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return L(t,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t,e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)e=M(this.states,(function(t){return t.initialStateValue||ve}),(function(t){return!("history"===t.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '"+this.initial+"' not found on '"+this.key+"'");e=Zt(this.states[this.initial])?this.initial:((t={})[this.initial]=this.states[this.initial].initialStateValue,t)}return this.__cache.initialStateValue=e,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(t,e){var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,void 0,e)},Object.defineProperty(t.prototype,"initialState",{get:function(){this._init();var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '"+this.id+"'.");return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var t;if("history"===this.type){var e=this.config;t=Z(e.target)&&ge(e.target)?F(this.machine.getStateNodeById(e.target).path.slice(this.path.length-1)):e.target}return t},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(t,e,n){return void 0===n&&(n=!0),n?"history"===t.type?t.resolveHistory(e):t.initialStateNodes:[t]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;return Zt(this)?[this]:"compound"!==this.type||this.initial?z(B(this.initialStateValue).map((function(e){return t.getFromRelativePath(e)}))):[this]},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var e=P(t),n=e[0],r=e.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '"+n+"' from node with no states");var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '"+n+"' does not exist on '"+this.id+"'");return this.states[n].getFromRelativePath(r)},t.prototype.historyValue=function(t){if(D(this.states).length)return{current:t||this.initialStateValue,states:M(this.states,(function(e,n){if(!t)return e.historyValue();var r=Z(t)?void 0:t[n];return e.historyValue(r||e.initialStateValue)}),(function(t){return!t.history}))}},t.prototype.resolveHistory=function(t){var e=this;if("history"!==this.type)return[this];var n=this.parent;if(!t){var r=this.target;return r?z(B(r).map((function(t){return n.getFromRelativePath(t)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(t){var e,n,r=t;try{for(var a=A(i),s=a.next();!s.done;s=a.next()){var c=s.value;r=r[o][c]}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return r})(t).current;return Z(a)?[n.getStateNode(a)]:z(B(a).map((function(t){return"deep"===e.history?n.getFromRelativePath(t):[n.states[t[0]]]})))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this,e=z(D(this.states).map((function(e){return t.states[e].stateIds})));return[this.id].concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var t,e,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=A(D(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,A(c.events)),l=u.next();!l.done;l=u.next()){var f=l.value;o.add(""+f)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(t){var e=this;if(void 0!==t)return t.map((function(t){if(!Z(t))return t;var n=t[0]===e.delimiter;if(n&&!e.parent)return e.getStateNodeByPath(t.slice(1));var r=n?e.key+t:t;if(!e.parent)return e.getStateNodeByPath(r);try{return e.parent.getStateNodeByPath(r)}catch(t){throw new Error("Invalid transition definition for state node '"+e.id+"':\n"+t.message)}}))},t.prototype.formatTransition=function(t){var e=this,n=function(t){if(void 0!==t&&""!==t)return W(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return Z(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=E(E({},t),{actions:Pt(W(t.actions)),cond:X(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return E(E({},a),{target:a.target?a.target.map((function(t){return"#"+t.id})):void 0,source:"#"+e.id})}});return a},t.prototype.formatTransitions=function(){var t,e,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o="*",a=i[o],s=void 0===a?[]:a,c=k(i,["*"]);n=z(D(c).map((function(t){var e=st(t,c[t]);return e})).concat(st("*",s)))}else n=[];var u=this.config.always?st("",this.config.always):[],l=this.config.onDone?st(String(Vt(this.id)),this.config.onDone):[];var f=z(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,T(st(String(Wt(t.id)),t.onDone))),t.onError&&e.push.apply(e,T(st(String(qt(t.id)),t.onError))),e}))),h=this.after,p=z(T(l,f,n,u).map((function(t){return W(t).map((function(t){return r.formatTransition(t)}))})));try{for(var d=A(h),y=d.next();!y.done;y=d.next()){var v=y.value;p.push(v)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}return p},t}();function _e(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new be(t,e,r)}function me(t,e){var n="function"==typeof t.context?t.context():t.context;return new be(t,e,n)}const we=Bt({failure:null}),je=Bt({errors:[]}),xe=Bt({edits:null}),Oe=Bt({data:null}),Se=je,Ee=Bt({failure:(t,e)=>e.data}),ke=Bt({errors:(t,e)=>e.data}),Ae=Bt({data:(t,e)=>e.data}),Pe=Bt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const Te=me({context:{data:null,edits:null,errors:[],failure:null},entry:["validate"],id:"nucleon",initial:"init",on:{DELETE:{target:"#nucleon.busy.deleting"},FETCH:{actions:["clearData","clearEdits","clearErrors"],target:"#nucleon.busy.fetching"},REFRESH:{target:"#nucleon.busy.fetching"},SET_DATA:{actions:["setData","clearEdits","clearErrors"],target:"#nucleon.init"}},states:{busy:{states:{creating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPost"}},deleting:{invoke:{onDone:{actions:["clearData","clearEdits","validate"],target:"#nucleon.idle.template"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendDelete"}},fetching:{invoke:{onDone:{actions:["setData","clearErrors","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendGet"}},updating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPatch"}}}},fail:{exit:"clearFailure"},idle:{initial:"unknown",on:{EDIT:{actions:["applyEdit","validate"],target:".unknown"}},states:{snapshot:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.snapshot.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.updating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},template:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.template.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.creating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},unknown:{always:[{cond:"hasData",target:"snapshot"},{target:"template"}]}}},init:{always:[{cond:"hasData",target:"idle.snapshot"},{target:"idle.template"}]}}},{actions:Object.freeze({__proto__:null,clearFailure:we,clearErrors:je,clearEdits:xe,clearData:Oe,validate:Se,setFailure:Ee,setErrors:ke,setData:Ae,applyEdit:Pe}),guards:Object.freeze({__proto__:null,hasData:t=>null!==t.data,hasEdits:t=>null!==t.edits,hasErrors:t=>t.errors.length>0,isV8nErrorEvent:(t,e)=>Array.isArray(e.data)})});class Re{constructor(t){this.__tree=Re.__parse(t)}static get True(){return Ne}static get False(){return De}static fromAttribute(t,e){return null===t?Re.False:""===t||t===e?Re.True:new Re(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const e=new Re("");return e.__tree=t.split(":").reduce(((t,e)=>{let n;if("include"in t){if(n=t.include[e],void 0===n)return{include:{}};if(!0===n)return{exclude:{"*":!0}}}else{if(n=t.exclude[e],void 0===n)return{exclude:{"*":!0}};if(!0===n)return{include:{}}}return n}),this.__tree),e}toString(){return Re.__stringifyTree(this.__tree)}toAttribute(t=""){const e=this.toString();return"not=*"===e?t:0===e.length?null:e}static __parsePath(t,e){const n=t.indexOf(":"),r=t.substring(0,n),i=t.substring(n+1);if("exclude"in e){const t=e.exclude[r];t&&(e.exclude[r]=this.__parseListItem(i,!0===t?void 0:t))}else{const t=e.include[r];!0!==t&&(e.include[r]=this.__parseListItem(i,t))}return e}static __parseSet(t,e){const n=t.split(",");if("include"in e){e={exclude:e.include};for(const t in e.exclude)n.includes(t)||delete e.exclude[t];for(const t of n)t in e.exclude?delete e.exclude[t]:e.exclude[t]=!0}else for(const t in e.exclude)n.includes(t)||delete e.exclude[t];return e}static __parseListItem(t,e={include:{}}){if(t.includes(":"))return this.__parsePath(t,e);if(t.startsWith("not="))return this.__parseSet(t.substring(4),e);if("include"in e)e.include[t]=!0;else for(const n in e.exclude)n===t&&delete e.exclude[n];return e}static __parseList(t,e={include:{}}){return t.split(" ").reduce(((t,e)=>this.__parseListItem(e,t)),e)}static __lintList(t){var e;let n="list",r="";for(let i=0;i<t.length;++i){const o=t.charAt(i);try{if("list"===n){if(/^\s$/.test(o)){/^\s$/.test(null!==(e=t[i-1])&&void 0!==e?e:" ")||(r+=" ");continue}if(/^[a-z]$/.test(o)){r+=o,n="path";continue}throw new SyntaxError(`Expected [a-z] or a whitespace, but got "${o}" instead.`)}if("path"===n){if(/^[a-z]$/.test(o)){r+=o;continue}if("-"===o){if("-"===t[i-1]||":"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if(":"===o){if(":"===t[i-1]||"-"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if("="===o){if("="===t[i-1]||":"===t[i-1]||"-"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);if(!r.endsWith("not")||3!==r.length&&/[a-z]|-/.test(r[i-4]))throw new SyntaxError(`Expected [a-z] or ":", but got "${o}" instead.`);r+=o,n="set";continue}if(/^\s$/.test(o)){r+=" ",n="list";continue}throw new SyntaxError(`Expected [a-z], ",", ":", ":" or a whitespace, but got "${o}" instead.`)}if("set"===n){if(/^\s$/.test(o))continue;if(/^[a-z]|\*$/.test(o)){n="set-item",r+=o;continue}throw new SyntaxError(`Expected [a-z] or a whitespace, but got "${o}" instead.`)}if("set-item"===n){if("*"===t[i-1]){if(","===o){r+=o,n="set";continue}if(/^\s$/.test(o)){i!==t.length-1&&(r+=" "),n="list";continue}throw new SyntaxError(`Expected "," or a whitespace, but got "${o}" instead.`)}if(/^[a-z]$/.test(o)){r+=o;continue}if("-"===o){if("-"===t[i-1]||":"===t[i-1]||"="===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if(","===o){r+=o,n="set";continue}if(/^\s$/.test(o)){i!==t.length-1&&(r+=" "),n="list";continue}throw new SyntaxError(`Expected [a-z], "," or a whitespace, but got "${o}" instead.`)}}catch(e){const n="This error occured at: ",r=t=>t.substring(Math.max(0,i-30),i+30),o=r(t),a=" ".repeat(n.length)+r("^".padStart(i+1," "));throw new SyntaxError([e.message,`${n}${o}`,a].join("\n"))}}return r.trimEnd()}static __parse(t){return this.__parseList(this.__lintList(t))}static __stringifyTree(t,e){const n=[];if("include"in t)for(const r in t.include){const i=t.include[r],o=e?[e,r].join(":"):r;!0===i?n.push(o):n.push(this.__stringifyTree(i,o))}else{const r=[],i=[];for(const n in t.exclude){const o=t.exclude[n],a=e?[e,n].join(":"):n;r.push(n),!0!==o&&i.push(this.__stringifyTree(o,a))}n.push(`${e?`${e}:`:""}not=${r.join(",")}`,...i)}return n.join(" ")}}const De=new Re(""),Ne=new Re("not=*");var Ie=Array.isArray,Le=v?v.prototype:void 0,Ce=Le?Le.toString:void 0;function Fe(t){if("string"==typeof t)return t;if(Ie(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,Fe)+"";if(S(t))return Ce?Ce.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Ue(t){if(!h(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Me,$e=y["__core-js_shared__"],Be=(Me=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"";var ze=Function.prototype.toString;function Ve(t){if(null!=t){try{return ze.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var We=/^\[object .+?Constructor\]$/,qe=Function.prototype,He=Object.prototype,Ge=qe.toString,Je=He.hasOwnProperty,Ke=RegExp("^"+Ge.call(Je).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qe(t){return!(!h(t)||(e=t,Be&&Be in e))&&(Ue(t)?Ke:We).test(Ve(t));var e}function Ze(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Qe(n)?n:void 0}var Xe=Ze(y,"WeakMap"),Ye=/^(?:0|[1-9]\d*)$/;function tn(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ye.test(t))&&t>-1&&t%1==0&&t<e}function en(t,e){return t===e||t!=t&&e!=e}function nn(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function rn(t){return null!=t&&nn(t.length)&&!Ue(t)}var on=Object.prototype;function an(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||on)}function sn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function cn(t){return O(t)&&"[object Arguments]"==x(t)}var un=Object.prototype,ln=un.hasOwnProperty,fn=un.propertyIsEnumerable,hn=cn(function(){return arguments}())?cn:function(t){return O(t)&&ln.call(t,"callee")&&!fn.call(t,"callee")};var pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,dn=pn&&"object"==typeof module&&module&&!module.nodeType&&module,yn=dn&&dn.exports===pn?y.Buffer:void 0,vn=(yn?yn.isBuffer:void 0)||function(){return!1},gn={};function bn(t){return function(e){return t(e)}}gn["[object Float32Array]"]=gn["[object Float64Array]"]=gn["[object Int8Array]"]=gn["[object Int16Array]"]=gn["[object Int32Array]"]=gn["[object Uint8Array]"]=gn["[object Uint8ClampedArray]"]=gn["[object Uint16Array]"]=gn["[object Uint32Array]"]=!0,gn["[object Arguments]"]=gn["[object Array]"]=gn["[object ArrayBuffer]"]=gn["[object Boolean]"]=gn["[object DataView]"]=gn["[object Date]"]=gn["[object Error]"]=gn["[object Function]"]=gn["[object Map]"]=gn["[object Number]"]=gn["[object Object]"]=gn["[object RegExp]"]=gn["[object Set]"]=gn["[object String]"]=gn["[object WeakMap]"]=!1;var _n="object"==typeof exports&&exports&&!exports.nodeType&&exports,mn=_n&&"object"==typeof module&&module&&!module.nodeType&&module,wn=mn&&mn.exports===_n&&p.process,jn=function(){try{var t=mn&&mn.require&&mn.require("util").types;return t||wn&&wn.binding&&wn.binding("util")}catch(t){}}(),xn=jn&&jn.isTypedArray,On=xn?bn(xn):function(t){return O(t)&&nn(t.length)&&!!gn[x(t)]},Sn=Object.prototype.hasOwnProperty;function En(t,e){var n=Ie(t),r=!n&&hn(t),i=!n&&!r&&vn(t),o=!n&&!r&&!i&&On(t),a=n||r||i||o,s=a?sn(t.length,String):[],c=s.length;for(var u in t)!e&&!Sn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tn(u,c))||s.push(u);return s}function kn(t,e){return function(n){return t(e(n))}}var An=kn(Object.keys,Object),Pn=Object.prototype.hasOwnProperty;function Tn(t){return rn(t)?En(t):function(t){if(!an(t))return An(t);var e=[];for(var n in Object(t))Pn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dn=/^\w*$/;var Nn=Ze(Object,"create");var In=Object.prototype.hasOwnProperty;var Ln=Object.prototype.hasOwnProperty;function Cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t,e){for(var n=t.length;n--;)if(en(t[n][0],e))return n;return-1}Cn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Cn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Cn.prototype.get=function(t){var e=this.__data__;if(Nn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return In.call(e,t)?e[t]:void 0},Cn.prototype.has=function(t){var e=this.__data__;return Nn?void 0!==e[t]:Ln.call(e,t)},Cn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nn&&void 0===e?"__lodash_hash_undefined__":e,this};var Un=Array.prototype.splice;function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Mn.prototype.clear=function(){this.__data__=[],this.size=0},Mn.prototype.delete=function(t){var e=this.__data__,n=Fn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Un.call(e,n,1),--this.size,!0)},Mn.prototype.get=function(t){var e=this.__data__,n=Fn(e,t);return n<0?void 0:e[n][1]},Mn.prototype.has=function(t){return Fn(this.__data__,t)>-1},Mn.prototype.set=function(t,e){var n=this.__data__,r=Fn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var $n=Ze(y,"Map");function Bn(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new($n||Mn),string:new Cn}},zn.prototype.delete=function(t){var e=Bn(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return Bn(this,t).get(t)},zn.prototype.has=function(t){return Bn(this,t).has(t)},zn.prototype.set=function(t,e){var n=Bn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Vn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Vn.Cache||zn),n}Vn.Cache=zn;var Wn,qn,Hn,Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jn=/\\(\\)?/g,Kn=(Wn=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gn,(function(t,n,r,i){e.push(r?i.replace(Jn,"$1"):n||t)})),e},qn=Vn(Wn,(function(t){return 500===Hn.size&&Hn.clear(),t})),Hn=qn.cache,qn),Qn=Kn;function Zn(t,e){return Ie(t)?t:function(t,e){if(Ie(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!S(t))||Dn.test(t)||!Rn.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:Qn(function(t){return null==t?"":Fe(t)}(t))}function Xn(t){if("string"==typeof t||S(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Yn(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=Zn(e,t)).length;null!=t&&n<r;)t=t[Xn(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}function tr(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function er(t){var e=this.__data__=new Mn(t);this.size=e.size}function nr(){return[]}er.prototype.clear=function(){this.__data__=new Mn,this.size=0},er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},er.prototype.get=function(t){return this.__data__.get(t)},er.prototype.has=function(t){return this.__data__.has(t)},er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!$n||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var rr=Object.prototype.propertyIsEnumerable,ir=Object.getOwnPropertySymbols,or=ir?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(ir(t),(function(e){return rr.call(t,e)})))}:nr,ar=or;function sr(t,e,n){var r=e(t);return Ie(t)?r:tr(r,n(t))}function cr(t){return sr(t,Tn,ar)}var ur=Ze(y,"DataView"),lr=Ze(y,"Promise"),fr=Ze(y,"Set"),hr=Ve(ur),pr=Ve($n),dr=Ve(lr),yr=Ve(fr),vr=Ve(Xe),gr=x;(ur&&"[object DataView]"!=gr(new ur(new ArrayBuffer(1)))||$n&&"[object Map]"!=gr(new $n)||lr&&"[object Promise]"!=gr(lr.resolve())||fr&&"[object Set]"!=gr(new fr)||Xe&&"[object WeakMap]"!=gr(new Xe))&&(gr=function(t){var e=x(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ve(n):"";if(r)switch(r){case hr:return"[object DataView]";case pr:return"[object Map]";case dr:return"[object Promise]";case yr:return"[object Set]";case vr:return"[object WeakMap]"}return e});var br=gr,_r=y.Uint8Array;function mr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function wr(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function jr(t,e){return t.has(e)}mr.prototype.add=mr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},mr.prototype.has=function(t){return this.__data__.has(t)};function xr(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var f=-1,h=!0,p=2&n?new mr:void 0;for(o.set(t,e),o.set(e,t);++f<s;){var d=t[f],y=e[f];if(r)var v=a?r(y,d,f,e,t,o):r(d,y,f,t,e,o);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!wr(e,(function(t,e){if(!jr(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){h=!1;break}}else if(d!==y&&!i(d,y,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function Or(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Sr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Er=v?v.prototype:void 0,kr=Er?Er.valueOf:void 0;var Ar=Object.prototype.hasOwnProperty;var Pr="[object Object]",Tr=Object.prototype.hasOwnProperty;function Rr(t,e,n,r,i,o){var a=Ie(t),s=Ie(e),c=a?"[object Array]":br(t),u=s?"[object Array]":br(e),l=(c="[object Arguments]"==c?Pr:c)==Pr,f=(u="[object Arguments]"==u?Pr:u)==Pr,h=c==u;if(h&&vn(t)){if(!vn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new er),a||On(t)?xr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new _r(t),new _r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return en(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Or;case"[object Set]":var c=1&r;if(s||(s=Sr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=xr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(kr)return kr.call(t)==kr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=l&&Tr.call(t,"__wrapped__"),d=f&&Tr.call(e,"__wrapped__");if(p||d){var y=p?t.value():t,v=d?e.value():e;return o||(o=new er),i(y,v,n,r,o)}}return!!h&&(o||(o=new er),function(t,e,n,r,i,o){var a=1&n,s=cr(t),c=s.length;if(c!=cr(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:Ar.call(e,l)))return!1}var f=o.get(t),h=o.get(e);if(f&&h)return f==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<c;){var y=t[l=s[u]],v=e[l];if(r)var g=a?r(v,y,l,e,t,o):r(y,v,l,t,e,o);if(!(void 0===g?y===v||i(y,v,n,r,o):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var b=t.constructor,_=e.constructor;b==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function Dr(t,e,n,r,i){return t===e||(null==t||null==e||!O(t)&&!O(e)?t!=t&&e!=e:Rr(t,e,n,r,Dr,i))}function Nr(t,e){return Dr(t,e)}class Ir extends Error{constructor(){super("not enough info to update; please reload resource instead")}}var Lr=u((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],l=!0;return function t(f){var h=n?i(f):f,p={},d=!0,y={node:h,node_:f,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){y.isRoot||(y.parent.node[y.key]=t),y.node=t,e&&(d=!1)},delete:function(t){delete y.parent.node[y.key],t&&(d=!1)},remove:function(t){s(y.parent.node)?y.parent.node.splice(y.key,1):delete y.parent.node[y.key],t&&(d=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return y;function v(){if("object"==typeof y.node&&null!==y.node){y.keys&&y.node_===y.node||(y.keys=o(y.node)),y.isLeaf=0==y.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===f){y.circular=a[t];break}}else y.isLeaf=!0,y.keys=null;y.notLeaf=!y.isLeaf,y.notRoot=!y.isRoot}v();var g=e.call(y,y.node);return void 0!==g&&y.update&&y.update(g),p.before&&p.before.call(y,y.node),d?("object"!=typeof y.node||null===y.node||y.circular||(a.push(y),v(),c(y.keys,(function(e,i){r.push(e),p.pre&&p.pre.call(y,y.node[e],e);var o=t(y.node[e]);n&&u.call(y.node,e)&&(y.node[e]=o.node),o.isLast=i==y.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(y,o),r.pop()})),a.pop()),p.after&&p.after.call(y,y.node),y):y}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];u.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),c(o(r),(function(t){s[t]=n(r[t])})),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(o(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}}));var u=Object.hasOwnProperty||function(t,e){return e in t}}));class Cr{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Cr.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Cr.__applyPatch(i,t,e);return Nr(t,n)?t:n}))}))}track(t){return this.__callbacks.push(t),()=>{this.__callbacks.splice(this.__callbacks.indexOf(t),1)}}cease(){this.__callbacks.length=0}static __isCollection(t){return"string"==typeof Yn(t,"_links.first.href")}static __isResource(t){return"string"==typeof Yn(t,"_links.self.href")}static __approximateURI(t){try{const e=new URL(t);return e.search="",e.hash="",e.toString()}catch(e){return t}}static __createPatch(t){return Lr(t).reduce((function(t,e){if(!Cr.__isResource(e)||Cr.__isCollection(e))return t;const n=Lr(e).map((function(){var t;(null===(t=this.key)||void 0===t?void 0:t.startsWith("_"))&&this.delete(!0)}));return t.set(e._links.self.href,n),t}),new Map)}static __applyPatch(t,e,n){var r,i;const o=null!==(r=null==n?void 0:n.map((t=>Cr.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=Lr({data:e}).map((function(e){if(!Cr.__isResource(e))return;const n=e._links.self.href,r=Cr.__approximateURI(n);if(o.includes(r))throw new Cr.UpdateError;if(t.has(n)){const r=t.get(n);if(r)return this.update(Object.assign(Object.assign({},e),r),!0);if(!this.parent.parent)return this.delete(!0);throw new Cr.UpdateError}})).data)&&void 0!==i?i:null}}Cr.UpdateError=Ir;var Fr=u((function(t,e){t.exports=function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(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 s(t,e){if(t){if("string"==typeof t)return c(t,e);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)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=s(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}var l={};l[l.Fatal=0]="Fatal",l[l.Error=0]="Error",l[l.Warn=1]="Warn",l[l.Log=2]="Log",l[l.Info=3]="Info",l[l.Success=3]="Success",l[l.Debug=4]="Debug",l[l.Trace=5]="Trace",l[l.Silent=-1/0]="Silent",l[l.Verbose=1/0]="Verbose";var f={silent:{level:-1},fatal:{level:l.Fatal},error:{level:l.Error},warn:{level:l.Warn},log:{level:l.Log},info:{level:l.Info},success:{level:l.Success},debug:{level:l.Debug},trace:{level:l.Trace},verbose:{level:l.Trace},ready:{level:l.Info},start:{level:l.Info}};function h(t){return e=t,!("[object Object]"!==Object.prototype.toString.call(e)||!t.message&&!t.args||t.stack);var e}var p=!1,d=[],y=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in t(this,e),this._reporters=n.reporters||[],this._types=n.types||f,this.level=void 0!==n.level?n.level:3,this._defaults=n.defaults||{},this._async=void 0!==n.async?n.async:void 0,this._stdout=n.stdout,this._stderr=n.stderr,this._mockFn=n.mockFn,this._throttle=n.throttle||1e3,this._throttleMin=n.throttleMin||5,this._types){var i=o(o({type:r},this._types[r]),this._defaults);this[r]=this._wrapLogFn(i),this[r].raw=this._wrapLogFn(i,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return n(e,[{key:"create",value:function(t){return new e(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},t))}},{key:"withDefaults",value:function(t){return this.create({defaults:Object.assign({},this._defaults,t)})}},{key:"withTag",value:function(t){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+t:t})}},{key:"addReporter",value:function(t){return this._reporters.push(t),this}},{key:"removeReporter",value:function(t){if(t){var e=this._reporters.indexOf(t);if(e>=0)return this._reporters.splice(e,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(t){return this._reporters=Array.isArray(t)?t:[t],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var t in this._types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}},{key:"restoreConsole",value:function(){for(var t in this._types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(t,e){var n=this;t&&(t.__write||(t.__write=t.write),t.write=function(t){n[e].raw(String(t).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}},{key:"pauseLogs",value:function(){p=!0}},{key:"resumeLogs",value:function(){p=!1;var t,e=u(d.splice(0));try{for(e.s();!(t=e.n()).done;){var n=t.value;n[0]._logFn(n[1],n[2])}}catch(t){e.e(t)}finally{e.f()}}},{key:"mockTypes",value:function(t){if(this._mockFn=t||this._mockFn,"function"==typeof this._mockFn)for(var e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e],this[e].raw=this[e]}},{key:"_wrapLogFn",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];if(!p)return n._logFn(t,i,e);d.push([n,t,i,e])}}},{key:"_logFn",value:function(t,e,n){var r=this;if(t.level>this.level)return!!this._async&&Promise.resolve(!1);var i=Object.assign({date:new Date,args:[]},t);!n&&1===e.length&&h(e[0])?Object.assign(i,e[0]):i.args=Array.from(e),i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split("\n")),i.args.push("\n"+i.additional.join("\n")),delete i.additional),i.type="string"==typeof i.type?i.type.toLowerCase():"",i.tag="string"==typeof i.tag?i.tag.toLowerCase():"";var s=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r._lastLogCount-r._throttleMin;if(r._lastLog&&e>0){var n=a(r._lastLog.args);e>1&&n.push("(repeated ".concat(e," times)")),r._log(o(o({},r._lastLog),{},{args:n})),r._lastLogCount=1}if(t){if(r._lastLog=i,r._async)return r._logAsync(i);r._log(i)}};clearTimeout(this._throttleTimeout);var c=this._lastLogTime?i.date-this._lastLogTime:0;if(this._lastLogTime=i.date,c<this._throttle)try{var u=JSON.stringify([i.type,i.tag,i.args]),l=this._lastLogSerialized===u;if(this._lastLogSerialized=u,l&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(s,this._throttle))}catch(t){}s(!0)}},{key:"_log",value:function(t){var e,n=u(this._reporters);try{for(n.s();!(e=n.n()).done;)e.value.log(t,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(t){n.e(t)}finally{n.f()}}},{key:"_logAsync",value:function(t){var e=this;return Promise.all(this._reporters.map((function(n){return n.log(t,{async:!0,stdout:e.stdout,stderr:e.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),e}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var v,g=function(){function e(n){t(this,e),this.options=Object.assign({},n),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return n(e,[{key:"log",value:function(t){var e=t.level<1?console.__error||console.error:1===t.level&&console.warn?console.__warn||console.warn:console.__log||console.log,n="log"!==t.type?t.type:"",r=t.tag?t.tag:"",i=this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor,o="\n background: ".concat(i,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),s="%c".concat([r,n].filter(Boolean).join(":"));"string"==typeof t.args[0]?e.apply(void 0,["".concat(s,"%c ").concat(t.args[0]),o,""].concat(a(t.args.slice(1)))):e.apply(void 0,[s,o].concat(a(t.args)))}}]),e}();return"undefined"!=typeof window&&window.consola||((v=new y({reporters:[new g]})).Consola=y,v.LogLevel=l,v.BrowserReporter=g,v)}()})),Ur=function(t,e,n,r){this.name=t,this.fn=e,this.args=n,this.modifiers=r};function Mr(t,e){return void 0===e&&(e="simple"),"object"==typeof t?t[e]:t}function $r(t,e,n){if(t.length){var r=t.shift(),i=$r(t,e,n);return r.perform(i,n)}return Mr(e)}function Br(t,e,n){if(t.length){var r=t.shift(),i=Br(t,e,n);return r.performAsync(i,n)}return function(t){return Promise.resolve(Mr(e,"async")(t))}}Ur.prototype._test=function(t){var e=this.fn;try{$r(this.modifiers.slice(),e,this)(t)}catch(t){e=function(){return!1}}try{return $r(this.modifiers.slice(),e,this)(t)}catch(t){return!1}},Ur.prototype._check=function(t){try{$r(this.modifiers.slice(),this.fn,this)(t)}catch(t){if($r(this.modifiers.slice(),(function(t){return t}),this)(!1))return}if(!$r(this.modifiers.slice(),this.fn,this)(t))throw null},Ur.prototype._testAsync=function(t){var e=this;return new Promise((function(n,r){Br(e.modifiers.slice(),e.fn,e)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))};var zr=function(t,e,n){this.name=t,this.perform=e,this.performAsync=n},Vr=function(t){function e(n,r,i,o){for(var a=[],s=arguments.length-4;s-- >0;)a[s]=arguments[s+4];t.call(this,a),t.captureStackTrace&&t.captureStackTrace(this,e),this.rule=n,this.value=r,this.cause=i,this.target=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Wr=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]),this.chain=t,this.nextRuleModifiers=e};function qr(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){qr(t,e,n,r)}),(function(e){r(new Vr(i,t,e))}))}else n(t)}Wr.prototype._applyRule=function(t,e){var n=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return n.chain.push(new Ur(e,t.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}},Wr.prototype._applyModifier=function(t,e){return this.nextRuleModifiers.push(new zr(e,t.simple,t.async)),this},Wr.prototype._clone=function(){return new Wr(this.chain.slice(),this.nextRuleModifiers.slice())},Wr.prototype.test=function(t){return this.chain.every((function(e){return e._test(t)}))},Wr.prototype.testAll=function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new Vr(n,t,r))}})),e},Wr.prototype.check=function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new Vr(e,t,n)}}))},Wr.prototype.testAsync=function(t){var e=this;return new Promise((function(n,r){qr(t,e.chain.slice(),n,r)}))};var Hr=function(t,e){return!(!e||"string"!=typeof t||0!==t.trim().length)||null==t};function Gr(){return"undefined"!=typeof Proxy?Kr(new Wr):Qr(new Wr)}var Jr={};function Kr(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=Kr(t._clone());return n in Zr?r._applyModifier(Zr[n],n):n in Jr?r._applyRule(Jr[n],n):n in ti?r._applyRule(ti[n],n):void 0}})}function Qr(t){var e=function(t,e){return Object.keys(t).forEach((function(n){e[n]=function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];var o=Qr(e._clone()),a=o._applyRule(t[n],n).apply(void 0,r);return a}})),e},n=e(ti,t),r=e(Jr,n);return Object.keys(Zr).forEach((function(t){Object.defineProperty(r,t,{get:function(){return Qr(r._clone())._applyModifier(Zr[t],t)}})})),r}Gr.extend=function(t){Object.assign(Jr,t)},Gr.clearCustomRules=function(){Jr={}};var Zr={not:{simple:function(t){return function(e){return!t(e)}},async:function(t){return function(e){return Promise.resolve(t(e)).then((function(t){return!t})).catch((function(){return!0}))}}},some:{simple:function(t){return function(e){return Yr(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Yr(e).map((function(e){try{return t(e).catch((function(){return!1}))}catch(t){return!1}}))).then((function(t){return t.some(Boolean)}))}}},every:{simple:function(t){return function(e){return!1!==e&&Yr(e).every(t)}},async:function(t){return function(e){return Promise.all(Yr(e).map(t)).then((function(t){return t.every(Boolean)}))}}},strict:{simple:function(t,e){return function(n){return Xr(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t(n):t(n)}},async:function(t,e){return function(n){return Promise.resolve(t(n)).then((function(t){return Xr(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t:t})).catch((function(){return!1}))}}}};function Xr(t){return t&&"schema"===t.name&&t.args.length>0&&"object"==typeof t.args[0]}function Yr(t){return"string"==typeof t?t.split(""):t}var ti={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(t){return void 0===t&&(t=!0),function(e){return"number"==typeof e&&(t||isFinite(e))}},integer:function(){return function(t){return(Number.isInteger||ni)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return ei("string")},boolean:function(){return ei("boolean")},undefined:function(){return ei("undefined")},null:function(){return ei("null")},array:function(){return ei("array")},object:function(){return ei("object")},instanceOf:function(t){return function(e){return e instanceof t}},pattern:function(t){return function(e){return t.test(e)}},lowercase:function(){return function(t){return"boolean"==typeof t||t===t.toLowerCase()&&""!==t.trim()}},uppercase:function(){return function(t){return t===t.toUpperCase()&&""!==t.trim()}},vowel:function(){return function(t){return/^[aeiou]+$/i.test(t)}},consonant:function(){return function(t){return/^(?=[^aeiou])([a-z]+)$/i.test(t)}},first:function(t){return function(e){return e[0]==t}},last:function(t){return function(e){return e[e.length-1]==t}},empty:function(){return function(t){return 0===t.length}},length:function(t,e){return function(n){return n.length>=t&&n.length<=(e||t)}},minLength:function(t){return function(e){return e.length>=t}},maxLength:function(t){return function(e){return e.length<=t}},negative:function(){return function(t){return t<0}},positive:function(){return function(t){return t>=0}},between:function(t,e){return function(n){return n>=t&&n<=e}},range:function(t,e){return function(n){return n>=t&&n<=e}},lessThan:function(t){return function(e){return e<t}},lessThanOrEqual:function(t){return function(e){return e<=t}},greaterThan:function(t){return function(e){return e>t}},greaterThanOrEqual:function(t){return function(e){return e>=t}},even:function(){return function(t){return t%2==0}},odd:function(){return function(t){return t%2!=0}},includes:function(t){return function(e){return~e.indexOf(t)}},schema:function(t){return function(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach((function(r){var i=t[r];try{i.check((e||{})[r])}catch(t){t.target=r,n.push(t)}})),n.length>0)throw n;return!0},async:function(e){var n=[],r=Object.keys(t).map((function(r){return t[r].testAsync((e||{})[r]).catch((function(t){t.target=r,n.push(t)}))}));return Promise.all(r).then((function(){if(n.length>0)throw n;return!0}))}}}(t)},passesAnyOf:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e){return t.some((function(t){return t.test(e)}))}},optional:function(t,e){return void 0===e&&(e=!1),{simple:function(n){return Hr(n,e)||void 0===t.check(n)},async:function(n){return Hr(n,e)||t.testAsync(n)}}}};function ei(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function ni(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Gr.extend({curieChain:()=>t=>Array.isArray(t)&&t[0]instanceof URL&&t.slice(1).every((t=>"string"==typeof t)),typeOf:t=>e=>typeof e===t});const ri=Gr().schema({clear:Gr().typeOf("function"),getItem:Gr().typeOf("function"),key:Gr().typeOf("function"),length:Gr().number(),removeItem:Gr().typeOf("function"),setItem:Gr().typeOf("function")});class ii extends Error{constructor(t){ii.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}ii.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",ii.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",ii.UNAUTHORIZED="UNAUTHORIZED",ii.UNKNOWN="UNKNOWN",ii.v8n={constructor:Gr().schema({code:Gr().passesAnyOf(Gr().exact(ii.NEW_PASSWORD_REQUIRED),Gr().exact(ii.INVALID_NEW_PASSWORD),Gr().exact(ii.UNAUTHORIZED),Gr().exact(ii.UNKNOWN))})};var oi=c(u((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),ai=u((function(t){t.exports=function(t,e){return e.get?e.get.call(t):e.value},t.exports.__esModule=!0,t.exports.default=t.exports})),si=u((function(t){t.exports=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),ci=c(u((function(t){t.exports=function(t,e){var n=si(t,e,"get");return ai(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),ui=new WeakMap,li=function(){function t(){ui.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=ci(this,ui).keys(),n=0,r=e.next();!r.done;){if(n===t)return r.value;n+=1,r=e.next()}return null},e.getItem=function(t){var e;return null!=(e=ci(this,ui).get(""+t))?e:null},e.setItem=function(t,e){ci(this,ui).set(""+t,""+e)},e.removeItem=function(t){ci(this,ui).delete(""+t)},e.clear=function(){ci(this,ui).clear()},oi(t,[{key:"length",get:function(){return ci(this,ui).size}}]),t}(),fi=li;class hi extends Error{constructor(t){super(),hi.v8n.constructor.check(t),this.response=t}}hi.v8n={constructor:Gr().instanceOf(f.Response)};var pi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},di=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function yi(t){const{json:e}=t,n=di(t,["json"]);if("_links"in e){const t=e._links;e._links=Object.entries(t).reduce(((t,[e,r])=>{if(Array.isArray(r))return Object.assign(Object.assign({},t),{[e]:r});const i=new mi(Object.assign(Object.assign({},n),{path:[new URL(r.href)]})),o={delete:i.delete.bind(i),follow:i.follow.bind(i),get:i.get.bind(i),patch:i.patch.bind(i),post:i.post.bind(i),put:i.put.bind(i)};return Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},r),o)})}),{})}if("_embedded"in e){const t=e._embedded;e._embedded=Object.entries(t).reduce(((t,[e,r])=>Object.assign(t,{[e]:Array.isArray(r)?r.map((t=>yi(Object.assign(Object.assign({},n),{json:t})))):yi(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class vi extends f.Response{constructor(t){vi.v8n.constructor.check(t),super(t.body,t),this._console=t.console,this._fetch=t.fetch,this._cache=t.cache}json(){const t=Object.create(null,{json:{get:()=>super.json}});return pi(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return yi(Object.assign({json:e},n))}))}}vi.v8n={constructor:Gr().schema({cache:ri,console:Gr().instanceOf(Fr.constructor),fetch:Gr().typeOf("function")})};var gi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};function bi(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>bi(t,e))).join():Object.entries(e).map((([t,e])=>bi(n+t,e))).join()}function _i(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>_i(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class mi{constructor(t){mi.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return gi(this,void 0,void 0,(function*(){mi.v8n.get.check(t);const e=yield this._resolve(),{filters:n,fields:r,offset:i,limit:o,order:a,zoom:s}=null!=t?t:{};void 0!==n&&n.forEach((t=>{const[n,r=""]=t.split("=");n&&e.searchParams.append(n,r)})),void 0!==r&&e.searchParams.set("fields",r.join(",")),void 0!==i&&e.searchParams.set("offset",String(i)),void 0!==o&&e.searchParams.set("limit",String(o)),void 0!==a&&e.searchParams.set("order",_i(a)),void 0!==s&&e.searchParams.set("zoom",bi("",s));const c=yield this._fetch(new f.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"PUT"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"POST"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"PATCH"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return gi(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new f.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){mi.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new mi(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return gi(this,void 0,void 0,(function*(){if(1===this._path.length)return new URL(this._path[0].toString());const[t,e]=this._path,n=`${t.toString()} > ${e}`,r={cache:this._cache,console:this._console,fetch:this._fetch};this._console.trace(`Trying to resolve ${n}...`);const i=this._cache.getItem(n);if(i){this._console.success(`Resolved ${n} to ${i.toString()} using cache.`);const t=[new URL(i),...this._path.slice(2)];return new mi(Object.assign(Object.assign({},r),{path:t}))._resolve()}const o=yield this._fetch(t.toString());if(o.ok){const t=yield o.clone().json();if(t._links[e]){const i=new URL(t._links[e].href),o=[i,...this._path.slice(2)];return this._cache.setItem(n,i.toString()),this._console.trace(`Cached ${i.toString()} for ${n}.`),this._console.success(`Resolved ${n} to ${i.toString()} online.`),new mi(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new hi(o)}))}}mi.v8n={classConstructor:Gr().schema({cache:ri,console:Gr().instanceOf(Fr.constructor),fetch:Gr().typeOf("function"),path:Gr().curieChain()}),follow:Gr().string(),get:Gr().optional(Gr().schema({fields:Gr().optional(Gr().array().every.string()),filters:Gr().optional(Gr().array().every.string()),limit:Gr().optional(Gr().number()),offset:Gr().optional(Gr().number()),order:Gr().optional(Gr().passesAnyOf(Gr().string(),Gr().object(),Gr().array())),zoom:Gr().optional(Gr().passesAnyOf(Gr().string(),Gr().object(),Gr().array()))}))},mi.ResolutionError=hi,mi.Response=vi;var wi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};class ji extends mi{constructor(t){var e,n,r;ji.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new fi,console:Fr.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:f.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new fi,this.cache=this._cache,this.base=t.base}fetch(...t){return wi(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}ji.WHATWGResponse=f.Response,ji.WHATWGRequest=f.Request,ji.WHATWGHeaders=f.Headers,ji.whatwgFetch=f.fetch,ji.AuthError=ii,ji.Node=mi,ji.v8n={classConstructor:Gr().schema({base:Gr().instanceOf(URL),cache:Gr().optional(ri),fetch:Gr().optional(Gr().typeOf("function")),level:Gr().optional(Gr().integer()),storage:Gr().optional(ri)})};export{Yn as $,ji as A,Re as B,ht as C,ft as D,tt as E,ut as F,H as G,Y as H,rt as I,yt as J,dt as K,pe as L,xt as M,qt as N,nt as O,K as P,ot as Q,Cr as R,ue as S,et as T,Z as U,it as V,jt as W,T as X,ce as Y,lt as Z,e as _,s as a,Rt as a0,Dt as a1,Nt as a2,It as a3,Ft as a4,Ut as a5,Mt as a6,$t as a7,zt as a8,Vt as a9,v as aA,O as aB,br as aC,jn as aD,bn as aE,Ie as aF,vn as aG,er as aH,cr as aI,n as aJ,nn as aK,hn as aL,Lt as aa,Gt as ab,Jt as ac,Kt as ad,Ht as ae,me as af,Zn as ag,Xn as ah,tn as ai,Ze as aj,en as ak,Gr as al,a as am,rn as an,sn as ao,_e as ap,Nr as aq,an as ar,En as as,kn as at,Tn as au,ar as av,nr as aw,tr as ax,sr as ay,_r as az,l as b,u as c,f as d,h as e,Te as f,c as g,Bt as h,S as i,E as j,A as k,oe as l,Vn as m,q as n,Wt as o,le as p,se as q,y as r,Et as s,Lr as t,Q as u,D as v,at as w,wt as x,kt as y,bt as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,k as e,l as n,n as i,o as r,p as s,q as o,S as a,s as h,u as c,v as u,w as d,x as l,y as f,z as p,C as v,D as y,E as w,F as x,G as b,H as m,I as g,J as E,K as S,L as T,M as L,N as _,O,P as k,Q as C,T as N,U as M,V as z,W as D,X as P,Y as I,Z as R}from"./shared-307262a1.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),j=new Map,F=0,U=function(){return"x:"+F++},X=function(t,e){return j.set(t,e),t},A=function(t){return j.get(t)},V=function(t){j.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(k(t))return i.batch(t),i.state;var n=d(C(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===N.Parent||i.parent.id===n),s=r?i.parent:M(n)?i.children.get(n)||A(n):z(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===D?""+_(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,c=void 0!==h?h:e.id;this.id=c,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=U()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return o(t)?e.machine.resolveState(t):e.machine.resolveState(a.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,h)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,a,h,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){a={error:t}}finally{try{E&&!E.done&&(h=g.return)&&h.call(g)}finally{if(a)throw a.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){c(t.stop)&&t.stop()}));try{for(var S=e(u(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],c=function(t){var e=d(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var u=e(t),l=u.next();!l.done;l=u.next()){c(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,d(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=d(t);if(0===n.name.indexOf(l)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(l)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||f(t.type,n),a=c(o)?o:o?o.exec:t.exec;if(a)try{return a(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case S:var h=t;if("number"==typeof h.delay)return void this.defer(h);h.to?this.sendTo(h._event,h.to):this.send(h._event);break;case E:this.cancel(t.sendId);break;case y:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===w.Invoke){var d=x(u.src),l=this.machine.options.services?this.machine.options.services[d.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!l)return;var O=L?i(L,r,s):void 0,k=c(l)?l(r,s.data,{data:O,src:d}):l;b(k)?this.spawnPromise(Promise.resolve(k),T):c(k)?this.spawnCallback(k,T):m(k)?this.spawnObservable(k,T):g(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case v:this.stopChild(t.activity.id);break;case p:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),c(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(b(e))return this.spawnPromise(Promise.resolve(e),n);if(c(e))return this.spawnCallback(e,n);if(T(e))return this.spawnActor(e);if(m(e))return this.spawnObservable(e,n);if(g(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(L,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(d(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(d(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=_(e,t);try{n.send(d(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(d(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(_(e,t))}if(b(n))return this.spawnPromise(n,e);var a={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,c(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,a),a},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(d(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(d(_(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(d(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[O]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,a as t,b as r}from"./shared-307262a1.js";var n=e((function(e,n){e.exports=function(){function e(t,n,i){function a(s,u){if(!n[s]){if(!t[s]){var c="function"==typeof r&&r;if(!u&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};t[s][0].call(p.exports,(function(e){return a(t[s][1][e]||e)}),p,p.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof r&&r,s=0;s<i.length;s++)a(i[s]);return a}return e}()({1:[function(e,t,r){const n=e("./utils"),i=function(){const e=n.stringToArray,t=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],r=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],i=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],a=["Thousand","Million","Billion","Trillion"];function o(e,n){var o=function(e,n,s){var u="";if(e<=19)u=(n?" and ":"")+(s?r[e]:t[e]);else if(e<100){const t=Math.floor(e/10),r=e%10;u=(n?" and ":"")+i[t-2],r>0?u+="-"+o(r,!1,s):s&&(u=u.substring(0,u.length-1)+"ieth")}else if(e<1e3){const r=Math.floor(e/100),i=e%100;u=(n?", ":"")+t[r]+" Hundred",i>0?u+=o(i,!0,s):s&&(u+="th")}else{var c=Math.floor(Math.log10(e)/3);c>a.length&&(c=a.length);const t=Math.pow(10,3*c),r=Math.floor(e/t),i=e-r*t;u=(n?", ":"")+o(r,!1,!1)+" "+a[c-1],i>0?u+=o(i,!0,s):s&&(u+="th")}return u};return o(e,!1,n)}const s={};function u(e){const t=e.split(/,\s|\sand\s|[\s\\-]/).map((e=>s[e]));let r=[0];return t.forEach((e=>{if(e<100){let t=r.pop();t>=1e3&&(r.push(t),t=0),r.push(t+e)}else r.push(r.pop()*e)})),r.reduce(((e,t)=>e+t),0)}t.forEach((function(e,t){s[e.toLowerCase()]=t})),r.forEach((function(e,t){s[e.toLowerCase()]=t})),i.forEach((function(e,t){const r=e.toLowerCase();s[r]=10*(t+2),s[r.substring(0,e.length-1)+"ieth"]=s[r]})),s.hundredth=100,a.forEach((function(e,t){const r=e.toLowerCase(),n=Math.pow(10,3*(t+1));s[r]=n,s[r+"th"]=n}));const c=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],l={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function p(e){for(var t=0;t<c.length;t++){const r=c[t];if(e>=r[0])return r[1]+p(e-r[0])}return""}function f(e){for(var t=0,r=1,n=e.length-1;n>=0;n--){const i=e[n],a=l[i];a<r?t-=a:(r=a,t+=a)}return t}function d(e,t){for(var r=[],n=t.charCodeAt(0);e>0;)r.unshift(String.fromCharCode((e-1)%26+n)),e=Math.floor((e-1)/26);return r.join("")}function h(e,t){for(var r=t.charCodeAt(0),n=0,i=0;i<e.length;i++)n+=(e.charCodeAt(e.length-i-1)-r+1)*Math.pow(26,i);return n}function v(e,t){if(void 0!==e)return m(e=Math.floor(e),k(t))}const g={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},y={UPPER:"upper",LOWER:"lower",TITLE:"title"};function m(t,r){let n;const i=t<0;switch(t=Math.abs(t),r.primary){case g.LETTERS:n=d(t,r.case===y.UPPER?"A":"a");break;case g.ROMAN:n=p(t),r.case===y.UPPER&&(n=n.toUpperCase());break;case g.WORDS:n=o(t,r.ordinal),r.case===y.UPPER?n=n.toUpperCase():r.case===y.LOWER&&(n=n.toLowerCase());break;case g.DECIMAL:n=""+t;var a=r.mandatoryDigits-n.length;if(a>0){var s=new Array(a+1).join("0");n=s+n}if(48!==r.zeroCode&&(n=e(n).map((e=>String.fromCodePoint(e.codePointAt(0)+r.zeroCode-48))).join("")),r.regular)for(let e=Math.floor((n.length-1)/r.groupingSeparators.position);e>0;e--){const t=n.length-e*r.groupingSeparators.position;n=n.substr(0,t)+r.groupingSeparators.character+n.substr(t)}else r.groupingSeparators.reverse().forEach((e=>{const t=n.length-e.position;n=n.substr(0,t)+e.character+n.substr(t)}));if(r.ordinal){var u={1:"st",2:"nd",3:"rd"}[n[n.length-1]];(!u||n.length>1&&"1"===n[n.length-2])&&(u="th"),n+=u}break;case g.SEQUENCE:throw{code:"D3130",value:r.token}}return i&&(n="-"+n),n}const b=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function k(t){const r={type:"integer",primary:g.DECIMAL,case:y.LOWER,ordinal:!1};let n,i;const a=t.lastIndexOf(";");switch(-1===a?n=t:(n=t.substring(0,a),i=t.substring(a+1),"o"===i[0]&&(r.ordinal=!0)),n){case"A":r.case=y.UPPER;case"a":r.primary=g.LETTERS;break;case"I":r.case=y.UPPER;case"i":r.primary=g.ROMAN;break;case"W":r.case=y.UPPER,r.primary=g.WORDS;break;case"Ww":r.case=y.TITLE,r.primary=g.WORDS;break;case"w":r.primary=g.WORDS;break;default:{let t=null,i=0,a=0,o=[],s=0;if(e(n).map((e=>e.codePointAt(0))).reverse().forEach((e=>{let r=!1;for(let n=0;n<b.length;n++){const a=b[n];if(e>=a&&e<=a+9){if(r=!0,i++,s++,null===t)t=a;else if(a!==t)throw{code:"D3131"};break}}r||(35===e?(s++,a++):o.push({position:s,character:String.fromCodePoint(e)}))})),i>0){r.primary=g.DECIMAL,r.zeroCode=t,r.mandatoryDigits=i,r.optionalDigits=a;const e=function(e){if(0===e.length)return 0;const t=e[0].character;for(let r=1;r<e.length;r++)if(e[r].character!==t)return 0;const r=e.map((e=>e.position)),n=function(e,t){return 0===t?e:n(t,e%t)},i=r.reduce(n);for(let e=1;e<=r.length;e++)if(-1===r.indexOf(e*i))return 0;return i}(o);e>0?(r.regular=!0,r.groupingSeparators={position:e,character:o[0].character}):(r.regular=!1,r.groupingSeparators=o)}else r.primary=g.SEQUENCE,r.token=n}}return r}const x={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function w(e){var t=[];const r={type:"datetime",parts:t},n=function(r,n){if(n>r){let i=e.substring(r,n);i=i.split("]]").join("]"),t.push({type:"literal",value:i})}};for(var i=0,a=0;a<e.length;){if("["===e.charAt(a)){if("["===e.charAt(a+1)){n(i,a),t.push({type:"literal",value:"["}),i=a+=2;continue}if(n(i,a),i=a,-1===(a=e.indexOf("]",i)))throw{code:"D3135"};let r=e.substring(i+1,a);r=r.split(/\s+/).join("");var o,s={type:"marker",component:r.charAt(0)},u=r.lastIndexOf(",");if(-1!==u){const e=r.substring(u+1),t=e.indexOf("-");let n,i;const a=function(e){return void 0===e||"*"===e?void 0:parseInt(e)};-1===t?n=e:(n=e.substring(0,t),i=e.substring(t+1));const c={min:a(n),max:a(i)};s.width=c,o=r.substring(1,u)}else o=r.substring(1);if(1===o.length)s.presentation1=o;else if(o.length>1){var c=o.charAt(o.length-1);-1!=="atco".indexOf(c)?(s.presentation2=c,"o"===c&&(s.ordinal=!0),s.presentation1=o.substring(0,o.length-1)):s.presentation1=o}else s.presentation1=x[s.component];if(void 0===s.presentation1)throw{code:"D3132",value:s.component};if("n"===s.presentation1[0])s.names=y.LOWER;else if("N"===s.presentation1[0])"n"===s.presentation1[1]?s.names=y.TITLE:s.names=y.UPPER;else if(-1!=="YMDdFWwXxHhmsf".indexOf(s.component)){var l=s.presentation1;if(s.presentation2&&(l+=";"+s.presentation2),s.integerFormat=k(l),s.width&&void 0!==s.width.min&&s.integerFormat.mandatoryDigits<s.width.min&&(s.integerFormat.mandatoryDigits=s.width.min),"Y"===s.component)if(s.n=-1,s.width&&void 0!==s.width.max)s.n=s.width.max,s.integerFormat.mandatoryDigits=s.n;else{var p=s.integerFormat.mandatoryDigits+s.integerFormat.optionalDigits;p>=2&&(s.n=p)}}"Z"!==s.component&&"z"!==s.component||(s.integerFormat=k(s.presentation1)),t.push(s),i=a+1}a++}return n(i,a),r}const A=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],E=["January","February","March","April","May","June","July","August","September","October","November","December"],T=864e5,D=function(e){const t=Date.UTC(e.year,e.month);var r=new Date(t).getUTCDay();return 0===r&&(r=7),r>4?t+(8-r)*T:t-(r-1)*T},S=function(e,t){return{year:e,month:t,nextMonth:function(){return 11===t?S(e+1,0):S(e,t+1)},previousMonth:function(){return 0===t?S(e-1,11):S(e,t-1)},nextYear:function(){return S(e+1,t)},previousYear:function(){return S(e-1,t)}}},O=function(e,t){return(t-e)/(7*T)+1},P=(e,t)=>{let r;switch(t){case"Y":r=e.getUTCFullYear();break;case"M":r=e.getUTCMonth()+1;break;case"D":r=e.getUTCDate();break;case"d":r=(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())-Date.UTC(e.getUTCFullYear(),0))/T+1;break;case"F":r=e.getUTCDay(),0===r&&(r=7);break;case"W":{const t=S(e.getUTCFullYear(),0),n=D(t),i=Date.UTC(t.year,e.getUTCMonth(),e.getUTCDate());let a=O(n,i);if(a>52)i>=D(t.nextYear())&&(a=1);else if(a<1){const e=D(t.previousYear());a=O(e,i)}r=Math.floor(a);break}case"w":{const t=S(e.getUTCFullYear(),e.getUTCMonth()),n=D(t),i=Date.UTC(t.year,t.month,e.getUTCDate());let a=O(n,i);if(a>4)i>=D(t.nextMonth())&&(a=1);else if(a<1){const e=D(t.previousMonth());a=O(e,i)}r=Math.floor(a);break}case"X":{const t=S(e.getUTCFullYear(),0),n=D(t),i=D(t.nextYear()),a=e.getTime();r=a<n?t.year-1:a>=i?t.year+1:t.year;break}case"x":{const t=S(e.getUTCFullYear(),e.getUTCMonth()),n=D(t),i=t.nextMonth(),a=D(i),o=e.getTime();r=o<n?t.previousMonth().month+1:o>=a?i.month+1:t.month+1;break}case"H":r=e.getUTCHours();break;case"h":r=e.getUTCHours(),r%=12,0===r&&(r=12);break;case"P":r=e.getUTCHours()>=12?"pm":"am";break;case"m":r=e.getUTCMinutes();break;case"s":r=e.getUTCSeconds();break;case"f":r=e.getUTCMilliseconds();break;case"Z":case"z":break;case"C":case"E":r="ISO"}return r};let M=null;function C(e,t,r){var n=0,i=0;if(void 0!==r){const e=parseInt(r);n=Math.floor(e/100),i=e%100}var a=function(e,t){var r=P(e,t.component);if(-1!=="YMDdFWwXxHhms".indexOf(t.component))if("Y"===t.component&&-1!==t.n&&(r%=Math.pow(10,t.n)),t.names){if("M"===t.component||"x"===t.component)r=E[r-1];else{if("F"!==t.component)throw{code:"D3133",value:t.component};r=A[r]}t.names===y.UPPER?r=r.toUpperCase():t.names===y.LOWER&&(r=r.toLowerCase()),t.width&&r.length>t.width.max&&(r=r.substring(0,t.width.max))}else r=m(r,t.integerFormat);else if("f"===t.component)r=m(r,t.integerFormat);else if("Z"===t.component||"z"===t.component){const e=100*n+i;if(t.integerFormat.regular)r=m(e,t.integerFormat);else{const a=t.integerFormat.mandatoryDigits;if(1===a||2===a)r=m(n,t.integerFormat),0!==i&&(r+=":"+v(i,"00"));else{if(3!==a&&4!==a)throw{code:"D3134",value:a};r=m(e,t.integerFormat)}}e>=0&&(r="+"+r),"z"===t.component&&(r="GMT"+r),0===e&&"t"===t.presentation2&&(r="Z")}return r};let o;void 0===t?(null===M&&(M=w("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),o=M):o=w(t);const s=new Date(e+60*(60*n+i)*1e3);let u="";return o.parts.forEach((function(e){"literal"===e.type?u+=e.value:u+=a(s,e)})),u}function j(e){var t={};if("datetime"===e.type)t.type="datetime",t.parts=e.parts.map((function(e){var t={};if("literal"===e.type)t.regex=e.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if("Z"===e.component||"z"===e.component){let r;Array.isArray(e.integerFormat.groupingSeparators)||(r=e.integerFormat.groupingSeparators),t.regex="","z"===e.component&&(t.regex="GMT"),t.regex+="[-+][0-9]+",r&&(t.regex+=r.character+"[0-9]+"),t.parse=function(t){"z"===e.component&&(t=t.substring(3));let n=0,i=0;return r?(n=Number.parseInt(t.substring(0,t.indexOf(r.character))),i=Number.parseInt(t.substring(t.indexOf(r.character)+1))):t.length-1<=2?n=Number.parseInt(t):(n=Number.parseInt(t.substring(0,3)),i=Number.parseInt(t.substring(3))),60*n+i}}else if(e.integerFormat)t=j(e.integerFormat);else{t.regex="[a-zA-Z]+";var r={};if("M"===e.component||"x"===e.component)E.forEach((function(t,n){e.width&&e.width.max?r[t.substring(0,e.width.max)]=n+1:r[t]=n+1}));else if("F"===e.component)A.forEach((function(t,n){n>0&&(e.width&&e.width.max?r[t.substring(0,e.width.max)]=n:r[t]=n)}));else{if("P"!==e.component)throw{code:"D3133",value:e.component};r={am:0,AM:0,pm:1,PM:1}}t.parse=function(e){return r[e]}}return t.component=e.component,t}));else{t.type="integer";const r=e.case===y.UPPER;switch(e.primary){case g.LETTERS:t.regex=r?"[A-Z]+":"[a-z]+",t.parse=function(e){return h(e,r?"A":"a")};break;case g.ROMAN:t.regex=r?"[MDCLXVI]+":"[mdclxvi]+",t.parse=function(e){return f(r?e:e.toUpperCase())};break;case g.WORDS:t.regex="(?:"+Object.keys(s).concat("and","[\\-, ]").join("|")+")+",t.parse=function(e){return u(e.toLowerCase())};break;case g.DECIMAL:t.regex="[0-9]+",e.ordinal&&(t.regex+="(?:th|st|nd|rd)"),t.parse=function(t){let r=t;return e.ordinal&&(r=t.substring(0,t.length-2)),e.regular?r=r.split(",").join(""):e.groupingSeparators.forEach((e=>{r=r.split(e.character).join("")})),48!==e.zeroCode&&(r=r.split("").map((t=>String.fromCodePoint(t.codePointAt(0)-e.zeroCode+48))).join("")),parseInt(r)};break;case g.SEQUENCE:throw{code:"D3130",value:e.token}}}return t}function U(e,t){if(void 0!==e)return j(k(t)).parse(e)}function F(e,t){const r=j(w(t)),n="^"+r.parts.map((e=>"("+e.regex+")")).join("")+"$";var i=new RegExp(n,"i").exec(e);if(null!==i){const e=161,t=130,n=84,o=72,s=23,u=47,c={};for(let e=1;e<i.length;e++){const t=r.parts[e-1];t.parse&&(c[t.component]=t.parse(i[e]))}if(0===Object.getOwnPropertyNames(c).length)return;let l=0;const p=e=>{l<<=1,l+=e?1:0},f=e=>!(~e&l||!(e&l));"YXMxWwdD".split("").forEach((e=>p(c[e])));const d=!f(e)&&f(t),h=f(n),v=!h&&f(o);l=0,"PHhmsf".split("").forEach((e=>p(c[e])));const g=!f(s)&&f(u),y=(d?"YD":h?"XxwF":v?"XWF":"YMD")+(g?"Phmsf":"Hmsf"),m=this.environment.timestamp;let b=!1,k=!1;if(y.split("").forEach((e=>{if(void 0===c[e])b?(c[e]=-1!=="MDd".indexOf(e)?1:0,k=!0):c[e]=P(m,e);else if(b=!0,k)throw{code:"D3136"}})),c.M>0?c.M-=1:c.M=0,d){const e=Date.UTC(c.Y,0),t=1e3*(c.d-1)*60*60*24,r=new Date(e+t);c.M=r.getUTCMonth(),c.D=r.getUTCDate()}if(h)throw{code:"D3136"};if(v)throw{code:"D3136"};g&&(c.H=12===c.h?0:c.h,1===c.P&&(c.H+=12));var a=Date.UTC(c.Y,c.M,c.D,c.H,c.m,c.s,c.f);return(c.Z||c.z)&&(a-=60*(c.Z||c.z)*1e3),a}}var N=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function I(e,t){if(void 0!==e){if(void 0===t){if(!N.test(e))throw{stack:(new Error).stack,code:"D3110",value:e};return Date.parse(e)}return F.call(this,e,t)}}function R(e,t,r){if(void 0!==e)return C.call(this,e,t,r)}return{formatInteger:v,parseInteger:U,fromMillis:R,toMillis:I}}();t.exports=i},{"./utils":6}],2:[function(e,r,n){(function(t){(function(){var n=e("./utils");const i=(()=>{var e=n.isNumeric,r=n.isArrayOfStrings,i=n.isArrayOfNumbers,a=n.createSequence,o=n.isSequence,s=n.isFunction,u=n.isLambda,c=n.isIterable,l=n.getFunctionArity,p=n.isDeepEqual,f=n.stringToArray;function d(e){if(void 0!==e){var t=0;return e.forEach((function(e){t+=e})),t}}function h(e){return void 0===e?0:e.length}function v(e){if(void 0!==e&&0!==e.length)return Math.max.apply(Math,e)}function g(e){if(void 0!==e&&0!==e.length)return Math.min.apply(Math,e)}function y(e){if(void 0!==e&&0!==e.length){var t=0;return e.forEach((function(e){t+=e})),t/e.length}}function m(t,r=!1){if(void 0!==t){var n;if("string"==typeof t)n=t;else if(s(t))n="";else{if("number"==typeof t&&!isFinite(t))throw{code:"D3001",value:t,stack:(new Error).stack};var i=r?2:0;Array.isArray(t)&&t.outerWrapper&&(t=t[0]),n=JSON.stringify(t,(function(t,r){return null!=r&&r.toPrecision&&e(r)?Number(r.toPrecision(15)):r&&s(r)?"":r}),i)}return n}}function b(e,t,r){if(void 0!==e){var n=f(e),i=n.length;if(i+t<0&&(t=0),void 0!==r){if(r<=0)return"";var a=t>=0?t+r:i+t+r;return n.slice(t,a).join("")}return n.slice(t).join("")}}function k(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(0,r):e}}function x(e,t){if(void 0!==e){var r=e.indexOf(t);return r>-1?e.substr(r+t.length):e}}function w(e){if(void 0!==e)return e.toLowerCase()}function A(e){if(void 0!==e)return e.toUpperCase()}function E(e){if(void 0!==e)return f(e).length}function T(e){if(void 0!==e){var t=e.replace(/[ \t\n\r]+/gm," ");return" "===t.charAt(0)&&(t=t.substring(1))," "===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1)),t}}function D(e,t,r){if(void 0!==e){var n;void 0!==r&&0!==r.length||(r=" ");var i=Math.abs(t)-E(e);if(i>0){var a=new Array(i+1).join(r);r.length>1&&(a=b(a,0,i)),n=t>0?e+a:a+e}else n=e;return n}}function*S(e,t){var r=e.apply(this,[t]);if(c(r)&&(r=yield*r),r&&"number"!=typeof r.start&&"number"!==r.end&&!Array.isArray(r.groups)&&!s(r.next))throw{code:"T1010",stack:(new Error).stack};return r}function*O(e,t){if(void 0!==e)return"string"==typeof t?-1!==e.indexOf(t):void 0!==(yield*S(t,e))}function*P(e,t,r){if(void 0!==e){if(r<0)throw{stack:(new Error).stack,value:r,code:"D3040",index:3};var n=a();if(void 0===r||r>0){var i=0,o=yield*S(t,e);if(void 0!==o)for(;void 0!==o&&(void 0===r||i<r);)n.push({match:o.match,index:o.start,groups:o.groups}),o=yield*S(o.next),i++}return n}}function*M(e,t,r,n){if(void 0!==e){var i,a=this;if(""===t)throw{code:"D3010",stack:(new Error).stack,value:t,index:2};if(n<0)throw{code:"D3011",stack:(new Error).stack,value:n,index:4};i="string"==typeof r?function(e){for(var t="",n=0,i=r.indexOf("$",n);-1!==i&&n<r.length;){t+=r.substring(n,i),n=i+1;var a=r.charAt(n);if("$"===a)t+="$",n++;else if("0"===a)t+=e.match,n++;else{var o;if(o=0===e.groups.length?1:Math.floor(Math.log(e.groups.length)*Math.LOG10E)+1,i=parseInt(r.substring(n,n+o),10),o>1&&i>e.groups.length&&(i=parseInt(r.substring(n,n+o-1),10)),isNaN(i))t+="$";else{if(e.groups.length>0){var s=e.groups[i-1];void 0!==s&&(t+=s)}n+=i.toString().length}}i=r.indexOf("$",n)}return t+=r.substring(n)}:r;var o="",s=0;if(void 0===n||n>0){var u=0;if("string"==typeof t){for(var l=e.indexOf(t,s);-1!==l&&(void 0===n||u<n);)o+=e.substring(s,l),o+=r,s=l+t.length,u++,l=e.indexOf(t,s);o+=e.substring(s)}else{var p=yield*S(t,e);if(void 0!==p){for(;void 0!==p&&(void 0===n||u<n);){o+=e.substring(s,p.start);var f=i.apply(a,[p]);if(c(f)&&(f=yield*f),"string"!=typeof f)throw{code:"D3012",stack:(new Error).stack,value:f};o+=f,s=p.start+p.match.length,u++,p=yield*S(p.next)}o+=e.substring(s)}else o=e}}else o=e;return o}}function C(e){if(void 0!==e){var r="undefined"!=typeof window?window.btoa:function(e){return new t.Buffer.from(e,"binary").toString("base64")};return r(e)}}function j(e){if(void 0!==e){var r="undefined"!=typeof window?window.atob:function(e){return new t.Buffer(e,"base64").toString("binary")};return r(e)}}function U(e){if(void 0!==e){var t;try{t=encodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrlComponent"}}return t}}function F(e){if(void 0!==e){var t;try{t=encodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"encodeUrl"}}return t}}function N(e){if(void 0!==e){var t;try{t=decodeURIComponent(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrlComponent"}}return t}}function I(e){if(void 0!==e){var t;try{t=decodeURI(e)}catch(t){throw{code:"D3140",stack:(new Error).stack,value:e,functionName:"decodeUrl"}}return t}}function*R(e,t,r){if(void 0!==e){if(r<0)throw{code:"D3020",stack:(new Error).stack,value:r,index:3};var n=[];if(void 0===r||r>0)if("string"==typeof t)n=e.split(t,r);else{var i=0,a=yield*S(t,e);if(void 0!==a){for(var o=0;void 0!==a&&(void 0===r||i<r);)n.push(e.substring(o,a.start)),o=a.end,a=yield*S(a.next),i++;(void 0===r||i<r)&&n.push(e.substring(o))}else n.push(e)}return n}}function z(e,t){if(void 0!==e)return void 0===t&&(t=""),e.join(t)}function L(e,t,r){if(void 0!==e){var n={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"};void 0!==r&&Object.keys(r).forEach((function(e){n[e]=r[e]}));for(var i=[],a=n["zero-digit"].charCodeAt(0),o=a;o<a+10;o++)i.push(String.fromCharCode(o));var s=i.concat([n["decimal-separator"],n["exponent-separator"],n["grouping-separator"],n.digit,n["pattern-separator"]]),u=t.split(n["pattern-separator"]);if(u.length>2)throw{code:"D3080",stack:(new Error).stack};var c=function(e){var t,r,i,a,o=function(){for(var t,r=0;r<e.length;r++)if(t=e.charAt(r),-1!==s.indexOf(t)&&t!==n["exponent-separator"])return e.substring(0,r)}(),u=function(){for(var t,r=e.length-1;r>=0;r--)if(t=e.charAt(r),-1!==s.indexOf(t)&&t!==n["exponent-separator"])return e.substring(r+1)}(),c=e.substring(o.length,e.length-u.length),l=e.indexOf(n["exponent-separator"],o.length);-1===l||l>e.length-u.length?(t=c,r=void 0):(t=c.substring(0,l),r=c.substring(l+1));var p=t.indexOf(n["decimal-separator"]);return-1===p?(i=t,a=u):(i=t.substring(0,p),a=t.substring(p+1)),{prefix:o,suffix:u,activePart:c,mantissaPart:t,exponentPart:r,integerPart:i,fractionalPart:a,subpicture:e}},l=function(e){var t,r,a=e.subpicture,o=a.indexOf(n["decimal-separator"]);o!==a.lastIndexOf(n["decimal-separator"])&&(t="D3081"),a.indexOf(n.percent)!==a.lastIndexOf(n.percent)&&(t="D3082"),a.indexOf(n["per-mille"])!==a.lastIndexOf(n["per-mille"])&&(t="D3083"),-1!==a.indexOf(n.percent)&&-1!==a.indexOf(n["per-mille"])&&(t="D3084");var u=!1;for(r=0;r<e.mantissaPart.length;r++){var c=e.mantissaPart.charAt(r);if(-1!==i.indexOf(c)||c===n.digit){u=!0;break}}u||(t="D3085"),-1!==e.activePart.split("").map((function(e){return-1===s.indexOf(e)?"p":"a"})).join("").indexOf("p")&&(t="D3086"),-1!==o?a.charAt(o-1)!==n["grouping-separator"]&&a.charAt(o+1)!==n["grouping-separator"]||(t="D3087"):e.integerPart.charAt(e.integerPart.length-1)===n["grouping-separator"]&&(t="D3088"),-1!==a.indexOf(n["grouping-separator"]+n["grouping-separator"])&&(t="D3089");var l=e.integerPart.indexOf(n.digit);-1!==l&&e.integerPart.substring(0,l).split("").filter((function(e){return i.indexOf(e)>-1})).length>0&&(t="D3090"),-1!==(l=e.fractionalPart.lastIndexOf(n.digit))&&e.fractionalPart.substring(l).split("").filter((function(e){return i.indexOf(e)>-1})).length>0&&(t="D3091");var p="string"==typeof e.exponentPart;if(p&&e.exponentPart.length>0&&(-1!==a.indexOf(n.percent)||-1!==a.indexOf(n["per-mille"]))&&(t="D3092"),p&&(0===e.exponentPart.length||e.exponentPart.split("").filter((function(e){return-1===i.indexOf(e)})).length>0)&&(t="D3093"),t)throw{code:t,stack:(new Error).stack}},p=function(e){var t=function(t,r){for(var a=[],o=t.indexOf(n["grouping-separator"]);-1!==o;){var s=(r?t.substring(0,o):t.substring(o)).split("").filter((function(e){return-1!==i.indexOf(e)||e===n.digit})).length;a.push(s),o=e.integerPart.indexOf(n["grouping-separator"],o+1)}return a},r=t(e.integerPart),a=function(e){if(0===e.length)return 0;for(var t=function(e,r){return 0===r?e:t(r,e%r)},r=e.reduce(t),n=1;n<=e.length;n++)if(-1===e.indexOf(n*r))return 0;return r}(r),o=t(e.fractionalPart,!0),s=e.integerPart.split("").filter((function(e){return-1!==i.indexOf(e)})).length,u=s,c=e.fractionalPart.split(""),l=c.filter((function(e){return-1!==i.indexOf(e)})).length,p=c.filter((function(e){return-1!==i.indexOf(e)||e===n.digit})).length,f="string"==typeof e.exponentPart;0===s&&0===p&&(f?(l=1,p=1):s=1),f&&0===s&&-1!==e.integerPart.indexOf(n.digit)&&(s=1),0===s&&0===l&&(l=1);var d=0;return f&&(d=e.exponentPart.split("").filter((function(e){return-1!==i.indexOf(e)})).length),{integerPartGroupingPositions:r,regularGrouping:a,minimumIntegerPartSize:s,scalingFactor:u,prefix:e.prefix,fractionalPartGroupingPositions:o,minimumFactionalPartSize:l,maximumFactionalPartSize:p,minimumExponentSize:d,suffix:e.suffix,picture:e.subpicture}},f=u.map(c);f.forEach(l);var d,h,v,g,y=f.map(p),m=n["minus-sign"],b=n["zero-digit"],k=n["decimal-separator"],x=n["grouping-separator"];if(1===y.length&&(y.push(JSON.parse(JSON.stringify(y[0]))),y[1].prefix=m+y[1].prefix),h=-1!==(d=e>=0?y[0]:y[1]).picture.indexOf(n.percent)?100*e:-1!==d.picture.indexOf(n["per-mille"])?1e3*e:e,0===d.minimumExponentSize)v=h;else{var w=Math.pow(10,d.scalingFactor),A=Math.pow(10,d.scalingFactor-1);for(v=h,g=0;v<A;)v*=10,g-=1;for(;v>w;)v/=10,g+=1}var E=function(e,t){var r=Math.abs(e).toFixed(t);return"0"!==b&&(r=r.split("").map((function(e){return e>="0"&&e<="9"?i[e.charCodeAt(0)-48]:e})).join("")),r},T=E(H(v,d.maximumFactionalPartSize),d.maximumFactionalPartSize),D=T.indexOf(".");for(-1===D?T+=k:T=T.replace(".",k);T.charAt(0)===b;)T=T.substring(1);for(;T.charAt(T.length-1)===b;)T=T.substring(0,T.length-1);D=T.indexOf(k);var S=d.minimumIntegerPartSize-D,O=d.minimumFactionalPartSize-(T.length-D-1);if(T=(S>0?new Array(S+1).join(b):"")+T,T+=O>0?new Array(O+1).join(b):"",D=T.indexOf(k),d.regularGrouping>0)for(var P=Math.floor((D-1)/d.regularGrouping),M=1;M<=P;M++)T=[T.slice(0,D-M*d.regularGrouping),x,T.slice(D-M*d.regularGrouping)].join("");else d.integerPartGroupingPositions.forEach((function(e){T=[T.slice(0,D-e),x,T.slice(D-e)].join(""),D++}));if(D=T.indexOf(k),d.fractionalPartGroupingPositions.forEach((function(e){T=[T.slice(0,e+D+1),x,T.slice(e+D+1)].join("")})),D=T.indexOf(k),-1!==d.picture.indexOf(k)&&D!==T.length-1||(T=T.substring(0,T.length-1)),void 0!==g){var C=E(g,0);(S=d.minimumExponentSize-C.length)>0&&(C=new Array(S+1).join(b)+C),T=T+n["exponent-separator"]+(g<0?m:"")+C}return T=d.prefix+T+d.suffix}}function $(e,t){if(void 0!==e){if(e=H(e),(t=void 0===t?10:H(t))<2||t>36)throw{code:"D3100",stack:(new Error).stack,value:t};return e.toString(t)}}function q(e){var t;if(void 0!==e){if("number"==typeof e)t=e;else if("string"==typeof e&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(e)&&!isNaN(parseFloat(e))&&isFinite(e))t=parseFloat(e);else if(!0===e)t=1;else{if(!1!==e)throw{code:"D3030",value:e,stack:(new Error).stack,index:1};t=0}return t}}function W(e){if(void 0!==e)return Math.abs(e)}function _(e){if(void 0!==e)return Math.floor(e)}function Y(e){if(void 0!==e)return Math.ceil(e)}function H(e,t){var r;if(void 0!==e){if(t){var n=e.toString().split("e");e=+(n[0]+"e"+(n[1]?+n[1]+t:t))}var i=(r=Math.round(e))-e;return.5===Math.abs(i)&&1===Math.abs(r%2)&&(r-=1),t&&(n=r.toString().split("e"),r=+(n[0]+"e"+(n[1]?+n[1]-t:-t))),Object.is(r,-0)&&(r=0),r}}function Z(e){if(void 0!==e){if(e<0)throw{stack:(new Error).stack,code:"D3060",index:1,value:e};return Math.sqrt(e)}}function G(e,t){var r;if(void 0!==e){if(r=Math.pow(e,t),!isFinite(r))throw{stack:(new Error).stack,code:"D3061",index:1,value:e,exp:t};return r}}function B(){return Math.random()}function J(t){if(void 0!==t){var r=!1;return Array.isArray(t)?1===t.length?r=J(t[0]):t.length>1&&(r=t.filter((function(e){return J(e)})).length>0):"string"==typeof t?t.length>0&&(r=!0):e(t)?0!==t&&(r=!0):null!==t&&"object"==typeof t?Object.keys(t).length>0&&(r=!0):"boolean"==typeof t&&!0===t&&(r=!0),r}}function X(e){if(void 0!==e)return!J(e)}function Q(e,t,r,n){var i=[t],a=l(e);return a>=2&&i.push(r),a>=3&&i.push(n),i}function*V(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=Q(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}}function*K(e,t){if(void 0!==e){for(var r=a(),n=0;n<e.length;n++){var i=e[n],o=Q(t,i,n,e);J(yield*t.apply(this,o))&&r.push(i)}return r}}function*ee(e,t){if(void 0!==e){for(var r,n=!1,i=0;i<e.length;i++){var a=e[i],o=!0;if(void 0!==t){var s=Q(t,a,i,e);o=J(yield*t.apply(this,s))}if(o){if(n)throw{stack:(new Error).stack,code:"D3138",index:i};r=a,n=!0}}if(!n)throw{stack:(new Error).stack,code:"D3139"};return r}}function te(){for(var e=[],t=Array.prototype.slice.call(arguments),r=Math.min.apply(Math,t.map((function(e){return Array.isArray(e)?e.length:0}))),n=0;n<r;n++){var i=t.map((e=>e[n]));e.push(i)}return e}function*re(e,t,r){if(void 0!==e){var n,i,a=l(t);if(a<2)throw{stack:(new Error).stack,code:"D3050",index:1};for(void 0===r&&e.length>0?(n=e[0],i=1):(n=r,i=0);i<e.length;){var o=[n,e[i]];a>=3&&o.push(i),a>=4&&o.push(e),n=yield*t.apply(this,o),i++}return n}}function ne(e){var t=a();if(Array.isArray(e)){var r={};e.forEach((function(e){ne(e).forEach((function(e){r[e]=!0}))})),t=ne(r)}else null===e||"object"!=typeof e||u(e)||Object.keys(e).forEach((e=>t.push(e)));return t}function ie(e,t){var r;if(Array.isArray(e)){r=a();for(var n=0;n<e.length;n++){var i=ie(e[n],t);void 0!==i&&(Array.isArray(i)?i.forEach((e=>r.push(e))):r.push(i))}}else null!==e&&"object"==typeof e&&(r=e[t]);return r}function ae(e,t){return void 0===e?t:void 0===t?e:(Array.isArray(e)||(e=a(e)),Array.isArray(t)||(t=[t]),e.concat(t))}function oe(e){return void 0!==e}function se(e){var t=a();if(Array.isArray(e))e.forEach((function(e){t=ae(t,se(e))}));else if(null===e||"object"!=typeof e||u(e))t=e;else for(var r in e){var n={};n[r]=e[r],t.push(n)}return t}function ue(e){if(void 0!==e){var t={};return e.forEach((function(e){for(var r in e)t[r]=e[r]})),t}}function ce(e){if(void 0!==e){if(e.length<=1)return e;for(var t=e.length,r=new Array(t),n=0;n<t;n++)r[t-n-1]=e[n];return r}}function*le(e,t){var r=a();for(var n in e){var i=Q(t,e[n],n,e),o=yield*t.apply(this,i);void 0!==o&&r.push(o)}return r}function pe(e){throw{code:"D3137",stack:(new Error).stack,message:e||"$error() function evaluated"}}function fe(e,t){if(!e)throw{code:"D3141",stack:(new Error).stack,message:t||"$assert() statement failed"}}function de(t){if(void 0!==t)return null===t?"null":e(t)?"number":"string"==typeof t?"string":"boolean"==typeof t?"boolean":Array.isArray(t)?"array":s(t)?"function":"object"}function*he(e,t){if(void 0!==e){if(e.length<=1)return e;var n;if(void 0===t){if(!i(e)&&!r(e))throw{stack:(new Error).stack,code:"D3070",index:1};n=function*(e,t){return e>t}}else n=t;var a=function*(e,t){var r=function*(e,t,i){0===t.length?Array.prototype.push.apply(e,i):0===i.length?Array.prototype.push.apply(e,t):(yield*n(t[0],i[0]))?(e.push(i[0]),yield*r(e,t,i.slice(1))):(e.push(t[0]),yield*r(e,t.slice(1),i))},i=[];return yield*r(i,e,t),i},o=function*(e){if(!Array.isArray(e)||e.length<=1)return e;var t=Math.floor(e.length/2),r=e.slice(0,t),n=e.slice(t);return r=yield*o(r),n=yield*o(n),yield*a(r,n)};return yield*o(e)}}function ve(e){if(void 0!==e){if(e.length<=1)return e;for(var t=new Array(e.length),r=0;r<e.length;r++){var n=Math.floor(Math.random()*(r+1));r!==n&&(t[r]=t[n]),t[n]=e[r]}return t}}function ge(e){if(void 0!==e){if(!Array.isArray(e)||e.length<=1)return e;for(var t=o(e)?a():[],r=0;r<e.length;r++){for(var n=e[r],i=!1,s=0;s<t.length;s++)if(p(n,t[s])){i=!0;break}i||t.push(n)}return t}}function*ye(e,t){var r={};for(var n in e){var i=e[n],a=Q(t,i,n,e);J(yield*t.apply(this,a))&&(r[n]=i)}return 0===Object.keys(r).length&&(r=void 0),r}return{sum:d,count:h,max:v,min:g,average:y,string:m,substring:b,substringBefore:k,substringAfter:x,lowercase:w,uppercase:A,length:E,trim:T,pad:D,match:P,contains:O,replace:M,split:R,join:z,formatNumber:L,formatBase:$,number:q,floor:_,ceil:Y,round:H,abs:W,sqrt:Z,power:G,random:B,boolean:J,not:X,map:V,zip:te,filter:K,single:ee,foldLeft:re,sift:ye,keys:ne,lookup:ie,append:ae,exists:oe,spread:se,merge:ue,reverse:ce,each:le,error:pe,assert:fe,type:de,sort:he,shuffle:ve,distinct:ge,base64encode:C,base64decode:j,encodeUrlComponent:U,encodeUrl:F,decodeUrlComponent:N,decodeUrl:I}})();r.exports=i}).call(this)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./utils":6}],3:[function(e,t,r){var n=e("./datetime"),i=e("./functions"),a=e("./utils"),o=e("./parser"),s=e("./signature"),u=function(){var e=a.isNumeric,t=a.isArrayOfStrings,r=a.isArrayOfNumbers,u=a.createSequence,c=a.isSequence,l=a.isFunction,p=a.isLambda,f=a.isIterable,d=a.getFunctionArity,h=a.isDeepEqual,v=le(null);function*g(e,t,r){var n,i=r.lookup("__evaluate_entry");switch(i&&i(e,t,r),e.type){case"path":n=yield*y(e,t,r);break;case"binary":n=yield*A(e,t,r);break;case"unary":n=yield*E(e,t,r);break;case"name":n=T(e,t);break;case"string":case"number":case"value":n=D(e);break;case"wildcard":n=S(e,t);break;case"descendant":n=P(e,t);break;case"parent":n=r.lookup(e.slot.label);break;case"condition":n=yield*W(e,t,r);break;case"block":n=yield*_(e,t,r);break;case"bind":n=yield*q(e,t,r);break;case"regex":n=Y(e);break;case"function":n=yield*X(e,t,r);break;case"variable":n=H(e,t,r);break;case"lambda":n=K(e,t,r);break;case"partial":n=yield*ee(e,t,r);break;case"apply":n=yield*J(e,t,r);break;case"transform":n=G(e,t,r)}if(!r.async||null!=n&&"function"==typeof n.then||(n=Promise.resolve(n)),r.async&&"function"==typeof n.then&&e.nextFunction&&"function"==typeof n[e.nextFunction]||(n=yield n),Object.prototype.hasOwnProperty.call(e,"predicate"))for(var a=0;a<e.predicate.length;a++)n=yield*w(e.predicate[a].expr,n,r);"path"!==e.type&&Object.prototype.hasOwnProperty.call(e,"group")&&(n=yield*z(e.group,n,r));var o=r.lookup("__evaluate_exit");return o&&o(e,t,r,n),n&&c(n)&&!n.tupleStream&&(e.keepArray&&(n.keepSingleton=!0),0===n.length?n=void 0:1===n.length&&(n=n.keepSingleton?n:n[0])),n}function*y(e,t,r){var n,i;n=Array.isArray(t)&&"variable"!==e.steps[0].type?t:u(t);for(var a=!1,o=void 0,s=0;s<e.steps.length;s++){var c=e.steps[s];if(c.tuple&&(a=!0),0===s&&c.consarray?i=yield*g(c,n,r):a?o=yield*x(c,n,o,r):i=yield*b(c,n,r,s===e.steps.length-1),!a&&(void 0===i||0===i.length))break;void 0===c.focus&&(n=i)}if(a)if(e.tuple)i=o;else for(i=u(),s=0;s<o.length;s++)i.push(o[s]["@"]);return e.keepSingletonArray&&(Array.isArray(i)&&i.cons&&!i.sequence&&(i=u(i)),i.keepSingleton=!0),e.hasOwnProperty("group")&&(i=yield*z(e.group,a?o:i,r)),i}function m(e,t){var r=le(e);for(const e in t)r.bind(e,t[e]);return r}function*b(e,t,r,n){var i;if("sort"===e.type)return i=yield*Z(e,t,r),e.stages&&(i=yield*k(e.stages,i,r)),i;i=u();for(var a=0;a<t.length;a++){var o=yield*g(e,t[a],r);if(e.stages)for(var s=0;s<e.stages.length;s++)o=yield*w(e.stages[s].expr,o,r);void 0!==o&&i.push(o)}var l=u();return n&&1===i.length&&Array.isArray(i[0])&&!c(i[0])?l=i[0]:i.forEach((function(e){!Array.isArray(e)||e.cons?l.push(e):e.forEach((e=>l.push(e)))})),l}function*k(e,t,r){for(var n=t,i=0;i<e.length;i++){var a=e[i];switch(a.type){case"filter":n=yield*w(a.expr,n,r);break;case"index":for(var o=0;o<n.length;o++)n[o][a.value]=o}}return n}function*x(e,t,r,n){var i;if("sort"===e.type){if(r)i=yield*Z(e,r,n);else{var a=yield*Z(e,t,n);(i=u()).tupleStream=!0;for(var o=0;o<a.length;o++){var s={"@":a[o]};s[e.index]=o,i.push(s)}}return e.stages&&(i=yield*k(e.stages,i,n)),i}(i=u()).tupleStream=!0;var c=n;void 0===r&&(r=t.map((e=>({"@":e}))));for(var l=0;l<r.length;l++){c=m(n,r[l]);var p=yield*g(e,r[l]["@"],c);if(void 0!==p){Array.isArray(p)||(p=[p]);for(var f=0;f<p.length;f++)s={},Object.assign(s,r[l]),p.tupleStream?Object.assign(s,p[f]):(e.focus?(s[e.focus]=p[f],s["@"]=r[l]["@"]):s["@"]=p[f],e.index&&(s[e.index]=f),e.ancestor&&(s[e.ancestor.label]=r[l]["@"])),i.push(s)}}return e.stages&&(i=yield*k(e.stages,i,n)),i}function*w(t,n,a){var o=u();if(n&&n.tupleStream&&(o.tupleStream=!0),Array.isArray(n)||(n=u(n)),"number"===t.type){var s=Math.floor(t.value);s<0&&(s=n.length+s),void 0!==(c=n[s])&&(Array.isArray(c)?o=c:o.push(c))}else for(s=0;s<n.length;s++){var c,l=c=n[s],p=a;n.tupleStream&&(l=c["@"],p=m(a,c));var f=yield*g(t,l,p);e(f)&&(f=[f]),r(f)?f.forEach((function(e){var t=Math.floor(e);t<0&&(t=n.length+t),t===s&&o.push(c)})):i.boolean(f)&&o.push(c)}return o}function*A(e,t,r){var n,i=yield*g(e.lhs,t,r),a=e.value,o=function*(){return yield*g(e.rhs,t,r)};if("and"===a||"or"===a)try{return yield*N(i,o,a)}catch(t){throw t.position=e.position,t.token=a,t}var s=yield*o();try{switch(a){case"+":case"-":case"*":case"/":case"%":n=C(i,s,a);break;case"=":case"!=":n=j(i,s,a);break;case"<":case"<=":case">":case">=":n=U(i,s,a);break;case"&":n=R(i,s);break;case"..":n=$(i,s);break;case"in":n=F(i,s)}}catch(t){throw t.position=e.position,t.token=a,t}return n}function*E(t,r,n){var a;switch(t.value){case"-":if(void 0===(a=yield*g(t.expression,r,n)))a=void 0;else{if(!e(a))throw{code:"D1002",stack:(new Error).stack,position:t.position,token:t.value,value:a};a=-a}break;case"[":a=[];for(var o=0;o<t.expressions.length;o++){var s=t.expressions[o],u=yield*g(s,r,n);void 0!==u&&("["===s.value?a.push(u):a=i.append(a,u))}t.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=yield*z(t,r,n)}return a}function T(e,t,r){return i.lookup(t,e.value)}function D(e){return e.value}function S(e,t){var r=u();return Array.isArray(t)&&t.outerWrapper&&t.length>0&&(t=t[0]),null!==t&&"object"==typeof t&&Object.keys(t).forEach((function(e){var n=t[e];Array.isArray(n)?(n=O(n),r=i.append(r,n)):r.push(n)})),r}function O(e,t){return void 0===t&&(t=[]),Array.isArray(e)?e.forEach((function(e){O(e,t)})):t.push(e),t}function P(e,t){var r,n=u();return void 0!==t&&(M(t,n),r=1===n.length?n[0]:n),r}function M(e,t){Array.isArray(e)||t.push(e),Array.isArray(e)?e.forEach((function(e){M(e,t)})):null!==e&&"object"==typeof e&&Object.keys(e).forEach((function(r){M(e[r],t)}))}function C(t,r,n){var i;if(void 0!==t&&!e(t))throw{code:"T2001",stack:(new Error).stack,value:t};if(void 0!==r&&!e(r))throw{code:"T2002",stack:(new Error).stack,value:r};if(void 0===t||void 0===r)return i;switch(n){case"+":i=t+r;break;case"-":i=t-r;break;case"*":i=t*r;break;case"/":i=t/r;break;case"%":i=t%r}return i}function j(e,t,r){var n;if(void 0===e||void 0===t)return!1;switch(r){case"=":n=h(e,t);break;case"!=":n=!h(e,t)}return n}function U(e,t,r){var n,i=typeof e,a=typeof t;if("undefined"!==i&&"string"!==i&&"number"!==i||"undefined"!==a&&"string"!==a&&"number"!==a)throw{code:"T2010",stack:(new Error).stack,value:"string"!==i&&"number"!==i?e:t};if("undefined"!==i&&"undefined"!==a){if(i!==a)throw{code:"T2009",stack:(new Error).stack,value:e,value2:t};switch(r){case"<":n=e<t;break;case"<=":n=e<=t;break;case">":n=e>t;break;case">=":n=e>=t}return n}}function F(e,t){var r=!1;if(void 0===e||void 0===t)return!1;Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++)if(t[n]===e){r=!0;break}return r}function*N(e,t,r){var n,i=I(e);switch(r){case"and":n=i&&I(yield*t());break;case"or":n=i||I(yield*t())}return n}function I(e){var t=i.boolean(e);return void 0!==t&&t}function R(e,t){var r="",n="";return void 0!==e&&(r=i.string(e)),void 0!==t&&(n=i.string(t)),r.concat(n)}function*z(e,t,r){var n={},a={},o=!(!t||!t.tupleStream);Array.isArray(t)||(t=u(t)),0===t.length&&t.push(void 0);for(var s=0;s<t.length;s++)for(var c=t[s],l=o?m(r,c):r,p=0;p<e.lhs.length;p++){var f=e.lhs[p],d=yield*g(f[0],o?c["@"]:c,l);if("string"!=typeof d)throw{code:"T1003",stack:(new Error).stack,position:e.position,value:d};var h={data:c,exprIndex:p};if(a.hasOwnProperty(d)){if(a[d].exprIndex!==p)throw{code:"D1009",stack:(new Error).stack,position:e.position,value:d};a[d].data=i.append(a[d].data,c)}else a[d]=h}for(d in a){var v=(h=a[d]).data;if(l=r,o){var y=L(h.data);v=y["@"],delete y["@"],l=m(r,y)}var b=yield*g(e.lhs[h.exprIndex][1],v,l);void 0!==b&&(n[d]=b)}return n}function L(e){if(!Array.isArray(e))return e;var t={};Object.assign(t,e[0]);for(var r=1;r<e.length;r++)for(const n in e[r])t[n]=i.append(t[n],e[r][n]);return t}function $(e,t){var r;if(void 0!==e&&!Number.isInteger(e))throw{code:"T2003",stack:(new Error).stack,value:e};if(void 0!==t&&!Number.isInteger(t))throw{code:"T2004",stack:(new Error).stack,value:t};if(void 0===e||void 0===t)return r;if(e>t)return r;var n=t-e+1;if(n>1e7)throw{code:"D2014",stack:(new Error).stack,value:n};r=new Array(n);for(var i=e,a=0;i<=t;i++,a++)r[a]=i;return r.sequence=!0,r}function*q(e,t,r){var n=yield*g(e.rhs,t,r);return r.bind(e.lhs.value,n),n}function*W(e,t,r){var n,a=yield*g(e.condition,t,r);return i.boolean(a)?n=yield*g(e.then,t,r):void 0!==e.else&&(n=yield*g(e.else,t,r)),n}function*_(e,t,r){for(var n,i=le(r),a=0;a<e.expressions.length;a++)n=yield*g(e.expressions[a],t,i);return n}function Y(e){var t=new de.RegexEngine(e.value),r=function(n,i){var a;t.lastIndex=i||0;var o=t.exec(n);if(null!==o){if(a={match:o[0],start:o.index,end:o.index+o[0].length,groups:[]},o.length>1)for(var s=1;s<o.length;s++)a.groups.push(o[s]);a.next=function(){if(!(t.lastIndex>=n.length)){var i=r(n,t.lastIndex);if(i&&""===i.match)throw{code:"D1004",stack:(new Error).stack,position:e.position,value:e.value.source};return i}}}return a};return r}function H(e,t,r){return""===e.value?t&&t.outerWrapper?t[0]:t:r.lookup(e.value)}function*Z(e,t,r){var n=t,a=!!t.tupleStream,o=function*(t,n){for(var i=0,o=0;0===i&&o<e.terms.length;o++){var s=e.terms[o],u=t,c=r;a&&(u=t["@"],c=m(r,t));var l=yield*g(s.expression,u,c);u=n,c=r,a&&(u=n["@"],c=m(r,n));var p=yield*g(s.expression,u,c),f=typeof l,d=typeof p;if("undefined"!==f)if("undefined"!==d){if("string"!==f&&"number"!==f||"string"!==d&&"number"!==d)throw{code:"T2008",stack:(new Error).stack,position:e.position,value:"string"!==f&&"number"!==f?l:p};if(f!==d)throw{code:"T2007",stack:(new Error).stack,position:e.position,value:l,value2:p};l!==p&&(i=l<p?-1:1,!0===s.descending&&(i=-i))}else i=-1;else i="undefined"===d?0:1}return 1===i},s={environment:r,input:t};return yield*i.sort.apply(s,[n,o])}function G(e,r,n){return se((function*(r){if(void 0!==r){var i=n.lookup("clone");if(!l(i))throw{code:"T2013",stack:(new Error).stack,position:e.position};var a=yield*Q(i,[r],null,n),o=yield*g(e.pattern,a,n);if(void 0!==o){Array.isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var u=o[s],c=yield*g(e.update,u,n),p=typeof c;if("undefined"!==p){if("object"!==p||null===c||Array.isArray(c))throw{code:"T2011",stack:(new Error).stack,position:e.update.position,value:c};for(var f in c)u[f]=c[f]}if(void 0!==e.delete){var d=yield*g(e.delete,u,n);if(void 0!==d){var h=d;if(Array.isArray(d)||(d=[d]),!t(d))throw{code:"T2012",stack:(new Error).stack,position:e.delete.position,value:h};for(var v=0;v<d.length;v++)"object"==typeof u&&null!==u&&delete u[d[v]]}}}}return a}}),"<(oa):o>")}var B=o("function($f, $g) { function($x){ $g($f($x)) } }");function*J(e,t,r){var n,i=yield*g(e.lhs,t,r);if("function"===e.rhs.type)n=yield*X(e.rhs,t,r,{context:i});else{var a=yield*g(e.rhs,t,r);if(!l(a))throw{code:"T2006",stack:(new Error).stack,position:e.position,value:a};if(l(i)){var o=yield*g(B,null,r);n=yield*Q(o,[i,a],null,r)}else n=yield*Q(a,[i],null,r)}return n}function*X(e,t,r,n){var i,a=yield*g(e.procedure,t,r);if(void 0===a&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1005",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};var o=[];void 0!==n&&o.push(n.context);for(var s=0;s<e.arguments.length;s++){const n=yield*g(e.arguments[s],t,r);if(l(n)){const e=function*(...e){return yield*Q(n,e,null,r)};e.arity=d(n),o.push(e)}else o.push(n)}var u="path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value;try{"object"==typeof a&&(a.token=u,a.position=e.position),i=yield*Q(a,o,t,r)}catch(t){throw t.position||(t.position=e.position),t.token||(t.token=u),t}return i}function*Q(e,t,r,n){var i;for(i=yield*V(e,t,r,n);p(i)&&!0===i.thunk;){var a=yield*g(i.body.procedure,i.input,i.environment);"variable"===i.body.procedure.type&&(a.token=i.body.procedure.value),a.position=i.body.procedure.position;for(var o=[],s=0;s<i.body.arguments.length;s++)o.push(yield*g(i.body.arguments[s],i.input,i.environment));i=yield*V(a,o,r,n)}return i}function*V(e,t,r,n){var i;try{var a=t;if(e&&(a=te(e.signature,t,r)),p(e))i=yield*re(e,a);else if(e&&!0===e._jsonata_function){var o={environment:n,input:r};i=e.implementation.apply(o,a),f(i)&&(i=yield*i)}else{if("function"!=typeof e)throw{code:"T1006",stack:(new Error).stack};i=e.apply(r,a),f(i)&&(i=yield*i)}}catch(t){throw e&&(void 0===t.token&&void 0!==e.token&&(t.token=e.token),t.position=e.position),t}return i}function K(e,t,r){var n={_jsonata_lambda:!0,input:t,environment:r,arguments:e.arguments,signature:e.signature,body:e.body};return!0===e.thunk&&(n.thunk=!0),n.apply=function*(e,r){return yield*Q(n,r,t,e.environment)},n}function*ee(e,t,r){for(var n,i=[],a=0;a<e.arguments.length;a++){var o=e.arguments[a];"operator"===o.type&&"?"===o.value?i.push(o):i.push(yield*g(o,t,r))}var s=yield*g(e.procedure,t,r);if(void 0===s&&"path"===e.procedure.type&&r.lookup(e.procedure.steps[0].value))throw{code:"T1007",stack:(new Error).stack,position:e.position,token:e.procedure.steps[0].value};if(p(s))n=ne(s,i);else if(s&&!0===s._jsonata_function)n=ie(s.implementation,i);else{if("function"!=typeof s)throw{code:"T1008",stack:(new Error).stack,position:e.position,token:"path"===e.procedure.type?e.procedure.steps[0].value:e.procedure.value};n=ie(s,i)}return n}function te(e,t,r){return void 0===e?t:e.validate(t,r)}function*re(e,t){var r=le(e.environment);return e.arguments.forEach((function(e,n){r.bind(e.value,t[n])})),"function"==typeof e.body?yield*ae(e.body,r):yield*g(e.body,e.input,r)}function ne(e,t){var r=le(e.environment),n=[];return e.arguments.forEach((function(e,i){var a=t[i];a&&"operator"===a.type&&"?"===a.value?n.push(e):r.bind(e.value,a)})),{_jsonata_lambda:!0,input:e.input,environment:r,arguments:n,body:e.body}}function ie(e,t){var r=oe(e),n="function("+(r=r.map((function(e){return"$"+e.trim()}))).join(", ")+"){ _ }",i=o(n);return i.body=e,ne(i,t)}function*ae(e,t){var r=oe(e).map((function(e){return t.lookup(e.trim())})),n={environment:t},i=e.apply(n,r);return f(i)&&(i=yield*i),i}function oe(e){var t=e.toString();return/\(([^)]*)\)/.exec(t)[1].split(",")}function se(e,t){var r={_jsonata_function:!0,implementation:e};return void 0!==t&&(r.signature=s(t)),r}function*ue(e,t){if(void 0!==e){var r=this.input;void 0!==t&&(r=t,Array.isArray(r)&&!c(r)&&((r=u(r)).outerWrapper=!0));try{var n=o(e,!1)}catch(e){throw fe(e),{stack:(new Error).stack,code:"D3120",value:e.message,error:e}}try{var i=yield*g(n,r,this.environment)}catch(e){throw fe(e),{stack:(new Error).stack,code:"D3121",value:e.message,error:e}}return i}}function ce(e){if(void 0!==e)return JSON.parse(i.string(e))}function le(e){var t={};return{bind:function(e,r){t[e]=r},lookup:function(r){var n;return t.hasOwnProperty(r)?n=t[r]:e&&(n=e.lookup(r)),n},timestamp:e?e.timestamp:null,async:!!e&&e.async,global:e?e.global:{ancestry:[null]}}}v.bind("sum",se(i.sum,"<a<n>:n>")),v.bind("count",se(i.count,"<a:n>")),v.bind("max",se(i.max,"<a<n>:n>")),v.bind("min",se(i.min,"<a<n>:n>")),v.bind("average",se(i.average,"<a<n>:n>")),v.bind("string",se(i.string,"<x-b?:s>")),v.bind("substring",se(i.substring,"<s-nn?:s>")),v.bind("substringBefore",se(i.substringBefore,"<s-s:s>")),v.bind("substringAfter",se(i.substringAfter,"<s-s:s>")),v.bind("lowercase",se(i.lowercase,"<s-:s>")),v.bind("uppercase",se(i.uppercase,"<s-:s>")),v.bind("length",se(i.length,"<s-:n>")),v.bind("trim",se(i.trim,"<s-:s>")),v.bind("pad",se(i.pad,"<s-ns?:s>")),v.bind("match",se(i.match,"<s-f<s:o>n?:a<o>>")),v.bind("contains",se(i.contains,"<s-(sf):b>")),v.bind("replace",se(i.replace,"<s-(sf)(sf)n?:s>")),v.bind("split",se(i.split,"<s-(sf)n?:a<s>>")),v.bind("join",se(i.join,"<a<s>s?:s>")),v.bind("formatNumber",se(i.formatNumber,"<n-so?:s>")),v.bind("formatBase",se(i.formatBase,"<n-n?:s>")),v.bind("formatInteger",se(n.formatInteger,"<n-s:s>")),v.bind("parseInteger",se(n.parseInteger,"<s-s:n>")),v.bind("number",se(i.number,"<(nsb)-:n>")),v.bind("floor",se(i.floor,"<n-:n>")),v.bind("ceil",se(i.ceil,"<n-:n>")),v.bind("round",se(i.round,"<n-n?:n>")),v.bind("abs",se(i.abs,"<n-:n>")),v.bind("sqrt",se(i.sqrt,"<n-:n>")),v.bind("power",se(i.power,"<n-n:n>")),v.bind("random",se(i.random,"<:n>")),v.bind("boolean",se(i.boolean,"<x-:b>")),v.bind("not",se(i.not,"<x-:b>")),v.bind("map",se(i.map,"<af>")),v.bind("zip",se(i.zip,"<a+>")),v.bind("filter",se(i.filter,"<af>")),v.bind("single",se(i.single,"<af?>")),v.bind("reduce",se(i.foldLeft,"<afj?:j>")),v.bind("sift",se(i.sift,"<o-f?:o>")),v.bind("keys",se(i.keys,"<x-:a<s>>")),v.bind("lookup",se(i.lookup,"<x-s:x>")),v.bind("append",se(i.append,"<xx:a>")),v.bind("exists",se(i.exists,"<x:b>")),v.bind("spread",se(i.spread,"<x-:a<o>>")),v.bind("merge",se(i.merge,"<a<o>:o>")),v.bind("reverse",se(i.reverse,"<a:a>")),v.bind("each",se(i.each,"<o-f:a>")),v.bind("error",se(i.error,"<s?:x>")),v.bind("assert",se(i.assert,"<bs?:x>")),v.bind("type",se(i.type,"<x:s>")),v.bind("sort",se(i.sort,"<af?:a>")),v.bind("shuffle",se(i.shuffle,"<a:a>")),v.bind("distinct",se(i.distinct,"<x:x>")),v.bind("base64encode",se(i.base64encode,"<s-:s>")),v.bind("base64decode",se(i.base64decode,"<s-:s>")),v.bind("encodeUrlComponent",se(i.encodeUrlComponent,"<s-:s>")),v.bind("encodeUrl",se(i.encodeUrl,"<s-:s>")),v.bind("decodeUrlComponent",se(i.decodeUrlComponent,"<s-:s>")),v.bind("decodeUrl",se(i.decodeUrl,"<s-:s>")),v.bind("eval",se(ue,"<sx?:x>")),v.bind("toMillis",se(n.toMillis,"<s-s?:n>")),v.bind("fromMillis",se(n.fromMillis,"<n-s?s?:s>")),v.bind("clone",se(ce,"<(oa)-:o>"));var pe={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function fe(e){var t=pe[e.code];if(void 0!==t){var r=t.replace(/\{\{\{([^}]+)}}}/g,(function(){return e[arguments[1]]}));r=r.replace(/\{\{([^}]+)}}/g,(function(){return JSON.stringify(e[arguments[1]])})),e.message=r}}function de(e,t){var r,i;try{r=o(e,t&&t.recover),i=r.errors,delete r.errors}catch(e){throw fe(e),e}var a=le(v),s=new Date;return a.bind("now",se((function(e,t){return n.fromMillis(s.getTime(),e,t)}),"<s?s?:s>")),a.bind("millis",se((function(){return s.getTime()}),"<:n>")),t&&t.RegexEngine?de.RegexEngine=t.RegexEngine:de.RegexEngine=RegExp,{evaluate:function(e,t,n){if(void 0!==i){var o={code:"S0500",position:0};throw fe(o),o}var l,p,f;if(void 0!==t)for(var d in l=le(a),t)l.bind(d,t[d]);else l=a;if(l.bind("$",e),s=new Date,l.timestamp=s,Array.isArray(e)&&!c(e)&&((e=u(e)).outerWrapper=!0),"function"==typeof n){l.async=!0;var h=function(e){fe(e),n(e,null)},v=function(e){(p=f.next(e)).done?n(null,p.value):p.value.then(v).catch(h)};f=g(r,e,l),(p=f.next()).value.then(v).catch(h)}else try{for(f=g(r,e,l),p=f.next();!p.done;)p=f.next(p.value);return p.value}catch(o){throw fe(o),o}},assign:function(e,t){a.bind(e,t)},registerFunction:function(e,t,r){var n=se(t,r);a.bind(e,n)},ast:function(){return r},errors:function(){return i}}}return de.parser=o,de}();t.exports=u},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(e,t,r){var n=e("./signature");const i=(a={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},s=function(e){var t=0,r=e.length,n=function(e,r){return{type:e,value:r,position:t}},i=function(){for(var n,i,a=t,o=0;t<r;){var s=e.charAt(t);if("/"===s&&"\\"!==e.charAt(t-1)&&0===o){if(""===(n=e.substring(a,t)))throw{code:"S0301",stack:(new Error).stack,position:t};for(t++,s=e.charAt(t),a=t;"i"===s||"m"===s;)t++,s=e.charAt(t);return i=e.substring(a,t)+"g",new RegExp(n,i)}"("!==s&&"["!==s&&"{"!==s||"\\"===e.charAt(t-1)||o++,")"!==s&&"]"!==s&&"}"!==s||"\\"===e.charAt(t-1)||o--,t++}throw{code:"S0302",stack:(new Error).stack,position:t}},s=function(u){if(t>=r)return null;for(var c=e.charAt(t);t<r&&" \t\n\r\v".indexOf(c)>-1;)t++,c=e.charAt(t);if("/"===c&&"*"===e.charAt(t+1)){var l=t;for(t+=2,c=e.charAt(t);"*"!==c||"/"!==e.charAt(t+1);)if(c=e.charAt(++t),t>=r)throw{code:"S0106",stack:(new Error).stack,position:l};return t+=2,c=e.charAt(t),s(u)}if(!0!==u&&"/"===c)return t++,n("regex",i());if("."===c&&"."===e.charAt(t+1))return t+=2,n("operator","..");if(":"===c&&"="===e.charAt(t+1))return t+=2,n("operator",":=");if("!"===c&&"="===e.charAt(t+1))return t+=2,n("operator","!=");if(">"===c&&"="===e.charAt(t+1))return t+=2,n("operator",">=");if("<"===c&&"="===e.charAt(t+1))return t+=2,n("operator","<=");if("*"===c&&"*"===e.charAt(t+1))return t+=2,n("operator","**");if("~"===c&&">"===e.charAt(t+1))return t+=2,n("operator","~>");if(Object.prototype.hasOwnProperty.call(a,c))return t++,n("operator",c);if('"'===c||"'"===c){var p=c;t++;for(var f="";t<r;){if("\\"===(c=e.charAt(t)))if(t++,c=e.charAt(t),Object.prototype.hasOwnProperty.call(o,c))f+=o[c];else{if("u"!==c)throw{code:"S0103",stack:(new Error).stack,position:t,token:c};var d=e.substr(t+1,4);if(!/^[0-9a-fA-F]+$/.test(d))throw{code:"S0104",stack:(new Error).stack,position:t};var h=parseInt(d,16);f+=String.fromCharCode(h),t+=4}else{if(c===p)return t++,n("string",f);f+=c}t++}throw{code:"S0101",stack:(new Error).stack,position:t}}var v,g=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/.exec(e.substring(t));if(null!==g){var y=parseFloat(g[0]);if(!isNaN(y)&&isFinite(y))return t+=g[0].length,n("number",y);throw{code:"S0102",stack:(new Error).stack,position:t,token:g[0]}}if("`"===c){t++;var m=e.indexOf("`",t);if(-1!==m)return v=e.substring(t,m),t=m+1,n("name",v);throw t=r,{code:"S0105",stack:(new Error).stack,position:t}}for(var b,k=t;;)if(b=e.charAt(k),k===r||" \t\n\r\v".indexOf(b)>-1||Object.prototype.hasOwnProperty.call(a,b)){if("$"===e.charAt(t))return v=e.substring(t+1,k),t=k,n("variable",v);switch(v=e.substring(t,k),t=k,v){case"or":case"in":case"and":return n("operator",v);case"true":return n("value",!0);case"false":return n("value",!1);case"null":return n("value",null);default:return t===r&&""===v?null:n("name",v)}}else k++};return s},function(e,t){var r,i,o={},u=[],c=function(){var e=[];"(end)"!==r.id&&e.push({type:r.type,value:r.value,position:r.position});for(var t=i();null!==t;)e.push(t),t=i();return e},l={nud:function(){var e={code:"S0211",token:this.value,position:this.position};if(t)return e.remaining=c(),e.type="error",u.push(e),e;throw e.stack=(new Error).stack,e}},p=function(e,t){var r=o[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=Object.create(l)).id=r.value=e,r.lbp=t,o[e]=r),r},f=function(e){if(t){e.remaining=c(),u.push(e);var n=o["(error)"];return(r=Object.create(n)).error=e,r.type="(error)",r}throw e.stack=(new Error).stack,e},d=function(t,n){if(t&&r.id!==t){var a={code:"(end)"===r.id?"S0203":"S0202",position:r.position,token:r.value,value:t};return f(a)}var s=i(n);if(null===s)return(r=o["(end)"]).position=e.length,r;var u,c=s.value,l=s.type;switch(l){case"name":case"variable":u=o["(name)"];break;case"operator":if(!(u=o[c]))return f({code:"S0204",stack:(new Error).stack,position:s.position,token:c});break;case"string":case"number":case"value":u=o["(literal)"];break;case"regex":l="regex",u=o["(regex)"];break;default:return f({code:"S0205",stack:(new Error).stack,position:s.position,token:c})}return(r=Object.create(u)).value=c,r.type=l,r.position=s.position,r},h=function(e){var t,n=r;for(d(null,!0),t=n.nud();e<r.lbp;)n=r,d(),t=n.led(t);return t},v=function(e){p(e,0).nud=function(){return this}},g=function(e,t,r){var n=t||a[e],i=p(e,n);return i.led=r||function(e){return this.lhs=e,this.rhs=h(n),this.type="binary",this},i},y=function(e,t,r){var n=p(e,t);return n.led=r,n},m=function(e,t){var r=p(e);return r.nud=t||function(){return this.expression=h(70),this.type="unary",this},r};v("(end)"),v("(name)"),v("(literal)"),v("(regex)"),p(":"),p(";"),p(","),p(")"),p("]"),p("}"),p(".."),g("."),g("+"),g("-"),g("*"),g("/"),g("%"),g("="),g("<"),g(">"),g("!="),g("<="),g(">="),g("&"),g("and"),g("or"),g("in"),v("and"),v("or"),v("in"),m("-"),g("~>"),y("(error)",10,(function(e){return this.lhs=e,this.error=r.error,this.remaining=c(),this.type="error",this})),m("*",(function(){return this.type="wildcard",this})),m("**",(function(){return this.type="descendant",this})),m("%",(function(){return this.type="parent",this})),g("(",a["("],(function(e){if(this.procedure=e,this.type="function",this.arguments=[],")"!==r.id)for(;"operator"===r.type&&"?"===r.id?(this.type="partial",this.arguments.push(r),d("?")):this.arguments.push(h(0)),","===r.id;)d(",");if(d(")",!0),"name"===e.type&&("function"===e.value||"λ"===e.value)){if(this.arguments.forEach((function(e,t){if("variable"!==e.type)return f({code:"S0208",stack:(new Error).stack,position:e.position,token:e.value,value:t+1})})),this.type="lambda","<"===r.id){for(var t=r.position,i=1,a="<";i>0&&"{"!==r.id&&"(end)"!==r.id;){var o=d();">"===o.id?i--:"<"===o.id&&i++,a+=o.value}d(">");try{this.signature=n(a)}catch(e){return e.position=t+e.offset,f(e)}}d("{"),this.body=h(0),d("}")}return this})),m("(",(function(){for(var e=[];")"!==r.id&&(e.push(h(0)),";"===r.id);)d(";");return d(")",!0),this.type="block",this.expressions=e,this})),m("[",(function(){var e=[];if("]"!==r.id)for(;;){var t=h(0);if(".."===r.id){var n={type:"binary",value:"..",position:r.position,lhs:t};d(".."),n.rhs=h(0),t=n}if(e.push(t),","!==r.id)break;d(",")}return d("]",!0),this.expressions=e,this.type="unary",this})),g("[",a["["],(function(e){if("]"===r.id){for(var t=e;t&&"binary"===t.type&&"["===t.value;)t=t.lhs;return t.keepArray=!0,d("]"),e}return this.lhs=e,this.rhs=h(a["]"]),this.type="binary",d("]",!0),this})),g("^",a["^"],(function(e){d("(");for(var t=[];;){var n={descending:!1};if("<"===r.id?d("<"):">"===r.id&&(n.descending=!0,d(">")),n.expression=h(0),t.push(n),","!==r.id)break;d(",")}return d(")"),this.lhs=e,this.rhs=t,this.type="binary",this}));var b=function(e){var t=[];if("}"!==r.id)for(;;){var n=h(0);d(":");var i=h(0);if(t.push([n,i]),","!==r.id)break;d(",")}return d("}",!0),void 0===e?(this.lhs=t,this.type="unary"):(this.lhs=e,this.rhs=t,this.type="binary"),this};m("{",b),g("{",a["{"],b),y(":=",a[":="],(function(e){return"variable"!==e.type?f({code:"S0212",stack:(new Error).stack,position:e.position,token:e.value}):(this.lhs=e,this.rhs=h(a[":="]-1),this.type="binary",this)})),g("@",a["@"],(function(e){return this.lhs=e,this.rhs=h(a["@"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)})),g("#",a["#"],(function(e){return this.lhs=e,this.rhs=h(a["#"]),"variable"!==this.rhs.type?f({code:"S0214",stack:(new Error).stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)})),g("?",a["?"],(function(e){return this.type="condition",this.condition=e,this.then=h(0),":"===r.id&&(d(":"),this.else=h(0)),this})),m("|",(function(){return this.type="transform",this.pattern=h(0),d("|"),this.update=h(0),","===r.id&&(d(","),this.delete=h(0)),d("|"),this}));var k=function(e){var t;if("function"!==e.type||e.predicate)if("condition"===e.type)e.then=k(e.then),void 0!==e.else&&(e.else=k(e.else)),t=e;else if("block"===e.type){var r=e.expressions.length;r>0&&(e.expressions[r-1]=k(e.expressions[r-1])),t=e}else t=e;else{var n={type:"lambda",thunk:!0,arguments:[],position:e.position};n.body=e,t=n}return t},x=0,w=0,A=[],E=function(e,t){switch(e.type){case"name":case"wildcard":t.level--,0===t.level&&(void 0===e.ancestor||(A[t.index].slot.label=e.ancestor.label),e.ancestor=t,e.tuple=!0);break;case"parent":t.level++;break;case"block":e.expressions.length>0&&(e.tuple=!0,t=E(e.expressions[e.expressions.length-1],t));break;case"path":e.tuple=!0;var r=e.steps.length-1;for(t=E(e.steps[r--],t);t.level>0&&r>=0;)t=E(e.steps[r--],t);break;default:throw{code:"S0217",token:e.type,position:e.position}}return t},T=function(e,t){if(void 0!==t.seekingParent||"parent"===t.type){var r=void 0!==t.seekingParent?t.seekingParent:[];"parent"===t.type&&r.push(t.slot),void 0===e.seekingParent?e.seekingParent=r:Array.prototype.push.apply(e.seekingParent,r)}},D=function(e){var t=e.steps.length-1,r=e.steps[t],n=void 0!==r.seekingParent?r.seekingParent:[];"parent"===r.type&&n.push(r.slot);for(var i=0;i<n.length;i++){var a=n[i];for(t=e.steps.length-2;a.level>0;){if(t<0){void 0===e.seekingParent?e.seekingParent=[a]:e.seekingParent.push(a);break}for(var o=e.steps[t--];t>=0&&o.focus&&e.steps[t].focus;)o=e.steps[t--];a=E(o,a)}}},S=function(e){var r;switch(e.type){case"binary":switch(e.value){case".":var n=S(e.lhs);r="path"===n.type?n:{type:"path",steps:[n]},"parent"===n.type&&(r.seekingParent=[n.slot]);var i=S(e.rhs);"function"===i.type&&"path"===i.procedure.type&&1===i.procedure.steps.length&&"name"===i.procedure.steps[0].type&&"function"===r.steps[r.steps.length-1].type&&(r.steps[r.steps.length-1].nextFunction=i.procedure.steps[0].value),"path"===i.type?Array.prototype.push.apply(r.steps,i.steps):(void 0!==i.predicate&&(i.stages=i.predicate,delete i.predicate),r.steps.push(i)),r.steps.filter((function(e){if("number"===e.type||"value"===e.type)throw{code:"S0213",stack:(new Error).stack,position:e.position,value:e.value};return"string"===e.type})).forEach((function(e){e.type="name"})),r.steps.filter((function(e){return!0===e.keepArray})).length>0&&(r.keepSingletonArray=!0);var a=r.steps[0];"unary"===a.type&&"["===a.value&&(a.consarray=!0);var o=r.steps[r.steps.length-1];"unary"===o.type&&"["===o.value&&(o.consarray=!0),D(r);break;case"[":var s=r=S(e.lhs),c="predicate";if("path"===r.type&&(s=r.steps[r.steps.length-1],c="stages"),void 0!==s.group)throw{code:"S0209",stack:(new Error).stack,position:e.position};void 0===s[c]&&(s[c]=[]);var l=S(e.rhs);void 0!==l.seekingParent&&(l.seekingParent.forEach((e=>{1===e.level?E(s,e):e.level--})),T(s,l)),s[c].push({type:"filter",expr:l,position:e.position});break;case"{":if(void 0!==(r=S(e.lhs)).group)throw{code:"S0210",stack:(new Error).stack,position:e.position};r.group={lhs:e.rhs.map((function(e){return[S(e[0]),S(e[1])]})),position:e.position};break;case"^":"path"!==(r=S(e.lhs)).type&&(r={type:"path",steps:[r]});var p={type:"sort",position:e.position};p.terms=e.rhs.map((function(e){var t=S(e.expression);return T(p,t),{descending:e.descending,expression:t}})),r.steps.push(p),D(r);break;case":=":(r={type:"bind",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),T(r,r.rhs);break;case"@":if(r=S(e.lhs),s=r,"path"===r.type&&(s=r.steps[r.steps.length-1]),void 0!==s.stages||void 0!==s.predicate)throw{code:"S0215",stack:(new Error).stack,position:e.position};if("sort"===s.type)throw{code:"S0216",stack:(new Error).stack,position:e.position};e.keepArray&&(s.keepArray=!0),s.focus=e.rhs.value,s.tuple=!0;break;case"#":r=S(e.lhs),s=r,"path"===r.type?s=r.steps[r.steps.length-1]:(r={type:"path",steps:[r]},void 0!==s.predicate&&(s.stages=s.predicate,delete s.predicate)),void 0===s.stages?s.index=e.rhs.value:s.stages.push({type:"index",value:e.rhs.value,position:e.position}),s.tuple=!0;break;case"~>":(r={type:"apply",value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs);break;default:(r={type:e.type,value:e.value,position:e.position}).lhs=S(e.lhs),r.rhs=S(e.rhs),T(r,r.lhs),T(r,r.rhs)}break;case"unary":r={type:e.type,value:e.value,position:e.position},"["===e.value?r.expressions=e.expressions.map((function(e){var t=S(e);return T(r,t),t})):"{"===e.value?r.lhs=e.lhs.map((function(e){var t=S(e[0]);T(r,t);var n=S(e[1]);return T(r,n),[t,n]})):(r.expression=S(e.expression),"-"===e.value&&"number"===r.expression.type?(r=r.expression).value=-r.value:T(r,r.expression));break;case"function":case"partial":(r={type:e.type,name:e.name,value:e.value,position:e.position}).arguments=e.arguments.map((function(e){var t=S(e);return T(r,t),t})),r.procedure=S(e.procedure);break;case"lambda":r={type:e.type,arguments:e.arguments,signature:e.signature,position:e.position};var f=S(e.body);r.body=k(f);break;case"condition":(r={type:e.type,position:e.position}).condition=S(e.condition),T(r,r.condition),r.then=S(e.then),T(r,r.then),void 0!==e.else&&(r.else=S(e.else),T(r,r.else));break;case"transform":(r={type:e.type,position:e.position}).pattern=S(e.pattern),r.update=S(e.update),void 0!==e.delete&&(r.delete=S(e.delete));break;case"block":(r={type:e.type,position:e.position}).expressions=e.expressions.map((function(e){var t=S(e);return T(r,t),(t.consarray||"path"===t.type&&t.steps[0].consarray)&&(r.consarray=!0),t}));break;case"name":r={type:"path",steps:[e]},e.keepArray&&(r.keepSingletonArray=!0);break;case"parent":r={type:"parent",slot:{label:"!"+x++,level:1,index:w++}},A.push(r);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":r=e;break;case"operator":if("and"===e.value||"or"===e.value||"in"===e.value)e.type="name",r=S(e);else{if("?"!==e.value)throw{code:"S0201",stack:(new Error).stack,position:e.position,token:e.value};r=e}break;case"error":r=e,e.lhs&&(r=S(e.lhs));break;default:var d="S0206";"(end)"===e.id&&(d="S0207");var h={code:d,position:e.position,token:e.value};if(t)return u.push(h),{type:"error",error:h};throw h.stack=(new Error).stack,h}return e.keepArray&&(r.keepArray=!0),r};i=s(e),d();var O=h(0);if("(end)"!==r.id){var P={code:"S0201",position:r.position,token:r.value};f(P)}if("parent"===(O=S(O)).type||void 0!==O.seekingParent)throw{code:"S0217",token:O.type,position:O.position};return u.length>0&&(O.errors=u),O});var a,o,s;t.exports=i},{"./signature":5}],5:[function(e,t,r){var n=e("./utils");const i=(()=>{var e={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function t(t){for(var r=1,i=[],a={},o=a;r<t.length;){var s=t.charAt(r);if(":"===s)break;var u=function(){i.push(a),o=a,a={}},c=function(e,t,r,n){for(var i=1,a=t;a<e.length;)if(a++,(s=e.charAt(a))===n){if(0==--i)break}else s===r&&i++;return a};switch(s){case"s":case"n":case"b":case"l":case"o":a.regex="["+s+"m]",a.type=s,u();break;case"a":a.regex="[asnblfom]",a.type=s,a.array=!0,u();break;case"f":a.regex="f",a.type=s,u();break;case"j":a.regex="[asnblom]",a.type=s,u();break;case"x":a.regex="[asnblfom]",a.type=s,u();break;case"-":o.context=!0,o.contextRegex=new RegExp(o.regex),o.regex+="?";break;case"?":case"+":o.regex+=s;break;case"(":var l=c(t,r,"(",")"),p=t.substring(r+1,l);if(-1!==p.indexOf("<"))throw{code:"S0402",stack:(new Error).stack,value:p,offset:r};a.regex="["+p+"m]",a.type="("+p+")",r=l,u();break;case"<":if("a"!==o.type&&"f"!==o.type)throw{code:"S0401",stack:(new Error).stack,value:o.type,offset:r};var f=c(t,r,"<",">");o.subtype=t.substring(r+1,f),r=f}r++}var d="^"+i.map((function(e){return"("+e.regex+")"})).join("")+"$",h=new RegExp(d),v=function(e){var t;if(n.isFunction(e))t="f";else switch(typeof e){case"string":t="s";break;case"number":t="n";break;case"boolean":t="b";break;case"object":t=null===e?"l":Array.isArray(e)?"a":"o";break;default:t="m"}return t},g=function(e,t){for(var r="^",n=0,a=0;a<i.length;a++){r+=i[a].regex;var o=t.match(r);if(null===o)throw{code:"T0410",stack:(new Error).stack,value:e[n],index:n+1};n=o[0].length}throw{code:"T0410",stack:(new Error).stack,value:e[n],index:n+1}};return{definition:t,validate:function(t,r){var n="";t.forEach((function(e){n+=v(e)}));var a=h.exec(n);if(a){var o=[],s=0;return i.forEach((function(n,i){var u=t[s],c=a[i+1];if(""===c)if(n.context&&n.contextRegex){var l=v(r);if(!n.contextRegex.test(l))throw{code:"T0411",stack:(new Error).stack,value:r,index:s+1};o.push(r)}else o.push(u),s++;else c.split("").forEach((function(r){if("a"===n.type){if("m"===r)u=void 0;else{u=t[s];var i=!0;if(void 0!==n.subtype)if("a"!==r&&c!==n.subtype)i=!1;else if("a"===r&&u.length>0){var a=v(u[0]);i=a===n.subtype.charAt(0)&&0===u.filter((function(e){return v(e)!==a})).length}if(!i)throw{code:"T0412",stack:(new Error).stack,value:u,index:s+1,type:e[n.subtype]};"a"!==r&&(u=[u])}o.push(u),s++}else o.push(u),s++}))})),o}g(t,n)}}}return t})();t.exports=i},{"./utils":6}],6:[function(e,t,r){const n=(()=>{function e(e){var t=!1;if("number"==typeof e&&(t=!isNaN(e))&&!isFinite(e))throw{code:"D1001",value:e,stack:(new Error).stack};return t}function t(e){var t=!1;return Array.isArray(e)&&(t=0===e.filter((function(e){return"string"!=typeof e})).length),t}function r(t){var r=!1;return Array.isArray(t)&&(r=0===t.filter((function(t){return!e(t)})).length),r}function n(){var e=[];return e.sequence=!0,1===arguments.length&&e.push(arguments[0]),e}function i(e){return!0===e.sequence&&Array.isArray(e)}function a(e){return e&&(!0===e._jsonata_function||!0===e._jsonata_lambda)||"function"==typeof e}function o(e){return"number"==typeof e.arity?e.arity:"function"==typeof e.implementation?e.implementation.length:"number"==typeof e.length?e.length:e.arguments.length}function s(e){return e&&!0===e._jsonata_lambda}var u=("function"==typeof Symbol?Symbol:{}).iterator||"@@iterator";function c(e){return"object"==typeof e&&null!==e&&u in e&&"next"in e&&"function"==typeof e.next}function l(e,t){if(e===t)return!0;if("object"==typeof e&&"object"==typeof t&&null!==e&&null!==t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!l(e[r],t[r]))return!1;return!0}var n=Object.getOwnPropertyNames(e),i=Object.getOwnPropertyNames(t);if(n.length!==i.length)return!1;for(n=n.sort(),i=i.sort(),r=0;r<n.length;r++)if(n[r]!==i[r])return!1;for(r=0;r<n.length;r++){var a=n[r];if(!l(e[a],t[a]))return!1}return!0}return!1}function p(e){var t=[];for(let r of e)t.push(r);return t}return{isNumeric:e,isArrayOfStrings:t,isArrayOfNumbers:r,createSequence:n,isSequence:i,isFunction:a,isLambda:s,isIterable:c,getFunctionArity:o,isDeepEqual:l,stringToArray:p}})();t.exports=n},{}]},{},[3])(3)}));export{n as j};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./shared-59042137.js";import{N as t}from"./shared-fef9ecc1.js";
|
|
2
|
-
/**
|
|
3
|
-
@license
|
|
4
|
-
Copyright (c) 2019 Vaadin Ltd.
|
|
5
|
-
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
-
*/const n=e`<dom-module id="vaadin-integer-field-template">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</dom-module>`;document.head.appendChild(n.content);class i extends t{static get is(){return"vaadin-integer-field"}static get version(){return"2.9.2"}static get properties(){return{pattern:String,preventInvalidInput:Boolean,minlength:Number,maxlength:Number}}ready(){super.ready(),this._enabledCharPattern="[-+\\d]"}_valueChanged(e,t){if(""!==e&&!this.__isInteger(e))return console.warn(`Trying to set non-integer value "${e}" to <vaadin-integer-field>. Clearing the value.`),void(this.value="");super._valueChanged(e,t)}_stepChanged(e,t){if(!this.__hasOnlyDigits(e))return console.warn(`Trying to set invalid step size "${e}", which is not a positive integer, to <vaadin-integer-field>. Resetting the default value 1.`),void(this.step=1);super._stepChanged(e,t)}__isInteger(e){return/^(-\d)?\d*$/.test(String(e))}__hasOnlyDigits(e){return/^\d*$/.test(String(e))}}window.customElements.define(i.is,i);export{i as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-e8e92fe3.js";import"./shared-e6828dbf.js";import{I as e}from"./shared-dfe2602a.js";import{i as r}from"./shared-d3bf9ac0.js";import{h as s}from"./shared-7f33a83a.js";let a,l=e=>e;customElements.define("foxy-internal-password-control",class extends e{renderControl(){return s(a||(a=l` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-password-field> `),r(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=r.value}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as t,ar as e,an as r,as as n,at as o,au as a,r as c,av as u,aw as s,ax as i,ay as f,az as b,aA as j,aB as y,aC as v,aD as p,aE as l,aF as d,aG as A,aH as w,aI as g}from"./shared-307262a1.js";import{b as h,a as m}from"./shared-fe54babe.js";var O=Object.create,x=function(){function e(){}return function(r){if(!t(r))return{};if(O)return O(r);e.prototype=r;var n=new e;return e.prototype=void 0,n}}();function I(t,e,r,n){var o=!r;r||(r={});for(var a=-1,c=e.length;++a<c;){var u=e[a],s=n?n(r[u],t[u],u,r,t):void 0;void 0===s&&(s=t[u]),o?h(r,u,s):m(r,u,s)}return r}var S=Object.prototype.hasOwnProperty;function U(r){if(!t(r))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(r);var n=e(r),o=[];for(var a in r)("constructor"!=a||!n&&S.call(r,a))&&o.push(a);return o}function F(t){return r(t)?n(t,!0):U(t)}var B=o(Object.getPrototypeOf,Object);var E="object"==typeof exports&&exports&&!exports.nodeType&&exports,D=E&&"object"==typeof module&&module&&!module.nodeType&&module,M=D&&D.exports===E?c.Buffer:void 0,P=M?M.allocUnsafe:void 0;var C=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)i(e,u(t)),t=B(t);return e}:s;function G(t){return f(t,F,C)}var L=Object.prototype.hasOwnProperty;function N(t){var e=new t.constructor(t.byteLength);return new b(e).set(new b(t)),e}var R=/\w*$/;var T=j?j.prototype:void 0,V=T?T.valueOf:void 0;function k(t,e,r){var n,o,a,c=t.constructor;switch(e){case"[object ArrayBuffer]":return N(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return function(t,e){var r=e?N(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?N(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return(a=new(o=t).constructor(o.source,R.exec(o))).lastIndex=o.lastIndex,a;case"[object Symbol]":return n=t,V?Object(V.call(n)):{}}}var z=p&&p.isMap,H=z?l(z):function(t){return y(t)&&"[object Map]"==v(t)};var W=p&&p.isSet,$=W?l(W):function(t){return y(t)&&"[object Set]"==v(t)},q={};function J(r,n,o,c,s,i){var f,b=1&n,j=2&n,y=4&n;if(o&&(f=s?o(r,c,s,i):o(r)),void 0!==f)return f;if(!t(r))return r;var p=d(r);if(p){if(f=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&L.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(r),!b)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(r,f)}else{var l=v(r),h="[object Function]"==l||"[object GeneratorFunction]"==l;if(A(r))return function(t,e){if(e)return t.slice();var r=t.length,n=P?P(r):new t.constructor(r);return t.copy(n),n}(r,b);if("[object Object]"==l||"[object Arguments]"==l||h&&!s){if(f=j||h?{}:function(t){return"function"!=typeof t.constructor||e(t)?{}:x(B(t))}(r),!b)return j?function(t,e){return I(t,C(t),e)}(r,function(t,e){return t&&I(e,F(e),t)}(f,r)):function(t,e){return I(t,u(t),e)}(r,function(t,e){return t&&I(e,a(e),t)}(f,r))}else{if(!q[l])return s?r:{};f=k(r,l,b)}}i||(i=new w);var O=i.get(r);if(O)return O;i.set(r,f),$(r)?r.forEach((function(t){f.add(J(t,n,o,t,r,i))})):H(r)&&r.forEach((function(t,e){f.set(e,J(t,n,o,e,r,i))}));var S=p?void 0:(y?j?G:g:j?F:a)(r);return function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););}(S||r,(function(t,e){S&&(t=r[e=t]),m(f,e,J(t,n,o,e,r,i))})),f}q["[object Arguments]"]=q["[object Array]"]=q["[object ArrayBuffer]"]=q["[object DataView]"]=q["[object Boolean]"]=q["[object Date]"]=q["[object Float32Array]"]=q["[object Float64Array]"]=q["[object Int8Array]"]=q["[object Int16Array]"]=q["[object Int32Array]"]=q["[object Map]"]=q["[object Number]"]=q["[object Object]"]=q["[object RegExp]"]=q["[object Set]"]=q["[object String]"]=q["[object Symbol]"]=q["[object Uint8Array]"]=q["[object Uint8ClampedArray]"]=q["[object Uint16Array]"]=q["[object Uint32Array]"]=!0,q["[object Error]"]=q["[object Function]"]=q["[object WeakMap]"]=!1;function K(t){return J(t,5)}export{K as c};
|