@happyvertical/smrt-planner 0.73.1 → 0.74.1
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/agents/commands.md +1 -1
- package/agents/cookbook.md +1 -1
- package/app/404.html +19 -19
- package/app/_app/immutable/chunks/{Cg-eL42V.js → 1MCEfbuK.js} +1 -1
- package/app/_app/immutable/chunks/{CQ-E56g5.js → 7MSV8zqY.js} +1 -1
- package/app/_app/immutable/chunks/{C-pqODM7.js → A9RxqqAT.js} +1 -1
- package/app/_app/immutable/chunks/{BAuTuURn.js → B0gVOiOz.js} +1 -1
- package/app/_app/immutable/chunks/{aq3-57l6.js → BJmbWKnL.js} +1 -1
- package/app/_app/immutable/chunks/{BEgzIsEU.js → BKyd-7tf.js} +1 -1
- package/app/_app/immutable/chunks/{6xv43Uld.js → BNuYLyJe.js} +1 -1
- package/app/_app/immutable/chunks/{Cu559PCD.js → Bd_VgQZP.js} +1 -1
- package/app/_app/immutable/chunks/{Cg56NuZX.js → BeGoDpoN.js} +1 -1
- package/app/_app/immutable/chunks/{BR7yw_9X.js → BhTbAGNT.js} +1 -1
- package/app/_app/immutable/chunks/{Dkpzehcu.js → C1oD87DR.js} +1 -1
- package/app/_app/immutable/chunks/{D37Tqc2g.js → C3_gJJeZ.js} +2 -2
- package/app/_app/immutable/chunks/COPIcUDJ.js +1 -0
- package/app/_app/immutable/chunks/CZz6oK-0.js +1 -0
- package/app/_app/immutable/chunks/{Q9_odFaS.js → Cg22Ob33.js} +1 -1
- package/app/_app/immutable/chunks/{Cfex8mXp.js → CmvA7uJQ.js} +3 -3
- package/app/_app/immutable/chunks/{BLCPylcV.js → D3e2k3cc.js} +33 -33
- package/app/_app/immutable/chunks/{DBqVHTJ2.js → D5fMVhuc.js} +1 -1
- package/app/_app/immutable/chunks/{CdtuGcb0.js → DBpiHw4Q.js} +1 -1
- package/app/_app/immutable/chunks/DGG2_OGp.js +4 -0
- package/app/_app/immutable/chunks/{fDQPJ_TP.js → DWkCa_4d.js} +1 -1
- package/app/_app/immutable/chunks/{veD8x7YP.js → DbjaEFL3.js} +1 -1
- package/app/_app/immutable/chunks/{t1rNSrEv.js → Di75bXkC.js} +1 -1
- package/app/_app/immutable/chunks/{D-AIVjtF.js → DjNuiDuh.js} +1 -1
- package/app/_app/immutable/chunks/{D1xEAquV.js → DsWtgd3o.js} +1 -1
- package/app/_app/immutable/chunks/DyJpiY9N.js +1 -0
- package/app/_app/immutable/chunks/{BjkmOr-u.js → GCZJpkJy.js} +1 -1
- package/app/_app/immutable/chunks/{Cvsgnp6s.js → QN425fRi.js} +1 -1
- package/app/_app/immutable/chunks/{CVkpERCA.js → fr3iOGAj.js} +1 -1
- package/app/_app/immutable/chunks/{COMo8yR5.js → r4rcBe9y.js} +1 -1
- package/app/_app/immutable/entry/{app.3PTRkAeY.js → app.D4qs0IN-.js} +2 -2
- package/app/_app/immutable/entry/start.O9a6Ul9y.js +1 -0
- package/app/_app/immutable/nodes/{0.DHgTX2Ft.js → 0.CbnoHyfD.js} +1 -1
- package/app/_app/immutable/nodes/{1.CmJuXA1E.js → 1.B0f5i13S.js} +1 -1
- package/app/_app/immutable/nodes/{10.Bad5X_0q.js → 10.JaOUxb0t.js} +1 -1
- package/app/_app/immutable/nodes/{11.BK_bqkRp.js → 11.USLp3IhE.js} +1 -1
- package/app/_app/immutable/nodes/{12.C_3kiyLa.js → 12.CRX7Ycoi.js} +1 -1
- package/app/_app/immutable/nodes/{13.5EDrUuao.js → 13.Bnpyjx4h.js} +1 -1
- package/app/_app/immutable/nodes/{14.OkwTA7bP.js → 14.B4ivd2k9.js} +1 -1
- package/app/_app/immutable/nodes/{2.mvNW8oqe.js → 2.DsNUQiA4.js} +3 -3
- package/app/_app/immutable/nodes/{3.ao8YlO4V.js → 3.BB8u3nSu.js} +1 -1
- package/app/_app/immutable/nodes/{4.B-mj2Hhd.js → 4.scGMz-n5.js} +1 -1
- package/app/_app/immutable/nodes/{5._seB8mHt.js → 5.CLjxo36i.js} +1 -1
- package/app/_app/immutable/nodes/{6.DsCqd44K.js → 6.DTm5R5il.js} +1 -1
- package/app/_app/immutable/nodes/{7.U4livcrx.js → 7.Dg2Sw-QC.js} +1 -1
- package/app/_app/immutable/nodes/{8.CpjiZr0k.js → 8.RDQcCsvh.js} +1 -1
- package/app/_app/immutable/nodes/{9.3jUYmI1Y.js → 9.BJX6p-Oh.js} +1 -1
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +21 -21
- package/app/ai/index.html +25 -25
- package/app/blueprint/index.html +20 -20
- package/app/cookbook/index.html +20 -20
- package/app/index.html +35 -35
- package/app/m/ads/AdDeliveryTier/index.html +24 -24
- package/app/m/ads/AdEvent/index.html +24 -24
- package/app/m/ads/AdFormat/index.html +24 -24
- package/app/m/ads/AdGroup/index.html +24 -24
- package/app/m/ads/AdVariation/index.html +24 -24
- package/app/m/analytics/AnalyticsDataStream/index.html +24 -24
- package/app/m/analytics/AnalyticsEvent/index.html +24 -24
- package/app/m/analytics/AnalyticsProperty/index.html +24 -24
- package/app/m/analytics/AnalyticsReport/index.html +24 -24
- package/app/m/approvals/ApprovalEvent/index.html +24 -24
- package/app/m/approvals/ApprovalPolicy/index.html +24 -24
- package/app/m/approvals/ApprovalRequest/index.html +24 -24
- package/app/m/assets/Asset/attachments/index.html +25 -25
- package/app/m/assets/Asset/index.html +24 -24
- package/app/m/assets/AssetAssociation/index.html +24 -24
- package/app/m/assets/AssetMetafield/index.html +24 -24
- package/app/m/assets/AssetStatus/index.html +24 -24
- package/app/m/assets/AssetType/index.html +24 -24
- package/app/m/assets/Folder/index.html +24 -24
- package/app/m/chat/AgentSession/index.html +24 -24
- package/app/m/chat/ChatMessage/index.html +24 -24
- package/app/m/chat/ChatParticipant/index.html +24 -24
- package/app/m/chat/ChatReaction/index.html +24 -24
- package/app/m/chat/ChatRoom/index.html +24 -24
- package/app/m/chat/ChatThread/index.html +24 -24
- package/app/m/chat/VoiceGatewayTurn/index.html +24 -24
- package/app/m/chat/VoiceSession/index.html +24 -24
- package/app/m/commerce/AccountingConnection/index.html +24 -24
- package/app/m/commerce/AccountingInvoiceReadback/index.html +24 -24
- package/app/m/commerce/AccountingMapping/index.html +24 -24
- package/app/m/commerce/AccountingPaymentSync/index.html +24 -24
- package/app/m/commerce/Agreement/index.html +24 -24
- package/app/m/commerce/Cart/index.html +24 -24
- package/app/m/commerce/Contract/index.html +24 -24
- package/app/m/commerce/ContractLineItem/index.html +24 -24
- package/app/m/commerce/Customer/index.html +24 -24
- package/app/m/commerce/DocumentTax/index.html +24 -24
- package/app/m/commerce/Estimate/index.html +24 -24
- package/app/m/commerce/Fulfillment/index.html +24 -24
- package/app/m/commerce/FulfillmentLineItem/index.html +24 -24
- package/app/m/commerce/HistoricalCustomerFunds/index.html +24 -24
- package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +24 -24
- package/app/m/commerce/HistoricalSalesLine/index.html +24 -24
- package/app/m/commerce/Invoice/index.html +24 -24
- package/app/m/commerce/InvoiceLineItem/index.html +24 -24
- package/app/m/commerce/Lease/index.html +24 -24
- package/app/m/commerce/LicenseSale/index.html +24 -24
- package/app/m/commerce/Order/index.html +24 -24
- package/app/m/commerce/Payment/index.html +24 -24
- package/app/m/commerce/PaymentAllocation/index.html +24 -24
- package/app/m/commerce/PaymentInstrument/index.html +24 -24
- package/app/m/commerce/PaymentIntent/index.html +24 -24
- package/app/m/commerce/Payout/index.html +24 -24
- package/app/m/commerce/ProductionOrder/index.html +24 -24
- package/app/m/commerce/PurchaseContract/index.html +24 -24
- package/app/m/commerce/PurchaseOrder/index.html +24 -24
- package/app/m/commerce/SalesContract/index.html +24 -24
- package/app/m/commerce/SupplierQuote/index.html +24 -24
- package/app/m/commerce/TaxCode/index.html +24 -24
- package/app/m/commerce/TaxComponent/index.html +24 -24
- package/app/m/commerce/TaxSettings/index.html +24 -24
- package/app/m/commerce/TaxSummaryReport/index.html +24 -24
- package/app/m/commerce/TenantPaymentAccount/index.html +24 -24
- package/app/m/commerce/Vendor/index.html +24 -24
- package/app/m/commerce/WholesaleOrder/index.html +24 -24
- package/app/m/content/Content/articles/index.html +25 -25
- package/app/m/content/Content/index.html +24 -24
- package/app/m/content/ContentContribution/index.html +24 -24
- package/app/m/content/ContentContributionAttachment/index.html +24 -24
- package/app/m/content/ContentContributionRevision/index.html +24 -24
- package/app/m/content/ContentContributionType/index.html +24 -24
- package/app/m/content/ContentContributor/index.html +24 -24
- package/app/m/content/ContentCorrection/index.html +24 -24
- package/app/m/content/ContentFeedSource/index.html +24 -24
- package/app/m/content/ContentGovernanceAssignment/index.html +24 -24
- package/app/m/content/ContentGovernancePolicy/index.html +24 -24
- package/app/m/content/ContentGovernanceProfile/index.html +24 -24
- package/app/m/content/ContentReference/index.html +24 -24
- package/app/m/content/ContentReview/index.html +24 -24
- package/app/m/content/ContentVersion/index.html +24 -24
- package/app/m/events/Event/index.html +24 -24
- package/app/m/events/EventParticipant/index.html +24 -24
- package/app/m/events/EventSeries/index.html +24 -24
- package/app/m/events/EventType/index.html +24 -24
- package/app/m/expenses/Expense/index.html +24 -24
- package/app/m/facts/Fact/index.html +24 -24
- package/app/m/facts/FactContent/index.html +24 -24
- package/app/m/facts/FactEvidence/index.html +24 -24
- package/app/m/facts/FactSource/index.html +24 -24
- package/app/m/facts/FactSubject/index.html +24 -24
- package/app/m/facts/FactTag/index.html +24 -24
- package/app/m/fields/FieldPolicy/index.html +24 -24
- package/app/m/fields/FieldPolicySuggestion/index.html +24 -24
- package/app/m/fields/FieldUsageCounter/index.html +24 -24
- package/app/m/human-resources/Employment/index.html +24 -24
- package/app/m/human-resources/EmploymentTerm/index.html +24 -24
- package/app/m/human-resources/HeldQualification/index.html +24 -24
- package/app/m/human-resources/Qualification/index.html +24 -24
- package/app/m/images/Image/index.html +24 -24
- package/app/m/inventory/InventoryLocation/index.html +24 -24
- package/app/m/inventory/Lot/index.html +24 -24
- package/app/m/inventory/LotCorrection/index.html +24 -24
- package/app/m/inventory/LotDocument/index.html +24 -24
- package/app/m/inventory/LotStockLevel/index.html +24 -24
- package/app/m/inventory/LotUsage/index.html +24 -24
- package/app/m/inventory/StockLevel/index.html +24 -24
- package/app/m/inventory/StockMovement/index.html +24 -24
- package/app/m/ledgers/Account/index.html +24 -24
- package/app/m/ledgers/Journal/index.html +24 -24
- package/app/m/ledgers/JournalEntry/index.html +24 -24
- package/app/m/ledgers/Ledger/index.html +24 -24
- package/app/m/manufacturing/Assembly/index.html +24 -24
- package/app/m/manufacturing/BillOfMaterials/index.html +24 -24
- package/app/m/manufacturing/BomLine/index.html +24 -24
- package/app/m/manufacturing/Operation/index.html +24 -24
- package/app/m/manufacturing/ProductionRun/index.html +24 -24
- package/app/m/manufacturing/ProductionRunCompletion/index.html +24 -24
- package/app/m/manufacturing/RoutingStep/index.html +24 -24
- package/app/m/marketing/Campaign/index.html +24 -24
- package/app/m/marketing/CampaignChannel/index.html +24 -24
- package/app/m/marketing/CampaignMetricSnapshot/index.html +24 -24
- package/app/m/messages/Account/index.html +24 -24
- package/app/m/messages/Attachment/index.html +24 -24
- package/app/m/messages/Blacklist/index.html +24 -24
- package/app/m/messages/Email/failed-sends/index.html +25 -25
- package/app/m/messages/Email/index.html +24 -24
- package/app/m/messages/Email/mailbox/index.html +25 -25
- package/app/m/messages/EmailAccount/index.html +24 -24
- package/app/m/messages/EmailAttachment/index.html +24 -24
- package/app/m/messages/EmailFolder/index.html +24 -24
- package/app/m/messages/Message/index.html +24 -24
- package/app/m/messages/MessagingEndpoint/index.html +24 -24
- package/app/m/messages/PersonaMessageRoute/index.html +24 -24
- package/app/m/messages/SlackAccount/index.html +24 -24
- package/app/m/messages/SlackMessage/index.html +24 -24
- package/app/m/messages/SlackMessage/slack-messages/index.html +25 -25
- package/app/m/messages/TelegramAccount/index.html +24 -24
- package/app/m/messages/Tweet/index.html +24 -24
- package/app/m/messages/TwitterAccount/index.html +24 -24
- package/app/m/messages/Whitelist/index.html +24 -24
- package/app/m/messages/ZulipAccount/index.html +24 -24
- package/app/m/places/Place/index.html +24 -24
- package/app/m/places/PlaceType/index.html +24 -24
- package/app/m/products/Category/index.html +24 -24
- package/app/m/products/Material/index.html +24 -24
- package/app/m/products/Product/index.html +24 -24
- package/app/m/products/Product/ingredients/index.html +25 -25
- package/app/m/products/ProductVariant/index.html +24 -24
- package/app/m/products/Sku/index.html +24 -24
- package/app/m/profiles/ApiKey/index.html +24 -24
- package/app/m/profiles/Bot/index.html +24 -24
- package/app/m/profiles/MagicLinkToken/index.html +24 -24
- package/app/m/profiles/NostrIdentity/index.html +24 -24
- package/app/m/profiles/OidcIdentity/index.html +24 -24
- package/app/m/profiles/Organization/index.html +24 -24
- package/app/m/profiles/Person/index.html +24 -24
- package/app/m/profiles/Profile/index.html +24 -24
- package/app/m/profiles/ProfileMetadata/index.html +24 -24
- package/app/m/profiles/ProfileMetafield/index.html +24 -24
- package/app/m/profiles/ProfileRelationship/index.html +24 -24
- package/app/m/profiles/ProfileRelationshipTerm/index.html +24 -24
- package/app/m/profiles/ProfileRelationshipType/index.html +24 -24
- package/app/m/profiles/ProfileType/index.html +24 -24
- package/app/m/projects/Comment/index.html +24 -24
- package/app/m/projects/Issue/index.html +24 -24
- package/app/m/projects/Label/index.html +24 -24
- package/app/m/projects/Project/index.html +24 -24
- package/app/m/projects/ProjectIntegration/index.html +24 -24
- package/app/m/projects/PullRequest/index.html +24 -24
- package/app/m/projects/Repository/index.html +24 -24
- package/app/m/properties/Property/index.html +24 -24
- package/app/m/properties/Zone/index.html +24 -24
- package/app/m/reports/RuntimeReport/index.html +24 -24
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +24 -24
- package/app/m/reports/SmrtReportLock/index.html +24 -24
- package/app/m/reports/SmrtReportRefreshTask/index.html +24 -24
- package/app/m/reports/SmrtReportRun/index.html +24 -24
- package/app/m/reports/SmrtReportSchedule/index.html +24 -24
- package/app/m/reports/SmrtReportWatermark/index.html +24 -24
- package/app/m/sales/Agreement/index.html +24 -24
- package/app/m/sales/AttributionException/index.html +24 -24
- package/app/m/sales/AttributionPolicy/index.html +24 -24
- package/app/m/sales/Commission/index.html +24 -24
- package/app/m/sales/CommissionAdjustment/index.html +24 -24
- package/app/m/sales/CommissionPayout/index.html +24 -24
- package/app/m/sales/CommissionPlan/index.html +24 -24
- package/app/m/sales/Earner/index.html +24 -24
- package/app/m/sales/EarnerSourceAttribution/index.html +24 -24
- package/app/m/sales/EarningEvent/index.html +24 -24
- package/app/m/sales/ExecutedAgreement/index.html +24 -24
- package/app/m/sales/Lead/index.html +24 -24
- package/app/m/sales/Opportunity/index.html +24 -24
- package/app/m/sales/OpportunityConversion/index.html +24 -24
- package/app/m/sales/PipelineDefinition/index.html +24 -24
- package/app/m/sales/PipelineStage/index.html +24 -24
- package/app/m/sales/Referral/index.html +24 -24
- package/app/m/sales/ReferralAgreement/index.html +24 -24
- package/app/m/sales/ReferralLink/index.html +24 -24
- package/app/m/sales/ReferralProgram/index.html +24 -24
- package/app/m/sales/ReferralTermSnapshot/index.html +24 -24
- package/app/m/sales/ReferralTouch/index.html +24 -24
- package/app/m/sales/Referrer/index.html +24 -24
- package/app/m/sales/ReferrerIdentifier/index.html +24 -24
- package/app/m/sales/SalesActivity/index.html +24 -24
- package/app/m/sales/SalesRepresentative/index.html +24 -24
- package/app/m/sites/DnsZone/index.html +24 -24
- package/app/m/sites/Domain/index.html +24 -24
- package/app/m/sites/ProjectDomain/index.html +24 -24
- package/app/m/sites/Site/index.html +24 -24
- package/app/m/sites/SiteAgentBinding/index.html +24 -24
- package/app/m/social/OAuthState/index.html +24 -24
- package/app/m/social/SocialAccount/index.html +24 -24
- package/app/m/social/SocialPost/index.html +24 -24
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +24 -24
- package/app/m/subscriptions/BillingAdjustment/index.html +24 -24
- package/app/m/subscriptions/ClientCharge/index.html +24 -24
- package/app/m/subscriptions/CreditGrant/index.html +24 -24
- package/app/m/subscriptions/PricingRule/index.html +24 -24
- package/app/m/subscriptions/RetailCharge/index.html +24 -24
- package/app/m/subscriptions/SpendingPolicy/index.html +24 -24
- package/app/m/subscriptions/SubscriptionPlan/index.html +24 -24
- package/app/m/subscriptions/SubscriptionPlanVersion/index.html +24 -24
- package/app/m/subscriptions/TenantSubscription/index.html +24 -24
- package/app/m/subscriptions/TenantUsageMetric/index.html +24 -24
- package/app/m/support/ServiceTimeEntry/index.html +24 -24
- package/app/m/support/SupportAiRun/index.html +24 -24
- package/app/m/support/SupportAvailability/index.html +24 -24
- package/app/m/support/SupportCase/index.html +24 -24
- package/app/m/support/SupportCaseEvent/index.html +24 -24
- package/app/m/support/SupportChannelBinding/index.html +24 -24
- package/app/m/support/SupportCharge/index.html +24 -24
- package/app/m/support/SupportCompensation/index.html +24 -24
- package/app/m/support/SupportCompensationPlan/index.html +24 -24
- package/app/m/support/SupportEscalation/index.html +24 -24
- package/app/m/support/SupportInteraction/index.html +24 -24
- package/app/m/support/SupportPlan/index.html +24 -24
- package/app/m/support/SupportPolicy/index.html +24 -24
- package/app/m/support/SupportQualification/index.html +24 -24
- package/app/m/support/SupportServiceTarget/index.html +24 -24
- package/app/m/support/SupportSpecialist/index.html +24 -24
- package/app/m/support/SupportWorkLink/index.html +24 -24
- package/app/m/tags/Tag/index.html +24 -24
- package/app/m/tags/TagAlias/index.html +24 -24
- package/app/m/timesheets/AttendanceBreak/index.html +24 -24
- package/app/m/timesheets/AttendancePunch/index.html +24 -24
- package/app/m/timesheets/AttendanceSegment/index.html +24 -24
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +24 -24
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +24 -24
- package/app/m/timesheets/ServiceTimeEntry/index.html +24 -24
- package/app/m/users/Group/index.html +24 -24
- package/app/m/users/GroupMember/index.html +24 -24
- package/app/m/users/GroupRole/index.html +24 -24
- package/app/m/users/Membership/index.html +24 -24
- package/app/m/users/MembershipOverride/index.html +24 -24
- package/app/m/users/Permission/index.html +24 -24
- package/app/m/users/Role/index.html +24 -24
- package/app/m/users/RolePermission/index.html +24 -24
- package/app/m/users/Session/index.html +24 -24
- package/app/m/users/Tenant/index.html +24 -24
- package/app/m/users/TenantGuestGrant/index.html +88 -0
- package/app/m/users/TenantIntegration/index.html +24 -24
- package/app/m/users/TenantPermissionOverride/index.html +24 -24
- package/app/m/users/User/index.html +24 -24
- package/app/m/video/Character/index.html +24 -24
- package/app/m/video/CharacterAsset/index.html +24 -24
- package/app/m/video/CompositeJob/index.html +24 -24
- package/app/m/video/Performer/index.html +24 -24
- package/app/m/video/PerformerAsset/index.html +24 -24
- package/app/m/video/Scene/index.html +24 -24
- package/app/m/video/SceneAsset/index.html +24 -24
- package/app/m/video/VideoComposition/index.html +24 -24
- package/app/m/video/VideoCompositionAsset/index.html +24 -24
- package/app/m/video/VideoSequence/index.html +24 -24
- package/app/m/video/VideoSequenceAsset/index.html +24 -24
- package/app/m/video/VideoShot/index.html +24 -24
- package/app/m/video/VideoShotAsset/index.html +24 -24
- package/app/m/video/VideoShotCharacter/index.html +24 -24
- package/app/m/video/VideoWorkflow/index.html +24 -24
- package/app/m/voice/VoiceOutput/index.html +24 -24
- package/app/m/voice/VoiceProfile/index.html +24 -24
- package/app/m/voice/VoiceSample/index.html +24 -24
- package/app/mcp.html +2 -2
- package/app/packages/ads/index.html +22 -22
- package/app/packages/analytics/index.html +22 -22
- package/app/packages/app-mcp/index.html +22 -22
- package/app/packages/approvals/index.html +22 -22
- package/app/packages/assets/index.html +22 -22
- package/app/packages/chat/index.html +22 -22
- package/app/packages/comments/index.html +22 -22
- package/app/packages/commerce/index.html +22 -22
- package/app/packages/content/index.html +22 -22
- package/app/packages/events/index.html +22 -22
- package/app/packages/expenses/index.html +22 -22
- package/app/packages/facts/index.html +22 -22
- package/app/packages/fields/index.html +22 -22
- package/app/packages/human-resources/index.html +22 -22
- package/app/packages/images/index.html +22 -22
- package/app/packages/index.html +22 -22
- package/app/packages/inference/index.html +22 -22
- package/app/packages/ingestion/index.html +22 -22
- package/app/packages/inventory/index.html +22 -22
- package/app/packages/ledgers/index.html +22 -22
- package/app/packages/manufacturing/index.html +22 -22
- package/app/packages/marketing/index.html +22 -22
- package/app/packages/messages/index.html +22 -22
- package/app/packages/places/index.html +22 -22
- package/app/packages/preferences/index.html +22 -22
- package/app/packages/products/index.html +22 -22
- package/app/packages/profiles/index.html +22 -22
- package/app/packages/projects/index.html +22 -22
- package/app/packages/properties/index.html +22 -22
- package/app/packages/reactions/index.html +22 -22
- package/app/packages/reports/index.html +22 -22
- package/app/packages/sales/index.html +22 -22
- package/app/packages/sites/index.html +22 -22
- package/app/packages/social/index.html +22 -22
- package/app/packages/subscriptions/index.html +22 -22
- package/app/packages/support/index.html +22 -22
- package/app/packages/tags/index.html +22 -22
- package/app/packages/timesheets/index.html +22 -22
- package/app/packages/users/index.html +23 -23
- package/app/packages/video/index.html +22 -22
- package/app/packages/voice/index.html +22 -22
- package/app/packages/webhooks/index.html +22 -22
- package/app/recipes/account-access/help/index.html +22 -22
- package/app/recipes/account-access/index.html +24 -24
- package/app/recipes/activity/help/index.html +22 -22
- package/app/recipes/activity/index.html +24 -24
- package/app/recipes/ads.campaigns/help/index.html +22 -22
- package/app/recipes/ads.campaigns/index.html +24 -24
- package/app/recipes/affiliates.referrals/help/index.html +22 -22
- package/app/recipes/affiliates.referrals/index.html +24 -24
- package/app/recipes/agreements/help/index.html +22 -22
- package/app/recipes/agreements/index.html +24 -24
- package/app/recipes/analytics.reports/help/index.html +22 -22
- package/app/recipes/analytics.reports/index.html +24 -24
- package/app/recipes/approvals.requests/help/index.html +22 -22
- package/app/recipes/approvals.requests/index.html +24 -24
- package/app/recipes/assets/help/index.html +22 -22
- package/app/recipes/assets/index.html +24 -24
- package/app/recipes/billing/help/index.html +22 -22
- package/app/recipes/billing/index.html +24 -24
- package/app/recipes/chat.assistant/help/index.html +22 -22
- package/app/recipes/chat.assistant/index.html +24 -24
- package/app/recipes/comments/help/index.html +22 -22
- package/app/recipes/comments/index.html +24 -24
- package/app/recipes/commerce.customers/help/index.html +22 -22
- package/app/recipes/commerce.customers/index.html +24 -24
- package/app/recipes/commerce.estimates/help/index.html +22 -22
- package/app/recipes/commerce.estimates/index.html +24 -24
- package/app/recipes/commerce.purchases/help/index.html +22 -22
- package/app/recipes/commerce.purchases/index.html +24 -24
- package/app/recipes/commerce.sales/help/index.html +22 -22
- package/app/recipes/commerce.sales/index.html +24 -24
- package/app/recipes/commerce.vendors/help/index.html +22 -22
- package/app/recipes/commerce.vendors/index.html +24 -24
- package/app/recipes/commerce.wholesale/help/index.html +22 -22
- package/app/recipes/commerce.wholesale/index.html +24 -24
- package/app/recipes/content.articles/help/index.html +22 -22
- package/app/recipes/content.articles/index.html +24 -24
- package/app/recipes/events.calendar/help/index.html +22 -22
- package/app/recipes/events.calendar/index.html +24 -24
- package/app/recipes/expenses.tracking/help/index.html +22 -22
- package/app/recipes/expenses.tracking/index.html +24 -24
- package/app/recipes/fields.form-customization/help/index.html +22 -22
- package/app/recipes/fields.form-customization/index.html +24 -24
- package/app/recipes/human-resources.people/help/index.html +22 -22
- package/app/recipes/human-resources.people/index.html +24 -24
- package/app/recipes/human-resources.qualifications/help/index.html +22 -22
- package/app/recipes/human-resources.qualifications/index.html +24 -24
- package/app/recipes/ingestion/help/index.html +22 -22
- package/app/recipes/ingestion/index.html +24 -24
- package/app/recipes/integrations/help/index.html +22 -22
- package/app/recipes/integrations/index.html +24 -24
- package/app/recipes/inventory.stock/help/index.html +22 -22
- package/app/recipes/inventory.stock/index.html +24 -24
- package/app/recipes/ledgers.bookkeeping/help/index.html +22 -22
- package/app/recipes/ledgers.bookkeeping/index.html +24 -24
- package/app/recipes/manufacturing.assemblies/help/index.html +22 -22
- package/app/recipes/manufacturing.assemblies/index.html +24 -24
- package/app/recipes/manufacturing.production/help/index.html +22 -22
- package/app/recipes/manufacturing.production/index.html +24 -24
- package/app/recipes/marketing.campaigns/help/index.html +22 -22
- package/app/recipes/marketing.campaigns/index.html +24 -24
- package/app/recipes/messages/help/index.html +22 -22
- package/app/recipes/messages/index.html +24 -24
- package/app/recipes/places.locations/help/index.html +22 -22
- package/app/recipes/places.locations/index.html +24 -24
- package/app/recipes/products/help/index.html +22 -22
- package/app/recipes/products/index.html +24 -24
- package/app/recipes/profiles.identity/help/index.html +22 -22
- package/app/recipes/profiles.identity/index.html +24 -24
- package/app/recipes/projects.tracker/help/index.html +22 -22
- package/app/recipes/projects.tracker/index.html +24 -24
- package/app/recipes/reports.materialized/help/index.html +22 -22
- package/app/recipes/reports.materialized/index.html +24 -24
- package/app/recipes/reports.runtime/help/index.html +22 -22
- package/app/recipes/reports.runtime/index.html +24 -24
- package/app/recipes/sales.pipeline/help/index.html +22 -22
- package/app/recipes/sales.pipeline/index.html +24 -24
- package/app/recipes/social.posts/help/index.html +22 -22
- package/app/recipes/social.posts/index.html +24 -24
- package/app/recipes/subscriptions.plans/help/index.html +22 -22
- package/app/recipes/subscriptions.plans/index.html +24 -24
- package/app/recipes/support.tickets/help/index.html +22 -22
- package/app/recipes/support.tickets/index.html +24 -24
- package/app/recipes/tags.taxonomy/help/index.html +22 -22
- package/app/recipes/tags.taxonomy/index.html +24 -24
- package/app/recipes/team-collaboration/help/index.html +22 -22
- package/app/recipes/team-collaboration/index.html +24 -24
- package/app/recipes/timesheets.time-entries/help/index.html +22 -22
- package/app/recipes/timesheets.time-entries/index.html +24 -24
- package/app/recipes/video.library/help/index.html +22 -22
- package/app/recipes/video.library/index.html +24 -24
- package/app/recipes/voice.profiles/help/index.html +22 -22
- package/app/recipes/voice.profiles/index.html +24 -24
- package/app/s/custom-accounts/index.html +20 -20
- package/app/s/custom-appointments/index.html +20 -20
- package/app/s/custom-billing/index.html +20 -20
- package/app/s/custom-bookings/index.html +20 -20
- package/app/s/custom-buying/index.html +20 -20
- package/app/s/custom-checkout/index.html +20 -20
- package/app/s/custom-classes/index.html +20 -20
- package/app/s/custom-clients/index.html +20 -20
- package/app/s/custom-events/index.html +20 -20
- package/app/s/custom-fleet/index.html +20 -20
- package/app/s/custom-gigs/index.html +20 -20
- package/app/s/custom-giving/index.html +20 -20
- package/app/s/custom-instruments/index.html +20 -20
- package/app/s/custom-jobs/index.html +20 -20
- package/app/s/custom-kitchen/index.html +20 -20
- package/app/s/custom-lessons/index.html +20 -20
- package/app/s/custom-material/index.html +20 -20
- package/app/s/custom-meetings/index.html +20 -20
- package/app/s/custom-members/index.html +20 -20
- package/app/s/custom-merch/index.html +20 -20
- package/app/s/custom-money/index.html +20 -20
- package/app/s/custom-paint/index.html +20 -20
- package/app/s/custom-parts/index.html +20 -20
- package/app/s/custom-rentals/index.html +20 -20
- package/app/s/custom-roastery/index.html +20 -20
- package/app/s/custom-schedule/index.html +20 -20
- package/app/s/custom-shelf/index.html +20 -20
- package/app/s/custom-shop/index.html +20 -20
- package/app/s/custom-students/index.html +20 -20
- package/app/s/custom-wholesale/index.html +20 -20
- package/app/s/custom-work/index.html +20 -20
- package/app/s/custom-yard/index.html +20 -20
- package/app/s/section-access-control/index.html +20 -20
- package/app/s/section-account-security/index.html +20 -20
- package/app/s/section-accounting/index.html +20 -20
- package/app/s/section-agreements/index.html +20 -20
- package/app/s/section-analytics/index.html +20 -20
- package/app/s/section-approvals/index.html +20 -20
- package/app/s/section-assets/index.html +20 -20
- package/app/s/section-billing/index.html +20 -20
- package/app/s/section-calendar/index.html +20 -20
- package/app/s/section-catalog/index.html +20 -20
- package/app/s/section-grow/index.html +20 -20
- package/app/s/section-make/index.html +20 -20
- package/app/s/section-messages/index.html +20 -20
- package/app/s/section-more/index.html +20 -20
- package/app/s/section-operations/index.html +20 -20
- package/app/s/section-places/index.html +20 -20
- package/app/s/section-projects/index.html +20 -20
- package/app/s/section-publish/index.html +20 -20
- package/app/s/section-purchasing/index.html +20 -20
- package/app/s/section-reports.runtime/index.html +20 -20
- package/app/s/section-sales/index.html +20 -20
- package/app/s/section-staff/index.html +20 -20
- package/app/s/section-support/index.html +20 -20
- package/app/s/section-taxonomy/index.html +20 -20
- package/app/s/section-team/index.html +20 -20
- package/app/s/section-work/index.html +20 -20
- package/dist/catalog/catalog.json +122 -42
- package/dist/cookbook/parse.d.ts.map +1 -1
- package/dist/cookbook/parse.js +3 -2
- package/dist/cookbook/types.d.ts +6 -1
- package/dist/cookbook/types.d.ts.map +1 -1
- package/dist/cookbook/types.js +6 -1
- package/dist/core/index.js +127 -64
- package/dist/library/library.json +16 -16
- package/dist/smrt-knowledge.okf.md +2 -2
- package/dist/smrt-version.d.ts +1 -1
- package/dist/smrt-version.js +1 -1
- package/package.json +57 -57
- package/app/_app/immutable/chunks/CizBIqSo.js +0 -1
- package/app/_app/immutable/chunks/D7VoviLp.js +0 -1
- package/app/_app/immutable/chunks/DeQ96uco.js +0 -1
- package/app/_app/immutable/chunks/uFBY9RwR.js +0 -4
- package/app/_app/immutable/entry/start.DUswAurR.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,B as t,C as n,Ct as r,Dt as i,E as a,Et as o,Ft as s,G as c,H as l,J as u,K as d,L as f,Ot as ee,Pt as p,S as m,Tt as h,U as g,X as _,Y as v,Z as y,_ as b,a as x,b as te,bt as S,ct as ne,d as C,ft as w,gt as T,ht as E,k as D,kt as O,mt as k,n as A,nt as j,pt as M,q as re,st as N,v as P,vt as F,w as I,wt as L}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as R}from"./Cekjnrta.js";import{a as z,t as ie}from"./Bq8E3AWP.js";import"./D3syEjNq.js";import{i as B}from"./CdtuGcb0.js";import{t as V}from"./CUyVrfsu.js";import{x as ae}from"./C65O26Eu.js";import{t as oe}from"./D042ejzG.js";import"./uFBY9RwR.js";import{nt as se}from"./aq3-57l6.js";function ce(){return V()}var H=z({"ui.address_input.street_placeholder":`123 Main Street`,"ui.address_input.city_placeholder":`City`,"ui.address_input.postal_code_placeholder":`A1A 1A1`,"ui.date_range_input.mic_aria_label":`Hold to speak date range`,"ui.date_range_input.parsing":`Parsing dates...`,"ui.date_range_input.end_after_start":`End date must be after start date`,"ui.date_time_input.mic_aria_label":`Hold to speak`,"ui.date_time_input.parsing":`Parsing date...`,"ui.file_upload.remove_file":`Remove {name}`,"ui.file_upload.required":`Select a file to upload`,"ui.file_upload.rejected_type":`{count} file(s) rejected: type not allowed`,"ui.file_upload.exceeds_max_size":`{count} file(s) exceed the maximum size of {size}`,"ui.form.extracting":`Extracting form fields…`,"ui.form.listening_status":`Listening. Say "done" to finish.`,"ui.form.listening_button":`Listening... (say "done" to finish)`,"ui.form.speak_all_fields":`Speak all fields`,"ui.form.you_said":`You said:`,"ui.form_mic_button.tooltip":`Speak to fill all fields. Click again to stop.`,"ui.measurement_input.value_at_least":`Value must be at least {min} {unit}`,"ui.measurement_input.value_at_most":`Value must be at most {max} {unit}`,"ui.money_input.value_at_least":`Value must be at least {min}`,"ui.money_input.value_at_most":`Value must be at most {max}`,"ui.number_input.value_at_least":`Value must be at least {min}`,"ui.number_input.value_at_most":`Value must be at most {max}`,"ui.phone_input.mic_aria_label":`Hold to speak`,"ui.phone_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.phone_input.invalid":`Invalid phone number`,"ui.search_input.clear_aria_label":`Clear search`,"ui.text_input.mic_aria_label":`Hold to speak`,"ui.text_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.text_input.invalid_email":`Invalid email address`,"ui.textarea_input.mic_aria_label":`Hold to speak`,"ui.textarea_input.downloading_model":`Downloading Whisper model... {progress}%`}),U=Symbol(`smrt-form`),W=new WeakMap;function G(e){let t=new Map;return{get mode(){return e.mode},registerField(n){let r=n.name,i=e.registerField(n),a=typeof i==`function`?i:()=>e.unregisterField(r),o=!0,s=()=>{if(!o)return;o=!1;let e=t.get(r);e?.delete(s),e?.size===0&&t.delete(r),a()},c=t.get(r)??new Set;return c.add(s),t.set(r,c),s},unregisterField(e){let n=t.get(e)?.values().next().value;n?.()},getFieldSchema:()=>e.getFieldSchema(),get isFormListening(){return e.isFormListening},get isExtracting(){return e.isExtracting},toggleListening:()=>e.toggleListening(),get interactionRegistry(){return e.interactionRegistry},get formId(){return e.formId}}}function K(e){let t=h(),n=W.get(t);if(n)return n;let r=o(U);if(!r){if(!e)return null;throw Error(`Form context not found. Make sure to wrap your inputs with <SMRTForm>`)}let i=G(r);return W.set(t,i),O(U,i),i}function le(){return K(!1)}function ue(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);throw Error(`staged_value_invalid`)}function de(){throw Error(`staged_value_invalid`)}var fe=c(`<div class="smrt-address-input__field-row smrt-address-input__full-width svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <input type="text" data-smrt-part="input"/></div>`),q=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-2 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <input type="text" data-smrt-part="input"/></div>`),J=c(`<option> </option>`),pe=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-1 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <select data-smrt-part="input"><option>Select...</option><!></select></div>`),me=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-1 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <input type="text" data-smrt-part="input"/></div>`),he=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-1 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <select data-smrt-part="input"></select></div>`),ge=c(`<div class="smrt-address-input__validation-error svelte-5rbjmj" data-smrt-part="error" role="alert"> </div>`),_e=c(`<div class="smrt-address-input__root svelte-5rbjmj" data-smrt-component="AddressInput"><!> <div data-smrt-part="body"><!> <div class="smrt-address-input__field-row-group svelte-5rbjmj" data-smrt-part="row"><!> <!></div> <div class="smrt-address-input__field-row-group svelte-5rbjmj" data-smrt-part="row"><!> <!></div></div> <!></div>`);function Y(o,c){let u=re();ee(c,!0);let{t:d}=ie(),p=[{value:`CA`,label:`Canada`},{value:`US`,label:`United States`}],h=[{value:`AB`,label:`Alberta`},{value:`BC`,label:`British Columbia`},{value:`MB`,label:`Manitoba`},{value:`NB`,label:`New Brunswick`},{value:`NL`,label:`Newfoundland and Labrador`},{value:`NS`,label:`Nova Scotia`},{value:`NT`,label:`Northwest Territories`},{value:`NU`,label:`Nunavut`},{value:`ON`,label:`Ontario`},{value:`PE`,label:`Prince Edward Island`},{value:`QC`,label:`Quebec`},{value:`SK`,label:`Saskatchewan`},{value:`YT`,label:`Yukon`},{value:`US-CA`,label:`California`},{value:`US-NY`,label:`New York`},{value:`US-TX`,label:`Texas`},{value:`US-FL`,label:`Florida`},{value:`US-WA`,label:`Washington`}],v=x(c,`value`,31,()=>T({})),y=x(c,`fields`,19,()=>[`street`,`city`,`province`,`postalCode`,`country`]),C=x(c,`disabled`,3,!1),D=x(c,`required`,3,!1),O=x(c,`countries`,3,p),A=x(c,`provinces`,3,h);function M(){return[...new Set(O().map(e=>e.value))]}function I(){return[...new Set([...D()?[]:[``],...A().map(e=>e.value)])]}function L(e){return e===`country`?{type:`string`,enum:M()}:e===`province`?{type:`string`,enum:I()}:{type:`string`}}function R(e){if(typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!(![Object.prototype,null].includes(Object.getPrototypeOf(t))||!Object.keys(t).every(e=>y().includes(e))||!y().every(e=>!Object.hasOwn(t,e)||typeof t[e]==`string`)||Object.hasOwn(t,`country`)&&!M().includes(t.country)||Object.hasOwn(t,`province`)&&!I().includes(t.province))}function z(e){if(e==null)return!D();if(!R(e))return!1;if(!D())return!0;let t=e;return y().every(e=>typeof t[e]==`string`&&t[e].trim().length>0)}let B=ce(),V=le(),oe=`smrt-rich-field-${u}`,se=r(()=>B.state.mode===`smrt`),U=S(T(v().street??``)),W=S(T(v().city??``)),G=S(T(v().province??``)),K=S(T(v().postalCode??``)),Y=S(T(v().country??j(()=>O()[0]?.value??``)));ne(()=>{v().street!==void 0&&v().street!==e(U)&&F(U,v().street,!0),v().city!==void 0&&v().city!==e(W)&&F(W,v().city,!0),v().province!==void 0&&v().province!==e(G)&&F(G,v().province,!0),v().postalCode!==void 0&&v().postalCode!==e(K)&&F(K,v().postalCode,!0),v().country!==void 0&&v().country!==e(Y)&&F(Y,v().country,!0)});function ve(){let t={};return y().includes(`street`)&&(t.street=e(U)),y().includes(`city`)&&(t.city=e(W)),y().includes(`province`)&&(t.province=e(G)),y().includes(`postalCode`)&&(t.postalCode=e(K)),y().includes(`country`)&&(t.country=e(Y)),t}function X(){let e=ve();v(e),c.onchange?.(e)}function ye(e){let t={},n=e.toLowerCase().trim(),r=n.match(/([a-z]\d[a-z]\s?\d[a-z]\d)|(\d{5}(-\d{4})?)/i);r&&(t.postalCode=r[0].toUpperCase().replace(/\s+/g,` `));for(let e of A())if(RegExp(`\\b${e.label.toLowerCase()}\\b|\\b${e.value.toLowerCase()}\\b`,`i`).test(n)){t.province=e.value;break}for(let e of O())if([e.label,e.value].some(e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\W)${t}(?=$|\\W)`,`i`).test(n)})){t.country=e.value;break}for(let e of[/(?:city\s+(?:of\s+)?|in\s+)([a-z\s]+?)(?:\s*,|\s+(?:ab|bc|mb|on|qc|sk|alberta|british columbia|ontario|quebec)|\s*$)/i]){let r=n.match(e);if(r){t.city=r[1].trim().replace(/\b\w/g,e=>e.toUpperCase());break}}let i=n.match(/(\d+\s+[a-z\s]+(?:street|st|avenue|ave|road|rd|drive|dr|boulevard|blvd|way|lane|ln|crescent|cres|place|pl|court|ct))/i);return i&&(t.street=i[1].replace(/\b\w/g,e=>e.toUpperCase())),t}let be={street:`Street Address`,city:`City`,province:`Province/State`,postalCode:`Postal/ZIP Code`,country:`Country`},xe=r(()=>{let e=y()[0]??`street`;switch(e){case`postalCode`:return`${c.name}_postal`;default:return`${c.name}_${e}`}});ne(()=>{if(V){let e={name:c.name,ownerToken:oe,type:`address`,get label(){return c.label},get description(){return c.description||`A mailing address with street, city, province, postal code, and country`},setValue:e=>{if(e==null){F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X();return}if(R(e)){let t=e;t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X();return}let t=Object.fromEntries(Object.entries(ye(String(e))).filter(([e])=>y().includes(e)));Object.keys(t).length>0&&R(t)&&(t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X())},getValue:ve,prepareValue:e=>{if(e==null)return Object.fromEntries(y().map(e=>[e,e===`country`?O()[0]?.value??``:``]));if(typeof e==`object`&&!Array.isArray(e))return e;let t=ye(ue(e)),n=Object.fromEntries(Object.entries(t).filter(([e])=>y().includes(e)));return Object.keys(n).length>0?{...ve(),...n}:de()},clear:()=>(F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X(),!0),getState:()=>({disabled:C()}),get constraints(){return{required:D()}},get webMcpSchema(){return{type:`object`,additionalProperties:!1,properties:Object.fromEntries(y().map(e=>[e,L(e)])),...D()?{required:[...y()]}:{}}},validateValue:z,validate:()=>z(ve())};return V.registerField(e)}});function Se(e){F(U,e.target.value,!0),X()}function Z(e){F(W,e.target.value,!0),X()}function Ce(e){F(G,e.target.value,!0),X()}function we(e){F(K,e.target.value,!0),X()}function Q(e){F(Y,e.target.value,!0),X()}var Te=_e(),Ee=w(Te),De=t=>{ae(t,{get for(){return e(xe)},get label(){return c.label},get required(){return D()}})};t(Ee,e=>{c.label&&e(De)});var Oe=E(Ee,2);let $;var ke=w(Oe),Ae=t=>{var n=fe(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_street`),l(i,be.street),P(o,`id`,`${c.name??``}_street`),P(o,`name`,`${c.name??``}[street]`),P(o,`placeholder`,t),te(o,e(U)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-address-input__input svelte-5rbjmj`,null,u,{"smrt-address-input__invalid":!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.street_placeholder`]),()=>D()&&y().includes(`street`)]),_(`input`,o,Se),g(t,n)},je=r(()=>y().includes(`street`));t(ke,t=>{e(je)&&t(Ae)});var Me=E(ke,2),Ne=w(Me),Pe=t=>{var n=q(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_city`),l(i,be.city),P(o,`id`,`${c.name??``}_city`),P(o,`name`,`${c.name??``}[city]`),P(o,`placeholder`,t),te(o,e(W)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-address-input__input svelte-5rbjmj`,null,u,{"smrt-address-input__invalid":!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.city_placeholder`]),()=>D()&&y().includes(`city`)]),_(`input`,o,Z),g(t,n)},Fe=r(()=>y().includes(`city`));t(Ne,t=>{e(Fe)&&t(Pe)});var Ie=E(Ne,2),Le=t=>{var r=pe(),i=w(r),o=k(i,!0),u=E(i,2);let d;var ee=w(u);ee.value=ee.__value=``;var p=E(ee);f(p,17,A,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var h;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_province`),l(o,be.province),P(u,`id`,`${c.name??``}_province`),P(u,`name`,`${c.name??``}[province]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-address-input__input smrt-address-input__select svelte-5rbjmj`,null,d,{"smrt-address-input__invalid":!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),h!==(h=e(G))&&(u.value=(u.__value=h)??``,n(u,h))},[()=>D()&&y().includes(`province`)]),_(`change`,u,Ce),g(t,r)},Re=r(()=>y().includes(`province`));t(Ie,t=>{e(Re)&&t(Le)}),s(Me);var ze=E(Me,2),Be=w(ze),Ve=t=>{var n=me(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_postal`),l(i,be.postalCode),P(o,`id`,`${c.name??``}_postal`),P(o,`name`,`${c.name??``}[postalCode]`),P(o,`placeholder`,t),te(o,e(K)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-address-input__input svelte-5rbjmj`,null,u,{"smrt-address-input__invalid":!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.postal_code_placeholder`]),()=>D()&&y().includes(`postalCode`)]),_(`input`,o,we),g(t,n)},He=r(()=>y().includes(`postalCode`));t(Be,t=>{e(He)&&t(Ve)});var Ue=E(Be,2),We=t=>{var r=he(),i=w(r),o=k(i,!0),u=E(i,2);let d;f(u,21,O,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var ee;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_country`),l(o,be.country),P(u,`id`,`${c.name??``}_country`),P(u,`name`,`${c.name??``}[country]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-address-input__input smrt-address-input__select svelte-5rbjmj`,null,d,{"smrt-address-input__invalid":!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),ee!==(ee=e(Y))&&(u.value=(u.__value=ee)??``,n(u,ee))},[()=>D()&&y().includes(`country`)]),_(`change`,u,Q),g(t,r)},Ge=r(()=>y().includes(`country`));t(Ue,t=>{e(Ge)&&t(We)}),s(ze),s(Oe);var Ke=E(Oe,2),qe=e=>{var t=ge(),n=k(t,!0);N(()=>{P(t,`id`,`${c.name}-error`),l(n,c.error)}),g(e,t)};t(Ke,e=>{c.error&&e(qe)}),s(Te),N(()=>{P(Te,`data-smrt-field-owner`,oe),$=a(Oe,1,`smrt-address-input__fields svelte-5rbjmj`,null,$,{"smrt-address-input__mode":e(se)})}),g(o,Te),i()}v([`input`,`change`]);function ve(e){return e.toLowerCase().replace(/\s+at\s+/gi,`@`).replace(/\bat\b/gi,`@`).replace(/\s+dot\s+/gi,`.`).replace(/\bdot\b/gi,`.`).replace(/\s+/g,``).trim()}function X(e){return e.replace(/^(my name is|i am|i'm|it's|this is|the name is)\s*/i,``).replace(/\b(um|uh|like|so|well)\b\s*/gi,``).trim()}function ye(e,t){let n=e.toLowerCase().trim();for(let e of t)if(e.value.toLowerCase()===n||e.label.toLowerCase()===n)return e.value;for(let e of t)if(e.label.toLowerCase().includes(n)||n.includes(e.label.toLowerCase()))return e.value;return null}v([`change`]);function be(e={}){let t=V(),n=!1;return e.autoInit&&t.initializeSTT().catch(()=>{}),A(()=>{n&&t.state.ai.stt.isListening&&t.stopListening().catch(()=>{}),n=!1}),{start:async r=>{n=!0;try{await t.startListening({...e.defaultOptions,...r})}catch(e){throw n=!1,e}},stop:async()=>{n=!1,await t.stopListening()},initialize:async e=>{await t.initializeSTT(e)},get isListening(){return t.state.ai.stt.isListening},get isReady(){return t.state.ai.stt.initState===`ready`},get isInitializing(){return t.state.ai.stt.initState===`initializing`},get lastResult(){return t.state.ai.stt.lastResult},get interimResult(){return t.state.ai.stt.interimResult},get currentResult(){let{isListening:e,interimResult:n,lastResult:r}=t.state.ai.stt;return e&&n?n:r},get error(){return t.state.ai.stt.error},get downloadProgress(){return t.state.ai.stt.downloadProgress?.percent??0},get adapterType(){return t.state.ai.stt.adapter?.type??null}}}v([`keydown`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`change`]);var xe=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="smrt-date-time-input__spinner svelte-rsri1g" data-smrt-part="spinner"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12" class="svelte-rsri1g"></circle></svg>`),Se=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-rsri1g"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-rsri1g"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-rsri1g"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-rsri1g"></line></svg>`),Z=c(`<input type="text" class="smrt-date-time-input__input smrt-date-time-input__mode svelte-rsri1g" data-smrt-part="input" readonly=""/> <button type="button" data-smrt-part="trigger"><!></button>`,1),Ce=c(`<input class="smrt-date-time-input__input svelte-rsri1g" data-smrt-part="input"/>`),we=c(`<div class="smrt-date-time-input__listening-indicator svelte-rsri1g" data-smrt-part="status">Recording...</div>`),Q=c(`<div class="smrt-date-time-input__parsing-indicator svelte-rsri1g" data-smrt-part="status"> </div>`),Te=c(`<div class="smrt-date-time-input__error-indicator svelte-rsri1g" data-smrt-part="error" role="alert"> </div>`),Ee=c(`<div data-smrt-component="DateTimeInput"><!> <div class="smrt-date-time-input__input-wrapper svelte-rsri1g" data-smrt-part="field"><!></div> <!></div>`);function De(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`includeTime`,3,!0),f=x(o,`placeholder`,19,()=>d()?`e.g., next Tuesday at 3pm`:`e.g., March 15, 1990`),p=x(o,`value`,15,``),m=x(o,`disabled`,3,!1),h=x(o,`required`,3,!1),v=`${c}-label`,T=ce(),D=be(),O=le(),A=S(null),j=S(``),I=S(!1),L=S(!1),R=S(null),z=0,V=r(()=>T.state.mode===`smrt`);function se(e){p(e),o.onchange?.(p())}function U(e){if(!e)return``;try{if(!d()&&/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r).toLocaleDateString(void 0,{dateStyle:`medium`})}let t=new Date(e);return Number.isNaN(t.getTime())?e:d()?t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):t.toLocaleDateString(void 0,{dateStyle:`medium`})}catch{return e}}function W(e){if(typeof e!=`string`)return!1;if(e===``)return!h();let t=d()?/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?$/.exec(e):/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return!1;let[,n,r,i,a=`0`,o=`0`,s=`0`]=t,c=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(a),Number(o),Number(s)));return c.getUTCFullYear()===Number(n)&&c.getUTCMonth()===Number(r)-1&&c.getUTCDate()===Number(i)&&c.getUTCHours()===Number(a)&&c.getUTCMinutes()===Number(o)&&c.getUTCSeconds()===Number(s)}ne(()=>{F(j,U(p()),!0)}),ne(()=>{if(O){let e={name:o.name,type:`datetime`,get label(){return o.label},get description(){return o.description??(d()?`Date and time`:`Date`)},setValue:e=>{se(String(e??``))},getValue:()=>p(),prepareValue:ue,getState:()=>({disabled:m()}),get constraints(){return{required:h()}},validateValue:W,validate:()=>W(p())};return O.registerField(e)}});async function G(e){let t;try{t=await oe(`chrono-node`)}catch{throw Error(`Natural-language date parsing requires the optional dependency "chrono-node". Install it with: pnpm add chrono-node`)}let n=t.parse(e);if(n.length===0)throw Error(`Could not parse date from speech`);let r=n[0].start.date();if(Number.isNaN(r.getTime()))throw Error(`Invalid date`);let i=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,`0`),o=String(r.getDate()).padStart(2,`0`);return d()?`${i}-${a}-${o}T${String(r.getHours()).padStart(2,`0`)}:${String(r.getMinutes()).padStart(2,`0`)}`:`${i}-${a}-${o}`}async function K(){if(!(!e(V)||m()||e(L))){F(R,null),z=Date.now(),F(I,!0);try{(!D.isReady||D.adapterType!==`whisper-wasm`)&&await D.initialize({type:`whisper-wasm`}),await D.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(R,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`DateTimeInput: failed to start voice recording`,{field:o.name,error:e})}}}async function de(){if(!e(I))return;let t=Date.now()-z;if(F(I,!1),await D.stop(),t<500)return;let n=Date.now();for(;D.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=D.lastResult?.trim()||``;if(!r||r.length<2)F(R,`No speech detected. Hold longer and speak clearly.`);else{F(L,!0),F(R,null);try{se(await G(r))}catch(e){F(R,e instanceof Error?e.message:`Failed to parse date`,!0)}finally{F(L,!1)}}}function fe(e){e.button===0&&K()}function q(){de()}function J(){de()}function pe(e){e.preventDefault(),K()}function me(){de()}function he(e){e.preventDefault(),e.stopPropagation()}function ge(e){e.stopPropagation(),e.button===0&&K()}function _e(e){e.stopPropagation(),e.preventDefault(),K()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e(I)?de():K())}function ve(e){let t=e.target;se(t.value)}var X=Ee();let ye;var De=w(X),Oe=e=>{ae(e,{get id(){return v},get for(){return o.name},get label(){return o.label},get required(){return h()}})};t(De,e=>{o.label&&e(Oe)});var $=E(De,2),ke=w($),Ae=n=>{var r=Z(),i=M(r);b(i),C(i,e=>F(A,e),()=>e(A));var c=E(i,2);let l;var d=w(c),ee=e=>{var t=xe();g(e,t)},p=e=>{var t=Se();g(e,t)};t(d,t=>{e(L)?t(ee):t(p,-1)}),s(c),N(t=>{P(i,`id`,o.name),P(i,`aria-labelledby`,o.label?v:void 0),P(i,`name`,o.name),P(i,`placeholder`,f()),te(i,e(j)),i.disabled=m()||e(L),i.required=h(),P(i,`aria-invalid`,e(R)?`true`:void 0),P(i,`aria-describedby`,e(R)?`${o.name}-error`:void 0),l=a(c,1,`smrt-date-time-input__mic-btn svelte-rsri1g`,null,l,{"smrt-date-time-input__active":e(I)}),c.disabled=m()||e(L),P(c,`aria-label`,t)},[()=>u(H[`ui.date_time_input.mic_aria_label`])]),_(`mousedown`,i,fe),_(`mouseup`,i,q),y(`mouseleave`,i,J),_(`touchstart`,i,pe,void 0,!0),_(`touchend`,i,me),_(`click`,c,he),_(`keydown`,c,Y),_(`mousedown`,c,ge),_(`mouseup`,c,q),y(`mouseleave`,c,J),_(`touchstart`,c,_e,void 0,!0),_(`touchend`,c,me),g(n,r)},je=t=>{var n=Ce();b(n),C(n,e=>F(A,e),()=>e(A)),N(()=>{P(n,`id`,o.name),P(n,`aria-labelledby`,o.label?v:void 0),P(n,`name`,o.name),P(n,`type`,d()?`datetime-local`:`date`),te(n,p()),n.disabled=m(),n.required=h(),P(n,`aria-invalid`,e(R)?`true`:void 0),P(n,`aria-describedby`,e(R)?`${o.name}-error`:void 0)}),_(`change`,n,ve),g(t,n)};t(ke,t=>{e(V)?t(Ae):t(je,-1)}),s($);var Me=E($,2),Ne=e=>{var t=we();g(e,t)},Pe=e=>{var t=Q(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.date_time_input.parsing`])]),g(e,t)},Fe=t=>{var n=Te(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-error`),l(r,e(R))}),g(t,n)};t(Me,t=>{e(I)?t(Ne):e(L)?t(Pe,1):e(R)&&t(Fe,2)}),s(X),N(()=>ye=a(X,1,`smrt-date-time-input__root svelte-rsri1g`,null,ye,{"smrt-date-time-input__listening":e(I),"smrt-date-time-input__parsing":e(L)})),g(n,X),i()}v([`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`,`change`]),v([`click`,`keydown`,`change`]),v([`click`]),v([`click`,`keydown`]),v([`input`,`change`]);var Oe=c(`<div class="smrt-money-input__validation-error svelte-e6jjj7" data-smrt-part="error" role="alert"> </div>`),$=c(`<div class="smrt-money-input__validation-error svelte-e6jjj7" data-smrt-part="error" role="alert"><!></div>`),ke=c(`<div class="smrt-money-input__root svelte-e6jjj7" data-smrt-component="MoneyInput"><!> <div class="smrt-money-input__input-wrapper svelte-e6jjj7" data-smrt-part="field"><input type="text" inputmode="decimal" data-smrt-part="input"/> <span class="smrt-money-input__currency-code svelte-e6jjj7" data-smrt-part="unit"> </span></div> <input type="hidden"/> <!></div>`);function Ae(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,`0.00`),p=x(o,`value`,15,null),m=x(o,`currency`,3,`CAD`),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),C=`${c}-label`,D=ce(),O=le(),A=r(()=>D.state.mode===`smrt`);function j(e){return e===null?``:(e/100).toFixed(2)}function M(e){let t=e.replace(/[$,\s]/g,``);if(t===``)return null;let n=parseFloat(t);return Number.isNaN(n)?null:Math.round(n*100)}let I=S(T(j(p())));ne(()=>{let t=j(p());e(I)!==t&&!e(L)&&F(I,t,!0)});let L=S(!1),R=r(()=>m()===`USD`?`US$`:`CA$`),z=r(()=>p()===null||!(o.min!==void 0&&p()<o.min||o.max!==void 0&&p()>o.max)),B=r(()=>p()!==null&&!e(z)||!!o.error);function V(e){p(e),o.onchange?.(p())}function oe(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=/dollar|buck|cad|usd/i.test(t),i=/cent/i.test(t),a=t.replace(/\$|dollar[s]?|buck[s]?|cad|usd|cent[s]?/gi,``).trim(),o=a.match(/[\d,.]+/);if(o){let e=parseFloat(o[0].replace(/,/g,``));if(!Number.isNaN(e))return Math.round(i&&!r?e:e*100)}let s=a.split(/[\s-]+/).filter(Boolean),c=0,l=0,u=0,d=!1;for(let e=0;e<s.length;e++){let t=s[e],r=n[t];t===`and`||t===`point`?(d=!0,c+=u,u=0):r!==void 0&&(r>=100?(u=u===0?r:u*r,r>=1e3&&(d?l+=u:c+=u,u=0)):u+=r)}d?(l+=u,l>99&&(c+=Math.floor(l/100),l%=100)):c+=u;let f=c*100+l;return f>0?f:null}ne(()=>{if(O){let t={name:o.name,type:`money`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between $${(o.min/100).toFixed(2)} and $${(o.max/100).toFixed(2)})`:o.min===void 0?o.max!==void 0&&(e=` (maximum $${(o.max/100).toFixed(2)})`):e=` (minimum $${(o.min/100).toFixed(2)})`,(o.description||`A monetary amount in dollars`)+e},setValue:e=>{if(e==null||e===``){V(null),F(I,``);return}if(typeof e==`number`){V(e),F(I,j(e),!0);return}let t=oe(String(e));t!==null&&(V(t),F(I,j(t),!0))},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?oe(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max}},validateValue:e=>e===null&&!v()||typeof e==`number`&&Number.isSafeInteger(e)&&(o.min===void 0||e>=o.min)&&(o.max===void 0||e<=o.max),validate:()=>p()===null?!v():Number.isSafeInteger(p())&&e(z)};return O.registerField(t)}});function se(e){let t=e.target;F(I,t.value,!0),V(M(t.value))}function U(){F(L,!0)}function W(){F(L,!1),F(I,j(p()),!0)}var G=ke(),K=w(G),ue=e=>{ae(e,{get id(){return C},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(K,e=>{o.label&&e(ue)});var fe=E(K,2),q=w(fe);b(q);let J;var pe=E(q,2),me=k(pe,!0);s(fe);var he=E(fe,2);b(he);var ge=E(he,2),_e=e=>{var t=Oe(),n=k(t,!0);N(()=>{P(t,`id`,`${o.name}-error`),l(n,o.error)}),g(e,t)},Y=n=>{var r=$(),i=w(r),a=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_least`],{min:`${e(R)}${(o.min/100).toFixed(2)}`})]),g(t,n)},c=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_most`],{max:`${e(R)}${(o.max/100).toFixed(2)}`})]),g(t,n)};t(i,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(a):o.max!==void 0&&p()!==null&&p()>o.max&&e(c,1)}),s(r),N(()=>P(r,`id`,`${o.name}-error`)),g(n,r)};t(ge,t=>{o.error?t(_e):e(B)&&!e(z)&&t(Y,1)}),s(G),N(()=>{P(q,`id`,o.name),P(q,`aria-labelledby`,o.label?C:void 0),P(q,`name`,o.name),P(q,`placeholder`,f()),te(q,e(I)),q.disabled=h(),q.required=v(),J=a(q,1,`smrt-money-input__input svelte-e6jjj7`,null,J,{"smrt-money-input__mode":e(A),"smrt-money-input__invalid":e(B)}),P(q,`aria-invalid`,e(B)?`true`:void 0),P(q,`aria-describedby`,e(B)?`${o.name}-error`:void 0),l(me,m()),P(he,`name`,`${o.name??``}_cents`),te(he,p()??``)}),_(`input`,q,se),y(`focus`,q,U),y(`blur`,q,W),g(n,G),i()}v([`input`]);var je=c(`<div class="smrt-number-input__validation-error svelte-1pebtso" data-smrt-part="error" role="alert"><!></div>`),Me=c(`<div class="smrt-number-input__root svelte-1pebtso" data-smrt-component="NumberInput"><!> <div class="smrt-number-input__input-wrapper svelte-1pebtso" data-smrt-part="field"><input type="number" data-smrt-part="input"/></div> <!></div>`);function Ne(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,``),p=x(o,`value`,15,null),m=x(o,`step`,3,1),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),y=`${c}-label`,S=ce(),C=le(),T=r(()=>S.state.mode===`smrt`);function D(e){return e===null||!(o.min!==void 0&&e<o.min||o.max!==void 0&&e>o.max)}function O(e){if(!Number.isFinite(m())||m()<=0)return!0;let t=(e-(o.min??0))/m();return Math.abs(t-Math.round(t))<=1e-9}let k=r(()=>D(p())),A=r(()=>p()!==null&&!e(k));function j(e){p(e),o.onchange?.(p())}function M(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=parseFloat(t.replace(/[,$]/g,``));if(!Number.isNaN(r))return r;if(n[t]!==void 0)return n[t];let i=t.split(/[\s-]+/),a=0,o=0;for(let e of i){let t=n[e];t!==void 0&&(t>=100?(o=o===0?t:o*t,t>=1e3&&(a+=o,o=0)):o+=t)}return a+=o,a>0?a:null}ne(()=>{if(C){let t={name:o.name,type:`number`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between ${o.min} and ${o.max})`:o.min===void 0?o.max!==void 0&&(e=` (maximum ${o.max})`):e=` (minimum ${o.min})`,(o.description||`A number`)+e},setValue:e=>{if(e==null||e===``){j(null);return}if(typeof e==`number`){j(e);return}let t=M(String(e));t!==null&&j(t)},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?M(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max,step:m()}},validateValue:e=>{if(e==null||e===``)return!v();let t=typeof e==`number`?e:M(String(e));return t!==null&&Number.isFinite(t)&&D(t)&&O(t)},validate:()=>p()===null?!v():Number.isFinite(p())&&e(k)};return C.registerField(t)}});function F(e){let t=e.target;j(t.value===``?null:parseFloat(t.value))}var I=Me(),L=w(I),R=e=>{ae(e,{get id(){return y},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(L,e=>{o.label&&e(R)});var z=E(L,2),B=w(z);b(B);let V;s(z);var oe=E(z,2),se=e=>{var n=je(),r=w(n),i=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_least`],{min:o.min})]),g(e,t)},a=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_most`],{max:o.max})]),g(e,t)};t(r,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(i):o.max!==void 0&&p()!==null&&p()>o.max&&e(a,1)}),s(n),N(()=>P(n,`id`,`${o.name}-error`)),g(e,n)};t(oe,t=>{e(A)&&t(se)}),s(I),N(()=>{P(B,`id`,o.name),P(B,`aria-labelledby`,o.label?y:void 0),P(B,`name`,o.name),P(B,`placeholder`,f()),te(B,p()??``),P(B,`min`,o.min),P(B,`max`,o.max),P(B,`step`,m()),B.disabled=h(),B.required=v(),V=a(B,1,`smrt-number-input__input svelte-1pebtso`,null,V,{"smrt-number-input__mode":e(T),"smrt-number-input__invalid":e(A)}),P(B,`aria-invalid`,e(A)?`true`:void 0),P(B,`aria-describedby`,e(A)?`${o.name}-error`:void 0)}),_(`input`,B,F),g(n,I),i()}v([`input`]);var Pe=c(`<button type="button" data-smrt-part="trigger"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1vixtb7"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-1vixtb7"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-1vixtb7"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-1vixtb7"></line></svg></button>`),Fe=c(`<div class="smrt-phone-input__downloading-indicator svelte-1vixtb7" data-smrt-part="status"><span class="smrt-phone-input__processing-spinner svelte-1vixtb7" data-smrt-part="spinner"></span> <span class="svelte-1vixtb7"> </span></div>`),Ie=c(`<div class="smrt-phone-input__listening-indicator svelte-1vixtb7" data-smrt-part="status"><span class="smrt-phone-input__listening-dot svelte-1vixtb7" data-smrt-part="indicator"></span> <span class="svelte-1vixtb7">Recording...</span></div>`),Le=c(`<div class="smrt-phone-input__processing-indicator svelte-1vixtb7" data-smrt-part="status"><span class="smrt-phone-input__processing-spinner svelte-1vixtb7" data-smrt-part="spinner"></span> <span class="svelte-1vixtb7">Processing...</span></div>`),Re=c(`<div class="smrt-phone-input__error-message svelte-1vixtb7" data-smrt-part="error" role="alert"> </div>`),ze=c(`<div class="smrt-phone-input__validation-error svelte-1vixtb7" data-smrt-part="error" role="alert"> </div>`),Be=c(`<div data-smrt-component="PhoneInput"><!> <div class="smrt-phone-input__input-wrapper svelte-1vixtb7" data-smrt-part="field"><input type="tel" data-smrt-part="input"/> <!></div> <!> <!> <!></div>`);function Ve(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,`(555) 555-5555`),f=x(o,`value`,15,``),p=x(o,`disabled`,3,!1),m=x(o,`required`,3,!1),h=`${c}-label`,v=ce(),T=be(),D=le(),O=S(null),A=S(!1),j=S(!1),M=S(null),I=0,L=r(()=>v.state.mode===`smrt`),R=r(()=>T.isInitializing),z=r(()=>T.downloadProgress);function V(e){if(typeof e!=`string`)return!1;if(!e)return!m();let t=e.replace(/\D/g,``);return t.length===10||t.length===11&&t[0]===`1`}let oe=r(()=>V(f())),se=r(()=>f()&&!e(oe));function U(e){f(e),o.onchange?.(f())}function W(e){let t=e.replace(/\D/g,``);return t.length===0?``:t.length<=3?`(${t}`:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length<=10?`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`:t.length===11&&t[0]===`1`?`+1 (${t.slice(1,4)}) ${t.slice(4,7)}-${t.slice(7)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6,10)}`}function G(e){let t={zero:`0`,oh:`0`,one:`1`,two:`2`,to:`2`,too:`2`,three:`3`,four:`4`,for:`4`,five:`5`,six:`6`,seven:`7`,eight:`8`,nine:`9`,niner:`9`},n=e.toLowerCase().replace(/^(my phone number is|my number is|phone number|number is|call me at)\s*/i,``).replace(/\b(area code|extension|ext)\b/gi,``).trim();for(let[e,r]of Object.entries(t))n=n.replace(RegExp(`\\b${e}\\b`,`gi`),r);return n=n.replace(/\bdouble\s*(\d)/gi,`$1$1`),n=n.replace(/\btriple\s*(\d)/gi,`$1$1$1`),n.replace(/\D/g,``)}function K(e){return W(G(e))}ne(()=>{if(D){let e={name:o.name,type:`phone`,get label(){return o.label},get description(){return o.description||`Phone number`},setValue:e=>{U(K(String(e??``)))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);if(t===``)return``;let n=G(t);return n.length!==10&&(n.length!==11||n[0]!==`1`)?t:W(n)||de()},getState:()=>({disabled:p()}),get constraints(){return{required:m()}},validateValue:e=>{if(typeof e!=`string`)return!1;if(e===``)return!m();let t=G(e);return t.length===10||t.length===11&&t[0]===`1`},validate:()=>V(f())};return D.registerField(e)}});async function fe(){if(!(!e(L)||p()||e(j))){F(M,null),I=Date.now(),F(A,!0);try{(!T.isReady||T.adapterType!==`whisper-wasm`)&&await T.initialize({type:`whisper-wasm`}),await T.start({continuous:!0,interimResults:!1})}catch(e){F(A,!1),F(M,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`PhoneInput: failed to start voice recording`,{field:o.name,error:e})}}}async function q(){if(!e(A))return;let t=Date.now()-I;if(F(A,!1),await T.stop(),t<500)return;let n=Date.now();for(;T.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=T.lastResult?.trim()||``;if(!r||r.length<2)F(M,`No speech detected. Hold longer and speak clearly.`);else{F(j,!0),F(M,null);try{U(K(r))}catch(e){F(M,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(j,!1)}}}function J(e){e.button===0&&fe()}function pe(){q()}function me(){q()}function he(e){e.preventDefault(),fe()}function ge(){q()}function _e(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(A)?q():fe())}function Y(e){let t=e.target;U(W(t.value))}var ve=Be();let X;var ye=w(ve),xe=e=>{ae(e,{get id(){return h},get for(){return o.name},get label(){return o.label},get required(){return m()}})};t(ye,e=>{o.label&&e(xe)});var Se=E(ye,2),Z=w(Se);b(Z);let Ce;C(Z,e=>F(O,e),()=>e(O));var we=E(Z,2),Q=t=>{var n=Pe();let r;N(t=>{r=a(n,1,`smrt-phone-input__mic-btn svelte-1vixtb7`,null,r,{"smrt-phone-input__active":e(A)}),n.disabled=p(),P(n,`aria-label`,t)},[()=>u(H[`ui.phone_input.mic_aria_label`])]),_(`keydown`,n,_e),_(`mousedown`,n,J),_(`mouseup`,n,pe),y(`mouseleave`,n,me),_(`touchstart`,n,he,void 0,!0),_(`touchend`,n,ge),g(t,n)};t(we,t=>{e(L)&&t(Q)}),s(Se);var Te=E(Se,2),Ee=t=>{var n=Fe(),r=E(w(n),2),i=k(r,!0);s(n),N(e=>l(i,e),[()=>u(H[`ui.phone_input.downloading_model`],{progress:e(z)})]),g(t,n)},De=e=>{var t=Ie();g(e,t)},Oe=e=>{var t=Le();g(e,t)};t(Te,t=>{e(R)?t(Ee):e(A)?t(De,1):e(j)&&t(Oe,2)});var $=E(Te,2),ke=t=>{var n=Re(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-stt-error`),l(r,e(M))}),g(t,n)};t($,t=>{e(M)&&t(ke)});var Ae=E($,2),je=e=>{var t=ze(),n=k(t,!0);N(e=>{P(t,`id`,`${o.name}-error`),l(n,e)},[()=>u(H[`ui.phone_input.invalid`])]),g(e,t)};t(Ae,t=>{e(se)&&t(je)}),s(ve),N(()=>{X=a(ve,1,`smrt-phone-input__root svelte-1vixtb7`,null,X,{"smrt-phone-input__listening":e(A)}),P(Z,`id`,o.name),P(Z,`aria-labelledby`,o.label?h:void 0),P(Z,`name`,o.name),P(Z,`placeholder`,d()),te(Z,f()),Z.disabled=p()||e(j),Z.required=m(),Ce=a(Z,1,`smrt-phone-input__input svelte-1vixtb7`,null,Ce,{"smrt-phone-input__mode":e(L),"smrt-phone-input__invalid":e(se),"smrt-phone-input__processing":e(j)}),P(Z,`aria-invalid`,e(se)?`true`:void 0),P(Z,`aria-describedby`,e(se)?`${o.name}-error`:e(M)?`${o.name}-stt-error`:void 0)}),_(`input`,Z,Y),_(`mousedown`,Z,function(...t){(e(L)?J:void 0)?.apply(this,t)}),_(`mouseup`,Z,function(...t){(e(L)?pe:void 0)?.apply(this,t)}),y(`mouseleave`,Z,function(...t){(e(L)?me:void 0)?.apply(this,t)}),_(`touchstart`,Z,function(...t){(e(L)?he:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Z,function(...t){(e(L)?ge:void 0)?.apply(this,t)}),g(n,ve),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]),v([`input`,`keydown`,`click`]);var He=c(`<option disabled=""> </option>`),Ue=c(`<option> </option>`),We=c(`<span class="smrt-select-input__info svelte-17ub3c7" data-smrt-part="description"> </span>`),Ge=c(`<div data-smrt-component="SelectInput"><!> <div class="smrt-select-input__container svelte-17ub3c7" data-smrt-part="field"><div class="smrt-select-input__content svelte-17ub3c7" data-smrt-part="body"><select class="smrt-select-input__input svelte-17ub3c7" data-smrt-part="input"><!><!></select></div> <div class="smrt-select-input__trailing-icon svelte-17ub3c7" data-smrt-part="icon"><!></div> <div class="smrt-select-input__active-indicator svelte-17ub3c7" data-smrt-part="indicator"></div></div> <div class="smrt-select-input__supporting-text svelte-17ub3c7" data-smrt-part="description" aria-live="polite"><!></div></div>`);function Ke(o,c){let u=re();ee(c,!0);let d=x(c,`placeholder`,3,`Select an option...`),h=x(c,`value`,15,``),v=x(c,`disabled`,3,!1),b=x(c,`required`,3,!1),te=`${u}-label`,C=ce(),T=le(),D=S(!1),O=r(()=>c.options.some(e=>e.value===``)),A=r(()=>c.options.filter((e,t)=>c.options.findIndex(t=>t.value===e.value)===t)),j=r(()=>C.state.mode===`smrt`);function M(e){h(e),c.onchange?.(h())}ne(()=>{if(T){let e={name:c.name,type:`select`,get label(){return c.label},get description(){let e=c.options.map(e=>e.label).join(`, `);return c.description?`${c.description}. Options: ${e}`:`Options: ${e}`},setValue:e=>{let t=String(e??``),n=ye(t,c.options);n?M(n):c.options.some(e=>e.value===t)&&M(t)},getValue:()=>h(),prepareValue:e=>{let t=ue(e);return t.trim()===``?t:ye(t,c.options)??t},clear:()=>(M(``),!0),getState:()=>({disabled:v()}),get constraints(){return{required:b()}},get options(){return c.options.map(e=>({value:e.value,label:e.label}))},validateValue:e=>{let t=String(e??``);return t===``?!b():c.options.some(e=>e.value===t)},validate:()=>!b()||h().trim().length>0};return T.registerField(e)}});function L(e){let t=e.target;M(t.value)}var R=Ge();let z;var ie=w(R),B=e=>{ae(e,{get id(){return te},get for(){return c.name},get label(){return c.label},get required(){return b()}})};t(ie,e=>{c.label&&e(B)});var V=E(ie,2),oe=w(V),H=w(oe),U=w(H),W=e=>{var t=He(),n=k(t,!0);t.value=t.__value=``,N(()=>{I(t,!h()),l(n,d())}),g(e,t)};t(U,t=>{e(O)||t(W)});var G=E(U);f(G,17,()=>e(A),e=>e.value,(t,n)=>{var r=Ue(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(H);var K;m(H),s(oe);var de=E(oe,2),fe=w(de);se(fe,{name:`chevron-down`,size:24}),s(de),p(2),s(V);var q=E(V,2),J=w(q),pe=e=>{var t=We(),n=k(t,!0);N(()=>l(n,c.description)),g(e,t)};t(J,t=>{c.description&&e(D)&&t(pe)}),s(q),s(R),N(()=>{z=a(R,1,`smrt-select-input__root svelte-17ub3c7`,null,z,{"smrt-select-input__mode":e(j),"smrt-select-input__focused":e(D),"smrt-select-input__disabled":v(),"smrt-select-input__has-value":!!h()}),P(H,`id`,c.name),P(H,`aria-labelledby`,c.label?te:void 0),P(H,`name`,c.name),H.disabled=v(),H.required=b(),P(H,`aria-describedby`,`${c.name}-supporting`),K!==(K=h())&&(H.value=(H.__value=K)??``,n(H,K)),P(q,`id`,`${c.name}-supporting`)}),_(`change`,H,L),y(`focus`,H,()=>F(D,!0)),y(`blur`,H,()=>F(D,!1)),g(o,R),i()}v([`change`]);var qe=c(`<button type="button" data-smrt-part="trigger"><!></button>`),Je=c(`<span class="smrt-textarea-input__info svelte-1wen309" data-smrt-part="description"> </span>`),Ye=c(`<span class="smrt-textarea-input__success svelte-1wen309" data-smrt-part="status">Recording...</span>`),Xe=c(`<span class="smrt-textarea-input__info svelte-1wen309" data-smrt-part="description">Processing...</span>`),Ze=c(`<span class="smrt-textarea-input__error svelte-1wen309" data-smrt-part="error"> </span>`),Qe=c(`<div data-smrt-component="TextareaInput"><!> <div class="smrt-textarea-input__container svelte-1wen309" data-smrt-part="field"><div class="smrt-textarea-input__content svelte-1wen309" data-smrt-part="body"><textarea class="smrt-textarea-input__input svelte-1wen309" data-smrt-part="input"></textarea></div> <!> <div class="smrt-textarea-input__active-indicator svelte-1wen309" data-smrt-part="indicator"></div></div> <div class="smrt-textarea-input__supporting-text svelte-1wen309" data-smrt-part="description" aria-live="polite"><!></div></div>`);function $e(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,``),f=x(o,`value`,15,``),m=x(o,`rows`,3,4),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),b=x(o,`appendMode`,3,!1),T=`${c}-label`,O=ce(),A=be(),j=le(),M=S(null),I=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>O.state.mode===`smrt`),K=r(()=>A.isInitializing),de=r(()=>A.downloadProgress);function fe(e){f(e),o.onchange?.(f())}ne(()=>{if(j){let e={name:o.name,type:`textarea`,get label(){return o.label},get description(){return o.description},setValue:e=>{fe(String(e??``))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);return b()&&f()?`${f()}\n${t}`:t},prepareReviewedValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>!v()||String(e??``).trim().length>0,validate:()=>!v()||f().trim().length>0};return j.registerField(e)}});async function q(){if(!(!e(G)||h()||e(z))){oe=f(),F(U,null),W=Date.now(),F(I,!0);try{(!A.isReady||A.adapterType!==`whisper-wasm`)&&await A.initialize({type:`whisper-wasm`}),await A.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextareaInput: failed to start voice recording`,{field:o.name,error:e})}}}async function J(){if(!e(I))return;let t=Date.now()-W;if(F(I,!1),await A.stop(),t<500)return;let n=Date.now();for(;A.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=A.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=X(r);b()&&oe?fe(`${oe}\n${e}`):fe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function pe(e){e.button===0&&q()}function me(){J()}function he(){J()}function ge(e){e.preventDefault(),q()}function _e(){J()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(I)?J():q())}function ve(e){let t=e.target;fe(t.value)}var ye=Qe();let xe;var Se=w(ye),Z=e=>{ae(e,{get id(){return T},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Se,e=>{o.label&&e(Z)});var Ce=E(Se,2),we=w(Ce),Q=w(we);L(Q),C(Q,e=>F(M,e),()=>e(M)),s(we);var Te=E(we,2),Ee=t=>{var n=qe();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`smrt-textarea-input__mic-btn svelte-1wen309`,null,r,{"smrt-textarea-input__active":e(I)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.textarea_input.mic_aria_label`])]),_(`keydown`,n,Y),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&q()}),_(`mouseup`,n,me),y(`mouseleave`,n,he),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),q()},void 0,!0),_(`touchend`,n,_e),g(t,n)};t(Te,t=>{e(G)&&t(Ee)}),p(2),s(Ce);var De=E(Ce,2),Oe=w(De),$=t=>{var n=Je(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.textarea_input.downloading_model`],{progress:e(de)})]),g(t,n)},ke=e=>{var t=Ye();g(e,t)},Ae=e=>{var t=Xe();g(e,t)},je=t=>{var n=Ze(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Me=e=>{var t=Je(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Oe,t=>{e(K)?t($):e(I)?t(ke,1):e(z)?t(Ae,2):e(U)?t(je,3):o.description&&e(V)&&t(Me,4)}),s(De),s(ye),N(()=>{xe=a(ye,1,`smrt-textarea-input__root smrt-textarea-input__multiline svelte-1wen309`,null,xe,{"smrt-textarea-input__mode":e(G),"smrt-textarea-input__focused":e(V),"smrt-textarea-input__disabled":h(),"smrt-textarea-input__has-value":!!f(),"smrt-textarea-input__listening":e(I)}),P(Q,`id`,o.name),P(Q,`aria-labelledby`,o.label?T:void 0),P(Q,`name`,o.name),P(Q,`placeholder`,e(V)?d():``),te(Q,f()),P(Q,`rows`,m()),Q.disabled=h()||e(z),Q.required=v(),P(Q,`aria-invalid`,e(U)?`true`:void 0),P(Q,`aria-describedby`,`${o.name}-supporting`),P(De,`id`,`${o.name}-supporting`)}),_(`input`,Q,ve),y(`focus`,Q,()=>F(V,!0)),y(`blur`,Q,()=>F(V,!1)),_(`mousedown`,Q,function(...t){(e(G)?pe:void 0)?.apply(this,t)}),_(`mouseup`,Q,function(...t){(e(G)?me:void 0)?.apply(this,t)}),y(`mouseleave`,Q,function(...t){(e(G)?he:void 0)?.apply(this,t)}),_(`touchstart`,Q,function(...t){(e(G)?ge:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Q,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),g(n,ye),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]);var et=c(`<button type="button" data-smrt-part="trigger"><!></button>`),tt=c(`<span class="smrt-text-input__info svelte-q632gy" data-smrt-part="description"> </span>`),nt=c(`<span class="smrt-text-input__success svelte-q632gy" data-smrt-part="status">Recording...</span>`),rt=c(`<span class="smrt-text-input__info svelte-q632gy" data-smrt-part="description">Processing...</span>`),it=c(`<span class="smrt-text-input__error svelte-q632gy" data-smrt-part="error"> </span>`),at=c(`<div data-smrt-component="TextInput"><!> <div class="smrt-text-input__container svelte-q632gy" data-smrt-part="field"><div class="smrt-text-input__content svelte-q632gy" data-smrt-part="body"><input class="smrt-text-input__input svelte-q632gy" data-smrt-part="input"/></div> <!> <div class="smrt-text-input__active-indicator svelte-q632gy" data-smrt-part="indicator"></div></div> <div class="smrt-text-input__supporting-text svelte-q632gy" data-smrt-part="description" aria-live="polite"><!></div></div>`);function ot(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`type`,3,`text`),f=x(o,`placeholder`,3,``),m=x(o,`value`,15,``),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),T=x(o,`appendMode`,3,!1),O=`${c}-label`,A=ce(),j=be(),M=le(),I=S(null),L=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>A.state.mode===`smrt`),K=r(()=>j.isInitializing),de=r(()=>j.downloadProgress);function fe(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}let q=r(()=>d()!==`email`||!m()||fe(m())),J=r(()=>d()===`email`&&m()&&!e(q));function pe(e){m(e),o.onchange?.(m())}ne(()=>{if(M){let t={name:o.name,get type(){return d()===`email`?`email`:`text`},get label(){return o.label},get description(){return o.description},setValue:e=>{pe(String(e??``))},getValue:()=>m(),prepareValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>{let t=String(e??``);return(!v()||t.trim().length>0)&&(d()!==`email`||t.length===0||fe(t))},validate:()=>(!v()||m().trim().length>0)&&(d()!==`email`||m().length===0||e(q))};return M.registerField(t)}});async function me(){if(!(!e(G)||h()||e(z))){oe=m(),F(U,null),W=Date.now(),F(L,!0);try{(!j.isReady||j.adapterType!==`whisper-wasm`)&&await j.initialize({type:`whisper-wasm`}),await j.start({continuous:!0,interimResults:!1})}catch(e){F(L,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextInput: failed to start voice recording`,{field:o.name,error:e})}}}async function he(){if(!e(L))return;let t=Date.now()-W;if(F(L,!1),await j.stop(),t<500)return;let n=Date.now();for(;j.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=j.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=d()===`email`?ve(r):X(r);T()&&oe?pe(`${oe} ${e}`):pe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function ge(e){e.button===0&&me()}function _e(){he()}function Y(){he()}function ye(e){e.preventDefault(),me()}function xe(){he()}function Se(e){e.preventDefault(),e.stopPropagation()}function Z(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(L)?he():me())}function Ce(e){let t=e.target;pe(t.value)}var we=at();let Q;var Te=w(we),Ee=e=>{ae(e,{get id(){return O},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Te,e=>{o.label&&e(Ee)});var De=E(Te,2),Oe=w(De),$=w(Oe);b($),C($,e=>F(I,e),()=>e(I)),s(Oe);var ke=E(Oe,2),Ae=t=>{var n=et();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`smrt-text-input__mic-btn svelte-q632gy`,null,r,{"smrt-text-input__active":e(L)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.text_input.mic_aria_label`])]),_(`click`,n,Se),_(`keydown`,n,Z),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&me()}),_(`mouseup`,n,_e),y(`mouseleave`,n,Y),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),me()},void 0,!0),_(`touchend`,n,xe),g(t,n)};t(ke,t=>{e(G)&&t(Ae)}),p(2),s(De);var je=E(De,2),Me=w(je),Ne=t=>{var n=tt(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.text_input.downloading_model`],{progress:e(de)})]),g(t,n)},Pe=e=>{var t=nt();g(e,t)},Fe=e=>{var t=rt();g(e,t)},Ie=t=>{var n=it(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Le=e=>{var t=it(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.text_input.invalid_email`])]),g(e,t)},Re=e=>{var t=tt(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Me,t=>{e(K)?t(Ne):e(L)?t(Pe,1):e(z)?t(Fe,2):e(U)?t(Ie,3):e(J)?t(Le,4):o.description&&e(V)&&t(Re,5)}),s(je),s(we),N(()=>{Q=a(we,1,`smrt-text-input__root svelte-q632gy`,null,Q,{"smrt-text-input__mode":e(G),"smrt-text-input__focused":e(V),"smrt-text-input__invalid":e(J),"smrt-text-input__disabled":h(),"smrt-text-input__has-value":!!m(),"smrt-text-input__listening":e(L)}),P($,`id`,o.name),P($,`aria-labelledby`,o.label?O:void 0),P($,`name`,o.name),P($,`type`,d()),P($,`placeholder`,e(V)?f():``),te($,m()),$.disabled=h()||e(z),$.required=v(),P($,`aria-invalid`,e(J)?`true`:void 0),P($,`aria-describedby`,`${o.name}-supporting`),P(je,`id`,`${o.name}-supporting`)}),_(`input`,$,Ce),y(`focus`,$,()=>F(V,!0)),y(`blur`,$,()=>F(V,!1)),_(`mousedown`,$,function(...t){(e(G)?ge:void 0)?.apply(this,t)}),_(`mouseup`,$,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),y(`mouseleave`,$,function(...t){(e(G)?Y:void 0)?.apply(this,t)}),_(`touchstart`,$,function(...t){(e(G)?ye:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,$,function(...t){(e(G)?xe:void 0)?.apply(this,t)}),g(n,we),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`]);function st(e){return typeof e!=`number`||!Number.isFinite(e)?null:Number((e*100).toFixed(4))}function ct(e){return e===null||!Number.isFinite(e)?null:Number((e/100).toFixed(6))}export{Ke as a,Ae as c,$e as i,De as l,ct as n,Ve as o,ot as r,Ne as s,st as t,Y as u};
|
|
1
|
+
import{$ as e,B as t,C as n,Ct as r,Dt as i,E as a,Et as o,Ft as s,G as c,H as l,J as u,K as d,L as f,Ot as ee,Pt as p,S as m,Tt as h,U as g,X as _,Y as v,Z as y,_ as b,a as x,b as te,bt as S,ct as ne,d as C,ft as w,gt as T,ht as E,k as D,kt as O,mt as k,n as A,nt as j,pt as M,q as re,st as N,v as P,vt as F,w as I,wt as L}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as R}from"./Cekjnrta.js";import{a as z,t as ie}from"./Bq8E3AWP.js";import"./D3syEjNq.js";import{i as B}from"./DBpiHw4Q.js";import{t as V}from"./CUyVrfsu.js";import{x as ae}from"./C65O26Eu.js";import{t as oe}from"./D042ejzG.js";import"./DGG2_OGp.js";import{nt as se}from"./BJmbWKnL.js";function ce(){return V()}var H=z({"ui.address_input.street_placeholder":`123 Main Street`,"ui.address_input.city_placeholder":`City`,"ui.address_input.postal_code_placeholder":`A1A 1A1`,"ui.date_range_input.mic_aria_label":`Hold to speak date range`,"ui.date_range_input.parsing":`Parsing dates...`,"ui.date_range_input.end_after_start":`End date must be after start date`,"ui.date_time_input.mic_aria_label":`Hold to speak`,"ui.date_time_input.parsing":`Parsing date...`,"ui.file_upload.remove_file":`Remove {name}`,"ui.file_upload.required":`Select a file to upload`,"ui.file_upload.rejected_type":`{count} file(s) rejected: type not allowed`,"ui.file_upload.exceeds_max_size":`{count} file(s) exceed the maximum size of {size}`,"ui.form.extracting":`Extracting form fields…`,"ui.form.listening_status":`Listening. Say "done" to finish.`,"ui.form.listening_button":`Listening... (say "done" to finish)`,"ui.form.speak_all_fields":`Speak all fields`,"ui.form.you_said":`You said:`,"ui.form_mic_button.tooltip":`Speak to fill all fields. Click again to stop.`,"ui.measurement_input.value_at_least":`Value must be at least {min} {unit}`,"ui.measurement_input.value_at_most":`Value must be at most {max} {unit}`,"ui.money_input.value_at_least":`Value must be at least {min}`,"ui.money_input.value_at_most":`Value must be at most {max}`,"ui.number_input.value_at_least":`Value must be at least {min}`,"ui.number_input.value_at_most":`Value must be at most {max}`,"ui.phone_input.mic_aria_label":`Hold to speak`,"ui.phone_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.phone_input.invalid":`Invalid phone number`,"ui.search_input.clear_aria_label":`Clear search`,"ui.text_input.mic_aria_label":`Hold to speak`,"ui.text_input.downloading_model":`Downloading Whisper model... {progress}%`,"ui.text_input.invalid_email":`Invalid email address`,"ui.textarea_input.mic_aria_label":`Hold to speak`,"ui.textarea_input.downloading_model":`Downloading Whisper model... {progress}%`}),U=Symbol(`smrt-form`),W=new WeakMap;function G(e){let t=new Map;return{get mode(){return e.mode},registerField(n){let r=n.name,i=e.registerField(n),a=typeof i==`function`?i:()=>e.unregisterField(r),o=!0,s=()=>{if(!o)return;o=!1;let e=t.get(r);e?.delete(s),e?.size===0&&t.delete(r),a()},c=t.get(r)??new Set;return c.add(s),t.set(r,c),s},unregisterField(e){let n=t.get(e)?.values().next().value;n?.()},getFieldSchema:()=>e.getFieldSchema(),get isFormListening(){return e.isFormListening},get isExtracting(){return e.isExtracting},toggleListening:()=>e.toggleListening(),get interactionRegistry(){return e.interactionRegistry},get formId(){return e.formId}}}function K(e){let t=h(),n=W.get(t);if(n)return n;let r=o(U);if(!r){if(!e)return null;throw Error(`Form context not found. Make sure to wrap your inputs with <SMRTForm>`)}let i=G(r);return W.set(t,i),O(U,i),i}function le(){return K(!1)}function ue(e){if(e==null)return``;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);throw Error(`staged_value_invalid`)}function de(){throw Error(`staged_value_invalid`)}var fe=c(`<div class="smrt-address-input__field-row smrt-address-input__full-width svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <input type="text" data-smrt-part="input"/></div>`),q=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-2 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <input type="text" data-smrt-part="input"/></div>`),J=c(`<option> </option>`),pe=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-1 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <select data-smrt-part="input"><option>Select...</option><!></select></div>`),me=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-1 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <input type="text" data-smrt-part="input"/></div>`),he=c(`<div class="smrt-address-input__field-row smrt-address-input__flex-1 svelte-5rbjmj" data-smrt-part="field"><label class="smrt-address-input__field-label svelte-5rbjmj" data-smrt-part="label"> </label> <select data-smrt-part="input"></select></div>`),ge=c(`<div class="smrt-address-input__validation-error svelte-5rbjmj" data-smrt-part="error" role="alert"> </div>`),_e=c(`<div class="smrt-address-input__root svelte-5rbjmj" data-smrt-component="AddressInput"><!> <div data-smrt-part="body"><!> <div class="smrt-address-input__field-row-group svelte-5rbjmj" data-smrt-part="row"><!> <!></div> <div class="smrt-address-input__field-row-group svelte-5rbjmj" data-smrt-part="row"><!> <!></div></div> <!></div>`);function Y(o,c){let u=re();ee(c,!0);let{t:d}=ie(),p=[{value:`CA`,label:`Canada`},{value:`US`,label:`United States`}],h=[{value:`AB`,label:`Alberta`},{value:`BC`,label:`British Columbia`},{value:`MB`,label:`Manitoba`},{value:`NB`,label:`New Brunswick`},{value:`NL`,label:`Newfoundland and Labrador`},{value:`NS`,label:`Nova Scotia`},{value:`NT`,label:`Northwest Territories`},{value:`NU`,label:`Nunavut`},{value:`ON`,label:`Ontario`},{value:`PE`,label:`Prince Edward Island`},{value:`QC`,label:`Quebec`},{value:`SK`,label:`Saskatchewan`},{value:`YT`,label:`Yukon`},{value:`US-CA`,label:`California`},{value:`US-NY`,label:`New York`},{value:`US-TX`,label:`Texas`},{value:`US-FL`,label:`Florida`},{value:`US-WA`,label:`Washington`}],v=x(c,`value`,31,()=>T({})),y=x(c,`fields`,19,()=>[`street`,`city`,`province`,`postalCode`,`country`]),C=x(c,`disabled`,3,!1),D=x(c,`required`,3,!1),O=x(c,`countries`,3,p),A=x(c,`provinces`,3,h);function M(){return[...new Set(O().map(e=>e.value))]}function I(){return[...new Set([...D()?[]:[``],...A().map(e=>e.value)])]}function L(e){return e===`country`?{type:`string`,enum:M()}:e===`province`?{type:`string`,enum:I()}:{type:`string`}}function R(e){if(typeof e!=`object`||Array.isArray(e))return!1;let t=e;return!(![Object.prototype,null].includes(Object.getPrototypeOf(t))||!Object.keys(t).every(e=>y().includes(e))||!y().every(e=>!Object.hasOwn(t,e)||typeof t[e]==`string`)||Object.hasOwn(t,`country`)&&!M().includes(t.country)||Object.hasOwn(t,`province`)&&!I().includes(t.province))}function z(e){if(e==null)return!D();if(!R(e))return!1;if(!D())return!0;let t=e;return y().every(e=>typeof t[e]==`string`&&t[e].trim().length>0)}let B=ce(),V=le(),oe=`smrt-rich-field-${u}`,se=r(()=>B.state.mode===`smrt`),U=S(T(v().street??``)),W=S(T(v().city??``)),G=S(T(v().province??``)),K=S(T(v().postalCode??``)),Y=S(T(v().country??j(()=>O()[0]?.value??``)));ne(()=>{v().street!==void 0&&v().street!==e(U)&&F(U,v().street,!0),v().city!==void 0&&v().city!==e(W)&&F(W,v().city,!0),v().province!==void 0&&v().province!==e(G)&&F(G,v().province,!0),v().postalCode!==void 0&&v().postalCode!==e(K)&&F(K,v().postalCode,!0),v().country!==void 0&&v().country!==e(Y)&&F(Y,v().country,!0)});function ve(){let t={};return y().includes(`street`)&&(t.street=e(U)),y().includes(`city`)&&(t.city=e(W)),y().includes(`province`)&&(t.province=e(G)),y().includes(`postalCode`)&&(t.postalCode=e(K)),y().includes(`country`)&&(t.country=e(Y)),t}function X(){let e=ve();v(e),c.onchange?.(e)}function ye(e){let t={},n=e.toLowerCase().trim(),r=n.match(/([a-z]\d[a-z]\s?\d[a-z]\d)|(\d{5}(-\d{4})?)/i);r&&(t.postalCode=r[0].toUpperCase().replace(/\s+/g,` `));for(let e of A())if(RegExp(`\\b${e.label.toLowerCase()}\\b|\\b${e.value.toLowerCase()}\\b`,`i`).test(n)){t.province=e.value;break}for(let e of O())if([e.label,e.value].some(e=>{let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);return RegExp(`(^|\\W)${t}(?=$|\\W)`,`i`).test(n)})){t.country=e.value;break}for(let e of[/(?:city\s+(?:of\s+)?|in\s+)([a-z\s]+?)(?:\s*,|\s+(?:ab|bc|mb|on|qc|sk|alberta|british columbia|ontario|quebec)|\s*$)/i]){let r=n.match(e);if(r){t.city=r[1].trim().replace(/\b\w/g,e=>e.toUpperCase());break}}let i=n.match(/(\d+\s+[a-z\s]+(?:street|st|avenue|ave|road|rd|drive|dr|boulevard|blvd|way|lane|ln|crescent|cres|place|pl|court|ct))/i);return i&&(t.street=i[1].replace(/\b\w/g,e=>e.toUpperCase())),t}let be={street:`Street Address`,city:`City`,province:`Province/State`,postalCode:`Postal/ZIP Code`,country:`Country`},xe=r(()=>{let e=y()[0]??`street`;switch(e){case`postalCode`:return`${c.name}_postal`;default:return`${c.name}_${e}`}});ne(()=>{if(V){let e={name:c.name,ownerToken:oe,type:`address`,get label(){return c.label},get description(){return c.description||`A mailing address with street, city, province, postal code, and country`},setValue:e=>{if(e==null){F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X();return}if(R(e)){let t=e;t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X();return}let t=Object.fromEntries(Object.entries(ye(String(e))).filter(([e])=>y().includes(e)));Object.keys(t).length>0&&R(t)&&(t.street!==void 0&&F(U,t.street,!0),t.city!==void 0&&F(W,t.city,!0),t.province!==void 0&&F(G,t.province,!0),t.postalCode!==void 0&&F(K,t.postalCode,!0),t.country!==void 0&&F(Y,t.country,!0),X())},getValue:ve,prepareValue:e=>{if(e==null)return Object.fromEntries(y().map(e=>[e,e===`country`?O()[0]?.value??``:``]));if(typeof e==`object`&&!Array.isArray(e))return e;let t=ye(ue(e)),n=Object.fromEntries(Object.entries(t).filter(([e])=>y().includes(e)));return Object.keys(n).length>0?{...ve(),...n}:de()},clear:()=>(F(U,``),F(W,``),F(G,``),F(K,``),F(Y,O()[0]?.value??``,!0),X(),!0),getState:()=>({disabled:C()}),get constraints(){return{required:D()}},get webMcpSchema(){return{type:`object`,additionalProperties:!1,properties:Object.fromEntries(y().map(e=>[e,L(e)])),...D()?{required:[...y()]}:{}}},validateValue:z,validate:()=>z(ve())};return V.registerField(e)}});function Se(e){F(U,e.target.value,!0),X()}function Z(e){F(W,e.target.value,!0),X()}function Ce(e){F(G,e.target.value,!0),X()}function we(e){F(K,e.target.value,!0),X()}function Q(e){F(Y,e.target.value,!0),X()}var Te=_e(),Ee=w(Te),De=t=>{ae(t,{get for(){return e(xe)},get label(){return c.label},get required(){return D()}})};t(Ee,e=>{c.label&&e(De)});var Oe=E(Ee,2);let $;var ke=w(Oe),Ae=t=>{var n=fe(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_street`),l(i,be.street),P(o,`id`,`${c.name??``}_street`),P(o,`name`,`${c.name??``}[street]`),P(o,`placeholder`,t),te(o,e(U)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-address-input__input svelte-5rbjmj`,null,u,{"smrt-address-input__invalid":!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.street_placeholder`]),()=>D()&&y().includes(`street`)]),_(`input`,o,Se),g(t,n)},je=r(()=>y().includes(`street`));t(ke,t=>{e(je)&&t(Ae)});var Me=E(ke,2),Ne=w(Me),Pe=t=>{var n=q(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_city`),l(i,be.city),P(o,`id`,`${c.name??``}_city`),P(o,`name`,`${c.name??``}[city]`),P(o,`placeholder`,t),te(o,e(W)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-address-input__input svelte-5rbjmj`,null,u,{"smrt-address-input__invalid":!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.city_placeholder`]),()=>D()&&y().includes(`city`)]),_(`input`,o,Z),g(t,n)},Fe=r(()=>y().includes(`city`));t(Ne,t=>{e(Fe)&&t(Pe)});var Ie=E(Ne,2),Le=t=>{var r=pe(),i=w(r),o=k(i,!0),u=E(i,2);let d;var ee=w(u);ee.value=ee.__value=``;var p=E(ee);f(p,17,A,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var h;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_province`),l(o,be.province),P(u,`id`,`${c.name??``}_province`),P(u,`name`,`${c.name??``}[province]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-address-input__input smrt-address-input__select svelte-5rbjmj`,null,d,{"smrt-address-input__invalid":!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),h!==(h=e(G))&&(u.value=(u.__value=h)??``,n(u,h))},[()=>D()&&y().includes(`province`)]),_(`change`,u,Ce),g(t,r)},Re=r(()=>y().includes(`province`));t(Ie,t=>{e(Re)&&t(Le)}),s(Me);var ze=E(Me,2),Be=w(ze),Ve=t=>{var n=me(),r=w(n),i=k(r,!0),o=E(r,2);b(o);let u;s(n),N((t,n)=>{P(r,`for`,`${c.name??``}_postal`),l(i,be.postalCode),P(o,`id`,`${c.name??``}_postal`),P(o,`name`,`${c.name??``}[postalCode]`),P(o,`placeholder`,t),te(o,e(K)),o.disabled=C(),o.required=n,u=a(o,1,`smrt-address-input__input svelte-5rbjmj`,null,u,{"smrt-address-input__invalid":!!c.error}),P(o,`aria-invalid`,c.error?`true`:void 0),P(o,`aria-describedby`,c.error?`${c.name}-error`:void 0)},[()=>d(H[`ui.address_input.postal_code_placeholder`]),()=>D()&&y().includes(`postalCode`)]),_(`input`,o,we),g(t,n)},He=r(()=>y().includes(`postalCode`));t(Be,t=>{e(He)&&t(Ve)});var Ue=E(Be,2),We=t=>{var r=he(),i=w(r),o=k(i,!0),u=E(i,2);let d;f(u,21,O,e=>e.value,(t,n)=>{var r=J(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(u);var ee;m(u),s(r),N(t=>{P(i,`for`,`${c.name??``}_country`),l(o,be.country),P(u,`id`,`${c.name??``}_country`),P(u,`name`,`${c.name??``}[country]`),u.disabled=C(),u.required=t,d=a(u,1,`smrt-address-input__input smrt-address-input__select svelte-5rbjmj`,null,d,{"smrt-address-input__invalid":!!c.error}),P(u,`aria-invalid`,c.error?`true`:void 0),P(u,`aria-describedby`,c.error?`${c.name}-error`:void 0),ee!==(ee=e(Y))&&(u.value=(u.__value=ee)??``,n(u,ee))},[()=>D()&&y().includes(`country`)]),_(`change`,u,Q),g(t,r)},Ge=r(()=>y().includes(`country`));t(Ue,t=>{e(Ge)&&t(We)}),s(ze),s(Oe);var Ke=E(Oe,2),qe=e=>{var t=ge(),n=k(t,!0);N(()=>{P(t,`id`,`${c.name}-error`),l(n,c.error)}),g(e,t)};t(Ke,e=>{c.error&&e(qe)}),s(Te),N(()=>{P(Te,`data-smrt-field-owner`,oe),$=a(Oe,1,`smrt-address-input__fields svelte-5rbjmj`,null,$,{"smrt-address-input__mode":e(se)})}),g(o,Te),i()}v([`input`,`change`]);function ve(e){return e.toLowerCase().replace(/\s+at\s+/gi,`@`).replace(/\bat\b/gi,`@`).replace(/\s+dot\s+/gi,`.`).replace(/\bdot\b/gi,`.`).replace(/\s+/g,``).trim()}function X(e){return e.replace(/^(my name is|i am|i'm|it's|this is|the name is)\s*/i,``).replace(/\b(um|uh|like|so|well)\b\s*/gi,``).trim()}function ye(e,t){let n=e.toLowerCase().trim();for(let e of t)if(e.value.toLowerCase()===n||e.label.toLowerCase()===n)return e.value;for(let e of t)if(e.label.toLowerCase().includes(n)||n.includes(e.label.toLowerCase()))return e.value;return null}v([`change`]);function be(e={}){let t=V(),n=!1;return e.autoInit&&t.initializeSTT().catch(()=>{}),A(()=>{n&&t.state.ai.stt.isListening&&t.stopListening().catch(()=>{}),n=!1}),{start:async r=>{n=!0;try{await t.startListening({...e.defaultOptions,...r})}catch(e){throw n=!1,e}},stop:async()=>{n=!1,await t.stopListening()},initialize:async e=>{await t.initializeSTT(e)},get isListening(){return t.state.ai.stt.isListening},get isReady(){return t.state.ai.stt.initState===`ready`},get isInitializing(){return t.state.ai.stt.initState===`initializing`},get lastResult(){return t.state.ai.stt.lastResult},get interimResult(){return t.state.ai.stt.interimResult},get currentResult(){let{isListening:e,interimResult:n,lastResult:r}=t.state.ai.stt;return e&&n?n:r},get error(){return t.state.ai.stt.error},get downloadProgress(){return t.state.ai.stt.downloadProgress?.percent??0},get adapterType(){return t.state.ai.stt.adapter?.type??null}}}v([`keydown`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`change`]);var xe=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="smrt-date-time-input__spinner svelte-rsri1g" data-smrt-part="spinner"><circle cx="12" cy="12" r="10" stroke-dasharray="32" stroke-dashoffset="12" class="svelte-rsri1g"></circle></svg>`),Se=d(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-rsri1g"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-rsri1g"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-rsri1g"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-rsri1g"></line></svg>`),Z=c(`<input type="text" class="smrt-date-time-input__input smrt-date-time-input__mode svelte-rsri1g" data-smrt-part="input" readonly=""/> <button type="button" data-smrt-part="trigger"><!></button>`,1),Ce=c(`<input class="smrt-date-time-input__input svelte-rsri1g" data-smrt-part="input"/>`),we=c(`<div class="smrt-date-time-input__listening-indicator svelte-rsri1g" data-smrt-part="status">Recording...</div>`),Q=c(`<div class="smrt-date-time-input__parsing-indicator svelte-rsri1g" data-smrt-part="status"> </div>`),Te=c(`<div class="smrt-date-time-input__error-indicator svelte-rsri1g" data-smrt-part="error" role="alert"> </div>`),Ee=c(`<div data-smrt-component="DateTimeInput"><!> <div class="smrt-date-time-input__input-wrapper svelte-rsri1g" data-smrt-part="field"><!></div> <!></div>`);function De(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`includeTime`,3,!0),f=x(o,`placeholder`,19,()=>d()?`e.g., next Tuesday at 3pm`:`e.g., March 15, 1990`),p=x(o,`value`,15,``),m=x(o,`disabled`,3,!1),h=x(o,`required`,3,!1),v=`${c}-label`,T=ce(),D=be(),O=le(),A=S(null),j=S(``),I=S(!1),L=S(!1),R=S(null),z=0,V=r(()=>T.state.mode===`smrt`);function se(e){p(e),o.onchange?.(p())}function U(e){if(!e)return``;try{if(!d()&&/^\d{4}-\d{2}-\d{2}$/.test(e)){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r).toLocaleDateString(void 0,{dateStyle:`medium`})}let t=new Date(e);return Number.isNaN(t.getTime())?e:d()?t.toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`}):t.toLocaleDateString(void 0,{dateStyle:`medium`})}catch{return e}}function W(e){if(typeof e!=`string`)return!1;if(e===``)return!h();let t=d()?/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?$/.exec(e):/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return!1;let[,n,r,i,a=`0`,o=`0`,s=`0`]=t,c=new Date(Date.UTC(Number(n),Number(r)-1,Number(i),Number(a),Number(o),Number(s)));return c.getUTCFullYear()===Number(n)&&c.getUTCMonth()===Number(r)-1&&c.getUTCDate()===Number(i)&&c.getUTCHours()===Number(a)&&c.getUTCMinutes()===Number(o)&&c.getUTCSeconds()===Number(s)}ne(()=>{F(j,U(p()),!0)}),ne(()=>{if(O){let e={name:o.name,type:`datetime`,get label(){return o.label},get description(){return o.description??(d()?`Date and time`:`Date`)},setValue:e=>{se(String(e??``))},getValue:()=>p(),prepareValue:ue,getState:()=>({disabled:m()}),get constraints(){return{required:h()}},validateValue:W,validate:()=>W(p())};return O.registerField(e)}});async function G(e){let t;try{t=await oe(`chrono-node`)}catch{throw Error(`Natural-language date parsing requires the optional dependency "chrono-node". Install it with: pnpm add chrono-node`)}let n=t.parse(e);if(n.length===0)throw Error(`Could not parse date from speech`);let r=n[0].start.date();if(Number.isNaN(r.getTime()))throw Error(`Invalid date`);let i=r.getFullYear(),a=String(r.getMonth()+1).padStart(2,`0`),o=String(r.getDate()).padStart(2,`0`);return d()?`${i}-${a}-${o}T${String(r.getHours()).padStart(2,`0`)}:${String(r.getMinutes()).padStart(2,`0`)}`:`${i}-${a}-${o}`}async function K(){if(!(!e(V)||m()||e(L))){F(R,null),z=Date.now(),F(I,!0);try{(!D.isReady||D.adapterType!==`whisper-wasm`)&&await D.initialize({type:`whisper-wasm`}),await D.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(R,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`DateTimeInput: failed to start voice recording`,{field:o.name,error:e})}}}async function de(){if(!e(I))return;let t=Date.now()-z;if(F(I,!1),await D.stop(),t<500)return;let n=Date.now();for(;D.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=D.lastResult?.trim()||``;if(!r||r.length<2)F(R,`No speech detected. Hold longer and speak clearly.`);else{F(L,!0),F(R,null);try{se(await G(r))}catch(e){F(R,e instanceof Error?e.message:`Failed to parse date`,!0)}finally{F(L,!1)}}}function fe(e){e.button===0&&K()}function q(){de()}function J(){de()}function pe(e){e.preventDefault(),K()}function me(){de()}function he(e){e.preventDefault(),e.stopPropagation()}function ge(e){e.stopPropagation(),e.button===0&&K()}function _e(e){e.stopPropagation(),e.preventDefault(),K()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),e(I)?de():K())}function ve(e){let t=e.target;se(t.value)}var X=Ee();let ye;var De=w(X),Oe=e=>{ae(e,{get id(){return v},get for(){return o.name},get label(){return o.label},get required(){return h()}})};t(De,e=>{o.label&&e(Oe)});var $=E(De,2),ke=w($),Ae=n=>{var r=Z(),i=M(r);b(i),C(i,e=>F(A,e),()=>e(A));var c=E(i,2);let l;var d=w(c),ee=e=>{var t=xe();g(e,t)},p=e=>{var t=Se();g(e,t)};t(d,t=>{e(L)?t(ee):t(p,-1)}),s(c),N(t=>{P(i,`id`,o.name),P(i,`aria-labelledby`,o.label?v:void 0),P(i,`name`,o.name),P(i,`placeholder`,f()),te(i,e(j)),i.disabled=m()||e(L),i.required=h(),P(i,`aria-invalid`,e(R)?`true`:void 0),P(i,`aria-describedby`,e(R)?`${o.name}-error`:void 0),l=a(c,1,`smrt-date-time-input__mic-btn svelte-rsri1g`,null,l,{"smrt-date-time-input__active":e(I)}),c.disabled=m()||e(L),P(c,`aria-label`,t)},[()=>u(H[`ui.date_time_input.mic_aria_label`])]),_(`mousedown`,i,fe),_(`mouseup`,i,q),y(`mouseleave`,i,J),_(`touchstart`,i,pe,void 0,!0),_(`touchend`,i,me),_(`click`,c,he),_(`keydown`,c,Y),_(`mousedown`,c,ge),_(`mouseup`,c,q),y(`mouseleave`,c,J),_(`touchstart`,c,_e,void 0,!0),_(`touchend`,c,me),g(n,r)},je=t=>{var n=Ce();b(n),C(n,e=>F(A,e),()=>e(A)),N(()=>{P(n,`id`,o.name),P(n,`aria-labelledby`,o.label?v:void 0),P(n,`name`,o.name),P(n,`type`,d()?`datetime-local`:`date`),te(n,p()),n.disabled=m(),n.required=h(),P(n,`aria-invalid`,e(R)?`true`:void 0),P(n,`aria-describedby`,e(R)?`${o.name}-error`:void 0)}),_(`change`,n,ve),g(t,n)};t(ke,t=>{e(V)?t(Ae):t(je,-1)}),s($);var Me=E($,2),Ne=e=>{var t=we();g(e,t)},Pe=e=>{var t=Q(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.date_time_input.parsing`])]),g(e,t)},Fe=t=>{var n=Te(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-error`),l(r,e(R))}),g(t,n)};t(Me,t=>{e(I)?t(Ne):e(L)?t(Pe,1):e(R)&&t(Fe,2)}),s(X),N(()=>ye=a(X,1,`smrt-date-time-input__root svelte-rsri1g`,null,ye,{"smrt-date-time-input__listening":e(I),"smrt-date-time-input__parsing":e(L)})),g(n,X),i()}v([`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`,`change`]),v([`click`,`keydown`,`change`]),v([`click`]),v([`click`,`keydown`]),v([`input`,`change`]);var Oe=c(`<div class="smrt-money-input__validation-error svelte-e6jjj7" data-smrt-part="error" role="alert"> </div>`),$=c(`<div class="smrt-money-input__validation-error svelte-e6jjj7" data-smrt-part="error" role="alert"><!></div>`),ke=c(`<div class="smrt-money-input__root svelte-e6jjj7" data-smrt-component="MoneyInput"><!> <div class="smrt-money-input__input-wrapper svelte-e6jjj7" data-smrt-part="field"><input type="text" inputmode="decimal" data-smrt-part="input"/> <span class="smrt-money-input__currency-code svelte-e6jjj7" data-smrt-part="unit"> </span></div> <input type="hidden"/> <!></div>`);function Ae(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,`0.00`),p=x(o,`value`,15,null),m=x(o,`currency`,3,`CAD`),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),C=`${c}-label`,D=ce(),O=le(),A=r(()=>D.state.mode===`smrt`);function j(e){return e===null?``:(e/100).toFixed(2)}function M(e){let t=e.replace(/[$,\s]/g,``);if(t===``)return null;let n=parseFloat(t);return Number.isNaN(n)?null:Math.round(n*100)}let I=S(T(j(p())));ne(()=>{let t=j(p());e(I)!==t&&!e(L)&&F(I,t,!0)});let L=S(!1),R=r(()=>m()===`USD`?`US$`:`CA$`),z=r(()=>p()===null||!(o.min!==void 0&&p()<o.min||o.max!==void 0&&p()>o.max)),B=r(()=>p()!==null&&!e(z)||!!o.error);function V(e){p(e),o.onchange?.(p())}function oe(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=/dollar|buck|cad|usd/i.test(t),i=/cent/i.test(t),a=t.replace(/\$|dollar[s]?|buck[s]?|cad|usd|cent[s]?/gi,``).trim(),o=a.match(/[\d,.]+/);if(o){let e=parseFloat(o[0].replace(/,/g,``));if(!Number.isNaN(e))return Math.round(i&&!r?e:e*100)}let s=a.split(/[\s-]+/).filter(Boolean),c=0,l=0,u=0,d=!1;for(let e=0;e<s.length;e++){let t=s[e],r=n[t];t===`and`||t===`point`?(d=!0,c+=u,u=0):r!==void 0&&(r>=100?(u=u===0?r:u*r,r>=1e3&&(d?l+=u:c+=u,u=0)):u+=r)}d?(l+=u,l>99&&(c+=Math.floor(l/100),l%=100)):c+=u;let f=c*100+l;return f>0?f:null}ne(()=>{if(O){let t={name:o.name,type:`money`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between $${(o.min/100).toFixed(2)} and $${(o.max/100).toFixed(2)})`:o.min===void 0?o.max!==void 0&&(e=` (maximum $${(o.max/100).toFixed(2)})`):e=` (minimum $${(o.min/100).toFixed(2)})`,(o.description||`A monetary amount in dollars`)+e},setValue:e=>{if(e==null||e===``){V(null),F(I,``);return}if(typeof e==`number`){V(e),F(I,j(e),!0);return}let t=oe(String(e));t!==null&&(V(t),F(I,j(t),!0))},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?oe(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max}},validateValue:e=>e===null&&!v()||typeof e==`number`&&Number.isSafeInteger(e)&&(o.min===void 0||e>=o.min)&&(o.max===void 0||e<=o.max),validate:()=>p()===null?!v():Number.isSafeInteger(p())&&e(z)};return O.registerField(t)}});function se(e){let t=e.target;F(I,t.value,!0),V(M(t.value))}function U(){F(L,!0)}function W(){F(L,!1),F(I,j(p()),!0)}var G=ke(),K=w(G),ue=e=>{ae(e,{get id(){return C},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(K,e=>{o.label&&e(ue)});var fe=E(K,2),q=w(fe);b(q);let J;var pe=E(q,2),me=k(pe,!0);s(fe);var he=E(fe,2);b(he);var ge=E(he,2),_e=e=>{var t=Oe(),n=k(t,!0);N(()=>{P(t,`id`,`${o.name}-error`),l(n,o.error)}),g(e,t)},Y=n=>{var r=$(),i=w(r),a=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_least`],{min:`${e(R)}${(o.min/100).toFixed(2)}`})]),g(t,n)},c=t=>{var n=u();N(e=>l(n,e),[()=>d(H[`ui.money_input.value_at_most`],{max:`${e(R)}${(o.max/100).toFixed(2)}`})]),g(t,n)};t(i,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(a):o.max!==void 0&&p()!==null&&p()>o.max&&e(c,1)}),s(r),N(()=>P(r,`id`,`${o.name}-error`)),g(n,r)};t(ge,t=>{o.error?t(_e):e(B)&&!e(z)&&t(Y,1)}),s(G),N(()=>{P(q,`id`,o.name),P(q,`aria-labelledby`,o.label?C:void 0),P(q,`name`,o.name),P(q,`placeholder`,f()),te(q,e(I)),q.disabled=h(),q.required=v(),J=a(q,1,`smrt-money-input__input svelte-e6jjj7`,null,J,{"smrt-money-input__mode":e(A),"smrt-money-input__invalid":e(B)}),P(q,`aria-invalid`,e(B)?`true`:void 0),P(q,`aria-describedby`,e(B)?`${o.name}-error`:void 0),l(me,m()),P(he,`name`,`${o.name??``}_cents`),te(he,p()??``)}),_(`input`,q,se),y(`focus`,q,U),y(`blur`,q,W),g(n,G),i()}v([`input`]);var je=c(`<div class="smrt-number-input__validation-error svelte-1pebtso" data-smrt-part="error" role="alert"><!></div>`),Me=c(`<div class="smrt-number-input__root svelte-1pebtso" data-smrt-component="NumberInput"><!> <div class="smrt-number-input__input-wrapper svelte-1pebtso" data-smrt-part="field"><input type="number" data-smrt-part="input"/></div> <!></div>`);function Ne(n,o){let c=re();ee(o,!0);let{t:d}=ie(),f=x(o,`placeholder`,3,``),p=x(o,`value`,15,null),m=x(o,`step`,3,1),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),y=`${c}-label`,S=ce(),C=le(),T=r(()=>S.state.mode===`smrt`);function D(e){return e===null||!(o.min!==void 0&&e<o.min||o.max!==void 0&&e>o.max)}function O(e){if(!Number.isFinite(m())||m()<=0)return!0;let t=(e-(o.min??0))/m();return Math.abs(t-Math.round(t))<=1e-9}let k=r(()=>D(p())),A=r(()=>p()!==null&&!e(k));function j(e){p(e),o.onchange?.(p())}function M(e){let t=e.toLowerCase().trim(),n={zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19,twenty:20,thirty:30,forty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90,hundred:100,thousand:1e3,million:1e6},r=parseFloat(t.replace(/[,$]/g,``));if(!Number.isNaN(r))return r;if(n[t]!==void 0)return n[t];let i=t.split(/[\s-]+/),a=0,o=0;for(let e of i){let t=n[e];t!==void 0&&(t>=100?(o=o===0?t:o*t,t>=1e3&&(a+=o,o=0)):o+=t)}return a+=o,a>0?a:null}ne(()=>{if(C){let t={name:o.name,type:`number`,get label(){return o.label},get description(){let e=``;return o.min!==void 0&&o.max!==void 0?e=` (between ${o.min} and ${o.max})`:o.min===void 0?o.max!==void 0&&(e=` (maximum ${o.max})`):e=` (minimum ${o.min})`,(o.description||`A number`)+e},setValue:e=>{if(e==null||e===``){j(null);return}if(typeof e==`number`){j(e);return}let t=M(String(e));t!==null&&j(t)},getValue:()=>p(),prepareValue:e=>e==null||e===``?null:typeof e==`number`?e:typeof e==`string`?M(e)??de():de(),getState:()=>({disabled:h()}),get constraints(){return{required:v(),min:o.min,max:o.max,step:m()}},validateValue:e=>{if(e==null||e===``)return!v();let t=typeof e==`number`?e:M(String(e));return t!==null&&Number.isFinite(t)&&D(t)&&O(t)},validate:()=>p()===null?!v():Number.isFinite(p())&&e(k)};return C.registerField(t)}});function F(e){let t=e.target;j(t.value===``?null:parseFloat(t.value))}var I=Me(),L=w(I),R=e=>{ae(e,{get id(){return y},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(L,e=>{o.label&&e(R)});var z=E(L,2),B=w(z);b(B);let V;s(z);var oe=E(z,2),se=e=>{var n=je(),r=w(n),i=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_least`],{min:o.min})]),g(e,t)},a=e=>{var t=u();N(e=>l(t,e),[()=>d(H[`ui.number_input.value_at_most`],{max:o.max})]),g(e,t)};t(r,e=>{o.min!==void 0&&p()!==null&&p()<o.min?e(i):o.max!==void 0&&p()!==null&&p()>o.max&&e(a,1)}),s(n),N(()=>P(n,`id`,`${o.name}-error`)),g(e,n)};t(oe,t=>{e(A)&&t(se)}),s(I),N(()=>{P(B,`id`,o.name),P(B,`aria-labelledby`,o.label?y:void 0),P(B,`name`,o.name),P(B,`placeholder`,f()),te(B,p()??``),P(B,`min`,o.min),P(B,`max`,o.max),P(B,`step`,m()),B.disabled=h(),B.required=v(),V=a(B,1,`smrt-number-input__input svelte-1pebtso`,null,V,{"smrt-number-input__mode":e(T),"smrt-number-input__invalid":e(A)}),P(B,`aria-invalid`,e(A)?`true`:void 0),P(B,`aria-describedby`,e(A)?`${o.name}-error`:void 0)}),_(`input`,B,F),g(n,I),i()}v([`input`]);var Pe=c(`<button type="button" data-smrt-part="trigger"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-1vixtb7"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z" class="svelte-1vixtb7"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2" class="svelte-1vixtb7"></path><line x1="12" x2="12" y1="19" y2="22" class="svelte-1vixtb7"></line></svg></button>`),Fe=c(`<div class="smrt-phone-input__downloading-indicator svelte-1vixtb7" data-smrt-part="status"><span class="smrt-phone-input__processing-spinner svelte-1vixtb7" data-smrt-part="spinner"></span> <span class="svelte-1vixtb7"> </span></div>`),Ie=c(`<div class="smrt-phone-input__listening-indicator svelte-1vixtb7" data-smrt-part="status"><span class="smrt-phone-input__listening-dot svelte-1vixtb7" data-smrt-part="indicator"></span> <span class="svelte-1vixtb7">Recording...</span></div>`),Le=c(`<div class="smrt-phone-input__processing-indicator svelte-1vixtb7" data-smrt-part="status"><span class="smrt-phone-input__processing-spinner svelte-1vixtb7" data-smrt-part="spinner"></span> <span class="svelte-1vixtb7">Processing...</span></div>`),Re=c(`<div class="smrt-phone-input__error-message svelte-1vixtb7" data-smrt-part="error" role="alert"> </div>`),ze=c(`<div class="smrt-phone-input__validation-error svelte-1vixtb7" data-smrt-part="error" role="alert"> </div>`),Be=c(`<div data-smrt-component="PhoneInput"><!> <div class="smrt-phone-input__input-wrapper svelte-1vixtb7" data-smrt-part="field"><input type="tel" data-smrt-part="input"/> <!></div> <!> <!> <!></div>`);function Ve(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,`(555) 555-5555`),f=x(o,`value`,15,``),p=x(o,`disabled`,3,!1),m=x(o,`required`,3,!1),h=`${c}-label`,v=ce(),T=be(),D=le(),O=S(null),A=S(!1),j=S(!1),M=S(null),I=0,L=r(()=>v.state.mode===`smrt`),R=r(()=>T.isInitializing),z=r(()=>T.downloadProgress);function V(e){if(typeof e!=`string`)return!1;if(!e)return!m();let t=e.replace(/\D/g,``);return t.length===10||t.length===11&&t[0]===`1`}let oe=r(()=>V(f())),se=r(()=>f()&&!e(oe));function U(e){f(e),o.onchange?.(f())}function W(e){let t=e.replace(/\D/g,``);return t.length===0?``:t.length<=3?`(${t}`:t.length<=6?`(${t.slice(0,3)}) ${t.slice(3)}`:t.length<=10?`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`:t.length===11&&t[0]===`1`?`+1 (${t.slice(1,4)}) ${t.slice(4,7)}-${t.slice(7)}`:`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6,10)}`}function G(e){let t={zero:`0`,oh:`0`,one:`1`,two:`2`,to:`2`,too:`2`,three:`3`,four:`4`,for:`4`,five:`5`,six:`6`,seven:`7`,eight:`8`,nine:`9`,niner:`9`},n=e.toLowerCase().replace(/^(my phone number is|my number is|phone number|number is|call me at)\s*/i,``).replace(/\b(area code|extension|ext)\b/gi,``).trim();for(let[e,r]of Object.entries(t))n=n.replace(RegExp(`\\b${e}\\b`,`gi`),r);return n=n.replace(/\bdouble\s*(\d)/gi,`$1$1`),n=n.replace(/\btriple\s*(\d)/gi,`$1$1$1`),n.replace(/\D/g,``)}function K(e){return W(G(e))}ne(()=>{if(D){let e={name:o.name,type:`phone`,get label(){return o.label},get description(){return o.description||`Phone number`},setValue:e=>{U(K(String(e??``)))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);if(t===``)return``;let n=G(t);return n.length!==10&&(n.length!==11||n[0]!==`1`)?t:W(n)||de()},getState:()=>({disabled:p()}),get constraints(){return{required:m()}},validateValue:e=>{if(typeof e!=`string`)return!1;if(e===``)return!m();let t=G(e);return t.length===10||t.length===11&&t[0]===`1`},validate:()=>V(f())};return D.registerField(e)}});async function fe(){if(!(!e(L)||p()||e(j))){F(M,null),I=Date.now(),F(A,!0);try{(!T.isReady||T.adapterType!==`whisper-wasm`)&&await T.initialize({type:`whisper-wasm`}),await T.start({continuous:!0,interimResults:!1})}catch(e){F(A,!1),F(M,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`PhoneInput: failed to start voice recording`,{field:o.name,error:e})}}}async function q(){if(!e(A))return;let t=Date.now()-I;if(F(A,!1),await T.stop(),t<500)return;let n=Date.now();for(;T.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=T.lastResult?.trim()||``;if(!r||r.length<2)F(M,`No speech detected. Hold longer and speak clearly.`);else{F(j,!0),F(M,null);try{U(K(r))}catch(e){F(M,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(j,!1)}}}function J(e){e.button===0&&fe()}function pe(){q()}function me(){q()}function he(e){e.preventDefault(),fe()}function ge(){q()}function _e(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(A)?q():fe())}function Y(e){let t=e.target;U(W(t.value))}var ve=Be();let X;var ye=w(ve),xe=e=>{ae(e,{get id(){return h},get for(){return o.name},get label(){return o.label},get required(){return m()}})};t(ye,e=>{o.label&&e(xe)});var Se=E(ye,2),Z=w(Se);b(Z);let Ce;C(Z,e=>F(O,e),()=>e(O));var we=E(Z,2),Q=t=>{var n=Pe();let r;N(t=>{r=a(n,1,`smrt-phone-input__mic-btn svelte-1vixtb7`,null,r,{"smrt-phone-input__active":e(A)}),n.disabled=p(),P(n,`aria-label`,t)},[()=>u(H[`ui.phone_input.mic_aria_label`])]),_(`keydown`,n,_e),_(`mousedown`,n,J),_(`mouseup`,n,pe),y(`mouseleave`,n,me),_(`touchstart`,n,he,void 0,!0),_(`touchend`,n,ge),g(t,n)};t(we,t=>{e(L)&&t(Q)}),s(Se);var Te=E(Se,2),Ee=t=>{var n=Fe(),r=E(w(n),2),i=k(r,!0);s(n),N(e=>l(i,e),[()=>u(H[`ui.phone_input.downloading_model`],{progress:e(z)})]),g(t,n)},De=e=>{var t=Ie();g(e,t)},Oe=e=>{var t=Le();g(e,t)};t(Te,t=>{e(R)?t(Ee):e(A)?t(De,1):e(j)&&t(Oe,2)});var $=E(Te,2),ke=t=>{var n=Re(),r=k(n,!0);N(()=>{P(n,`id`,`${o.name}-stt-error`),l(r,e(M))}),g(t,n)};t($,t=>{e(M)&&t(ke)});var Ae=E($,2),je=e=>{var t=ze(),n=k(t,!0);N(e=>{P(t,`id`,`${o.name}-error`),l(n,e)},[()=>u(H[`ui.phone_input.invalid`])]),g(e,t)};t(Ae,t=>{e(se)&&t(je)}),s(ve),N(()=>{X=a(ve,1,`smrt-phone-input__root svelte-1vixtb7`,null,X,{"smrt-phone-input__listening":e(A)}),P(Z,`id`,o.name),P(Z,`aria-labelledby`,o.label?h:void 0),P(Z,`name`,o.name),P(Z,`placeholder`,d()),te(Z,f()),Z.disabled=p()||e(j),Z.required=m(),Ce=a(Z,1,`smrt-phone-input__input svelte-1vixtb7`,null,Ce,{"smrt-phone-input__mode":e(L),"smrt-phone-input__invalid":e(se),"smrt-phone-input__processing":e(j)}),P(Z,`aria-invalid`,e(se)?`true`:void 0),P(Z,`aria-describedby`,e(se)?`${o.name}-error`:e(M)?`${o.name}-stt-error`:void 0)}),_(`input`,Z,Y),_(`mousedown`,Z,function(...t){(e(L)?J:void 0)?.apply(this,t)}),_(`mouseup`,Z,function(...t){(e(L)?pe:void 0)?.apply(this,t)}),y(`mouseleave`,Z,function(...t){(e(L)?me:void 0)?.apply(this,t)}),_(`touchstart`,Z,function(...t){(e(L)?he:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Z,function(...t){(e(L)?ge:void 0)?.apply(this,t)}),g(n,ve),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]),v([`input`,`keydown`,`click`]);var He=c(`<option disabled=""> </option>`),Ue=c(`<option> </option>`),We=c(`<span class="smrt-select-input__info svelte-17ub3c7" data-smrt-part="description"> </span>`),Ge=c(`<div data-smrt-component="SelectInput"><!> <div class="smrt-select-input__container svelte-17ub3c7" data-smrt-part="field"><div class="smrt-select-input__content svelte-17ub3c7" data-smrt-part="body"><select class="smrt-select-input__input svelte-17ub3c7" data-smrt-part="input"><!><!></select></div> <div class="smrt-select-input__trailing-icon svelte-17ub3c7" data-smrt-part="icon"><!></div> <div class="smrt-select-input__active-indicator svelte-17ub3c7" data-smrt-part="indicator"></div></div> <div class="smrt-select-input__supporting-text svelte-17ub3c7" data-smrt-part="description" aria-live="polite"><!></div></div>`);function Ke(o,c){let u=re();ee(c,!0);let d=x(c,`placeholder`,3,`Select an option...`),h=x(c,`value`,15,``),v=x(c,`disabled`,3,!1),b=x(c,`required`,3,!1),te=`${u}-label`,C=ce(),T=le(),D=S(!1),O=r(()=>c.options.some(e=>e.value===``)),A=r(()=>c.options.filter((e,t)=>c.options.findIndex(t=>t.value===e.value)===t)),j=r(()=>C.state.mode===`smrt`);function M(e){h(e),c.onchange?.(h())}ne(()=>{if(T){let e={name:c.name,type:`select`,get label(){return c.label},get description(){let e=c.options.map(e=>e.label).join(`, `);return c.description?`${c.description}. Options: ${e}`:`Options: ${e}`},setValue:e=>{let t=String(e??``),n=ye(t,c.options);n?M(n):c.options.some(e=>e.value===t)&&M(t)},getValue:()=>h(),prepareValue:e=>{let t=ue(e);return t.trim()===``?t:ye(t,c.options)??t},clear:()=>(M(``),!0),getState:()=>({disabled:v()}),get constraints(){return{required:b()}},get options(){return c.options.map(e=>({value:e.value,label:e.label}))},validateValue:e=>{let t=String(e??``);return t===``?!b():c.options.some(e=>e.value===t)},validate:()=>!b()||h().trim().length>0};return T.registerField(e)}});function L(e){let t=e.target;M(t.value)}var R=Ge();let z;var ie=w(R),B=e=>{ae(e,{get id(){return te},get for(){return c.name},get label(){return c.label},get required(){return b()}})};t(ie,e=>{c.label&&e(B)});var V=E(ie,2),oe=w(V),H=w(oe),U=w(H),W=e=>{var t=He(),n=k(t,!0);t.value=t.__value=``,N(()=>{I(t,!h()),l(n,d())}),g(e,t)};t(U,t=>{e(O)||t(W)});var G=E(U);f(G,17,()=>e(A),e=>e.value,(t,n)=>{var r=Ue(),i=k(r,!0),a={};N(()=>{l(i,e(n).label),a!==(a=e(n).value)&&(r.value=(r.__value=a)??``)}),g(t,r)}),s(H);var K;m(H),s(oe);var de=E(oe,2),fe=w(de);se(fe,{name:`chevron-down`,size:24}),s(de),p(2),s(V);var q=E(V,2),J=w(q),pe=e=>{var t=We(),n=k(t,!0);N(()=>l(n,c.description)),g(e,t)};t(J,t=>{c.description&&e(D)&&t(pe)}),s(q),s(R),N(()=>{z=a(R,1,`smrt-select-input__root svelte-17ub3c7`,null,z,{"smrt-select-input__mode":e(j),"smrt-select-input__focused":e(D),"smrt-select-input__disabled":v(),"smrt-select-input__has-value":!!h()}),P(H,`id`,c.name),P(H,`aria-labelledby`,c.label?te:void 0),P(H,`name`,c.name),H.disabled=v(),H.required=b(),P(H,`aria-describedby`,`${c.name}-supporting`),K!==(K=h())&&(H.value=(H.__value=K)??``,n(H,K)),P(q,`id`,`${c.name}-supporting`)}),_(`change`,H,L),y(`focus`,H,()=>F(D,!0)),y(`blur`,H,()=>F(D,!1)),g(o,R),i()}v([`change`]);var qe=c(`<button type="button" data-smrt-part="trigger"><!></button>`),Je=c(`<span class="smrt-textarea-input__info svelte-1wen309" data-smrt-part="description"> </span>`),Ye=c(`<span class="smrt-textarea-input__success svelte-1wen309" data-smrt-part="status">Recording...</span>`),Xe=c(`<span class="smrt-textarea-input__info svelte-1wen309" data-smrt-part="description">Processing...</span>`),Ze=c(`<span class="smrt-textarea-input__error svelte-1wen309" data-smrt-part="error"> </span>`),Qe=c(`<div data-smrt-component="TextareaInput"><!> <div class="smrt-textarea-input__container svelte-1wen309" data-smrt-part="field"><div class="smrt-textarea-input__content svelte-1wen309" data-smrt-part="body"><textarea class="smrt-textarea-input__input svelte-1wen309" data-smrt-part="input"></textarea></div> <!> <div class="smrt-textarea-input__active-indicator svelte-1wen309" data-smrt-part="indicator"></div></div> <div class="smrt-textarea-input__supporting-text svelte-1wen309" data-smrt-part="description" aria-live="polite"><!></div></div>`);function $e(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`placeholder`,3,``),f=x(o,`value`,15,``),m=x(o,`rows`,3,4),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),b=x(o,`appendMode`,3,!1),T=`${c}-label`,O=ce(),A=be(),j=le(),M=S(null),I=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>O.state.mode===`smrt`),K=r(()=>A.isInitializing),de=r(()=>A.downloadProgress);function fe(e){f(e),o.onchange?.(f())}ne(()=>{if(j){let e={name:o.name,type:`textarea`,get label(){return o.label},get description(){return o.description},setValue:e=>{fe(String(e??``))},getValue:()=>f(),prepareValue:e=>{let t=ue(e);return b()&&f()?`${f()}\n${t}`:t},prepareReviewedValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>!v()||String(e??``).trim().length>0,validate:()=>!v()||f().trim().length>0};return j.registerField(e)}});async function q(){if(!(!e(G)||h()||e(z))){oe=f(),F(U,null),W=Date.now(),F(I,!0);try{(!A.isReady||A.adapterType!==`whisper-wasm`)&&await A.initialize({type:`whisper-wasm`}),await A.start({continuous:!0,interimResults:!1})}catch(e){F(I,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextareaInput: failed to start voice recording`,{field:o.name,error:e})}}}async function J(){if(!e(I))return;let t=Date.now()-W;if(F(I,!1),await A.stop(),t<500)return;let n=Date.now();for(;A.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=A.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=X(r);b()&&oe?fe(`${oe}\n${e}`):fe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function pe(e){e.button===0&&q()}function me(){J()}function he(){J()}function ge(e){e.preventDefault(),q()}function _e(){J()}function Y(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(I)?J():q())}function ve(e){let t=e.target;fe(t.value)}var ye=Qe();let xe;var Se=w(ye),Z=e=>{ae(e,{get id(){return T},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Se,e=>{o.label&&e(Z)});var Ce=E(Se,2),we=w(Ce),Q=w(we);L(Q),C(Q,e=>F(M,e),()=>e(M)),s(we);var Te=E(we,2),Ee=t=>{var n=qe();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`smrt-textarea-input__mic-btn svelte-1wen309`,null,r,{"smrt-textarea-input__active":e(I)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.textarea_input.mic_aria_label`])]),_(`keydown`,n,Y),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&q()}),_(`mouseup`,n,me),y(`mouseleave`,n,he),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),q()},void 0,!0),_(`touchend`,n,_e),g(t,n)};t(Te,t=>{e(G)&&t(Ee)}),p(2),s(Ce);var De=E(Ce,2),Oe=w(De),$=t=>{var n=Je(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.textarea_input.downloading_model`],{progress:e(de)})]),g(t,n)},ke=e=>{var t=Ye();g(e,t)},Ae=e=>{var t=Xe();g(e,t)},je=t=>{var n=Ze(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Me=e=>{var t=Je(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Oe,t=>{e(K)?t($):e(I)?t(ke,1):e(z)?t(Ae,2):e(U)?t(je,3):o.description&&e(V)&&t(Me,4)}),s(De),s(ye),N(()=>{xe=a(ye,1,`smrt-textarea-input__root smrt-textarea-input__multiline svelte-1wen309`,null,xe,{"smrt-textarea-input__mode":e(G),"smrt-textarea-input__focused":e(V),"smrt-textarea-input__disabled":h(),"smrt-textarea-input__has-value":!!f(),"smrt-textarea-input__listening":e(I)}),P(Q,`id`,o.name),P(Q,`aria-labelledby`,o.label?T:void 0),P(Q,`name`,o.name),P(Q,`placeholder`,e(V)?d():``),te(Q,f()),P(Q,`rows`,m()),Q.disabled=h()||e(z),Q.required=v(),P(Q,`aria-invalid`,e(U)?`true`:void 0),P(Q,`aria-describedby`,`${o.name}-supporting`),P(De,`id`,`${o.name}-supporting`)}),_(`input`,Q,ve),y(`focus`,Q,()=>F(V,!0)),y(`blur`,Q,()=>F(V,!1)),_(`mousedown`,Q,function(...t){(e(G)?pe:void 0)?.apply(this,t)}),_(`mouseup`,Q,function(...t){(e(G)?me:void 0)?.apply(this,t)}),y(`mouseleave`,Q,function(...t){(e(G)?he:void 0)?.apply(this,t)}),_(`touchstart`,Q,function(...t){(e(G)?ge:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,Q,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),g(n,ye),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`keydown`]);var et=c(`<button type="button" data-smrt-part="trigger"><!></button>`),tt=c(`<span class="smrt-text-input__info svelte-q632gy" data-smrt-part="description"> </span>`),nt=c(`<span class="smrt-text-input__success svelte-q632gy" data-smrt-part="status">Recording...</span>`),rt=c(`<span class="smrt-text-input__info svelte-q632gy" data-smrt-part="description">Processing...</span>`),it=c(`<span class="smrt-text-input__error svelte-q632gy" data-smrt-part="error"> </span>`),at=c(`<div data-smrt-component="TextInput"><!> <div class="smrt-text-input__container svelte-q632gy" data-smrt-part="field"><div class="smrt-text-input__content svelte-q632gy" data-smrt-part="body"><input class="smrt-text-input__input svelte-q632gy" data-smrt-part="input"/></div> <!> <div class="smrt-text-input__active-indicator svelte-q632gy" data-smrt-part="indicator"></div></div> <div class="smrt-text-input__supporting-text svelte-q632gy" data-smrt-part="description" aria-live="polite"><!></div></div>`);function ot(n,o){let c=re();ee(o,!0);let{t:u}=ie(),d=x(o,`type`,3,`text`),f=x(o,`placeholder`,3,``),m=x(o,`value`,15,``),h=x(o,`disabled`,3,!1),v=x(o,`required`,3,!1),T=x(o,`appendMode`,3,!1),O=`${c}-label`,A=ce(),j=be(),M=le(),I=S(null),L=S(!1),z=S(!1),V=S(!1),oe=``,U=S(null),W=0,G=r(()=>A.state.mode===`smrt`),K=r(()=>j.isInitializing),de=r(()=>j.downloadProgress);function fe(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}let q=r(()=>d()!==`email`||!m()||fe(m())),J=r(()=>d()===`email`&&m()&&!e(q));function pe(e){m(e),o.onchange?.(m())}ne(()=>{if(M){let t={name:o.name,get type(){return d()===`email`?`email`:`text`},get label(){return o.label},get description(){return o.description},setValue:e=>{pe(String(e??``))},getValue:()=>m(),prepareValue:ue,getState:()=>({disabled:h()}),get constraints(){return{required:v()}},validateValue:e=>{let t=String(e??``);return(!v()||t.trim().length>0)&&(d()!==`email`||t.length===0||fe(t))},validate:()=>(!v()||m().trim().length>0)&&(d()!==`email`||m().length===0||e(q))};return M.registerField(t)}});async function me(){if(!(!e(G)||h()||e(z))){oe=m(),F(U,null),W=Date.now(),F(L,!0);try{(!j.isReady||j.adapterType!==`whisper-wasm`)&&await j.initialize({type:`whisper-wasm`}),await j.start({continuous:!0,interimResults:!1})}catch(e){F(L,!1),F(U,e instanceof Error?e.message:`Could not start voice input`,!0),B.error(`TextInput: failed to start voice recording`,{field:o.name,error:e})}}}async function he(){if(!e(L))return;let t=Date.now()-W;if(F(L,!1),await j.stop(),t<500)return;let n=Date.now();for(;j.isListening&&Date.now()-n<3e3;)await new Promise(e=>setTimeout(e,100));await new Promise(e=>setTimeout(e,100));let r=j.lastResult?.trim()||``;if(!r||r.length<2)F(U,`No speech detected. Hold longer and speak clearly.`);else{F(z,!0),F(U,null);try{let e=d()===`email`?ve(r):X(r);T()&&oe?pe(`${oe} ${e}`):pe(e)}catch(e){F(U,e instanceof Error?e.message:`Failed to process speech`,!0)}finally{F(z,!1)}}}function ge(e){e.button===0&&me()}function _e(){he()}function Y(){he()}function ye(e){e.preventDefault(),me()}function xe(){he()}function Se(e){e.preventDefault(),e.stopPropagation()}function Z(t){(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(L)?he():me())}function Ce(e){let t=e.target;pe(t.value)}var we=at();let Q;var Te=w(we),Ee=e=>{ae(e,{get id(){return O},get for(){return o.name},get label(){return o.label},get required(){return v()}})};t(Te,e=>{o.label&&e(Ee)});var De=E(Te,2),Oe=w(De),$=w(Oe);b($),C($,e=>F(I,e),()=>e(I)),s(Oe);var ke=E(Oe,2),Ae=t=>{var n=et();let r;var i=w(n);se(i,{name:`mic`,size:20}),s(n),D(n,e=>R?.(e)),N(t=>{r=a(n,1,`smrt-text-input__mic-btn svelte-q632gy`,null,r,{"smrt-text-input__active":e(L)}),n.disabled=h(),P(n,`aria-label`,t)},[()=>u(H[`ui.text_input.mic_aria_label`])]),_(`click`,n,Se),_(`keydown`,n,Z),_(`mousedown`,n,e=>{e.stopPropagation(),e.button===0&&me()}),_(`mouseup`,n,_e),y(`mouseleave`,n,Y),_(`touchstart`,n,e=>{e.stopPropagation(),e.preventDefault(),me()},void 0,!0),_(`touchend`,n,xe),g(t,n)};t(ke,t=>{e(G)&&t(Ae)}),p(2),s(De);var je=E(De,2),Me=w(je),Ne=t=>{var n=tt(),r=k(n,!0);N(e=>l(r,e),[()=>u(H[`ui.text_input.downloading_model`],{progress:e(de)})]),g(t,n)},Pe=e=>{var t=nt();g(e,t)},Fe=e=>{var t=rt();g(e,t)},Ie=t=>{var n=it(),r=k(n,!0);N(()=>l(r,e(U))),g(t,n)},Le=e=>{var t=it(),n=k(t,!0);N(e=>l(n,e),[()=>u(H[`ui.text_input.invalid_email`])]),g(e,t)},Re=e=>{var t=tt(),n=k(t,!0);N(()=>l(n,o.description)),g(e,t)};t(Me,t=>{e(K)?t(Ne):e(L)?t(Pe,1):e(z)?t(Fe,2):e(U)?t(Ie,3):e(J)?t(Le,4):o.description&&e(V)&&t(Re,5)}),s(je),s(we),N(()=>{Q=a(we,1,`smrt-text-input__root svelte-q632gy`,null,Q,{"smrt-text-input__mode":e(G),"smrt-text-input__focused":e(V),"smrt-text-input__invalid":e(J),"smrt-text-input__disabled":h(),"smrt-text-input__has-value":!!m(),"smrt-text-input__listening":e(L)}),P($,`id`,o.name),P($,`aria-labelledby`,o.label?O:void 0),P($,`name`,o.name),P($,`type`,d()),P($,`placeholder`,e(V)?f():``),te($,m()),$.disabled=h()||e(z),$.required=v(),P($,`aria-invalid`,e(J)?`true`:void 0),P($,`aria-describedby`,`${o.name}-supporting`),P(je,`id`,`${o.name}-supporting`)}),_(`input`,$,Ce),y(`focus`,$,()=>F(V,!0)),y(`blur`,$,()=>F(V,!1)),_(`mousedown`,$,function(...t){(e(G)?ge:void 0)?.apply(this,t)}),_(`mouseup`,$,function(...t){(e(G)?_e:void 0)?.apply(this,t)}),y(`mouseleave`,$,function(...t){(e(G)?Y:void 0)?.apply(this,t)}),_(`touchstart`,$,function(...t){(e(G)?ye:void 0)?.apply(this,t)},void 0,!0),_(`touchend`,$,function(...t){(e(G)?xe:void 0)?.apply(this,t)}),g(n,we),i()}v([`input`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`,`keydown`]);function st(e){return typeof e!=`number`||!Number.isFinite(e)?null:Number((e*100).toFixed(4))}function ct(e){return e===null||!Number.isFinite(e)?null:Number((e/100).toFixed(6))}export{Ke as a,Ae as c,$e as i,De as l,ct as n,Ve as o,ot as r,Ne as s,st as t,Y as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BGpjZKOE.js","./BaNbYf_w.js","./eBF8D7GD.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{$ as e,B as t,Ct as n,Dt as r,E as i,Et as a,F as o,Ft as s,G as c,H as l,I as u,J as d,K as f,L as p,Lt as m,Mt as h,Ot as g,P as _,Pt as v,R as y,Rt as b,T as x,U as S,W as C,X as w,Y as T,Z as E,_ as D,_t as O,a as k,bt as A,ct as j,d as M,dt as N,f as P,ft as F,gt as I,ht as L,k as ee,kt as R,lt as te,mt as z,n as ne,nt as re,ot as ie,pt as B,q as ae,r as V,rt as oe,st as H,tt as se,v as U,vt as W,xt as ce,yt as le,z as G}from"./DG3qFFTE.js";import{t as ue}from"./BaNbYf_w.js";import"./xihTtKlq.js";import{r as de}from"./Cekjnrta.js";import{a as K,t as q}from"./Bq8E3AWP.js";import{B as fe,Mt as pe,Pt as J,R as me,W as he}from"./BLCPylcV.js";import{n as Y}from"./denq4QT7.js";import{C as X,S as ge,b as _e,x as ve}from"./Cfex8mXp.js";import{n as ye,r as be}from"./D3syEjNq.js";import{i as xe}from"./Cvsgnp6s.js";import{_ as Se,b as Ce,c as we,d as Te,g as Ee,h as De,i as Oe,m as ke,n as Ae,p as je,s as Me}from"./C65O26Eu.js";import{n as Ne}from"./BEgzIsEU.js";import{n as Pe,r as Fe}from"./C3BPmBbi.js";import{c as Ie,t as Le}from"./eBF8D7GD.js";import{_ as Re,a as ze,g as Be,h as Ve,l as He,n as Ue,p as We,u as Ge}from"./D37Tqc2g.js";import{Q as Z,b as Ke,t as qe}from"./aq3-57l6.js";import{C as Je,_ as Ye,h as Xe,i as Ze,m as Qe,o as $e,r as et,t as tt,u as nt}from"./BR7yw_9X.js";import{n as rt,t as it}from"./DeQ96uco.js";function at(e,t){let n=t.trim();if(!n)return;let r=e.value,i=typeof document<`u`&&document.activeElement===e,a=e.selectionStart??r.length,o=e.selectionEnd??r.length;!i&&a===0&&o===0&&r.length>0&&(a=r.length,o=r.length);let s=r.slice(0,a),c=r.slice(o),l=`${s.length>0&&!/\s$/.test(s)?` `:``}${n}${/^[\p{L}\p{N}]/u.test(c)?` `:``}`;e.value=`${s}${l}${c}`;let u=s.length+l.length;try{e.setSelectionRange(u,u)}catch{}e.dispatchEvent(new Event(`input`,{bubbles:!0}))}function ot(e){let t=e,n=null,r=null,i=0,a=0,o=null,s=!1,c=!1,l=null;function u(){n&&clearTimeout(n),n=null}function d(){u(),r=null,o=null,s=!1}function f(){n&&(d(),t.onCancel?.())}function p(e){let n=!t.filter||t.filter(e);return n?n===!0?e.target instanceof Element?e.target:null:n:null}function m(){c=!0,l&&clearTimeout(l),l=setTimeout(()=>{c=!1,l=null},400)}return{handlePointerDown(e){if(t.disabled||!e.isPrimary||e.pointerType===`mouse`&&e.button!==0)return;let c=p(e);if(!c)return;d(),r=e.pointerId,i=e.clientX,a=e.clientY,o={target:c,pointerType:e.pointerType||`mouse`,clientX:e.clientX,clientY:e.clientY},t.onPressStart?.(o);let l=o;n=setTimeout(()=>{n=null,s=!0,t.onLongPress(l)},t.delay??500)},handlePointerMove(e){if(!n||e.pointerId!==r)return;let o=t.moveTolerance??10;Math.hypot(e.clientX-i,e.clientY-a)>o&&f()},handlePointerUp(e){if(e.pointerId===r){if(n)f();else if(s&&o){let e=o;m(),d(),t.onRelease?.(e)}else d()}},handlePointerCancel(e){if(e.pointerId===r){if(n)f();else if(s&&o){let e=o;d(),t.onRelease?.(e)}else d()}},handleDragStart(){f()},handleContextMenu(e){t.preventContextMenu&&(n||s)&&e.preventDefault()},handleClick(e){c&&(c=!1,l&&clearTimeout(l),l=null,e.preventDefault(),e.stopPropagation())},cancel(){d()},update(e){t=e,e.disabled&&d()},get pending(){return n!==null},get fired(){return s}}}function st(e,t){let n=ot(t),r=e=>n.handlePointerDown(e),i=e=>n.handlePointerMove(e),a=e=>n.handlePointerUp(e),o=e=>n.handlePointerCancel(e),s=()=>n.handleDragStart(),c=e=>n.handleContextMenu(e),l=e=>n.handleClick(e);return e.addEventListener(`pointerdown`,r),e.addEventListener(`dragstart`,s),e.addEventListener(`contextmenu`,c),e.addEventListener(`click`,l,!0),window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,o),{update(e){n.update(e)},destroy(){n.cancel(),e.removeEventListener(`pointerdown`,r),e.removeEventListener(`dragstart`,s),e.removeEventListener(`contextmenu`,c),e.removeEventListener(`click`,l,!0),window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,o)}}}var ct=new WeakMap;async function lt(e,t={}){let n=Math.max(0,t.quietMs??120),r=Math.max(0,t.timeoutMs??5e3),i=Date.now(),a=()=>Math.max(0,r-(Date.now()-i)),o=e=>new Promise(t=>setTimeout(t,e));for(;;){let n=ct.get(e);if(!n||n.size===0||t.signal?.aborted)break;let r=a();if(r===0)return;await Promise.race([Promise.all([...n]),o(r)])}t.signal?.aborted||a()===0||await new Promise(r=>{let i=null,o=[],s=()=>{i&&clearTimeout(i),clearTimeout(l);for(let e of o)e();t.signal?.removeEventListener(`abort`,s),r()},c=()=>{i&&clearTimeout(i),i=setTimeout(s,n)},l=setTimeout(s,a());t.signal?.addEventListener(`abort`,s,{once:!0}),o.push(e.subscribe(e=>{(e.type===`registered`||e.type===`unregistered`)&&c()}));for(let e of t.alsoWatch??[]){let t=e?.subscribe?.(()=>c());t&&o.push(t)}c()})}async function ut(e={}){let t=e.window??(typeof window<`u`?window:void 0),n=e.navigator??(typeof navigator<`u`?navigator:void 0);return!t||!(`SpeechRecognition`in t)&&!(`webkitSpeechRecognition`in t)?`missing`:n&&`brave`in n&&n.brave||/\bElectron\//.test(n?.userAgent??``)?`unreliable`:`works`}function dt(e){return new Worker(new URL(`../workers/local-speech.worker-BzGX7Qdn.js`,import.meta.url).href,{name:e?.name})}var ft=2**28,pt=16,mt=.95;function ht(e){if(e===0)return 1;let t=Math.PI*e;return Math.sin(t)/t}function gt(e,t,n){for(let[e,r]of[[`fromRate`,t],[`toRate`,n]])if(!Number.isFinite(r)||r<=0)throw new Ie(`invalid_argument`,`${e} must be a positive finite number (got ${String(r)})`);let r=Math.floor(e.length*n/t);if(r>ft)throw new Ie(`invalid_argument`,`resampled output would be ${r} samples; the limit is ${ft}`);if(t===n)return e.slice();let i=new Float32Array(r),a=t/n,o=a>1?mt/a:1,s=pt/o,c=e.length-1;for(let t=0;t<r;t+=1){let n=t*a,r=Math.max(0,Math.ceil(n-s)),l=Math.min(c,Math.floor(n+s)),u=0,d=0;for(let t=r;t<=l;t+=1){let r=t-n,i=.5+.5*Math.cos(Math.PI*r/s),a=o*ht(o*r)*i;u+=a*e[t],d+=a}i[t]=d===0?0:u/d}return i}var _t={silenceMs:800,minSpeechMs:150,preRollMs:300,maxUtteranceMs:3e4,sensitivity:.5,calibrateMs:300},vt=.0015,yt=.003,bt=.006,xt=.2,St=.02,Ct=2e3,wt=250;function Tt(e,t,n){return Math.min(n,Math.max(t,e))}function Et(e={}){let t=(e,t,n)=>typeof e==`number`&&Number.isFinite(e)?Math.max(n,e):t;return{silenceMs:t(e.silenceMs,_t.silenceMs,20),minSpeechMs:t(e.minSpeechMs,_t.minSpeechMs,0),preRollMs:t(e.preRollMs,_t.preRollMs,0),maxUtteranceMs:t(e.maxUtteranceMs,_t.maxUtteranceMs,1e3),sensitivity:Tt(typeof e.sensitivity==`number`&&Number.isFinite(e.sensitivity)?e.sensitivity:_t.sensitivity,0,1),calibrateMs:t(e.calibrateMs,_t.calibrateMs,0)}}function Dt(e){let t=e.length;if(t===0)return 0;let n=0;for(let r=0;r<t;r++){let t=e[r];n+=t*t}return Math.sqrt(n/t)}function Ot(e={}){let t=Et(e),n=6-4*t.sensitivity,r=.02-.015*t.sensitivity,i=yt,a=0,o=[],s=!1,c=0,l=0,u=0,d=()=>Math.max(i*n,r),f=()=>Math.max(d()*.6,i*1.5),p=()=>{s=!1,c=0,l=0,u=0};return{get speaking(){return s},get noiseFloor(){return i},get threshold(){return d()},push(e,n=20){let r=[],m=Number.isFinite(e)?Math.max(0,e):0,h=Tt(m/(d()*3),0,1),g=a<t.calibrateMs;if(g&&(a+=n,!s)){o.push(m);let e=[...o].sort((e,t)=>e-t);i=Tt(e[Math.min(e.length-1,Math.floor(e.length*xt))]??yt,vt,bt)}if(!s){if(m>d())c+=n,c>=t.minSpeechMs&&(s=!0,l=0,u=c,r.push({type:`start`,leadMs:t.preRollMs+c}),c=0);else if(g)c=0;else{c=0;let e=n/Ct*(m<i?4:1);i=Tt(i+(m-i)*Math.min(1,e),vt,St)}return{events:r,level:h,speaking:s}}return u+=n,m>f()?l=0:l+=n,l>=t.silenceMs?(r.push({type:`end`,reason:`silence`,trailingSilenceMs:l}),p()):u>=t.maxUtteranceMs&&(r.push({type:`split`}),u=0,l=0),{events:r,level:h,speaking:s}},flush(){let e=[];return s&&e.push({type:`end`,reason:`flush`,trailingSilenceMs:l}),p(),e}}}function kt(e){let t=Et(e),n=Ot(t),r=Math.max(1,Math.round(e.sampleRate*20/1e3)),i=r/e.sampleRate*1e3,a=Math.ceil((t.preRollMs+t.minSpeechMs)/i)+1,o=[],s=new Float32Array,c=null,l=!1,u=(t,n,r)=>{let a=Math.max(0,Math.floor((r-wt)/i)),o=t.slice(0,Math.max(1,t.length-a)),s=0;for(let e of o)s+=e.length;let c=new Float32Array(s),l=0;for(let e of o)c.set(e,l),l+=e.length;e.onUtterance({pcm:c,sampleRate:e.sampleRate,durationMs:s/e.sampleRate*1e3,reason:n})},d=t=>{t!==l&&(l=t,e.onSpeaking?.(t))},f=s=>{let l=n.push(Dt(s),i);e.onLevel?.(l.level),o.push(s),o.length>a&&o.shift(),c&&c.push(s);for(let e of l.events)if(e.type===`start`){c=[...o];let e=Math.ceil(t.preRollMs/i),n=Math.max(0,o.length-Math.ceil(t.minSpeechMs/i));for(let t=n;t<e;t++)c.unshift(new Float32Array(r))}else if(e.type===`end`){let t=c??[];c=null,o.length=0,t.length>0&&u(t,e.reason,e.trailingSilenceMs)}else if(e.type===`split`){let e=c??[];c=[],e.length>0&&u(e,`max`,0)}d(n.speaking)};return{get speaking(){return n.speaking},segmenter:n,push(e){let t=e;s.length>0&&(t=new Float32Array(s.length+e.length),t.set(s,0),t.set(e,s.length));let n=0;for(;n+r<=t.length;)f(t.slice(n,n+r)),n+=r;s=t.slice(n)},flush(){let t=n.flush();for(let e of t)e.type===`end`&&c&&c.length>0&&u(c,`flush`,e.trailingSilenceMs);c=null,o.length=0,s=new Float32Array,d(!1),e.onLevel?.(0)},discard(){n.flush(),c=null,o.length=0,s=new Float32Array,d(!1),e.onLevel?.(0)}}}var At=44,jt=4294967295,Mt=1;function Nt(e){let t=new Int16Array(e.length);for(let n=0;n<e.length;n+=1){let r=e[n];Number.isNaN(r)||(t[n]=Math.min(32767,Math.round((r>1?1:r<-1?-1:r)*32768)))}return t}function Pt(e,t){if(!Number.isInteger(e)||e<1||e*2>jt)throw new Ie(`invalid_argument`,`${t} must be a positive integer sample rate (got ${String(e)})`)}function Ft(e,t,n){for(let r=0;r<n.length;r+=1)e.setUint8(t+r,n.charCodeAt(r))}function It(e,t){Pt(t,`sampleRate`);let n=e.length*2;if(n+At-8>jt)throw new Ie(`invalid_argument`,`too many samples for a single WAV (4 GiB limit)`);let r=e instanceof Int16Array?e:Nt(e),i=new Uint8Array(At+n),a=new DataView(i.buffer);Ft(a,0,`RIFF`),a.setUint32(4,36+n,!0),Ft(a,8,`WAVE`),Ft(a,12,`fmt `),a.setUint32(16,16,!0),a.setUint16(20,Mt,!0),a.setUint16(22,1,!0),a.setUint32(24,t,!0),a.setUint32(28,t*2,!0),a.setUint16(32,2,!0),a.setUint16(34,16,!0),Ft(a,36,`data`),a.setUint32(40,n,!0);for(let e=0;e<r.length;e+=1)a.setInt16(At+e*2,r[e],!0);return i}var Lt=`hv-pcm-tap`,Rt=`
|
|
2
|
+
import{$ as e,B as t,Ct as n,Dt as r,E as i,Et as a,F as o,Ft as s,G as c,H as l,I as u,J as d,K as f,L as p,Lt as m,Mt as h,Ot as g,P as _,Pt as v,R as y,Rt as b,T as x,U as S,W as C,X as w,Y as T,Z as E,_ as D,_t as O,a as k,bt as A,ct as j,d as M,dt as N,f as P,ft as F,gt as I,ht as L,k as ee,kt as R,lt as te,mt as z,n as ne,nt as re,ot as ie,pt as B,q as ae,r as V,rt as oe,st as H,tt as se,v as U,vt as W,xt as ce,yt as le,z as G}from"./DG3qFFTE.js";import{t as ue}from"./BaNbYf_w.js";import"./xihTtKlq.js";import{r as de}from"./Cekjnrta.js";import{a as K,t as q}from"./Bq8E3AWP.js";import{B as fe,Mt as pe,Pt as J,R as me,W as he}from"./D3e2k3cc.js";import{n as Y}from"./denq4QT7.js";import{C as X,S as ge,b as _e,x as ve}from"./CmvA7uJQ.js";import{n as ye,r as be}from"./D3syEjNq.js";import{i as xe}from"./QN425fRi.js";import{_ as Se,b as Ce,c as we,d as Te,g as Ee,h as De,i as Oe,m as ke,n as Ae,p as je,s as Me}from"./C65O26Eu.js";import{n as Ne}from"./BKyd-7tf.js";import{n as Pe,r as Fe}from"./C3BPmBbi.js";import{c as Ie,t as Le}from"./eBF8D7GD.js";import{_ as Re,a as ze,g as Be,h as Ve,l as He,n as Ue,p as We,u as Ge}from"./C3_gJJeZ.js";import{Q as Z,b as Ke,t as qe}from"./BJmbWKnL.js";import{C as Je,_ as Ye,h as Xe,i as Ze,m as Qe,o as $e,r as et,t as tt,u as nt}from"./BhTbAGNT.js";import{n as rt,t as it}from"./DyJpiY9N.js";function at(e,t){let n=t.trim();if(!n)return;let r=e.value,i=typeof document<`u`&&document.activeElement===e,a=e.selectionStart??r.length,o=e.selectionEnd??r.length;!i&&a===0&&o===0&&r.length>0&&(a=r.length,o=r.length);let s=r.slice(0,a),c=r.slice(o),l=`${s.length>0&&!/\s$/.test(s)?` `:``}${n}${/^[\p{L}\p{N}]/u.test(c)?` `:``}`;e.value=`${s}${l}${c}`;let u=s.length+l.length;try{e.setSelectionRange(u,u)}catch{}e.dispatchEvent(new Event(`input`,{bubbles:!0}))}function ot(e){let t=e,n=null,r=null,i=0,a=0,o=null,s=!1,c=!1,l=null;function u(){n&&clearTimeout(n),n=null}function d(){u(),r=null,o=null,s=!1}function f(){n&&(d(),t.onCancel?.())}function p(e){let n=!t.filter||t.filter(e);return n?n===!0?e.target instanceof Element?e.target:null:n:null}function m(){c=!0,l&&clearTimeout(l),l=setTimeout(()=>{c=!1,l=null},400)}return{handlePointerDown(e){if(t.disabled||!e.isPrimary||e.pointerType===`mouse`&&e.button!==0)return;let c=p(e);if(!c)return;d(),r=e.pointerId,i=e.clientX,a=e.clientY,o={target:c,pointerType:e.pointerType||`mouse`,clientX:e.clientX,clientY:e.clientY},t.onPressStart?.(o);let l=o;n=setTimeout(()=>{n=null,s=!0,t.onLongPress(l)},t.delay??500)},handlePointerMove(e){if(!n||e.pointerId!==r)return;let o=t.moveTolerance??10;Math.hypot(e.clientX-i,e.clientY-a)>o&&f()},handlePointerUp(e){if(e.pointerId===r){if(n)f();else if(s&&o){let e=o;m(),d(),t.onRelease?.(e)}else d()}},handlePointerCancel(e){if(e.pointerId===r){if(n)f();else if(s&&o){let e=o;d(),t.onRelease?.(e)}else d()}},handleDragStart(){f()},handleContextMenu(e){t.preventContextMenu&&(n||s)&&e.preventDefault()},handleClick(e){c&&(c=!1,l&&clearTimeout(l),l=null,e.preventDefault(),e.stopPropagation())},cancel(){d()},update(e){t=e,e.disabled&&d()},get pending(){return n!==null},get fired(){return s}}}function st(e,t){let n=ot(t),r=e=>n.handlePointerDown(e),i=e=>n.handlePointerMove(e),a=e=>n.handlePointerUp(e),o=e=>n.handlePointerCancel(e),s=()=>n.handleDragStart(),c=e=>n.handleContextMenu(e),l=e=>n.handleClick(e);return e.addEventListener(`pointerdown`,r),e.addEventListener(`dragstart`,s),e.addEventListener(`contextmenu`,c),e.addEventListener(`click`,l,!0),window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,o),{update(e){n.update(e)},destroy(){n.cancel(),e.removeEventListener(`pointerdown`,r),e.removeEventListener(`dragstart`,s),e.removeEventListener(`contextmenu`,c),e.removeEventListener(`click`,l,!0),window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,o)}}}var ct=new WeakMap;async function lt(e,t={}){let n=Math.max(0,t.quietMs??120),r=Math.max(0,t.timeoutMs??5e3),i=Date.now(),a=()=>Math.max(0,r-(Date.now()-i)),o=e=>new Promise(t=>setTimeout(t,e));for(;;){let n=ct.get(e);if(!n||n.size===0||t.signal?.aborted)break;let r=a();if(r===0)return;await Promise.race([Promise.all([...n]),o(r)])}t.signal?.aborted||a()===0||await new Promise(r=>{let i=null,o=[],s=()=>{i&&clearTimeout(i),clearTimeout(l);for(let e of o)e();t.signal?.removeEventListener(`abort`,s),r()},c=()=>{i&&clearTimeout(i),i=setTimeout(s,n)},l=setTimeout(s,a());t.signal?.addEventListener(`abort`,s,{once:!0}),o.push(e.subscribe(e=>{(e.type===`registered`||e.type===`unregistered`)&&c()}));for(let e of t.alsoWatch??[]){let t=e?.subscribe?.(()=>c());t&&o.push(t)}c()})}async function ut(e={}){let t=e.window??(typeof window<`u`?window:void 0),n=e.navigator??(typeof navigator<`u`?navigator:void 0);return!t||!(`SpeechRecognition`in t)&&!(`webkitSpeechRecognition`in t)?`missing`:n&&`brave`in n&&n.brave||/\bElectron\//.test(n?.userAgent??``)?`unreliable`:`works`}function dt(e){return new Worker(new URL(`../workers/local-speech.worker-BzGX7Qdn.js`,import.meta.url).href,{name:e?.name})}var ft=2**28,pt=16,mt=.95;function ht(e){if(e===0)return 1;let t=Math.PI*e;return Math.sin(t)/t}function gt(e,t,n){for(let[e,r]of[[`fromRate`,t],[`toRate`,n]])if(!Number.isFinite(r)||r<=0)throw new Ie(`invalid_argument`,`${e} must be a positive finite number (got ${String(r)})`);let r=Math.floor(e.length*n/t);if(r>ft)throw new Ie(`invalid_argument`,`resampled output would be ${r} samples; the limit is ${ft}`);if(t===n)return e.slice();let i=new Float32Array(r),a=t/n,o=a>1?mt/a:1,s=pt/o,c=e.length-1;for(let t=0;t<r;t+=1){let n=t*a,r=Math.max(0,Math.ceil(n-s)),l=Math.min(c,Math.floor(n+s)),u=0,d=0;for(let t=r;t<=l;t+=1){let r=t-n,i=.5+.5*Math.cos(Math.PI*r/s),a=o*ht(o*r)*i;u+=a*e[t],d+=a}i[t]=d===0?0:u/d}return i}var _t={silenceMs:800,minSpeechMs:150,preRollMs:300,maxUtteranceMs:3e4,sensitivity:.5,calibrateMs:300},vt=.0015,yt=.003,bt=.006,xt=.2,St=.02,Ct=2e3,wt=250;function Tt(e,t,n){return Math.min(n,Math.max(t,e))}function Et(e={}){let t=(e,t,n)=>typeof e==`number`&&Number.isFinite(e)?Math.max(n,e):t;return{silenceMs:t(e.silenceMs,_t.silenceMs,20),minSpeechMs:t(e.minSpeechMs,_t.minSpeechMs,0),preRollMs:t(e.preRollMs,_t.preRollMs,0),maxUtteranceMs:t(e.maxUtteranceMs,_t.maxUtteranceMs,1e3),sensitivity:Tt(typeof e.sensitivity==`number`&&Number.isFinite(e.sensitivity)?e.sensitivity:_t.sensitivity,0,1),calibrateMs:t(e.calibrateMs,_t.calibrateMs,0)}}function Dt(e){let t=e.length;if(t===0)return 0;let n=0;for(let r=0;r<t;r++){let t=e[r];n+=t*t}return Math.sqrt(n/t)}function Ot(e={}){let t=Et(e),n=6-4*t.sensitivity,r=.02-.015*t.sensitivity,i=yt,a=0,o=[],s=!1,c=0,l=0,u=0,d=()=>Math.max(i*n,r),f=()=>Math.max(d()*.6,i*1.5),p=()=>{s=!1,c=0,l=0,u=0};return{get speaking(){return s},get noiseFloor(){return i},get threshold(){return d()},push(e,n=20){let r=[],m=Number.isFinite(e)?Math.max(0,e):0,h=Tt(m/(d()*3),0,1),g=a<t.calibrateMs;if(g&&(a+=n,!s)){o.push(m);let e=[...o].sort((e,t)=>e-t);i=Tt(e[Math.min(e.length-1,Math.floor(e.length*xt))]??yt,vt,bt)}if(!s){if(m>d())c+=n,c>=t.minSpeechMs&&(s=!0,l=0,u=c,r.push({type:`start`,leadMs:t.preRollMs+c}),c=0);else if(g)c=0;else{c=0;let e=n/Ct*(m<i?4:1);i=Tt(i+(m-i)*Math.min(1,e),vt,St)}return{events:r,level:h,speaking:s}}return u+=n,m>f()?l=0:l+=n,l>=t.silenceMs?(r.push({type:`end`,reason:`silence`,trailingSilenceMs:l}),p()):u>=t.maxUtteranceMs&&(r.push({type:`split`}),u=0,l=0),{events:r,level:h,speaking:s}},flush(){let e=[];return s&&e.push({type:`end`,reason:`flush`,trailingSilenceMs:l}),p(),e}}}function kt(e){let t=Et(e),n=Ot(t),r=Math.max(1,Math.round(e.sampleRate*20/1e3)),i=r/e.sampleRate*1e3,a=Math.ceil((t.preRollMs+t.minSpeechMs)/i)+1,o=[],s=new Float32Array,c=null,l=!1,u=(t,n,r)=>{let a=Math.max(0,Math.floor((r-wt)/i)),o=t.slice(0,Math.max(1,t.length-a)),s=0;for(let e of o)s+=e.length;let c=new Float32Array(s),l=0;for(let e of o)c.set(e,l),l+=e.length;e.onUtterance({pcm:c,sampleRate:e.sampleRate,durationMs:s/e.sampleRate*1e3,reason:n})},d=t=>{t!==l&&(l=t,e.onSpeaking?.(t))},f=s=>{let l=n.push(Dt(s),i);e.onLevel?.(l.level),o.push(s),o.length>a&&o.shift(),c&&c.push(s);for(let e of l.events)if(e.type===`start`){c=[...o];let e=Math.ceil(t.preRollMs/i),n=Math.max(0,o.length-Math.ceil(t.minSpeechMs/i));for(let t=n;t<e;t++)c.unshift(new Float32Array(r))}else if(e.type===`end`){let t=c??[];c=null,o.length=0,t.length>0&&u(t,e.reason,e.trailingSilenceMs)}else if(e.type===`split`){let e=c??[];c=[],e.length>0&&u(e,`max`,0)}d(n.speaking)};return{get speaking(){return n.speaking},segmenter:n,push(e){let t=e;s.length>0&&(t=new Float32Array(s.length+e.length),t.set(s,0),t.set(e,s.length));let n=0;for(;n+r<=t.length;)f(t.slice(n,n+r)),n+=r;s=t.slice(n)},flush(){let t=n.flush();for(let e of t)e.type===`end`&&c&&c.length>0&&u(c,`flush`,e.trailingSilenceMs);c=null,o.length=0,s=new Float32Array,d(!1),e.onLevel?.(0)},discard(){n.flush(),c=null,o.length=0,s=new Float32Array,d(!1),e.onLevel?.(0)}}}var At=44,jt=4294967295,Mt=1;function Nt(e){let t=new Int16Array(e.length);for(let n=0;n<e.length;n+=1){let r=e[n];Number.isNaN(r)||(t[n]=Math.min(32767,Math.round((r>1?1:r<-1?-1:r)*32768)))}return t}function Pt(e,t){if(!Number.isInteger(e)||e<1||e*2>jt)throw new Ie(`invalid_argument`,`${t} must be a positive integer sample rate (got ${String(e)})`)}function Ft(e,t,n){for(let r=0;r<n.length;r+=1)e.setUint8(t+r,n.charCodeAt(r))}function It(e,t){Pt(t,`sampleRate`);let n=e.length*2;if(n+At-8>jt)throw new Ie(`invalid_argument`,`too many samples for a single WAV (4 GiB limit)`);let r=e instanceof Int16Array?e:Nt(e),i=new Uint8Array(At+n),a=new DataView(i.buffer);Ft(a,0,`RIFF`),a.setUint32(4,36+n,!0),Ft(a,8,`WAVE`),Ft(a,12,`fmt `),a.setUint32(16,16,!0),a.setUint16(20,Mt,!0),a.setUint16(22,1,!0),a.setUint32(24,t,!0),a.setUint32(28,t*2,!0),a.setUint16(32,2,!0),a.setUint16(34,16,!0),Ft(a,36,`data`),a.setUint32(40,n,!0);for(let e=0;e<r.length;e+=1)a.setInt16(At+e*2,r[e],!0);return i}var Lt=`hv-pcm-tap`,Rt=`
|
|
3
3
|
class HvPcmTap extends AudioWorkletProcessor {
|
|
4
4
|
process(inputs) {
|
|
5
5
|
const channels = inputs[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,B as t,Ct as n,D as r,Dt as i,E as a,Ft as o,G as s,H as c,J as l,L as u,Ot as d,Pt as f,U as p,W as m,X as h,Y as g,a as _,b as v,bt as y,ct as b,ft as x,ht as S,mt as C,pt as w,st as T,v as E,vt as D}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{n as O}from"./denq4QT7.js";import{n as k}from"./D3syEjNq.js";import{b as A,i as j,x as M}from"./C65O26Eu.js";import{A as N,D as P,E as F,O as I,T as L,_ as R,i as z,k as B,n as V,r as ee,t as H,v as U,w as te}from"./
|
|
1
|
+
import{$ as e,B as t,Ct as n,D as r,Dt as i,E as a,Ft as o,G as s,H as c,J as l,L as u,Ot as d,Pt as f,U as p,W as m,X as h,Y as g,a as _,b as v,bt as y,ct as b,ft as x,ht as S,mt as C,pt as w,st as T,v as E,vt as D}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{n as O}from"./denq4QT7.js";import{n as k}from"./D3syEjNq.js";import{b as A,i as j,x as M}from"./C65O26Eu.js";import{A as N,D as P,E as F,O as I,T as L,_ as R,i as z,k as B,n as V,r as ee,t as H,v as U,w as te}from"./DjNuiDuh.js";import{nt as W}from"./BJmbWKnL.js";var ne=s(`<p class="smrt-ai-setup__notice svelte-19u3zp7" role="status" data-smrt-component="AiSetup"> </p>`),G=s(`<option> </option>`),re=s(`<label class="svelte-19u3zp7">Assistant mode <!></label> <p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta">Changing modes happens only when you choose it here.</p>`,1),ie=s(`<p class="smrt-ai-setup__status svelte-19u3zp7" data-smrt-part="status">Inference off</p> <p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta">Build, edit, validate and export your cookbook without a model. No
|
|
2
2
|
provider is contacted and no browser model is downloaded.</p>`,1),ae=s(`<p class="smrt-ai-setup__status svelte-19u3zp7" data-smrt-part="status">Server</p> <p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta">This site's server answers the assistant. What you type, and a short
|
|
3
3
|
summary of your plan, is sent to it. Nothing is downloaded.</p>`,1),oe=s(`<p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta">A key is saved for another address, so it is not used here. Paste it again for this address.</p>`),se=s(`<div class="smrt-ai-setup__field svelte-19u3zp7" data-smrt-part="field"><!> <!></div> <!> <p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta"> <button class="smrt-ai-setup__link svelte-19u3zp7" data-smrt-part="action" type="button">Forget the key</button></p>`,1),ce=s(`<p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta"><strong>Browser access.</strong> </p>`),le=s(`<p data-smrt-part="status"> </p>`),ue=s(`<p class="smrt-ai-setup__status svelte-19u3zp7" data-smrt-part="status" role="status"> </p>`),de=s(`<label class="svelte-19u3zp7">Model provider <!></label> <div class="smrt-ai-setup__field svelte-19u3zp7" data-smrt-part="field"><!> <!></div> <div class="smrt-ai-setup__field svelte-19u3zp7" data-smrt-part="field"><!> <!></div> <!> <!> <p class="smrt-ai-setup__meta svelte-19u3zp7" data-smrt-part="meta">What you type, and a short summary of your plan, is sent to this
|
|
4
4
|
endpoint.</p> <!> <!> <div class="smrt-ai-setup__actions svelte-19u3zp7" data-smrt-part="actions"><!> <!></div>`,1),fe=s(`<p role="status" class="svelte-19u3zp7">This browser has no WebGPU, which the model needs. Try a recent
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as e}from"./BJmbWKnL.js";var t={cookbooks:[{id:`bakery`,name:`Bakery`,icon:`bread`,summary:`Retail and cafe wholesale orders, ingredient stock, batches and suppliers.`,keywords:[`bake`,`baker`,`bakery`,`baking`,`bread`,`pastry`,`cake`,`cookies`,`cafe wholesale`,`coffee shop`,`patisserie`,`sourdough`],settings:{currency:`USD`,paymentTerms:`Net 15`,taxRate:0},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#b45309`,fontFamily:`Georgia`}},recipes:[`commerce.customers`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`commerce.wholesale`,`inventory.stock`,`ledgers.bookkeeping`,`products.ingredients`,`products.simple`,`profiles.identity`],features:[`@happyvertical/smrt-commerce:ProductionOrder`],policies:[{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:ProductionOrder`,fieldName:`channelId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:ProductionOrder`,fieldName:`expiryDate`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:ProductionOrder`,fieldName:`vendorId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`}],layout:{version:1,sectionOrder:[`custom:shop`,`custom:wholesale`,`custom:kitchen`,`custom:buying`,`section:accounting`],itemOrder:{"custom:shop":[`item:commerce:Order`,`item:commerce:Customer`],"custom:wholesale":[`item:commerce:WholesaleOrder`,`item:commerce:Invoice`,`item:commerce:Payment`],"custom:kitchen":[`item:products:Product`,`item:products:Product:ingredients`,`item:inventory:StockLevel`,`item:commerce:ProductionOrder`],"custom:buying":[`item:commerce:Vendor`,`item:commerce:PurchaseOrder`]},hidden:[`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Order":`custom:shop`,"item:commerce:Customer":`custom:shop`,"item:commerce:WholesaleOrder":`custom:wholesale`,"item:commerce:Invoice":`custom:wholesale`,"item:commerce:Payment":`custom:wholesale`,"item:products:Product":`custom:kitchen`,"item:inventory:StockLevel":`custom:kitchen`,"item:commerce:ProductionOrder":`custom:kitchen`,"item:commerce:Vendor":`custom:buying`,"item:commerce:PurchaseOrder":`custom:buying`,"item:products:Product:ingredients":`custom:kitchen`},customSections:[{id:`custom:shop`,label:`Shop`},{id:`custom:wholesale`,label:`Wholesale`},{id:`custom:kitchen`,label:`Kitchen`},{id:`custom:buying`,label:`Buying`}],items:{"item:commerce:Order":{label:`Orders`,description:`Orders from your shop and website customers.`},"item:commerce:WholesaleOrder":{label:`Cafe orders`,description:`Standing and one-off orders from cafes and shops.`},"item:inventory:StockLevel":{label:`Stock`,description:`Baked goods and supplies on hand today.`},"item:commerce:ProductionOrder":{label:`Batches`,description:`What you plan to bake, with the amounts and the day.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The mills, dairies and suppliers you buy from.`},"item:products:Product:ingredients":{label:`Ingredients`,description:`Flour, butter, sugar and the rest, with costs and units.`}},sections:{"custom:shop":{icon:`shoppingBag`},"custom:wholesale":{icon:`briefcase`},"custom:kitchen":{icon:`package`},"custom:buying":{icon:`truck`}}}},sectionDescriptions:{"custom:shop":`Sell to customers and keep their details.`,"custom:wholesale":`Orders, invoices and payments from trade customers.`,"custom:kitchen":`Products, ingredients, stock and what you are making.`,"custom:buying":`Suppliers and what you order from them.`}},{id:`mechanic`,name:`Mechanic`,icon:`car`,summary:`Quotes, work orders, parts, appointments and billing for a repair shop.`,keywords:[`mechanic`,`garage`,`auto repair`,`car repair`,`fix cars`,`car`,`vehicle`,`brakes`,`oil change`,`tyres`,`tires`,`servicing`,`repair shop`],settings:{currency:`USD`,paymentTerms:`Due on receipt`,taxRate:.0825,taxRounding:`document`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{preset:`smrt`},recipes:[`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Contract`,fieldName:`taxRoundingScope`,scopeType:`app`,defaultValue:`"document"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.0825`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`taxRoundingScope`,scopeType:`app`,defaultValue:`"document"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.0825`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:parts`,`custom:billing`,`custom:schedule`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Estimate`,`item:commerce:Order`,`item:commerce:Customer`],"custom:parts":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`],"custom:schedule":[`item:events:Event`,`item:events:EventType`]},hidden:[`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Estimate":`custom:jobs`,"item:commerce:Order":`custom:jobs`,"item:commerce:Customer":`custom:jobs`,"item:products:Product":`custom:parts`,"item:inventory:StockLevel":`custom:parts`,"item:commerce:Vendor":`custom:parts`,"item:commerce:PurchaseOrder":`custom:parts`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:parts`,label:`Parts`},{id:`custom:billing`,label:`Billing`},{id:`custom:schedule`,label:`Schedule`}],items:{"item:commerce:Estimate":{label:`Quotes`,description:`Quotes for repairs, ready to become work orders once approved.`},"item:commerce:Order":{label:`Work orders`,description:`Every job in the shop, from drop-off to pick-up.`},"item:products:Product":{label:`Parts catalog`,description:`The parts you sell and fit, with prices.`},"item:inventory:StockLevel":{label:`Parts on hand`,description:`Parts on the shelf, so you know what to reorder.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The parts suppliers you buy from, with terms and contacts.`},"item:commerce:PurchaseOrder":{label:`Parts orders`,description:`Parts you have ordered and when they arrive.`},"item:events:Event":{label:`Appointments`,description:`Bookings on the shop calendar, by day and bay.`},"item:events:EventType":{label:`Appointment types`,description:`The kinds of service you book, like an oil change or inspection.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:parts":{icon:`package`},"custom:billing":{icon:`receipt`},"custom:schedule":{icon:`calendar`}}}},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:parts":`Parts, materials and the stock on your shelves.`,"custom:billing":`Invoices and the payments against them.`,"custom:schedule":`Appointments and what is on the calendar.`}},{id:`welder`,name:`Welder`,icon:`flame`,summary:`Quotes, jobs, agreements, material and site visits for a welding business.`,keywords:[`weld`,`welder`,`welding`,`fabrication`,`fabricate`,`metal`,`steel`,`gates`,`railings`,`metalwork`,`boilermaker`],settings:{currency:`USD`,paymentTerms:`50% deposit, balance on completion`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{preset:`studio`},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:material`,`custom:billing`,`custom:schedule`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Order`,`item:commerce:Customer`,`item:commerce:Estimate`,`item:commerce:Agreement`],"custom:material":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`],"custom:schedule":[`item:events:Event`,`item:events:EventType`]},hidden:[`item:commerce:Contract`,`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Customer":`custom:jobs`,"item:commerce:Estimate":`custom:jobs`,"item:commerce:Agreement":`custom:jobs`,"item:products:Product":`custom:material`,"item:inventory:StockLevel":`custom:material`,"item:commerce:Vendor":`custom:material`,"item:commerce:PurchaseOrder":`custom:material`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:commerce:Order":`custom:jobs`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:material`,label:`Material`},{id:`custom:billing`,label:`Billing`},{id:`custom:schedule`,label:`Schedule`}],items:{"item:commerce:Estimate":{label:`Quotes`,description:`Quotes for jobs, ready to turn into orders when accepted.`},"item:products:Product":{label:`Steel & supplies`,description:`Steel, rod, gas and other materials you stock and charge for.`},"item:inventory:StockLevel":{label:`Material on hand`,description:`Material on hand, so you know what to buy before the next job.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The suppliers you buy metal and gas from.`},"item:commerce:PurchaseOrder":{label:`Material orders`,description:`Material you have ordered and when it lands.`},"item:events:Event":{label:`Site visits`,description:`Visits to measure, quote or install on site, by day.`},"item:events:EventType":{label:`Visit types`,description:`The kinds of visit you make, like a quote visit or install.`},"item:commerce:Order":{label:`Work orders`,description:`Every job you have won, from start to final invoice.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:material":{icon:`layers`},"custom:billing":{icon:`receipt`},"custom:schedule":{icon:`calendar`}}}},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:material":`Material, stock and what you have ordered.`,"custom:billing":`Invoices and the payments against them.`,"custom:schedule":`Appointments and what is on the calendar.`}},{id:`yoga-studio`,name:`Yoga studio`,icon:`yoga`,summary:`Classes, class series, members, memberships and a small retail shop.`,keywords:[`yoga`,`yoga studio`,`pilates`,`studio`,`classes`,`class series`,`meditation`,`members`,`memberships`,`instructor`],settings:{currency:`USD`,paymentTerms:`Due on receipt`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#0f766e`,fontFamily:`ui-rounded`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.invoicing`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxExempt`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxId`,scopeType:`app`,visibility:`hidden`}],layout:{version:1,sectionOrder:[`custom:classes`,`custom:members`,`custom:shop`,`custom:billing`,`section:accounting`],itemOrder:{"custom:classes":[`item:events:Event`,`item:events:EventSeries`,`item:events:EventType`],"custom:members":[`item:commerce:Customer`,`item:commerce:Agreement`],"custom:shop":[`item:products:Product`,`item:inventory:StockLevel`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:events:Event":`custom:classes`,"item:events:EventSeries":`custom:classes`,"item:events:EventType":`custom:classes`,"item:commerce:Customer":`custom:members`,"item:commerce:Agreement":`custom:members`,"item:products:Product":`custom:shop`,"item:inventory:StockLevel":`custom:shop`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:classes`,label:`Classes`},{id:`custom:members`,label:`Members`},{id:`custom:shop`,label:`Shop`},{id:`custom:billing`,label:`Billing`}],items:{"item:events:Event":{label:`Class schedule`,description:`Every class on your timetable, with who's teaching and where.`},"item:events:EventSeries":{label:`Class series`,description:`Weekly classes that repeat, so you set them up once.`},"item:events:EventType":{label:`Class types`,description:`Your styles, like Vinyasa or Yin, with length and price.`},"item:commerce:Customer":{label:`Students`,description:`Your students, with how to reach them and what they have booked.`},"item:commerce:Agreement":{label:`Memberships`,description:`Memberships and class packs, with who holds them and when they renew.`},"item:inventory:StockLevel":{label:`Stock`,description:`Mats, props and retail items on hand.`}},sections:{"custom:classes":{icon:`school`},"custom:members":{icon:`users`},"custom:shop":{icon:`shoppingBag`},"custom:billing":{icon:`receipt`}}}},sectionDescriptions:{"custom:classes":`Classes, sessions and bookings.`,"custom:members":`Members and their memberships.`,"custom:shop":`Sell to customers and keep their details.`,"custom:billing":`Invoices and the payments against them.`}},{id:`landscaping`,name:`Landscaping`,icon:`leaf`,summary:`Quotes, jobs, maintenance contracts, materials and the crew schedule for a lawn and landscape business.`,keywords:[`landscaping`,`landscaper`,`lawn care`,`lawn`,`mowing`,`garden`,`gardener`,`yard work`,`hardscape`,`irrigation`,`tree service`,`snow removal`,`grounds`],settings:{currency:`USD`,paymentTerms:`Net 15`,taxRate:.06},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:schedule":`Appointments and what is on the calendar.`,"custom:yard":`Materials, stock and the suppliers you buy from.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#15803d`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.06`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.06`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:schedule`,`custom:yard`,`custom:billing`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Estimate`,`item:commerce:Order`,`item:commerce:Customer`,`item:commerce:Agreement`],"custom:schedule":[`item:events:Event`,`item:events:EventSeries`,`item:events:EventType`],"custom:yard":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Estimate":`custom:jobs`,"item:commerce:Order":`custom:jobs`,"item:commerce:Customer":`custom:jobs`,"item:commerce:Agreement":`custom:jobs`,"item:events:Event":`custom:schedule`,"item:events:EventSeries":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:products:Product":`custom:yard`,"item:inventory:StockLevel":`custom:yard`,"item:commerce:Vendor":`custom:yard`,"item:commerce:PurchaseOrder":`custom:yard`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:schedule`,label:`Schedule`},{id:`custom:yard`,label:`Yard`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Estimate":{label:`Quotes`,description:`Quotes for new work, ready to become jobs once approved.`},"item:commerce:Order":{label:`Work orders`,description:`Every job you have won, from the first visit to the final invoice.`},"item:commerce:Agreement":{label:`Maintenance contracts`,description:`Weekly mowing and seasonal programs, with who holds them and when they renew.`},"item:events:Event":{label:`Crew schedule`,description:`Visits on the calendar, by day and crew.`},"item:events:EventSeries":{label:`Recurring visits`,description:`Routes that repeat, like a Tuesday mowing round, set up once.`},"item:events:EventType":{label:`Visit types`,description:`The kinds of visit you make, like a mow, a clean-up or an install.`},"item:products:Product":{label:`Materials`,description:`Mulch, soil, sod, plants and the other things you sell and install.`},"item:inventory:StockLevel":{label:`Materials on hand`,description:`What is in the yard and on the trucks.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The nurseries and stone yards you buy from.`},"item:commerce:PurchaseOrder":{label:`Material orders`,description:`Material you have ordered and when it lands.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:schedule":{icon:`calendar`},"custom:yard":{icon:`package`},"custom:billing":{icon:`receipt`}}}}},{id:`salon`,name:`Hair salon`,icon:`scissors`,summary:`Appointments, clients, services, retail stock and payments at the desk for a salon or barbershop.`,keywords:[`salon`,`hair salon`,`barber`,`barbershop`,`hairdresser`,`stylist`,`haircut`,`hair colour`,`hair color`,`highlights`,`blow-dry`,`nails`,`beauty`,`spa`],settings:{currency:`USD`,paymentTerms:`Due on receipt`,taxRate:.07,pricesIncludeTax:!0},sectionDescriptions:{"custom:appointments":`Bookings and the services behind them.`,"custom:clients":`Clients and what they usually have.`,"custom:checkout":`Sales at the desk and the payments against them.`,"custom:shelf":`Retail, backbar stock and who you buy from.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#9d174d`}},recipes:[`commerce.customers`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Contract`,fieldName:`lineAmountType`,scopeType:`app`,defaultValue:`"inclusive"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.07`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxExempt`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`lineAmountType`,scopeType:`app`,defaultValue:`"inclusive"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.07`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`}],layout:{version:1,sectionOrder:[`custom:appointments`,`custom:clients`,`custom:checkout`,`custom:shelf`,`section:accounting`],itemOrder:{"custom:appointments":[`item:events:Event`,`item:events:EventType`,`item:events:EventSeries`],"custom:clients":[`item:commerce:Customer`],"custom:checkout":[`item:commerce:Order`,`item:commerce:Payment`,`item:commerce:Invoice`],"custom:shelf":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`]},hidden:[`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:events:Event":`custom:appointments`,"item:events:EventType":`custom:appointments`,"item:events:EventSeries":`custom:appointments`,"item:commerce:Customer":`custom:clients`,"item:commerce:Order":`custom:checkout`,"item:commerce:Payment":`custom:checkout`,"item:commerce:Invoice":`custom:checkout`,"item:products:Product":`custom:shelf`,"item:inventory:StockLevel":`custom:shelf`,"item:commerce:Vendor":`custom:shelf`,"item:commerce:PurchaseOrder":`custom:shelf`},customSections:[{id:`custom:appointments`,label:`Appointments`},{id:`custom:clients`,label:`Clients`},{id:`custom:checkout`,label:`Checkout`},{id:`custom:shelf`,label:`Shelf`}],items:{"item:events:Event":{label:`Bookings`,description:`Every booking in the book, by stylist and chair.`},"item:events:EventType":{label:`Appointment types`,description:`The services you book, like a cut, a colour or a beard trim, with their length.`},"item:events:EventSeries":{label:`Standing appointments`,description:`Regulars who come back every few weeks, set up once.`},"item:commerce:Customer":{label:`Client cards`,description:`Your clients, with how to reach them and what they usually have.`},"item:commerce:Order":{label:`Sales`,description:`Each visit’s ticket: the services done and anything bought at the desk.`},"item:commerce:Payment":{label:`Payments`,description:`Money taken at the desk, by card or cash.`},"item:commerce:Invoice":{label:`Invoices`,description:`Bills for bridal parties, packages and accounts that pay later.`},"item:products:Product":{label:`Services & products`,description:`Your services and the retail you sell, with prices.`},"item:inventory:StockLevel":{label:`Retail stock`,description:`Product on the shelf and at the backbar.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The distributors you buy colour, product and towels from.`},"item:commerce:PurchaseOrder":{label:`Supply orders`,description:`Product you have ordered and when it arrives.`}},sections:{"custom:appointments":{icon:`calendar`},"custom:clients":{icon:`users`},"custom:checkout":{icon:`creditCard`},"custom:shelf":{icon:`shoppingBag`}}}}},{id:`roaster`,name:`Coffee roaster`,icon:`coffee`,summary:`Cafe accounts, online orders, green coffee, roast batches and importers for a small roastery or brewery.`,keywords:[`coffee roaster`,`roaster`,`roastery`,`coffee`,`beans`,`green coffee`,`espresso`,`cafe accounts`,`brewery`,`microbrewery`,`taproom`,`kegs`,`small batch`],settings:{currency:`USD`,paymentTerms:`Net 30`,taxRate:.0725},sectionDescriptions:{"custom:shop":`Sell to customers and keep their details.`,"custom:wholesale":`Orders, invoices and payments from trade customers.`,"custom:roastery":`Coffees, green coffee, stock and what you are roasting.`,"custom:buying":`Suppliers and what you order from them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#7c2d12`,fontFamily:`Georgia`}},recipes:[`commerce.customers`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`commerce.wholesale`,`inventory.stock`,`ledgers.bookkeeping`,`products.ingredients`,`products.simple`,`profiles.identity`],features:[`@happyvertical/smrt-commerce:ProductionOrder`],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.0725`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.0725`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:ProductionOrder`,fieldName:`channelId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:ProductionOrder`,fieldName:`expiryDate`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:ProductionOrder`,fieldName:`vendorId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`}],layout:{version:1,sectionOrder:[`custom:shop`,`custom:wholesale`,`custom:roastery`,`custom:buying`,`section:accounting`],itemOrder:{"custom:shop":[`item:commerce:Order`,`item:commerce:Customer`],"custom:wholesale":[`item:commerce:WholesaleOrder`,`item:commerce:Invoice`,`item:commerce:Payment`],"custom:roastery":[`item:products:Product`,`item:products:Product:ingredients`,`item:inventory:StockLevel`,`item:commerce:ProductionOrder`],"custom:buying":[`item:commerce:Vendor`,`item:commerce:PurchaseOrder`]},hidden:[`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Order":`custom:shop`,"item:commerce:Customer":`custom:shop`,"item:commerce:WholesaleOrder":`custom:wholesale`,"item:commerce:Invoice":`custom:wholesale`,"item:commerce:Payment":`custom:wholesale`,"item:products:Product":`custom:roastery`,"item:products:Product:ingredients":`custom:roastery`,"item:inventory:StockLevel":`custom:roastery`,"item:commerce:ProductionOrder":`custom:roastery`,"item:commerce:Vendor":`custom:buying`,"item:commerce:PurchaseOrder":`custom:buying`},customSections:[{id:`custom:shop`,label:`Shop`},{id:`custom:wholesale`,label:`Wholesale`},{id:`custom:roastery`,label:`Roastery`},{id:`custom:buying`,label:`Buying`}],items:{"item:commerce:Order":{label:`Online & retail orders`,description:`Orders from the website and the roastery door.`},"item:commerce:WholesaleOrder":{label:`Cafe orders`,description:`Standing and one-off orders from cafes, bars and grocers.`},"item:products:Product":{label:`Coffees`,description:`Roasted coffees and shop items, with prices.`},"item:products:Product:ingredients":{label:`Green coffee`,description:`Green coffee and packaging, by the bag, with costs.`},"item:inventory:StockLevel":{label:`Stock`,description:`Roasted and green coffee on hand today.`},"item:commerce:ProductionOrder":{label:`Roast batches`,description:`What you plan to roast, with the amounts and the day.`},"item:commerce:Vendor":{label:`Importers & suppliers`,description:`The importers and packaging suppliers you buy from.`},"item:commerce:PurchaseOrder":{label:`Green coffee orders`,description:`Green coffee you have bought and when the container lands.`}},sections:{"custom:shop":{icon:`shoppingBag`},"custom:wholesale":{icon:`briefcase`},"custom:roastery":{icon:`package`},"custom:buying":{icon:`truck`}}}}},{id:`equipment-rental`,name:`Equipment rental`,icon:`forklift`,summary:`Rentals, quotes, the fleet and its availability, pickups and returns, and billing for a hire yard.`,keywords:[`equipment rental`,`rental`,`rentals`,`hire`,`tool hire`,`plant hire`,`party rental`,`excavator`,`scaffolding`,`generators`,`bike rental`,`kayak rental`,`fleet`],settings:{currency:`USD`,paymentTerms:`Deposit on pickup, balance on return`,taxRate:.08,taxRounding:`document`},sectionDescriptions:{"custom:rentals":`Rentals, quotes and the customers they belong to.`,"custom:fleet":`Equipment, availability and who you buy from.`,"custom:schedule":`Appointments and what is on the calendar.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#a16207`}},recipes:[`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.leases`,`commerce.purchases`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`},{objectRef:`@happyvertical/smrt-commerce:Contract`,fieldName:`taxRoundingScope`,scopeType:`app`,defaultValue:`"document"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.08`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`taxRoundingScope`,scopeType:`app`,defaultValue:`"document"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.08`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Deposit on pickup, balance on return"`}],layout:{version:1,sectionOrder:[`custom:rentals`,`custom:fleet`,`custom:schedule`,`custom:billing`,`section:accounting`],itemOrder:{"custom:rentals":[`item:commerce:Lease`,`item:commerce:Estimate`,`item:commerce:Customer`],"custom:fleet":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:schedule":[`item:events:Event`,`item:events:EventType`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Lease":`custom:rentals`,"item:commerce:Estimate":`custom:rentals`,"item:commerce:Customer":`custom:rentals`,"item:products:Product":`custom:fleet`,"item:inventory:StockLevel":`custom:fleet`,"item:commerce:Vendor":`custom:fleet`,"item:commerce:PurchaseOrder":`custom:fleet`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:rentals`,label:`Rentals`},{id:`custom:fleet`,label:`Fleet`},{id:`custom:schedule`,label:`Schedule`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Lease":{label:`Rental contracts`,description:`Every rental out the gate, with the dates and what is due.`},"item:commerce:Estimate":{label:`Quotes`,description:`Quotes for a hire, ready to become a rental when accepted.`},"item:products:Product":{label:`Equipment`,description:`The machines and tools you hire out, with the daily rate.`},"item:inventory:StockLevel":{label:`Availability`,description:`What is in the yard, out on hire or in for service.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The dealers and parts suppliers you buy from.`},"item:commerce:PurchaseOrder":{label:`Equipment & parts orders`,description:`Machines and parts you have ordered and when they arrive.`},"item:events:Event":{label:`Pickups & returns`,description:`Pickups, returns and deliveries on the calendar, by day.`},"item:events:EventType":{label:`Booking types`,description:`The kinds of booking you make, like a pickup, a return or a delivery.`}},sections:{"custom:rentals":{icon:`fileText`},"custom:fleet":{icon:`truck`},"custom:schedule":{icon:`calendar`},"custom:billing":{icon:`receipt`}}}}},{id:`nonprofit`,name:`Non-profit`,icon:`heart`,summary:`Members, memberships, dues and donations, events and the books for a club, society or charity.`,keywords:[`non-profit`,`nonprofit`,`charity`,`club`,`society`,`association`,`members`,`membership dues`,`donations`,`donors`,`fundraiser`,`volunteers`,`community group`],settings:{currency:`USD`,paymentTerms:`Due on receipt`,taxRate:0},sectionDescriptions:{"custom:members":`Members and their memberships.`,"custom:events":`Meetings, fundraisers and volunteer days.`,"custom:giving":`Dues, pledges and the money that comes in.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#1d4ed8`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.invoicing`,`events.calendar`,`ledgers.bookkeeping`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxExempt`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on receipt"`}],layout:{version:1,sectionOrder:[`custom:members`,`custom:events`,`custom:giving`,`section:accounting`],itemOrder:{"custom:members":[`item:commerce:Customer`,`item:commerce:Agreement`],"custom:events":[`item:events:Event`,`item:events:EventSeries`,`item:events:EventType`],"custom:giving":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`],moved:{"item:commerce:Customer":`custom:members`,"item:commerce:Agreement":`custom:members`,"item:events:Event":`custom:events`,"item:events:EventSeries":`custom:events`,"item:events:EventType":`custom:events`,"item:commerce:Invoice":`custom:giving`,"item:commerce:Payment":`custom:giving`},customSections:[{id:`custom:members`,label:`Members`},{id:`custom:events`,label:`Events`},{id:`custom:giving`,label:`Giving`}],items:{"item:commerce:Customer":{label:`Members & donors`,description:`Your members and donors, with how to reach them.`},"item:commerce:Agreement":{label:`Memberships`,description:`Annual, family and student memberships, with who holds them and when they renew.`},"item:events:Event":{label:`Event calendar`,description:`Meetings, fundraisers and volunteer days, with who is coming.`},"item:events:EventSeries":{label:`Regular meetings`,description:`Meetings that repeat, like the monthly meetup, set up once.`},"item:events:EventType":{label:`Event types`,description:`The kinds of event you run, like a fundraiser or a clean-up.`},"item:commerce:Invoice":{label:`Dues & pledges`,description:`Dues and pledges you have asked for and which are still owed.`},"item:commerce:Payment":{label:`Donations & payments`,description:`Money that has come in, from dues, gifts and tickets.`}},sections:{"custom:members":{icon:`users`},"custom:events":{icon:`calendar`},"custom:giving":{icon:`creditCard`}}}}},{id:`agency`,name:`Agency`,icon:`pencil`,summary:`Clients, proposals, retainers, projects, time, expenses and invoices for a consulting or design studio.`,keywords:[`agency`,`design agency`,`consulting`,`consultant`,`consultancy`,`studio`,`design studio`,`freelance`,`retainer`,`proposals`,`billable hours`,`timesheets`,`creative`],settings:{currency:`USD`,paymentTerms:`Net 30`,taxRate:0},sectionDescriptions:{"custom:accounts":`Clients, proposals and the contracts you hold with them.`,"custom:work":`Projects, tasks, time and costs.`,"custom:meetings":`Meetings with clients and the studio.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#4338ca`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.vendors`,`events.calendar`,`expenses.tracking`,`ledgers.bookkeeping`,`profiles.identity`,`projects.tracker`,`timesheets.time-entries`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`}],layout:{version:1,sectionOrder:[`custom:accounts`,`custom:work`,`custom:meetings`,`custom:billing`,`section:accounting`],itemOrder:{"custom:accounts":[`item:commerce:Customer`,`item:commerce:Estimate`,`item:commerce:Agreement`],"custom:work":[`item:projects:Project`,`item:projects:Issue`,`item:timesheets:ServiceTimeEntry`,`item:expenses:Expense`],"custom:meetings":[`item:events:Event`,`item:events:EventType`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`,`item:commerce:Vendor`]},hidden:[`item:commerce:Contract`,`item:events:EventSeries`,`item:projects:Label`],moved:{"item:commerce:Customer":`custom:accounts`,"item:commerce:Estimate":`custom:accounts`,"item:commerce:Agreement":`custom:accounts`,"item:projects:Project":`custom:work`,"item:projects:Issue":`custom:work`,"item:timesheets:ServiceTimeEntry":`custom:work`,"item:expenses:Expense":`custom:work`,"item:events:Event":`custom:meetings`,"item:events:EventType":`custom:meetings`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`,"item:commerce:Vendor":`custom:billing`},customSections:[{id:`custom:accounts`,label:`Clients`},{id:`custom:work`,label:`Work`},{id:`custom:meetings`,label:`Meetings`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Customer":{label:`Client companies`,description:`The companies you work for, with how to reach them.`},"item:commerce:Estimate":{label:`Proposals`,description:`Proposals you have sent, ready to become a contract when accepted.`},"item:commerce:Agreement":{label:`Contracts`,description:`Retainers and statements of work, with the terms and the dates.`},"item:projects:Project":{label:`Projects`,description:`Each engagement, with what it covers and where it stands.`},"item:projects:Issue":{label:`Tasks`,description:`The work inside each project, from to-do to done.`},"item:timesheets:ServiceTimeEntry":{label:`Time entries`,description:`Hours logged by person and project, from draft to approved.`},"item:expenses:Expense":{label:`Expenses`,description:`Costs on a project, with the receipt and whether to bill them on.`},"item:events:Event":{label:`Client meetings`,description:`Kickoffs, reviews and check-ins with clients, by day.`},"item:events:EventType":{label:`Meeting types`,description:`The kinds of meeting you hold, like a kickoff or a review.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The printers, photographers and freelancers you buy from.`}},sections:{"custom:accounts":{icon:`users`},"custom:work":{icon:`briefcase`},"custom:meetings":{icon:`calendar`},"custom:billing":{icon:`receipt`}}}}},{id:`plumber`,name:`Plumber`,icon:`tool`,summary:`Quotes, service calls, parts, appointments and billing for a plumbing business.`,keywords:[`plumber`,`plumbing`,`pipes`,`leak`,`drain`,`blocked drain`,`water heater`,`boiler`,`bathroom`,`faucet`,`toilet`,`sewer`,`emergency call-out`,`gas fitter`],settings:{currency:`USD`,paymentTerms:`Due on completion`,taxRate:.07},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:parts":`Parts, materials and the stock on your shelves.`,"custom:schedule":`Appointments and what is on the calendar.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#0e7490`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on completion"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.07`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Due on completion"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on completion"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on completion"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.07`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due on completion"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:schedule`,`custom:parts`,`custom:billing`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Order`,`item:commerce:Estimate`,`item:commerce:Customer`,`item:commerce:Agreement`],"custom:schedule":[`item:events:Event`,`item:events:EventType`],"custom:parts":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`,`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Order":`custom:jobs`,"item:commerce:Estimate":`custom:jobs`,"item:commerce:Customer":`custom:jobs`,"item:commerce:Agreement":`custom:jobs`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:products:Product":`custom:parts`,"item:inventory:StockLevel":`custom:parts`,"item:commerce:Vendor":`custom:parts`,"item:commerce:PurchaseOrder":`custom:parts`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:schedule`,label:`Schedule`},{id:`custom:parts`,label:`Parts`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Order":{label:`Service calls`,description:`Call-outs and booked jobs, emergencies first, from the first call to the final invoice.`},"item:commerce:Estimate":{label:`Quotes`,description:`Quotes for installs and bigger repairs, ready to book once approved.`},"item:commerce:Agreement":{label:`Service plans`,description:`Yearly water heater and drain service plans, with who holds them and when they renew.`},"item:events:Event":{label:`Appointments`,description:`Calls on the calendar, by day and van.`},"item:events:EventType":{label:`Call types`,description:`The kinds of call you take, like a leak, a blocked drain or a water heater install.`},"item:products:Product":{label:`Parts & fittings`,description:`Valves, fittings, pipe and fixtures you fit and charge for.`},"item:inventory:StockLevel":{label:`Van stock`,description:`What is on each van and in the store, so a call is not a second trip.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The plumbing merchants and wholesalers you buy from.`},"item:commerce:PurchaseOrder":{label:`Parts orders`,description:`Parts you have ordered and when they are ready for pickup.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:schedule":{icon:`calendar`},"custom:parts":{icon:`package`},"custom:billing":{icon:`receipt`}}}}},{id:`electrician`,name:`Electrician`,icon:`bolt`,summary:`Quotes, installs, repairs, materials and billing for an electrical contractor.`,keywords:[`electrician`,`electrical`,`electric`,`wiring`,`rewire`,`panel upgrade`,`breaker`,`lighting`,`outlets`,`ev charger`,`inspection`,`sparky`,`electrical contractor`],settings:{currency:`USD`,paymentTerms:`Net 15`,taxRate:.0625},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:material":`Material, stock and what you have ordered.`,"custom:schedule":`Appointments and what is on the calendar.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#ca8a04`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.0625`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.0625`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 15"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:schedule`,`custom:material`,`custom:billing`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Estimate`,`item:commerce:Order`,`item:commerce:Customer`,`item:commerce:Agreement`],"custom:schedule":[`item:events:Event`,`item:events:EventType`],"custom:material":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`,`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Estimate":`custom:jobs`,"item:commerce:Order":`custom:jobs`,"item:commerce:Customer":`custom:jobs`,"item:commerce:Agreement":`custom:jobs`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:products:Product":`custom:material`,"item:inventory:StockLevel":`custom:material`,"item:commerce:Vendor":`custom:material`,"item:commerce:PurchaseOrder":`custom:material`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:schedule`,label:`Schedule`},{id:`custom:material`,label:`Material`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Estimate":{label:`Quotes`,description:`Priced quotes for installs, rewires and upgrades, ready to schedule once accepted.`},"item:commerce:Order":{label:`Work orders`,description:`Installs, repairs and inspections you have won, from rough-in to sign-off.`},"item:commerce:Agreement":{label:`Maintenance contracts`,description:`Planned maintenance and testing for commercial sites, with renewal dates.`},"item:events:Event":{label:`Site visits`,description:`Visits to quote, wire, inspect or test, by day and electrician.`},"item:events:EventType":{label:`Visit types`,description:`The kinds of visit you make, like a panel upgrade, a fault call or an inspection.`},"item:products:Product":{label:`Electrical supplies`,description:`Cable, breakers, devices and fixtures you stock and charge for.`},"item:inventory:StockLevel":{label:`Materials on hand`,description:`Cable and parts in the shop and on the trucks.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The electrical wholesalers and lighting suppliers you buy from.`},"item:commerce:PurchaseOrder":{label:`Material orders`,description:`Material you have ordered and when it lands.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:schedule":{icon:`calendar`},"custom:material":{icon:`layers`},"custom:billing":{icon:`receipt`}}}}},{id:`painter`,name:`Painter`,icon:`brush`,summary:`Estimates, jobs, paint and materials, crew schedule and billing for a painting business.`,keywords:[`painter`,`painting`,`decorator`,`decorating`,`house painting`,`interior painting`,`exterior painting`,`wallpaper`,`drywall repair`,`cabinet painting`,`stain`,`repaint`],settings:{currency:`USD`,paymentTerms:`50% deposit, balance on completion`,taxRate:.06},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:paint":`Paint, sundries and the stock in your store room.`,"custom:schedule":`Appointments and what is on the calendar.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#be185d`}},recipes:[`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.06`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.06`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on completion"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:schedule`,`custom:paint`,`custom:billing`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Estimate`,`item:commerce:Order`,`item:commerce:Customer`],"custom:schedule":[`item:events:Event`,`item:events:EventType`],"custom:paint":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Estimate":`custom:jobs`,"item:commerce:Order":`custom:jobs`,"item:commerce:Customer":`custom:jobs`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:products:Product":`custom:paint`,"item:inventory:StockLevel":`custom:paint`,"item:commerce:Vendor":`custom:paint`,"item:commerce:PurchaseOrder":`custom:paint`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:schedule`,label:`Crew`},{id:`custom:paint`,label:`Paint & supplies`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Estimate":{label:`Estimates`,description:`Room-by-room estimates from the site visit, ready to book once signed.`},"item:commerce:Order":{label:`Projects`,description:`Every painting project you have booked, from prep to the final walkthrough.`},"item:events:Event":{label:`Crew schedule`,description:`Site visits and crew days on the calendar, by job.`},"item:events:EventType":{label:`Visit types`,description:`The kinds of day you book, like an estimate visit, prep or a touch-up.`},"item:products:Product":{label:`Paint & sundries`,description:`Paint, primer, caulk, tape and the other things you use and charge for.`},"item:inventory:StockLevel":{label:`Paint on hand`,description:`Paint and supplies in the store room and on the van.`},"item:commerce:Vendor":{label:`Paint suppliers`,description:`The paint stores and suppliers you buy from, with trade terms.`},"item:commerce:PurchaseOrder":{label:`Supply orders`,description:`Paint and supplies you have ordered and when they are ready.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:schedule":{icon:`calendar`},"custom:paint":{icon:`package`},"custom:billing":{icon:`receipt`}}}}},{id:`roofer`,name:`Roofer`,icon:`home`,summary:`Inspections, quotes, jobs, materials and billing for a roofing contractor.`,keywords:[`roofer`,`roofing`,`roof`,`roof repair`,`reroof`,`shingles`,`gutters`,`flashing`,`leaking roof`,`storm damage`,`flat roof`,`skylight`],settings:{currency:`USD`,paymentTerms:`Net 30`,taxRate:.07},sectionDescriptions:{"custom:jobs":`Work orders and the customers they belong to.`,"custom:material":`Material, stock and what you have ordered.`,"custom:schedule":`Appointments and what is on the calendar.`,"custom:billing":`Invoices and the payments against them.`},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#475569`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:ContractLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.07`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`},{objectRef:`@happyvertical/smrt-commerce:InvoiceLineItem`,fieldName:`taxRate`,scopeType:`app`,defaultValue:`0.07`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Net 30"`}],layout:{version:1,sectionOrder:[`custom:jobs`,`custom:schedule`,`custom:material`,`custom:billing`,`section:accounting`],itemOrder:{"custom:jobs":[`item:commerce:Estimate`,`item:commerce:Order`,`item:commerce:Customer`,`item:commerce:Agreement`],"custom:schedule":[`item:events:Event`,`item:events:EventType`],"custom:material":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`,`item:events:EventSeries`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:commerce:Estimate":`custom:jobs`,"item:commerce:Order":`custom:jobs`,"item:commerce:Customer":`custom:jobs`,"item:commerce:Agreement":`custom:jobs`,"item:events:Event":`custom:schedule`,"item:events:EventType":`custom:schedule`,"item:products:Product":`custom:material`,"item:inventory:StockLevel":`custom:material`,"item:commerce:Vendor":`custom:material`,"item:commerce:PurchaseOrder":`custom:material`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:jobs`,label:`Jobs`},{id:`custom:schedule`,label:`Schedule`},{id:`custom:material`,label:`Material`},{id:`custom:billing`,label:`Billing`}],items:{"item:commerce:Estimate":{label:`Quotes`,description:`Quotes written up after an inspection, for repairs and full replacements.`},"item:commerce:Order":{label:`Roofing jobs`,description:`Repairs and re-roofs you have won, from tear-off to final cleanup.`},"item:commerce:Agreement":{label:`Maintenance agreements`,description:`Yearly inspection and gutter programs for homes and buildings, with renewal dates.`},"item:events:Event":{label:`Inspections & visits`,description:`Roof inspections, measure-ups and crew days on the calendar.`},"item:events:EventType":{label:`Visit types`,description:`The kinds of visit you make, like an inspection, a storm check or a tear-off.`},"item:products:Product":{label:`Roofing products`,description:`Shingles, underlayment, flashing and fasteners you install and charge for.`},"item:inventory:StockLevel":{label:`Materials on hand`,description:`Bundles and rolls in the yard and on the trailer.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The roofing distributors and lumber yards you buy from.`},"item:commerce:PurchaseOrder":{label:`Material orders`,description:`Material you have ordered and when it is delivered to site.`}},sections:{"custom:jobs":{icon:`wrench`},"custom:schedule":{icon:`calendar`},"custom:material":{icon:`layers`},"custom:billing":{icon:`receipt`}}}}},{id:`music-teacher`,name:`Music teacher`,icon:`music`,summary:`Students, lesson schedule, packages, recitals and billing for a music teacher or studio.`,keywords:[`music teacher`,`music lessons`,`music studio`,`music school`,`piano teacher`,`piano lessons`,`guitar lessons`,`violin lessons`,`voice lessons`,`singing lessons`,`drum lessons`,`recital`,`instrument rental`,`sheet music`],settings:{currency:`USD`,paymentTerms:`Due at the start of each month`,taxRate:0},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#6d28d9`,fontFamily:`Georgia`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.invoicing`,`commerce.leases`,`events.calendar`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxExempt`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`taxId`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"Due at the start of each month"`}],layout:{version:1,sectionOrder:[`custom:lessons`,`custom:students`,`custom:instruments`,`custom:billing`,`section:accounting`],itemOrder:{"custom:lessons":[`item:events:Event`,`item:events:EventSeries`,`item:events:EventType`],"custom:students":[`item:commerce:Customer`,`item:commerce:Agreement`],"custom:instruments":[`item:commerce:Lease`,`item:products:Product`,`item:inventory:StockLevel`],"custom:billing":[`item:commerce:Invoice`,`item:commerce:Payment`]},hidden:[`item:commerce:Contract`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:events:Event":`custom:lessons`,"item:events:EventSeries":`custom:lessons`,"item:events:EventType":`custom:lessons`,"item:commerce:Customer":`custom:students`,"item:commerce:Agreement":`custom:students`,"item:commerce:Lease":`custom:instruments`,"item:products:Product":`custom:instruments`,"item:inventory:StockLevel":`custom:instruments`,"item:commerce:Invoice":`custom:billing`,"item:commerce:Payment":`custom:billing`},customSections:[{id:`custom:lessons`,label:`Lessons`},{id:`custom:students`,label:`Students`},{id:`custom:instruments`,label:`Rentals & shop`},{id:`custom:billing`,label:`Billing`}],items:{"item:events:Event":{label:`Lesson calendar`,description:`Every lesson, group class and recital, with the teacher and the room.`},"item:events:EventSeries":{label:`Weekly slots`,description:`A student’s regular lesson time, set up once for the term.`},"item:events:EventType":{label:`Lesson types`,description:`Private lessons, group classes and recitals, with their length.`},"item:commerce:Customer":{label:`Students & families`,description:`Your students, with a parent or guardian to contact for younger ones.`},"item:commerce:Agreement":{label:`Lesson packages`,description:`Term enrolments and lesson packs, with who holds them and when they renew.`},"item:commerce:Lease":{label:`Instrument rentals`,description:`Instruments out on rent, with the student, the dates and the monthly fee.`},"item:products:Product":{label:`Books & instruments`,description:`Method books, sheet music, accessories and rental instruments, with prices.`},"item:inventory:StockLevel":{label:`Stock`,description:`Books, strings and rental instruments on the shelf.`}},sections:{"custom:lessons":{icon:`school`},"custom:students":{icon:`users`},"custom:instruments":{icon:`package`},"custom:billing":{icon:`receipt`}}}},sectionDescriptions:{"custom:lessons":`Lessons, recitals and the weekly timetable.`,"custom:students":`Students, their families and the packages they hold.`,"custom:instruments":`Instrument rentals, books and sheet music on the shelf.`,"custom:billing":`Invoices and the payments against them.`}},{id:`band`,name:`Band`,icon:`microphone`,summary:`Gigs, venues, booking contracts, merch and billing for a band.`,keywords:[`band`,`gigs`,`gigging`,`live music`,`musicians`,`ensemble`,`wedding band`,`cover band`,`venues`,`booking`,`promoter`,`merch`,`merchandise`,`tour`,`residency`],settings:{currency:`USD`,paymentTerms:`50% deposit, balance on the night`,taxRate:0},document:{$schema:`https://smrt.happyvertical.com/schemas/cookbook/v1.json`,version:1,theme:{custom:{primary:`#b91c1c`}},recipes:[`commerce.agreements`,`commerce.customers`,`commerce.estimates`,`commerce.invoicing`,`commerce.purchases`,`commerce.sales`,`commerce.vendors`,`events.calendar`,`expenses.tracking`,`inventory.stock`,`ledgers.bookkeeping`,`products.simple`,`profiles.identity`],features:[],policies:[{objectRef:`@happyvertical/smrt-commerce:Agreement`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`creditLimit`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`customerType`,scopeType:`app`,visibility:`hidden`},{objectRef:`@happyvertical/smrt-commerce:Customer`,fieldName:`paymentTerms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`},{objectRef:`@happyvertical/smrt-commerce:Estimate`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`currency`,scopeType:`app`,defaultValue:`"USD"`},{objectRef:`@happyvertical/smrt-commerce:Invoice`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`},{objectRef:`@happyvertical/smrt-commerce:Lease`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`},{objectRef:`@happyvertical/smrt-commerce:Order`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`},{objectRef:`@happyvertical/smrt-commerce:WholesaleOrder`,fieldName:`terms`,scopeType:`app`,defaultValue:`"50% deposit, balance on the night"`}],layout:{version:1,sectionOrder:[`custom:gigs`,`custom:bookings`,`custom:merch`,`custom:money`,`section:accounting`],itemOrder:{"custom:gigs":[`item:events:Event`,`item:events:EventSeries`,`item:events:EventType`],"custom:bookings":[`item:commerce:Customer`,`item:commerce:Estimate`,`item:commerce:Agreement`],"custom:merch":[`item:products:Product`,`item:inventory:StockLevel`,`item:commerce:Order`,`item:commerce:Vendor`,`item:commerce:PurchaseOrder`],"custom:money":[`item:commerce:Invoice`,`item:commerce:Payment`,`item:expenses:Expense`]},hidden:[`item:commerce:Contract`,`item:inventory:InventoryLocation`,`item:inventory:StockMovement`],moved:{"item:events:Event":`custom:gigs`,"item:events:EventSeries":`custom:gigs`,"item:events:EventType":`custom:gigs`,"item:commerce:Customer":`custom:bookings`,"item:commerce:Estimate":`custom:bookings`,"item:commerce:Agreement":`custom:bookings`,"item:products:Product":`custom:merch`,"item:inventory:StockLevel":`custom:merch`,"item:commerce:Order":`custom:merch`,"item:commerce:Vendor":`custom:merch`,"item:commerce:PurchaseOrder":`custom:merch`,"item:commerce:Invoice":`custom:money`,"item:commerce:Payment":`custom:money`,"item:expenses:Expense":`custom:money`},customSections:[{id:`custom:gigs`,label:`Gigs`},{id:`custom:bookings`,label:`Bookings`},{id:`custom:merch`,label:`Merch`},{id:`custom:money`,label:`Money`}],items:{"item:events:Event":{label:`Show calendar`,description:`Every gig and rehearsal, with the venue, the call time and who is playing.`},"item:events:EventSeries":{label:`Residencies`,description:`Regular nights at the same venue, set up once.`},"item:events:EventType":{label:`Show types`,description:`The kinds of date you play, like a club night, a wedding, a festival set or a rehearsal.`},"item:commerce:Customer":{label:`Venues & promoters`,description:`The venues, promoters and private clients who book you, with how to reach them.`},"item:commerce:Estimate":{label:`Quotes`,description:`Quotes for a booking, ready to become a contract when accepted.`},"item:commerce:Agreement":{label:`Booking contracts`,description:`The fee, deposit and terms agreed for each show.`},"item:products:Product":{label:`Products`,description:`Shirts, records, posters and anything else on the merch table, with prices.`},"item:inventory:StockLevel":{label:`Stock`,description:`What is in the merch cases and what is left at the rehearsal space.`},"item:commerce:Order":{label:`Sales`,description:`Merch sold at shows and online.`},"item:commerce:Vendor":{label:`Suppliers`,description:`The printers and pressing plants that make your merch.`},"item:commerce:PurchaseOrder":{label:`Print & pressing orders`,description:`Shirts and records you have ordered and when they arrive.`},"item:commerce:Invoice":{label:`Invoices`,description:`Bills for deposits and show fees, and which are still owed.`},"item:commerce:Payment":{label:`Payments`,description:`Fees, deposits and merch money that has come in.`},"item:expenses:Expense":{label:`Expenses`,description:`Van hire, strings, rehearsal space and travel, with who paid and what to pay back.`}},sections:{"custom:gigs":{icon:`calendar`},"custom:bookings":{icon:`fileText`},"custom:merch":{icon:`shoppingBag`},"custom:money":{icon:`receipt`}}}},sectionDescriptions:{"custom:gigs":`Shows, rehearsals and residencies on the calendar.`,"custom:bookings":`Venues, quotes and the contract for each booking.`,"custom:merch":`Merch, stock, sales and who makes it for you.`,"custom:money":`Invoices, payments and what the band spends.`}}]},n=new Intl.Collator(`en`,{sensitivity:`base`,numeric:!0}),r=[...t.cookbooks].sort((e,t)=>n.compare(e.name,t.name));function i(e){return r.find(t=>t.id===e)}function a(t){return t.document.recipes.map(t=>e.get(t)?.label??t)}export{r as n,a as r,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Ct as t,Dt as n,E as r,Ft as i,G as a,Ot as o,U as s,a as c,ft as l,ht as u,st as d,v as f}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{t as p}from"./
|
|
1
|
+
import{$ as e,Ct as t,Dt as n,E as r,Ft as i,G as a,Ot as o,U as s,a as c,ft as l,ht as u,st as d,v as f}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{t as p}from"./D3e2k3cc.js";import{nt as m}from"./BJmbWKnL.js";var h=a(`<div data-smrt-component="SectionIcons"><a class="svelte-1fbsd8p"><!></a> <a class="svelte-1fbsd8p"><!></a></div>`);function g(a,g){o(g,!0);let _=c(g,`compact`,3,!1),v=t(()=>`${p(`/recipes/${g.section}/help/`)}${g.helpAnchor?`#${g.helpAnchor}`:``}`);var y=h();let b;var x=l(y),S=l(x);{let n=t(()=>_()?16:22);m(S,{path:`M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z`,get size(){return e(n)}})}i(x);var C=u(x,2),w=l(C);{let n=t(()=>_()?16:22);m(w,{path:`M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58a.49.49 0 0 0 .12-.61l-1.92-3.32a.488.488 0 0 0-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54a.484.484 0 0 0-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58a.49.49 0 0 0-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z`,get size(){return e(n)}})}i(C),i(y),d(t=>{b=r(y,1,`smrt-section-icons__root svelte-1fbsd8p`,null,b,{"smrt-section-icons__compact":_()}),f(x,`href`,e(v)),f(x,`title`,`${g.label} help`),f(x,`aria-label`,`${g.label} help`),f(x,`aria-current`,g.current===`help`?`page`:void 0),f(C,`href`,t),f(C,`title`,`${g.label} options`),f(C,`aria-label`,`${g.label} options`),f(C,`aria-current`,g.current===`options`?`page`:void 0)},[()=>p(`/recipes/${g.section}/`)]),s(a,y),n()}export{g as t};
|