@happyvertical/smrt-planner 0.57.7 → 0.57.8
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/app/404.html +18 -18
- package/app/_app/immutable/chunks/{D3lXu_rt.js → B45qMR8U.js} +21 -21
- package/app/_app/immutable/chunks/{Bhd-3niN.js → BU0vd8nA.js} +1 -1
- package/app/_app/immutable/chunks/{JqlEoPqZ.js → BWd9iJf7.js} +1 -1
- package/app/_app/immutable/chunks/BeJxxDXZ.js +1 -0
- package/app/_app/immutable/chunks/{BeL8dJx9.js → BfeotTF9.js} +3 -3
- package/app/_app/immutable/chunks/{BdOPgmQ_.js → BlJ-05MM.js} +1 -1
- package/app/_app/immutable/chunks/{Vt9hDpHd.js → C6HSENij.js} +1 -1
- package/app/_app/immutable/chunks/{DmHVTNcC.js → C7boms_S.js} +1 -1
- package/app/_app/immutable/chunks/{C8FX0hli.js → C8kJ-wTn.js} +1 -1
- package/app/_app/immutable/chunks/CKd9O-eU.js +1 -0
- package/app/_app/immutable/chunks/{CYhwv6d2.js → COQVmnKJ.js} +1 -1
- package/app/_app/immutable/chunks/{DIgo5ngo.js → CTlovRev.js} +1 -1
- package/app/_app/immutable/chunks/{DmdvNG82.js → CaiMTXlW.js} +1 -1
- package/app/_app/immutable/chunks/{BqEBz5Vq.js → CiNYyHrL.js} +1 -1
- package/app/_app/immutable/chunks/{B2uXaQfZ.js → Cmh0yR4f.js} +1 -1
- package/app/_app/immutable/chunks/{BQLQsso4.js → Ct5r3XV1.js} +1 -1
- package/app/_app/immutable/chunks/{CdKHckEF.js → D0m3WNVh.js} +1 -1
- package/app/_app/immutable/chunks/{ICDFUCZL.js → DKi2uwTq.js} +1 -1
- package/app/_app/immutable/chunks/{D8MqcCKq.js → DWeCJh9N.js} +1 -1
- package/app/_app/immutable/chunks/{TcjpRcdI.js → D_xoWitl.js} +1 -1
- package/app/_app/immutable/chunks/Dg4KRWOz.js +1 -0
- package/app/_app/immutable/chunks/{Db12RzZi.js → DmvHEN1v.js} +1 -1
- package/app/_app/immutable/chunks/{DfN2k_EX.js → DoGeTgSe.js} +1 -1
- package/app/_app/immutable/chunks/{C6AANt9H.js → DqrQeG8L.js} +1 -1
- package/app/_app/immutable/chunks/{C2OYATC6.js → DziaAoFY.js} +1 -1
- package/app/_app/immutable/chunks/{FeyhlLIZ.js → QJX7BlhI.js} +1 -1
- package/app/_app/immutable/chunks/{Cwz7QFS4.js → Ywu-998J.js} +2 -2
- package/app/_app/immutable/chunks/{lUJaueNM.js → nB-x9BEp.js} +1 -1
- package/app/_app/immutable/chunks/{DwIRC3h5.js → ptmcJq5j.js} +1 -1
- package/app/_app/immutable/entry/{app.C5bxPKCP.js → app.g4Bu04a3.js} +2 -2
- package/app/_app/immutable/entry/start.C4bzxGdW.js +1 -0
- package/app/_app/immutable/nodes/{0.DFJFBCCB.js → 0.C6N6B83E.js} +1 -1
- package/app/_app/immutable/nodes/{1.D_79m87b.js → 1.9pTjyJp5.js} +1 -1
- package/app/_app/immutable/nodes/{10.20u2-jxn.js → 10.BkbBDSaP.js} +1 -1
- package/app/_app/immutable/nodes/{11.CvMq32jC.js → 11.BcVi4XqZ.js} +1 -1
- package/app/_app/immutable/nodes/{12.Cd0cy1AC.js → 12.j9PkVob2.js} +1 -1
- package/app/_app/immutable/nodes/{13.DYYS3YVQ.js → 13.BOUYEx8n.js} +1 -1
- package/app/_app/immutable/nodes/{14.BEf5BJDn.js → 14.CuMuuCU7.js} +1 -1
- package/app/_app/immutable/nodes/{2.C_kLkHNl.js → 2.BHCkcrHF.js} +3 -3
- package/app/_app/immutable/nodes/{3.CZw3hv8O.js → 3.D6l9gEJu.js} +1 -1
- package/app/_app/immutable/nodes/{4.WMU9NDex.js → 4.BUHWJvB3.js} +1 -1
- package/app/_app/immutable/nodes/{5.CuqxSfl4.js → 5.C1jfy8Yg.js} +1 -1
- package/app/_app/immutable/nodes/{6.BXLQB7tR.js → 6.LSyNtBLJ.js} +1 -1
- package/app/_app/immutable/nodes/{7.BZvxNeL2.js → 7.CC7rRIn7.js} +1 -1
- package/app/_app/immutable/nodes/{8.Bj2O4pyx.js → 8.S9H6LDRX.js} +1 -1
- package/app/_app/immutable/nodes/{9.yeFzeUHj.js → 9.BPt57fDH.js} +1 -1
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +21 -21
- package/app/ai/index.html +24 -24
- package/app/blueprint/index.html +19 -19
- package/app/cookbook/index.html +19 -19
- package/app/index.html +27 -27
- package/app/m/ads/AdDeliveryTier/index.html +23 -23
- package/app/m/ads/AdEvent/index.html +23 -23
- package/app/m/ads/AdFormat/index.html +23 -23
- package/app/m/ads/AdGroup/index.html +23 -23
- package/app/m/ads/AdVariation/index.html +23 -23
- package/app/m/analytics/AnalyticsDataStream/index.html +23 -23
- package/app/m/analytics/AnalyticsEvent/index.html +23 -23
- package/app/m/analytics/AnalyticsProperty/index.html +23 -23
- package/app/m/analytics/AnalyticsReport/index.html +23 -23
- package/app/m/approvals/ApprovalEvent/index.html +23 -23
- package/app/m/approvals/ApprovalPolicy/index.html +23 -23
- package/app/m/approvals/ApprovalRequest/index.html +23 -23
- package/app/m/assets/Asset/attachments/index.html +24 -24
- package/app/m/assets/Asset/index.html +23 -23
- package/app/m/assets/AssetAssociation/index.html +23 -23
- package/app/m/assets/AssetMetafield/index.html +23 -23
- package/app/m/assets/AssetStatus/index.html +23 -23
- package/app/m/assets/AssetType/index.html +23 -23
- package/app/m/assets/Folder/index.html +23 -23
- package/app/m/chat/AgentSession/index.html +23 -23
- package/app/m/chat/ChatMessage/index.html +23 -23
- package/app/m/chat/ChatParticipant/index.html +23 -23
- package/app/m/chat/ChatReaction/index.html +23 -23
- package/app/m/chat/ChatRoom/index.html +23 -23
- package/app/m/chat/ChatThread/index.html +23 -23
- package/app/m/chat/VoiceGatewayTurn/index.html +23 -23
- package/app/m/chat/VoiceSession/index.html +23 -23
- package/app/m/commerce/Agreement/index.html +23 -23
- package/app/m/commerce/Cart/index.html +23 -23
- package/app/m/commerce/Contract/index.html +23 -23
- package/app/m/commerce/ContractLineItem/index.html +23 -23
- package/app/m/commerce/Customer/index.html +23 -23
- package/app/m/commerce/DocumentTax/index.html +23 -23
- package/app/m/commerce/Estimate/index.html +23 -23
- package/app/m/commerce/Fulfillment/index.html +23 -23
- package/app/m/commerce/FulfillmentLineItem/index.html +23 -23
- package/app/m/commerce/HistoricalCustomerFunds/index.html +23 -23
- package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +23 -23
- package/app/m/commerce/HistoricalSalesLine/index.html +23 -23
- package/app/m/commerce/Invoice/index.html +23 -23
- package/app/m/commerce/InvoiceLineItem/index.html +23 -23
- package/app/m/commerce/Lease/index.html +23 -23
- package/app/m/commerce/LicenseSale/index.html +23 -23
- package/app/m/commerce/Order/index.html +23 -23
- package/app/m/commerce/Payment/index.html +23 -23
- package/app/m/commerce/PaymentAllocation/index.html +23 -23
- package/app/m/commerce/PaymentInstrument/index.html +23 -23
- package/app/m/commerce/PaymentIntent/index.html +23 -23
- package/app/m/commerce/Payout/index.html +23 -23
- package/app/m/commerce/ProductionOrder/index.html +23 -23
- package/app/m/commerce/PurchaseContract/index.html +23 -23
- package/app/m/commerce/PurchaseOrder/index.html +23 -23
- package/app/m/commerce/SalesContract/index.html +23 -23
- package/app/m/commerce/SupplierQuote/index.html +23 -23
- package/app/m/commerce/TaxCode/index.html +23 -23
- package/app/m/commerce/TaxComponent/index.html +23 -23
- package/app/m/commerce/TaxSettings/index.html +23 -23
- package/app/m/commerce/TaxSummaryReport/index.html +23 -23
- package/app/m/commerce/Vendor/index.html +23 -23
- package/app/m/commerce/WholesaleOrder/index.html +23 -23
- package/app/m/content/Content/index.html +23 -23
- package/app/m/content/ContentContribution/index.html +23 -23
- package/app/m/content/ContentContributionAttachment/index.html +23 -23
- package/app/m/content/ContentContributionRevision/index.html +23 -23
- package/app/m/content/ContentContributionType/index.html +23 -23
- package/app/m/content/ContentContributor/index.html +23 -23
- package/app/m/content/ContentCorrection/index.html +23 -23
- package/app/m/content/ContentFeedSource/index.html +23 -23
- package/app/m/content/ContentGovernanceAssignment/index.html +23 -23
- package/app/m/content/ContentGovernancePolicy/index.html +23 -23
- package/app/m/content/ContentGovernanceProfile/index.html +23 -23
- package/app/m/content/ContentReference/index.html +23 -23
- package/app/m/content/ContentReview/index.html +23 -23
- package/app/m/content/ContentVersion/index.html +23 -23
- package/app/m/events/Event/index.html +23 -23
- package/app/m/events/EventParticipant/index.html +23 -23
- package/app/m/events/EventSeries/index.html +23 -23
- package/app/m/events/EventType/index.html +23 -23
- package/app/m/expenses/Expense/index.html +23 -23
- package/app/m/facts/Fact/index.html +23 -23
- package/app/m/facts/FactContent/index.html +23 -23
- package/app/m/facts/FactEvidence/index.html +23 -23
- package/app/m/facts/FactSource/index.html +23 -23
- package/app/m/facts/FactSubject/index.html +23 -23
- package/app/m/facts/FactTag/index.html +23 -23
- package/app/m/fields/FieldPolicy/index.html +23 -23
- package/app/m/fields/FieldPolicySuggestion/index.html +23 -23
- package/app/m/fields/FieldUsageCounter/index.html +23 -23
- package/app/m/images/Image/index.html +23 -23
- package/app/m/inventory/InventoryLocation/index.html +23 -23
- package/app/m/inventory/StockLevel/index.html +23 -23
- package/app/m/inventory/StockMovement/index.html +23 -23
- package/app/m/ledgers/Account/index.html +23 -23
- package/app/m/ledgers/Journal/index.html +23 -23
- package/app/m/ledgers/JournalEntry/index.html +23 -23
- package/app/m/ledgers/Ledger/index.html +23 -23
- package/app/m/manufacturing/Assembly/index.html +23 -23
- package/app/m/manufacturing/BillOfMaterials/index.html +23 -23
- package/app/m/manufacturing/BomLine/index.html +23 -23
- package/app/m/manufacturing/Operation/index.html +23 -23
- package/app/m/manufacturing/ProductionRun/index.html +23 -23
- package/app/m/manufacturing/ProductionRunCompletion/index.html +23 -23
- package/app/m/manufacturing/RoutingStep/index.html +23 -23
- package/app/m/marketing/Campaign/index.html +23 -23
- package/app/m/marketing/CampaignChannel/index.html +23 -23
- package/app/m/marketing/CampaignMetricSnapshot/index.html +23 -23
- package/app/m/messages/Account/index.html +23 -23
- package/app/m/messages/Attachment/index.html +23 -23
- package/app/m/messages/Blacklist/index.html +23 -23
- package/app/m/messages/Email/failed-sends/index.html +24 -24
- package/app/m/messages/Email/index.html +23 -23
- package/app/m/messages/Email/mailbox/index.html +24 -24
- package/app/m/messages/EmailAccount/index.html +23 -23
- package/app/m/messages/EmailAttachment/index.html +23 -23
- package/app/m/messages/EmailFolder/index.html +23 -23
- package/app/m/messages/Message/index.html +23 -23
- package/app/m/messages/MessagingEndpoint/index.html +23 -23
- package/app/m/messages/PersonaMessageRoute/index.html +23 -23
- package/app/m/messages/SlackAccount/index.html +23 -23
- package/app/m/messages/SlackMessage/index.html +23 -23
- package/app/m/messages/TelegramAccount/index.html +23 -23
- package/app/m/messages/Tweet/index.html +23 -23
- package/app/m/messages/TwitterAccount/index.html +23 -23
- package/app/m/messages/Whitelist/index.html +23 -23
- package/app/m/messages/ZulipAccount/index.html +23 -23
- package/app/m/places/Place/index.html +23 -23
- package/app/m/places/PlaceType/index.html +23 -23
- package/app/m/products/Category/index.html +23 -23
- package/app/m/products/Material/index.html +23 -23
- package/app/m/products/Product/index.html +23 -23
- package/app/m/products/Product/ingredients/index.html +24 -24
- package/app/m/products/ProductVariant/index.html +23 -23
- package/app/m/products/Sku/index.html +23 -23
- package/app/m/profiles/ApiKey/index.html +23 -23
- package/app/m/profiles/Bot/index.html +23 -23
- package/app/m/profiles/MagicLinkToken/index.html +23 -23
- package/app/m/profiles/NostrIdentity/index.html +23 -23
- package/app/m/profiles/OidcIdentity/index.html +23 -23
- package/app/m/profiles/Organization/index.html +23 -23
- package/app/m/profiles/Person/index.html +23 -23
- package/app/m/profiles/Profile/index.html +23 -23
- package/app/m/profiles/ProfileMetadata/index.html +23 -23
- package/app/m/profiles/ProfileMetafield/index.html +23 -23
- package/app/m/profiles/ProfileRelationship/index.html +23 -23
- package/app/m/profiles/ProfileRelationshipTerm/index.html +23 -23
- package/app/m/profiles/ProfileRelationshipType/index.html +23 -23
- package/app/m/profiles/ProfileType/index.html +23 -23
- package/app/m/projects/Comment/index.html +23 -23
- package/app/m/projects/Issue/index.html +23 -23
- package/app/m/projects/Label/index.html +23 -23
- package/app/m/projects/Project/index.html +23 -23
- package/app/m/projects/ProjectIntegration/index.html +23 -23
- package/app/m/projects/PullRequest/index.html +23 -23
- package/app/m/projects/Repository/index.html +23 -23
- package/app/m/properties/Property/index.html +23 -23
- package/app/m/properties/Zone/index.html +23 -23
- package/app/m/reports/RuntimeReport/index.html +23 -23
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +23 -23
- package/app/m/reports/SmrtReportLock/index.html +23 -23
- package/app/m/reports/SmrtReportRefreshTask/index.html +23 -23
- package/app/m/reports/SmrtReportRun/index.html +23 -23
- package/app/m/reports/SmrtReportSchedule/index.html +23 -23
- package/app/m/reports/SmrtReportWatermark/index.html +23 -23
- package/app/m/sales/Agreement/index.html +23 -23
- package/app/m/sales/AttributionException/index.html +23 -23
- package/app/m/sales/AttributionPolicy/index.html +23 -23
- package/app/m/sales/Commission/index.html +23 -23
- package/app/m/sales/CommissionAdjustment/index.html +23 -23
- package/app/m/sales/CommissionPayout/index.html +23 -23
- package/app/m/sales/CommissionPlan/index.html +23 -23
- package/app/m/sales/Earner/index.html +23 -23
- package/app/m/sales/EarnerSourceAttribution/index.html +23 -23
- package/app/m/sales/EarningEvent/index.html +23 -23
- package/app/m/sales/ExecutedAgreement/index.html +23 -23
- package/app/m/sales/Lead/index.html +23 -23
- package/app/m/sales/Opportunity/index.html +23 -23
- package/app/m/sales/OpportunityConversion/index.html +23 -23
- package/app/m/sales/PipelineDefinition/index.html +23 -23
- package/app/m/sales/PipelineStage/index.html +23 -23
- package/app/m/sales/Referral/index.html +23 -23
- package/app/m/sales/ReferralAgreement/index.html +23 -23
- package/app/m/sales/ReferralLink/index.html +23 -23
- package/app/m/sales/ReferralProgram/index.html +23 -23
- package/app/m/sales/ReferralTermSnapshot/index.html +23 -23
- package/app/m/sales/ReferralTouch/index.html +23 -23
- package/app/m/sales/Referrer/index.html +23 -23
- package/app/m/sales/SalesActivity/index.html +23 -23
- package/app/m/sales/SalesRepresentative/index.html +23 -23
- package/app/m/sites/Site/index.html +23 -23
- package/app/m/sites/SiteAgentBinding/index.html +23 -23
- package/app/m/social/OAuthState/index.html +23 -23
- package/app/m/social/SocialAccount/index.html +23 -23
- package/app/m/social/SocialPost/index.html +23 -23
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +23 -23
- package/app/m/subscriptions/BillingAdjustment/index.html +23 -23
- package/app/m/subscriptions/ClientCharge/index.html +23 -23
- package/app/m/subscriptions/CreditGrant/index.html +23 -23
- package/app/m/subscriptions/PricingRule/index.html +23 -23
- package/app/m/subscriptions/RetailCharge/index.html +23 -23
- package/app/m/subscriptions/SpendingPolicy/index.html +23 -23
- package/app/m/subscriptions/SubscriptionPlan/index.html +23 -23
- package/app/m/subscriptions/TenantSubscription/index.html +23 -23
- package/app/m/subscriptions/TenantUsageMetric/index.html +23 -23
- package/app/m/support/ServiceTimeEntry/index.html +23 -23
- package/app/m/support/SupportAiRun/index.html +23 -23
- package/app/m/support/SupportAvailability/index.html +23 -23
- package/app/m/support/SupportCase/index.html +23 -23
- package/app/m/support/SupportCaseEvent/index.html +23 -23
- package/app/m/support/SupportChannelBinding/index.html +23 -23
- package/app/m/support/SupportCharge/index.html +23 -23
- package/app/m/support/SupportCompensation/index.html +23 -23
- package/app/m/support/SupportCompensationPlan/index.html +23 -23
- package/app/m/support/SupportEscalation/index.html +23 -23
- package/app/m/support/SupportInteraction/index.html +23 -23
- package/app/m/support/SupportPlan/index.html +23 -23
- package/app/m/support/SupportPolicy/index.html +23 -23
- package/app/m/support/SupportQualification/index.html +23 -23
- package/app/m/support/SupportServiceTarget/index.html +23 -23
- package/app/m/support/SupportSpecialist/index.html +23 -23
- package/app/m/support/SupportWorkLink/index.html +23 -23
- package/app/m/tags/Tag/index.html +23 -23
- package/app/m/tags/TagAlias/index.html +23 -23
- package/app/m/timesheets/AttendanceBreak/index.html +23 -23
- package/app/m/timesheets/AttendancePunch/index.html +23 -23
- package/app/m/timesheets/AttendanceSegment/index.html +23 -23
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +23 -23
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +23 -23
- package/app/m/timesheets/ServiceTimeEntry/index.html +23 -23
- package/app/m/users/Group/index.html +23 -23
- package/app/m/users/GroupMember/index.html +23 -23
- package/app/m/users/GroupRole/index.html +23 -23
- package/app/m/users/Membership/index.html +23 -23
- package/app/m/users/MembershipOverride/index.html +23 -23
- package/app/m/users/Permission/index.html +23 -23
- package/app/m/users/Role/index.html +23 -23
- package/app/m/users/RolePermission/index.html +23 -23
- package/app/m/users/Session/index.html +23 -23
- package/app/m/users/Tenant/index.html +23 -23
- package/app/m/users/TenantIntegration/index.html +23 -23
- package/app/m/users/TenantPermissionOverride/index.html +23 -23
- package/app/m/users/User/index.html +23 -23
- package/app/m/video/Character/index.html +23 -23
- package/app/m/video/CharacterAsset/index.html +23 -23
- package/app/m/video/CompositeJob/index.html +23 -23
- package/app/m/video/Performer/index.html +23 -23
- package/app/m/video/PerformerAsset/index.html +23 -23
- package/app/m/video/Scene/index.html +23 -23
- package/app/m/video/SceneAsset/index.html +23 -23
- package/app/m/video/VideoComposition/index.html +23 -23
- package/app/m/video/VideoCompositionAsset/index.html +23 -23
- package/app/m/video/VideoSequence/index.html +23 -23
- package/app/m/video/VideoSequenceAsset/index.html +23 -23
- package/app/m/video/VideoShot/index.html +23 -23
- package/app/m/video/VideoShotAsset/index.html +23 -23
- package/app/m/video/VideoShotCharacter/index.html +23 -23
- package/app/m/video/VideoWorkflow/index.html +23 -23
- package/app/m/voice/VoiceOutput/index.html +23 -23
- package/app/m/voice/VoiceProfile/index.html +23 -23
- package/app/m/voice/VoiceSample/index.html +23 -23
- package/app/mcp.html +2 -2
- package/app/packages/ads/index.html +21 -21
- package/app/packages/analytics/index.html +21 -21
- package/app/packages/approvals/index.html +21 -21
- package/app/packages/assets/index.html +21 -21
- package/app/packages/chat/index.html +21 -21
- package/app/packages/comments/index.html +21 -21
- package/app/packages/commerce/index.html +21 -21
- package/app/packages/content/index.html +21 -21
- package/app/packages/events/index.html +21 -21
- package/app/packages/expenses/index.html +21 -21
- package/app/packages/facts/index.html +21 -21
- package/app/packages/fields/index.html +21 -21
- package/app/packages/human-resources/index.html +21 -21
- package/app/packages/images/index.html +21 -21
- package/app/packages/index.html +20 -20
- package/app/packages/ingestion/index.html +21 -21
- package/app/packages/inventory/index.html +21 -21
- package/app/packages/ledgers/index.html +21 -21
- package/app/packages/manufacturing/index.html +21 -21
- package/app/packages/marketing/index.html +21 -21
- package/app/packages/messages/index.html +21 -21
- package/app/packages/places/index.html +21 -21
- package/app/packages/preferences/index.html +21 -21
- package/app/packages/products/index.html +21 -21
- package/app/packages/profiles/index.html +21 -21
- package/app/packages/projects/index.html +21 -21
- package/app/packages/properties/index.html +21 -21
- package/app/packages/reports/index.html +21 -21
- package/app/packages/sales/index.html +21 -21
- package/app/packages/sites/index.html +21 -21
- package/app/packages/social/index.html +21 -21
- package/app/packages/subscriptions/index.html +21 -21
- package/app/packages/support/index.html +21 -21
- package/app/packages/tags/index.html +21 -21
- package/app/packages/timesheets/index.html +21 -21
- package/app/packages/users/index.html +21 -21
- package/app/packages/video/index.html +21 -21
- package/app/packages/voice/index.html +21 -21
- package/app/packages/webhooks/index.html +21 -21
- package/app/recipes/account-access/help/index.html +22 -22
- package/app/recipes/account-access/index.html +23 -23
- package/app/recipes/activity/help/index.html +21 -21
- package/app/recipes/activity/index.html +23 -23
- package/app/recipes/agreements/help/index.html +21 -21
- package/app/recipes/agreements/index.html +23 -23
- package/app/recipes/analytics.reports/help/index.html +21 -21
- package/app/recipes/analytics.reports/index.html +23 -23
- package/app/recipes/assets/help/index.html +21 -21
- package/app/recipes/assets/index.html +23 -23
- package/app/recipes/billing/help/index.html +21 -21
- package/app/recipes/billing/index.html +23 -23
- package/app/recipes/chat.assistant/help/index.html +21 -21
- package/app/recipes/chat.assistant/index.html +23 -23
- package/app/recipes/comments/help/index.html +21 -21
- package/app/recipes/comments/index.html +23 -23
- package/app/recipes/commerce.customers/help/index.html +21 -21
- package/app/recipes/commerce.customers/index.html +23 -23
- package/app/recipes/commerce.estimates/help/index.html +21 -21
- package/app/recipes/commerce.estimates/index.html +23 -23
- package/app/recipes/commerce.purchases/help/index.html +21 -21
- package/app/recipes/commerce.purchases/index.html +23 -23
- package/app/recipes/commerce.sales/help/index.html +21 -21
- package/app/recipes/commerce.sales/index.html +23 -23
- package/app/recipes/commerce.vendors/help/index.html +21 -21
- package/app/recipes/commerce.vendors/index.html +23 -23
- package/app/recipes/commerce.wholesale/help/index.html +21 -21
- package/app/recipes/commerce.wholesale/index.html +23 -23
- package/app/recipes/events.calendar/help/index.html +21 -21
- package/app/recipes/events.calendar/index.html +23 -23
- package/app/recipes/expenses.tracking/help/index.html +21 -21
- package/app/recipes/expenses.tracking/index.html +23 -23
- package/app/recipes/fields.form-customization/help/index.html +21 -21
- package/app/recipes/fields.form-customization/index.html +23 -23
- package/app/recipes/ingestion/help/index.html +21 -21
- package/app/recipes/ingestion/index.html +23 -23
- package/app/recipes/integrations/help/index.html +21 -21
- package/app/recipes/integrations/index.html +23 -23
- package/app/recipes/inventory.stock/help/index.html +21 -21
- package/app/recipes/inventory.stock/index.html +23 -23
- package/app/recipes/ledgers.bookkeeping/help/index.html +21 -21
- package/app/recipes/ledgers.bookkeeping/index.html +23 -23
- package/app/recipes/messages/help/index.html +21 -21
- package/app/recipes/messages/index.html +23 -23
- package/app/recipes/products/help/index.html +21 -21
- package/app/recipes/products/index.html +23 -23
- package/app/recipes/projects.tracker/help/index.html +21 -21
- package/app/recipes/projects.tracker/index.html +23 -23
- package/app/recipes/reports.materialized/help/index.html +21 -21
- package/app/recipes/reports.materialized/index.html +23 -23
- package/app/recipes/reports.runtime/help/index.html +21 -21
- package/app/recipes/reports.runtime/index.html +23 -23
- package/app/recipes/sales.pipeline/help/index.html +21 -21
- package/app/recipes/sales.pipeline/index.html +23 -23
- package/app/recipes/tags.taxonomy/help/index.html +21 -21
- package/app/recipes/tags.taxonomy/index.html +23 -23
- package/app/recipes/team-collaboration/help/index.html +21 -21
- package/app/recipes/team-collaboration/index.html +23 -23
- package/app/recipes/timesheets.time-entries/help/index.html +21 -21
- package/app/recipes/timesheets.time-entries/index.html +23 -23
- package/app/s/custom-accounts/index.html +19 -19
- package/app/s/custom-appointments/index.html +19 -19
- package/app/s/custom-billing/index.html +19 -19
- package/app/s/custom-bookings/index.html +19 -19
- package/app/s/custom-buying/index.html +19 -19
- package/app/s/custom-checkout/index.html +19 -19
- package/app/s/custom-classes/index.html +19 -19
- package/app/s/custom-clients/index.html +19 -19
- package/app/s/custom-events/index.html +19 -19
- package/app/s/custom-fleet/index.html +19 -19
- package/app/s/custom-gigs/index.html +19 -19
- package/app/s/custom-giving/index.html +19 -19
- package/app/s/custom-instruments/index.html +19 -19
- package/app/s/custom-jobs/index.html +19 -19
- package/app/s/custom-kitchen/index.html +19 -19
- package/app/s/custom-lessons/index.html +19 -19
- package/app/s/custom-material/index.html +19 -19
- package/app/s/custom-meetings/index.html +19 -19
- package/app/s/custom-members/index.html +19 -19
- package/app/s/custom-merch/index.html +19 -19
- package/app/s/custom-money/index.html +19 -19
- package/app/s/custom-paint/index.html +19 -19
- package/app/s/custom-parts/index.html +19 -19
- package/app/s/custom-rentals/index.html +19 -19
- package/app/s/custom-roastery/index.html +19 -19
- package/app/s/custom-schedule/index.html +19 -19
- package/app/s/custom-shelf/index.html +19 -19
- package/app/s/custom-shop/index.html +19 -19
- package/app/s/custom-students/index.html +19 -19
- package/app/s/custom-wholesale/index.html +19 -19
- package/app/s/custom-work/index.html +19 -19
- package/app/s/custom-yard/index.html +19 -19
- package/app/s/section-access-control/index.html +19 -19
- package/app/s/section-account-security/index.html +19 -19
- package/app/s/section-accounting/index.html +19 -19
- package/app/s/section-activity/index.html +19 -19
- package/app/s/section-agreements/index.html +19 -19
- package/app/s/section-analytics/index.html +19 -19
- package/app/s/section-assets/index.html +19 -19
- package/app/s/section-billing/index.html +19 -19
- package/app/s/section-calendar/index.html +19 -19
- package/app/s/section-catalog/index.html +19 -19
- package/app/s/section-chat.assistant/index.html +19 -19
- package/app/s/section-comments/index.html +19 -19
- package/app/s/section-fields.form-customization/index.html +19 -19
- package/app/s/section-ingestion/index.html +19 -19
- package/app/s/section-integrations/index.html +19 -19
- package/app/s/section-messages/index.html +19 -19
- package/app/s/section-more/index.html +19 -19
- package/app/s/section-operations/index.html +19 -19
- package/app/s/section-projects/index.html +19 -19
- package/app/s/section-purchasing/index.html +19 -19
- package/app/s/section-reports.materialized/index.html +19 -19
- package/app/s/section-reports.runtime/index.html +19 -19
- package/app/s/section-sales/index.html +19 -19
- package/app/s/section-taxonomy/index.html +19 -19
- package/app/s/section-team/index.html +19 -19
- package/app/s/section-work/index.html +19 -19
- package/dist/catalog/catalog.json +50 -38
- package/dist/smrt-version.d.ts +1 -1
- package/dist/smrt-version.js +1 -1
- package/package.json +54 -54
- package/app/_app/immutable/chunks/DGaFQflg.js +0 -1
- package/app/_app/immutable/chunks/IDZmjRDr.js +0 -1
- package/app/_app/immutable/chunks/ezs6CGyc.js +0 -1
- package/app/_app/immutable/entry/start.CZvO61qD.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./
|
|
2
|
-
import{$ as e,Et as t,Mt as n,bt as r,vt as i}from"./DG3qFFTE.js";import{t as a}from"./uBIymjUX.js";import"./xihTtKlq.js";import{I as o,K as s,L as c,O as l,U as u,W as d,_ as f,dt as p,ft as m,h,lt as g,p as _,st as v,x as y}from"./D3lXu_rt.js";import{g as ee}from"./BeL8dJx9.js";import"./DF-0MxNw.js";import"./DIE02RSm.js";import{u as b}from"./DfN2k_EX.js";import{C as x,D as te,E as S,F as ne,I as C,L as re,N as ie,O as ae,S as oe,T as se,_ as ce,b as le,d as ue,g as de,h as fe,n as pe,r as me,v as he,w as ge,x as _e,z as ve}from"./DmHVTNcC.js";import{B as ye,G as be,J as xe,R as Se,V as Ce,W as we,X as Te,Y as Ee,a as De,b as w,c as Oe,d as ke,i as Ae,j as je,l as Me,n as Ne,o as Pe,q as Fe,t as T,v as Ie,x as E,z as Le}from"./lUJaueNM.js";function Re(e){let t=e?.surfaces?.find(e=>e.kind===`widget`&&e.sectionDefault===!0);return t?{id:t.type,type:t.type,span:4,options:{}}:void 0}function ze(e){let t=e.lastIndexOf(`#`);if(t<=0||t===e.length-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return n.startsWith(`.`)||n.startsWith(`/`)||/\s/.test(n)||!/^[A-Za-z_$][\w$]*$/.test(r)?null:{specifier:n,exportName:r}}function D(e,t){let n=ze(e);return n?Promise.resolve(t(n.specifier,n.exportName)).then(t=>{if(t==null)throw Error(`export "${e}" was not found`);return t}):Promise.reject(Error(`invalid export ref "${e}"`))}function Be(e){let t;return()=>(t??=e(),t)}function Ve(e){return typeof e==`object`&&!!e&&`default`in e&&!!e.default}function He(e,t,n){let r=Be(()=>D(e.export,t)),i=e.optionsEditor?Be(()=>D(e.optionsEditor,t)):void 0,a=e.data?.load?Be(()=>D(e.data?.load,t)):void 0,o={type:e.type,title:e.label,options:e.options??[],loadComponent:async()=>{let e=await r();return Ve(e)?e.default:e}};return e.description!==void 0&&(o.description=e.description),e.icon!==void 0&&(o.icon=e.icon),e.version!==void 0&&(o.version=e.version),e.allowedIn&&(o.allowedIn=e.allowedIn),e.defaultSpan!==void 0&&(o.defaultSpan=e.defaultSpan),e.minSpan!==void 0&&(o.minSpan=e.minSpan),e.maxSpan!==void 0&&(o.maxSpan=e.maxSpan),n&&(o.migrate=n),i&&(o.loadOptionsEditor=async()=>{let e=await i();return Ve(e)?e.default:e}),a&&(o.load=async(t,n)=>{let r=await a();if(typeof r!=`function`)throw Error(`loader "${e.data?.load}" is not a function`);return r(t,n)}),o}async function Ue(e,t,n,r={}){let i=[],a=[],o=[];for(let s of t)if(!r.enabled||r.enabled(s.id))for(let t of s.surfaces??[]){if(t.kind!==`widget`)continue;let c=(e,n)=>a.push({recipeId:s.id,type:t.type,reason:e,message:n});if(e.has(t.type)&&!r.replace){c(`duplicate_type`,`"${t.type}" is already registered`);continue}let l;if(t.migrate)try{let e=await D(t.migrate,n);if(typeof e!=`function`)throw Error(`not a function`);l=e}catch(e){c(`unresolved`,`migrate "${t.migrate}": ${e instanceof Error?e.message:String(e)}`);continue}try{o.push(e.register(He(t,n,l),{replace:r.replace})),i.push(t.type)}catch(e){c(`invalid`,e instanceof Error?e.message:String(e))}}return{registered:i,skipped:a,dispose:()=>{for(let e of o.splice(0))e()}}}var We=[`identifier`,`status`,`date`,`party`,`total`,`money`];function Ge(e){for(let t of[`identifier`,`status`,`date`,`money`,`quantity`,`party`,`title`])if(e.includes(t))return t}function O(e,t,n={}){let r=new Set(n.exclude??[]),i=n.max??4,a=Object.keys(t).filter(t=>!r.has(t)&&t in e.fields),o=e=>a.find(n=>t[n]?.includes(e)),s=[],c=e=>{e&&!s.includes(e)&&s.push(e)};c(o(`identifier`)??o(`title`));for(let e of We)e!==`identifier`&&(e===`money`&&s.some(e=>t[e]?.includes(`money`))||c(e===`date`?a.find(e=>t[e]?.includes(`date`)&&e!==`createdAt`&&e!==`updatedAt`)??o(`date`):o(e)));return s.slice(0,i).map(n=>({key:n,label:k(n,e),...Ge(t[n]??[])?{role:Ge(t[n]??[])}:{}}))}function Ke(e,t,n={}){let r=new Set(n.exclude??[]),i=Object.keys(t).filter(t=>!r.has(t)&&t in e.fields),a=i.filter(t=>e.fields[t]?.type===`text`),o=a.find(e=>/^(?:description|title|name|label)$/.test(e))??a.find(e=>t[e]?.includes(`title`))??a.find(e=>!t[e]?.includes(`identifier`)),s=i.find(e=>t[e]?.includes(`quantity`)),c=i.filter(e=>t[e]?.includes(`money`)),l=c.find(e=>/unit|price|rate/i.test(e)),u=c.find(e=>/^(?:amount|lineTotal|total|lineAmount)$/.test(e))??[...c].reverse().find(e=>e!==l),d=[];return o&&d.push({key:o,label:k(o,e)}),s&&d.push({key:s,label:k(s,e),role:`quantity`}),l&&d.push({key:l,label:k(l,e),role:`money`,summarize:!1}),u&&u!==l&&d.push({key:u,label:k(u,e),role:`money`}),d}function k(e,t){let n=t.fields[e];return n&&(n.type===`foreignKey`||n.type===`crossPackageRef`)&&/.[a-z]Id$/.test(e)?S(e.slice(0,-2)):S(e)}var qe=[`text`,`integer`,`decimal`,`boolean`,`datetime`,`json`,`foreignKey`,`crossPackageRef`];function Je(e){return qe.includes(e)?e:`text`}var Ye=/(Date|^date|period(Start|End))$/;function Xe(e,t){return t.type===`datetime`&&!t.system&&Ye.test(t.name)&&!e.fields.some(e=>e.name===`allDay`)?`date`:void 0}function Ze(e){return ue(e)[0]}function Qe(e,t){let n=t.ui?{...t.ui}:void 0,r=l(t)?`money`:Xe(e,t);return{type:Je(t.type),required:t.required,nullable:!t.required,...t.default===void 0?{}:{default:t.default},...t.description?{description:t.description}:{},...n?{ui:n}:{},...t.enum?.length?{enum:[...t.enum]}:{},...r?{format:r}:{},...Ze(e)===t.name?{display:!0}:{}}}function $e(e,t){return e.includes(`:`)?e:`${t.slice(0,t.lastIndexOf(`:`))}:${e}`}function et(e,t){if(!t.related)return!1;let n=$e(t.related,e.id);return xe(g,n,s).some(t=>t.id===e.id)}function tt(e){return e.fields.flatMap(t=>{if(t.type!==`foreignKey`&&t.type!==`crossPackageRef`||!t.related)return[];let n=m($e(t.related,e.id));return n?[{field:t.name,kind:t.type===`crossPackageRef`?`crossPackageRef`:`foreignKey`,relatedCollection:n.model.collection,...et(e,t)?{role:`items`}:{}}]:[]})}function A(e){let t=tt(e);return{name:e.collection,objectRef:e.id,className:e.name,idField:`id`,fields:Object.fromEntries(e.fields.map(t=>[t.name,Qe(e,t)])),...t.length?{relationships:t}:{}}}function nt(e,t){return{objectRef:e.id,fields:Object.fromEntries(t.map((e,t)=>[e.name,{visibility:`basic`,label:e.label,help:e.help??null,order:t,required:e.required}]))}}function rt(e,t){let n=new Set(t);for(let t of e)for(let e of t.models)n.add(e);return n}function it(e){return _(e.replace(/_?id$/i,``)||e)}function at(e,t,n){let r=Ee(e,t),i=Te(e,t).filter(e=>e.model.exposed&&n.has(e.model.id)),a=new Set(xe(e,t,s).map(e=>e.id)),o=new Map;for(let e of i)o.set(e.model.id,(o.get(e.model.id)??0)+1);let c=i.map(e=>{let t=a.has(e.model.id)?`items`:`children`,n=A(e.model),i=ae(n),s=[e.fk];return{model:e.model.id,field:e.fk,label:(o.get(e.model.id)??0)>1?`${we(e.model.name,r)} (${it(e.fk).toLowerCase()})`:we(e.model.name,r),kind:t,columns:t===`items`?Ke(n,i,{exclude:s}):O(n,i,{exclude:s,max:5}),...t===`items`&&`sortOrder`in n.fields?{sort:`sortOrder`}:{}}});for(let n of be(e,t))c.push({model:n.model.id,field:n.fk,label:it(n.fk),kind:`reference`});return c}var ot=Symbol(`smrt-cookbook`);function st(){return t(ot)}function ct(e,t){let{sections:n}=t;if(!n)throw Error(`the cookbook widget context is missing`);let r=typeof e.section==`string`?e.section:``,i=r?n.find(e=>e.id===`section:${r}`||e.id===`custom:${r}`)?.id:t.overviewId;if(!i)throw Error(`unknown section ${r}`);return se(n,i)}function lt(e){return e?async(t,n)=>{let r=ct(t,n);try{let t=await e(n,r.items.map(e=>({...e})));if(!Array.isArray(t))return r;let i=new Set,a=[];for(let e of t){if(!e||typeof e.href!=`string`)continue;let t=typeof e.id==`string`&&e.id?e.id:e.href;i.has(t)&&(t=`${t}#${a.length}`),i.add(t),a.push({...e,id:t})}return{items:a}}catch(e){if(n.signal?.aborted)throw e;return r}}:ct}var ut=new Set([`foreignKey`,`crossPackageRef`]);function j(e,t){return`/m/${e}/${t}/`}function dt(e,t,n,r=`view`){let i=`${j(e,t)}${encodeURIComponent(n)}/`;return r===`edit`?`${i}edit/`:i}function ft(e,t,n,r){return`${j(e,t)}?${encodeURIComponent(n)}=${encodeURIComponent(r)}`}function pt(e,t){let n=new URLSearchParams(e);for(let e of t.fields){if(!ut.has(e.type))continue;let t=n.get(e.name);if(t)return{field:e.name,equals:t}}}function mt(e){return e?.equals===void 0?``:`${encodeURIComponent(e.field)}=${encodeURIComponent(e.equals)}`}function ht(e,t,n){let r=n.filter(t=>t.model.id===e&&t.filter);if(t){let e=r.find(e=>e.key===t)?.filter;return e?{field:e.field,equals:e.value}:void 0}let i=r[0]?.filter;if(!i)return;let a=r.map(e=>e.filter).filter(e=>e?.field===i.field).map(e=>String(e?.value));return{field:i.field,notIn:[...new Set(a)]}}function gt(e,t){if(!e)return!0;let n=String(t[e.field]??``);return e.equals===void 0?!e.notIn?.includes(n):n===e.equals}function _t(e){return e?.equals===void 0?{}:{[e.field]:e.equals}}var M=e=>typeof e==`number`&&Number.isSafeInteger(e)?e:null,vt=(e,t)=>e.fields.some(e=>e.name===t);function yt(e,t){let n=ae(A(e)),r=fe(t,n);return Object.values(r).some(e=>M(e)!==null)?r:void 0}function bt(e,t){return!!e.fields.find(e=>e.name===`status`)?.enum?.includes(`draft`)&&typeof t.status==`string`&&t.status!==``&&t.status!==`draft`}function xt(e,t,n){if(!bt(e,t)||![`subtotal`,`taxAmount`,`totalAmount`,`discountTotal`].every(t=>vt(e,t)))return;let r=M(t.subtotal),i=M(t.taxAmount),a=M(t.totalAmount),o=M(t.discountTotal)??0;if(r===null||i===null||a===null)return;let s=u(t,`exclusive`);return{subtotal:r,discount:o,tax:i,total:a,lineAmountType:s,roundingScope:d(t,`line`),showNetSubtotal:s===`inclusive`,taxes:v(n,s).flatMap(e=>e.taxComponentId?[{taxComponentId:e.taxComponentId,name:e.name,percent:e.percent,taxable:e.taxable,tax:e.tax}]:[])}}var N=ie();function P(e){let{source:t,href:n}=e;if(!t||!n)throw Error(`the planner widget context is missing`);return{source:t,href:n}}function F(e){let t=typeof e==`string`?m(e):void 0;if(!t)throw Error(`unknown model ${String(e)}`);return{model:t.model,packageId:t.pkg.id,path:j(t.pkg.id,t.model.name)}}var St=new Set([`foreignKey`,`crossPackageRef`]);function Ct(e,t,n){let r=e.filter;if(typeof r!=`string`||r===``)return;if(r!==`parent`)throw Error(`unknown filter ${r}`);let{record:i}=t;if(!i?.id)throw Error(`the parent filter needs a record`);let a=typeof e.parentField==`string`&&e.parentField?e.parentField:e.field,o=typeof a==`string`?a:``,s=n.fields.find(e=>e.name===o);if(!s||!St.has(s.type))throw Error(`${n.name} has no reference field ${o}`);return{field:o,id:i.id}}async function I(e,t,n){return n?e.listWhere(t,n.field,n.id):e.list(t)}function L(e,t,n){return e(n?ft(t.packageId,t.model.name,n.field,n.id):t.path)}var R=e=>typeof e==`number`&&Number.isFinite(e);async function wt(e,t){let{source:n,href:r}=P(t),i=F(e.model),{model:a}=i,o=Ct(e,t,a),s=await I(n,a,o),c=L(r,i,o),u=typeof e.measure==`string`?e.measure:``;if(u===`count`||u===``)return{value:s.length,format:`integer`,href:c};let d=a.fields.find(t=>t.name===e.field);if(!d||d.type!==`integer`&&d.type!==`decimal`)throw Error(`${u} needs a numeric field of ${a.name}`);let f=s.map(e=>e[d.name]).filter(R),p=0;if(f.length){if(u===`sum`||u===`avg`)p=f.reduce((e,t)=>e+t,0),u===`avg`&&(p/=f.length);else if(u===`min`)p=Math.min(...f);else if(u===`max`)p=Math.max(...f);else throw Error(`unknown measure ${u}`)}let m=l(d);return{value:m?Math.round(p):p,format:m?`money`:d.type===`integer`?`integer`:`decimal`,...m?{currency:`USD`}:{},href:c}}function Tt(e,t){return R(e)&&R(t)?e-t:String(e??``).localeCompare(String(t??``))}var Et=new Set([`createdAt`,`updatedAt`]),Dt=[`identifier`,`status`,`date`,`money`,`quantity`,`party`,`title`];function Ot(e=[]){return Dt.find(t=>e.includes(t))}function kt(e,t,n,r){let i=A(e),a=r?[r]:[],o=ge(n);if(o.length===0)return O(i,t,{exclude:a,max:5});let s=[...Ke(i,t,{exclude:a}),...O(i,t,{exclude:a,max:o.length+8})];return o.map(n=>{let r=e.fields.find(e=>e.name===n);if(!r)throw Error(`${e.name} has no field ${n}`);let i=s.find(e=>e.key===n);if(i)return i;let a=Ot(t[n]);return{key:n,label:St.has(r.type)?_(n.replace(/Id$/,``)):_(n),...a?{role:a}:{}}})}var At=new Set([`money`,`quantity`]);function jt(e,t){let n={};for(let r of e)(r.summarize??At.has(r.role))&&(n[r.key]=t.reduce((e,t)=>{let n=t[r.key];return R(n)?e+n:e},0));return n}function Mt(e,t){let n=te(A(e)),r=new Set(t.map(e=>n?e[n]:void 0).filter(e=>typeof e==`string`&&e!==``));return r.size===1?[...r][0]??`USD`:`USD`}async function Nt(e,t){let{source:n,href:r}=P(t),i=F(e.model),{model:a}=i,o=Ct(e,t,a),s=await I(n,a,o);if(typeof e.sort==`string`&&e.sort){if(!a.fields.find(t=>t.name===e.sort)&&!Et.has(e.sort))throw Error(`${a.name} has no field ${e.sort}`);let t=s.some(t=>t[e.sort]!==void 0)?e.sort:B(a)?.name;if(t){let n=e.direction===`asc`?1:-1;s=[...s].sort((e,r)=>n*Tt(e[t],r[t]))}}let c=kt(a,ae(A(a)),e.columns,o?.field),l=R(e.limit)?e.limit:5,u=s.slice(0,l),d=a.fields.filter(e=>St.has(e.type)&&c.some(t=>t.key===e.name)),f=await me(n,d,u),p=e=>Object.fromEntries(c.map(t=>{let n=e[t.key],r=d.find(e=>e.name===t.key);return r?.related&&typeof n==`string`&&n?[t.key,f.get(h(r.related,n))??``]:[t.key,n??null]})),m=jt(c,s),g=!Fe(a);return{rows:await Promise.all(u.map(async e=>({id:String(e.id),title:await pe(n,a,e,0,o?.field),...g?{href:r(dt(i.packageId,a.name,String(e.id)))}:{},cells:p(e)}))),total:s.length,...g?{href:L(r,i,o)}:{},columns:c,currency:Mt(a,s),...Object.keys(m).length?{summaries:m}:{}}}var Pt={"7d":7,"30d":30,"90d":90,"12m":365,all:null},z=864e5;function Ft(e){return e===`7d`||e===`30d`?`day`:e===`90d`?`week`:`month`}function It(e,t){let n=new Date(e);if(t===`month`)return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1);let r=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate());return t===`week`?r-(n.getUTCDay()+6)%7*z:r}function Lt(e,t){if(t===`month`){let t=new Date(e);return Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,1)}return e+(t===`week`?7:1)*z}function Rt(e,t){let n=new Date(e).toISOString();return t===`month`?n.slice(0,7):n.slice(0,10)}var zt=e=>e.type===`datetime`&&!e.system;function B(e){let t=e.fields.filter(zt);return t.find(e=>/^(issue|order|start|created)/i.test(e.name))??t[0]}function V(e){if(typeof e!=`string`&&typeof e!=`number`)return;let t=new Date(e).getTime();return Number.isFinite(t)?t:void 0}async function Bt(e,t){let{source:n,href:r}=P(t),i=F(e.model),{model:a}=i,o=Ct(e,t,a),s=typeof e.groupBy==`string`?e.groupBy:``,c=s?a.fields.find(e=>e.name===s):B(a);if(!c)throw Error(s?`${a.name} has no field ${s}`:`${a.name} has no date field to chart; choose a group-by field`);let u=typeof e.measure==`string`?e.measure:``,d;if(u&&u!==`count`){if(u!==`sum`&&u!==`avg`)throw Error(`unknown measure ${u}`);if(d=a.fields.find(t=>t.name===e.field),!d||d.type!==`integer`&&d.type!==`decimal`)throw Error(`${u} needs a numeric field of ${a.name}`)}let f=typeof e.period==`string`?e.period:`30d`;if(!Object.hasOwn(Pt,f))throw Error(`unknown period ${f}`);let p=Pt[f],m=zt(c),h=m?c:B(a),g=p!==null&&h?y-p*z:-1/0,_=await I(n,a,o);h&&g!==-1/0&&(_=_.filter(e=>{let t=V(e[h.name]);return t!==void 0&&t>=g&&t<=y}));let v=new Map,ee=(e,t,n)=>{let r=v.get(e)??{key:t,sum:0,n:0};if(d){let e=n[d.name];if(!R(e))return;r.sum+=e}r.n+=1,v.set(e,r)},b=Ft(f);if(m){let e=g===-1/0?Math.min(..._.map(e=>V(e[c.name])??y),y):g;for(let t=It(e,b);t<=y;t=Lt(t,b))v.set(Rt(t,b),{key:t,sum:0,n:0});for(let e of _){let t=V(e[c.name]);if(t===void 0)continue;let n=It(t,b);ee(Rt(n,b),n,e)}}else for(let e of _){let t=e[c.name],n=t==null||t===``?`(none)`:String(t);ee(n,n,e)}let x=d?l(d):!1,te=e=>{if(!d)return e.n;let t=u===`avg`&&e.n?e.sum/e.n:e.sum;return x?Math.round(t):t},S=[...v.entries()].map(([e,t])=>({label:e,value:te(t),key:t.key}));return S=m?S.sort((e,t)=>Number(e.key)-Number(t.key)):S.sort((e,t)=>t.value-e.value||e.label.localeCompare(t.label)),{points:S.map(({label:e,value:t})=>({label:e,value:t})),format:d?x?`money`:d.type===`integer`?`integer`:`decimal`:`integer`,...x?{currency:`USD`}:{},href:L(r,i,o)}}var Vt=async(e,t)=>{let{source:n,entryIndex:r}=e;if(!n||!r)throw Error(`the planner widget context is missing`);return Promise.all(t.map(async e=>{let t=r.get(e.id??``);if(!t)return e;let i=await n.list(t.model);return{...e,count:i.filter(e=>gt(t.scope,e)).length}}))};he(N,{metric:wt,records:Nt,chart:Bt,shortcuts:Vt,shortcuts:lt(Vt)});function Ht(e){let{relations:t,viewAllHref:n}=e;if(!t)throw Error(`the record page context is missing`);return{relations:t,records:Nt,viewAllHref:n}}async function Ut(e,t){let{source:n}=P(e),r=e.record;if(!r?.id)throw Error(`line items need a record`);let{model:i}=F(r.model),a=await n.get(i,r.id);if(!a)return{};let o=t.find(e=>e.kind===`items`),s=o?m(o.model)?.model:void 0,c=xt(i,a,o&&s?await n.listWhere(s,o.field,r.id):[]),l=c?void 0:yt(i,a),u=te(A(i)),d=u?a[u]:void 0;return{...c?{storedTotals:c}:{},...l?{totals:l}:{},...typeof d==`string`&&d?{currency:d}:{}}}N.register(ce((e,t)=>_e(Ht(t))(e,t))),N.register(de(async(e,t)=>{let n=Ht(t),{totals:r,storedTotals:i,currency:a}=await Ut(t,n.relations);return le({...n,totals:()=>r,storedTotals:()=>i,currency:()=>a})(e,t)}));var Wt=[`shortcuts`,`metric`,`records`,`chart`,`note`],Gt={"@happyvertical/smrt-reports/svelte":async()=>({SavedReportsWidget:(await a(async()=>{let{default:e}=await import(`./JqlEoPqZ.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]),import.meta.url)).default})},Kt=async(e,t)=>{let n=Gt[e];if(n)return(await n())[t]},qt=w.filter(e=>e.surfaces?.some(e=>e.kind===`widget`)),Jt=qt.flatMap(e=>(e.surfaces??[]).flatMap(e=>e.kind===`widget`?[e.type]:[]));Ue(N,qt,Kt);var H=new Map(Se(w).map(e=>[`section:${e.id}`,e])),Yt=g.packages.flatMap(e=>e.models.map(e=>e.id)),Xt=[...Wt,...Jt];function Zt(e){let t=H.get(e);for(let e of t?.recipes??[]){let t=Ie(e)[0];if(t)return{id:t.model.id,name:_(t.model.name)}}}function Qt(e){let t=Re(H.get(e)?.recipes[0]);if(t&&Jt.includes(t.type))return[t];let n=[{id:`shortcuts`,type:`shortcuts`,span:4,options:{}}],r=Zt(e);return r&&n.push({id:`count`,type:`metric`,span:1,options:{title:f(r.name),model:r.id,measure:`count`}},{id:`latest`,type:`records`,span:3,options:{title:`${r.name} records`,model:r.id,limit:5}}),n}var $t=new Map;function en(e){if(!ve.test(e))return;let t=$t.get(e);return t||(t=C({id:e,allowed:Xt,models:Yt,defaults:Qt(e)}),$t.set(e,t)),t}function tn(e,t){return`detail:${e}.${t}`}var nn=new Map(g.packages.flatMap(e=>e.models.filter(e=>e.exposed).map(t=>[x(t.id),{packageId:e.id,model:t}])));function U(e){let[,t,n]=/^detail:([A-Za-z0-9_-]+)\.([A-Za-z0-9_]+)$/.exec(e)??[],r=t&&n?p(t,n):void 0;return t&&r?.exposed?{packageId:t,model:r}:nn.get(e)}var rn=new Set(g.packages.flatMap(e=>e.models.filter(e=>e.exposed).map(e=>e.id))),an=new Map;function on(e){let t=an.get(e);if(t)return t;let n=U(e);if(!n)return;let r=at(g,n.model.id,rn),i=oe(A(n.model),r,{id:e,maxMetrics:2*r.length});return t=C({...i,maxWidgets:Math.max(i.maxWidgets??24,i.defaults.length+24)}),an.set(e,t),t}function sn(e,t){let n=on(e),r=U(e);if(!n||!r)return;let i=at(g,r.model.id,t),a=0,o=n.defaults.filter(e=>e.type===`line-items`?i.some(e=>e.kind===`items`):e.type===`related`?i.some(e=>e.kind===`children`):t.has(String(e.options.model))?e.type!==`metric`||(a+=1,a<=4):!1);return C({...n,defaults:o})}function cn(e){return e.startsWith(`detail:`)?on(e):en(e)}function ln(e,t){return H.has(e)||e===`section:${je.id}`?!0:e.startsWith(`detail:`)?U(e)!==void 0:e.startsWith(`custom:`)&&ve.test(e)&&(t?.customSections??[]).some(t=>t.id===e)}var un=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function dn(e,t){let n=t.widgetId?`widget ${t.widgetId}${t.type?` (${t.type})`:``}`:`an entry`,r=t.options?.length?`: ${t.options.map(e=>`${e.key} ${e.code}`).join(`, `)}`:``;return`Overview ${e}: ${n} was dropped (${t.code}${r}).`}function fn(e,t){let n={...e};return e.added&&(n.added=e.added.filter(e=>!t.has(e.id))),e.changed&&(n.changed=Object.fromEntries(Object.entries(e.changed).filter(([e])=>!t.has(e)))),n}function pn(e,t){let n=cn(e);if(!n)return{override:null,issues:[{widgetId:null,type:null,code:`malformed`,message:`not an overview id`}]};let r=ne(n,t,N);if(r.ok)return{override:r.override,issues:[]};let i=re(t),a=new Set(r.issues.flatMap(e=>e.widgetId?[e.widgetId]:[]));if(!i.override)return{override:null,issues:r.issues};let o=ne(n,fn(i.override,a),N);return o.ok?{override:o.override,issues:r.issues}:{override:null,issues:[...r.issues,...o.issues]}}function mn(e,t){if(!un(e))return null;let n=[],r=[];for(let i of Object.keys(e).sort()){if(!ln(i,t)){r.push(`Overview ${i} is not a page in this app and was dropped.`);continue}let{override:a,issues:o}=pn(i,e[i]);for(let e of o)r.push(dn(i,e));a&&n.push([i,a])}return{overviews:Object.fromEntries(n),dropped:r}}var W=b,hn=`glass`,gn=`system`,_n=[`light`,`dark`,`system`],vn=[`none`,`sm`,`md`,`lg`,`xl`,`full`],yn=[`comfortable`,`touch`],bn=[`auto`,`standard`,`more`],G={"system-ui":`system-ui, -apple-system, "Segoe UI", sans-serif`,Inter:`Inter, system-ui, sans-serif`,Georgia:`Georgia, "Times New Roman", serif`,"ui-rounded":`ui-rounded, "SF Pro Rounded", system-ui, sans-serif`,"ui-monospace":`ui-monospace, "SF Mono", Menlo, monospace`},xn=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;function Sn(e){if(typeof e!=`string`)return null;let t=xn.exec(e.trim());if(!t)return null;let n=t[1].toLowerCase();return n.length===3&&(n=[...n].map(e=>e+e).join(``)),`#${n}`}var Cn=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function wn(e){if(e===void 0)return{ok:!0,theme:void 0};if(!Cn(e))return{ok:!1,error:`The cookbook "theme" must be an object.`};let t={};if(e.preset!==void 0){if(typeof e.preset!=`string`||!W.includes(e.preset))return{ok:!1,error:`The theme preset must be one of ${W.join(`, `)}.`};t.preset=e.preset}if(e.colorScheme!==void 0){if(!_n.includes(e.colorScheme))return{ok:!1,error:`The theme colorScheme must be light, dark or system.`};t.colorScheme=e.colorScheme}for(let[n,r]of[[`borderRadius`,vn],[`density`,yn],[`contrast`,bn]]){let i=e[n];if(i!==void 0){if(!r.includes(i))return{ok:!1,error:`The theme ${n} must be one of ${r.join(`, `)}.`};t[n]=i}}if(e.fontFamily!==void 0){if(typeof e.fontFamily!=`string`||!Object.hasOwn(G,e.fontFamily))return{ok:!1,error:`The theme font must be one of ${Object.keys(G).join(`, `)}.`};t.fontFamily=e.fontFamily}if(e.custom!==void 0){if(!Cn(e.custom))return{ok:!1,error:`The theme "custom" must be an object.`};let n=Sn(e.custom.primary);if(!n)return{ok:!1,error:`The theme custom primary must be a hex colour like #c2410c.`};let r={primary:n};if(e.custom.fontFamily!==void 0){let t=e.custom.fontFamily;if(typeof t!=`string`||!Object.hasOwn(G,t))return{ok:!1,error:`The theme font must be one of ${Object.keys(G).join(`, `)}.`};r.fontFamily=t}t.custom=r}if(e.customCss!==void 0){if(typeof e.customCss!=`string`)return{ok:!1,error:`The theme customCss must be a string.`};if(Array.from(e.customCss).length>65536)return{ok:!1,error:`The theme customCss is too long (65,536 characters maximum).`};e.customCss&&(t.customCss=e.customCss)}return{ok:!0,theme:Object.keys(t).length?t:void 0}}function Tn(e){if(!e)return;let t={};return e.preset&&(t.preset=e.preset),e.colorScheme&&(t.colorScheme=e.colorScheme),e.borderRadius&&(t.borderRadius=e.borderRadius),e.density&&(t.density=e.density),e.contrast&&(t.contrast=e.contrast),e.fontFamily&&(t.fontFamily=e.fontFamily),e.custom&&(t.custom={...e.custom}),e.customCss&&(t.customCss=e.customCss),Object.keys(t).length?t:void 0}function En(e){let t=e?.colorScheme??`system`,n=e?.custom?`brand colour ${e.custom.primary}`:e?.preset??`glass`;return t===`system`?n:`${n}, ${t}`}var K=`section:`;function Dn(e,t=Le(w)){let n=Object.keys(t).sort((e,t)=>t.length-e.length);if(!n.length)return e;let r=e=>{if(!e.startsWith(K))return e;let r=e.slice(8);for(let e of n){if(r===e)return`${K}${t[e]}`;if(r.startsWith(`${e}:`))return`${K}${t[e]}${r.slice(e.length)}`}return e},i=e=>e.startsWith(K)&&n.includes(e.slice(8)),a=e=>[...new Set(e)],o={...e};if(e.sectionOrder&&(o.sectionOrder=a(e.sectionOrder.map(r))),e.hidden&&(o.hidden=a(e.hidden.filter(e=>!i(e)).map(r))),e.itemOrder){let t={};for(let[n,i]of Object.entries(e.itemOrder)){let e=r(n);t[e]=a([...t[e]??[],...i.map(r)])}o.itemOrder=t}return e.moved&&(o.moved=Object.fromEntries(Object.entries(e.moved).map(([e,t])=>[r(e),r(t)]))),o}function On(e,t=w){let n=new Map;for(let e of t){let t=Ce(e).id;for(let r of Ie(e))r.key&&n.set(`${K}${t}:${r.packageId}:${r.model.name}:${r.label}`,ye(r.packageId,r.model.name,r.key))}let r=e=>{let t=n.get(e);if(t)return t;if(!e.startsWith(K))return e;let r=e.slice(8).split(`:`);return r.length<3||!r[1]||!r[2]?e:ye(r[1],r[2])},i=e=>[...new Set(e)],a=(e,t)=>{let n={};for(let[i,a]of Object.entries(e)){let e=r(i);e in n||(n[e]=t(a))}return n},o={...e};return e.hidden&&(o.hidden=i(e.hidden.map(r))),e.itemOrder&&(o.itemOrder=a(e.itemOrder,e=>i(e.map(r)))),e.moved&&(o.moved=a(e.moved,r)),e.items&&(o.items=a(e.items,e=>e)),o}var q=`https://s-m-r-t.dev/schemas/cookbook/v1.json`,kn=new Set([`basic`,`advanced`,`hidden`]),An=new Set([`api`,`mcp`,`cli`]),J=e=>({ok:!1,error:e}),Y=e=>typeof e==`object`&&!!e&&!Array.isArray(e),X=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`);function jn(e,t){if(!Y(e))return`${t} is not an object`;let{objectRef:n,fieldName:r}=e;if(typeof n!=`string`||!n)return`${t} has no objectRef`;if(typeof r!=`string`||!r)return`${t} has no fieldName`;if(e.scopeType!==`app`)return`${t} must have scopeType "app"`;let i={objectRef:n,fieldName:r,scopeType:`app`};for(let n of[`defaultValue`,`help`,`label`]){let r=e[n];if(r!==void 0){if(typeof r!=`string`&&r!==null)return`${t}.${n} is invalid`;i[n]=r}}if(e.visibility!==void 0){let n=e.visibility;if(n!==null&&!(typeof n==`string`&&kn.has(n)))return`${t}.visibility is invalid`;i.visibility=n}if(e.displayOrder!==void 0){let n=e.displayOrder;if(n!==null&&!(typeof n==`number`&&Number.isFinite(n)))return`${t}.displayOrder is invalid`;i.displayOrder=n}if(e.locked!==void 0){if(e.locked!==null&&typeof e.locked!=`boolean`)return`${t}.locked is invalid`;i.locked=e.locked}return i}function Mn(e){if(!Y(e)||e.version!==1)return`layout must be an object with version 1`;for(let t of[`sectionOrder`,`hidden`])if(e[t]!==void 0&&!X(e[t]))return`layout.${t} must be a list of strings`;for(let t of[`itemOrder`,`moved`,`panels`])if(e[t]!==void 0&&!Y(e[t]))return`layout.${t} must be an object`;let t=e.itemOrder;if(Y(t)){for(let[e,n]of Object.entries(t))if(e===`__proto__`||!X(n))return`layout.itemOrder.${e} must be a list of strings`}let n=e.moved;if(Y(n)){for(let[e,t]of Object.entries(n))if(e===`__proto__`||typeof t!=`string`)return`layout.moved.${e} must be a string`}return e}function Nn(e,t={}){if(!Y(e))return J(`This is not a cookbook: expected a JSON object.`);if(e.$schema!==void 0&&e.$schema!==`https://s-m-r-t.dev/schemas/cookbook/v1.json`&&e.$schema!==`https://s-m-r-t.dev/schemas/blueprint/v1.json`)return J(`This is not a cookbook: its "$schema" is not a cookbook schema this planner knows.`);let{version:n}=e;if(n===void 0)return J(`This is not a cookbook: it has no "version".`);if(typeof n!=`number`||!Number.isInteger(n))return J(`The cookbook "version" must be a whole number.`);if(n>1)return J(`This cookbook is version ${n}, newer than this planner understands (1). Update the planner or re-export it.`);if(n!==1)return J(`Cookbook version ${n} is not supported (this planner reads version 1).`);if(!X(e.recipes))return J(`The cookbook "recipes" must be a list of recipe ids.`);let r=e.recipes.filter(e=>!E.has(e)),i=[...new Set([...ke(e.recipes.filter(e=>E.has(e)),E),...r])].sort(),a=[];if(e.features!==void 0){if(!X(e.features))return J(`The cookbook "features" must be a list of model names.`);let t=new Set;for(let n of e.features){if(t.has(n))return J(`The cookbook lists the feature ${n} more than once.`);t.add(n)}a=[...e.features].sort()}let o=new Set([...i.flatMap(e=>E.get(e)?.models??[]),...a]);if(!Array.isArray(e.policies))return J(`The cookbook "policies" must be a list.`);let s=[];for(let[t,n]of e.policies.entries()){let e=jn(n,`policies[${t}]`);if(typeof e==`string`)return J(`Invalid cookbook: ${e}.`);(o.has(e.objectRef)||De(e))&&s.push(e)}let c;if(e.exposure!==void 0){if(!Y(e.exposure))return J(`The cookbook "exposure" must be an object.`);let t=[];for(let[n,r]of Object.entries(e.exposure)){if(!X(r)||!r.every(e=>An.has(e)))return J(`Invalid cookbook: exposure for ${n} must list api, mcp or cli.`);r.length&&o.has(n)&&t.push([n,[...r]])}c=Object.fromEntries(t)}let l;if(e.layout!==void 0){let t=Mn(e.layout);if(typeof t==`string`)return J(`Invalid cookbook: ${t}.`);l=On(Dn(t))}let u;if(e.theme!==void 0){let n=wn(e.theme);if(n.ok)u=n.theme;else if(!t.dropUnknownRecipes)return J(n.error)}let d,f=[];if(e.overviews!==void 0){if(t.overviews){let n=t.overviews(e.overviews,l);if(!n)return J(`The cookbook "overviews" must be an object.`);d=n.overviews,f=n.dropped}else{if(!Y(e.overviews))return J(`The cookbook "overviews" must be an object.`);Object.keys(e.overviews).length&&(f=[`Page customisations (overviews) are not kept by this host and were dropped.`])}}let p={$schema:q,version:1,recipes:i,features:a,policies:s};for(let t of[`name`,`description`]){let n=e[t];if(n!==void 0){if(typeof n!=`string`)return J(`The cookbook "${t}" must be a string.`);n.trim()&&(p[t]=n.trim())}}return c&&Object.keys(c).length&&(p.exposure=c),l&&(p.layout=l),u&&(p.theme=u),d&&Object.keys(d).length&&(p.overviews=d),f.length?{ok:!0,cookbook:p,dropped:f}:{ok:!0,cookbook:p}}var Pn=e=>({ok:!1,error:e});function Fn(e,t={}){return Nn(e,{...t,overviews:mn})}function In(e,t={}){let n;try{n=JSON.parse(e)}catch{return Pn(`This file is not valid JSON.`)}try{return Fn(n,t)}catch{return Pn(`This file is not a valid cookbook.`)}}var Z=`smrt-planner:cookbook-doc:v1`,Ln=`smrt-planner:blueprint:v1`,Rn=`smrt-planner:cookbook-doc:unreadable`;function zn(){try{return globalThis.localStorage??null}catch{return null}}function Bn(e){if(!e)return{status:`unavailable`};let t;try{t=e.getItem(Z)}catch{return{status:`unavailable`}}let n=null;try{n=e.getItem(Ln)}catch{}let r=t===null&&n!==null,i=r?n:t;if(i===null)return{status:`empty`};let a=In(i,{dropUnknownRecipes:!0});if(a.ok)return r&&Q(e,Z,JSON.stringify(a.cookbook)),{status:`loaded`,cookbook:a.cookbook,previousKept:n!==null,...a.dropped?{dropped:a.dropped}:{}};t=i;let o=Q(e,Rn,t);return{status:`unreadable`,reason:a.error,keptAside:o}}function Q(e,t,n){if(!e)return!1;try{return e.setItem(t,n),!0}catch{return!1}}function Vn(e,t){if(!e)return!1;try{return e.removeItem(t),!0}catch{return!1}}function Hn(e,t){return Q(e,Z,JSON.stringify(t))}function Un(e,t={}){let n={$schema:q,version:1,...Ne(e)};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.layout&&(n.layout=t.layout);let r=Tn(t.theme);r&&(n.theme=r);let i=t.overviews??{},a=Object.keys(i).sort();return a.length&&(n.overviews=Object.fromEntries(a.map(e=>[e,i[e]]))),n}var Wn=new Set([`basic`,`advanced`,`hidden`]),Gn=new Set([`api`,`mcp`,`cli`]);function Kn(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t+`=`.repeat((4-t.length%4)%4));return new TextDecoder().decode(Uint8Array.from(n,e=>e.charCodeAt(0)))}function qn(e){let t=new URLSearchParams(e);return t.has(`r`)||t.has(`o`)}function Jn(e){let t={rows:[],narrowed:{}};if(!e)return t;let n;try{n=JSON.parse(Kn(e))}catch{return t}if(!n||typeof n!=`object`)return t;let r=[];for(let[e,t]of Object.entries(n.r??{}))if(t&&typeof t==`object`)for(let[n,i]of Object.entries(t)){if(!i||typeof i!=`object`)continue;let t={objectRef:e,fieldName:n,scopeType:`app`};typeof i.v==`string`&&Wn.has(i.v)&&(t.visibility=i.v),typeof i.l==`string`&&(t.label=i.l),(typeof i.h==`string`||i.h===null)&&(t.help=i.h),(typeof i.d==`string`||i.d===null)&&(t.defaultValue=i.d),typeof i.o==`number`&&Number.isFinite(i.o)&&(t.displayOrder=i.o),typeof i.k==`boolean`&&(t.locked=i.k),r.push(t)}let i={};for(let[e,t]of Object.entries(n.x??{})){if(!Array.isArray(t))continue;let n=t.filter(e=>Gn.has(e));n.length&&(i[e]=n)}return{rows:r,narrowed:i}}function Yn(e){let t=new URLSearchParams(e),n=(t.get(`r`)??``).split(`,`).filter(Boolean),r=ke(Me(n,E),E),i=new Set(r.flatMap(e=>E.get(e)?.models??[])),{rows:a,narrowed:o}=Jn(t.get(`o`)??``),s={$schema:q,version:1,recipes:r,features:[],policies:a.filter(e=>i.has(e.objectRef))},c=Object.fromEntries(Object.entries(o).filter(([e])=>i.has(e)));return Object.keys(c).length&&(s.exposure=c),s}var Xn=`smrt-planner:shell`;function $(e){let t=Pe(e),n=e.policies.some(e=>e.defaultValue!==void 0&&De(e));c(Ae(e)||n?t.taxRate:void 0),o({pricesIncludeTax:t.pricesIncludeTax,taxRounding:t.taxRounding,currency:t.currency})}var Zn=new class{#e=r();get layout(){return e(this.#e)}set layout(e){i(this.#e,e,!0)}#t=r();get name(){return e(this.#t)}set name(e){i(this.#t,e,!0)}#n=r();get description(){return e(this.#n)}set description(e){i(this.#n,e,!0)}#r=r();get theme(){return e(this.#r)}set theme(e){i(this.#r,e,!0)}#i=r({});get overviews(){return e(this.#i)}set overviews(e){i(this.#i,e)}#a=r(`unknown`);get persist(){return e(this.#a)}set persist(e){i(this.#a,e,!0)}#o=r(!1);get loaded(){return e(this.#o)}set loaded(e){i(this.#o,e,!0)}hostManaged=!1;#s=r(``);get loadNotice(){return e(this.#s)}set loadNotice(e){i(this.#s,e,!0)}saveBlocked=!1;#c=r(!1);get keepLegacyUrl(){return e(this.#c)}set keepLegacyUrl(e){i(this.#c,e,!0)}replacedBeforeLoad=!1;previousKept=!1;storage=null;timer;snapshot(){return Un(n(T.data),{layout:n(this.layout),theme:n(this.theme),overviews:n(this.overviews),name:this.name,description:this.description})}overview(e){return Object.hasOwn(this.overviews,e)?this.overviews[e]:null}setOverview(e,t){let n=Object.fromEntries(Object.entries(this.overviews).filter(([t])=>t!==e));t&&(n[e]=t),this.overviews=n}setLayout(e){this.layout=ee(e)?void 0:e}apply(e){T.load(e),this.layout=e.layout,this.theme=e.theme,this.name=e.name,this.description=e.description,this.overviews={...e.overviews??{}},$(e)}get unavailableNotice(){let e=[...T.unavailableRecipes,...T.unavailableFeatures];if(!e.length)return``;let t=e.length;return`${t} ${t===1?`recipe`:`recipes`} in this cookbook ${t===1?`isn't`:`aren't`} available in this version: ${e.join(`, `)}. They are kept when you save or export.`}removeUnavailable(){T.removeUnavailable(),this.scheduleSave()}setTheme(e){this.theme=Tn(e)}settings(){return Pe(this.snapshot())}setSettings(e){let t=Oe(this.snapshot(),e);T.rows=t.policies.map(e=>({...e})),$(t)}replace(e){this.apply(e),this.loaded||(this.replacedBeforeLoad=!0),this.saveBlocked=!1,this.keepLegacyUrl=!1}reset(){T.clear(),$({policies:[]}),this.layout=void 0,this.theme=void 0,this.name=void 0,this.description=void 0,this.overviews={};try{globalThis.localStorage?.removeItem(Xn)}catch{}this.saveBlocked=!1,this.keepLegacyUrl=!1}importText(e){let t=In(e);return t.ok&&this.replace(t.cookbook),t}hydrate(e,t=zn()){this.storage=t;let n=Bn(t);n.status===`loaded`&&(this.previousKept=n.previousKept),n.status===`loaded`&&!this.replacedBeforeLoad?(this.apply(n.cookbook),n.dropped?.length&&(this.loadNotice=`Some saved page customisations could not be used and were removed: ${n.dropped.join(` `)}`)):n.status===`unreadable`&&(this.saveBlocked=!n.keptAside,this.loadNotice=n.keptAside?`The saved cookbook could not be read (${n.reason}) and was kept aside; starting empty.`:`The saved cookbook could not be read (${n.reason}). Starting empty without overwriting it; import or reset to save again.`);let r=!1;if(qn(e)&&(n.status===`loaded`&&!Q(t,`smrt-planner:cookbook-doc:backup`,JSON.stringify(n.cookbook))&&(this.saveBlocked=!0),this.apply(Yn(e)),r=!0),this.persist=n.status===`unavailable`?`memory`:`unknown`,this.loaded=!0,r){let e=this.save();this.keepLegacyUrl=!e}return r}save(){if(clearTimeout(this.timer),this.timer=void 0,!this.loaded)return!1;if(this.hostManaged)return!0;if(this.saveBlocked)return this.persist=`memory`,!1;let e=Hn(this.storage,this.snapshot());return this.persist=e?`ok`:`memory`,e&&this.previousKept&&(this.previousKept=!Vn(this.storage,Ln)),e&&(this.keepLegacyUrl=!1),e}scheduleSave(){this.loaded&&!this.hostManaged&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.save(),300))}flush(){this.timer!==void 0&&this.save()}};export{st as A,ht as C,pt as D,j as E,at as M,A as N,mt as O,nt as P,gt as S,ft as T,Sn as _,zn as a,en as b,q as c,gn as d,hn as f,En as g,W as h,Z as i,rt as j,dt as k,vn as l,G as m,Zn as n,Fn as o,yn as p,$ as r,In as s,Xn as t,bn as u,sn as v,_t as w,N as x,tn as y};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BWd9iJf7.js","./DG3qFFTE.js","./COiEfhsA.js","./xihTtKlq.js","./B45qMR8U.js","./YUSKx8_q.js","./DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","../assets/app.BHwMQ9Zv.css","./DKi2uwTq.js","./Bv5jGtB8.js","../assets/feedback.qFktqYFY.css","./BfeotTF9.js","./uBIymjUX.js","./DF-0MxNw.js","../assets/SegmentedControl.DMqHG5fn.css","./DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","./DoGeTgSe.js","../assets/data.CVlX_W0i.css","./CUyVrfsu.js","./CsaWd8kG.js","../assets/forms.BRdbPdvs.css","./BYcBM-fh.js","../assets/AppShell.BkKNrxND.css","./Ct5r3XV1.js","../assets/workspace.C40zM0Mb.css","./C7boms_S.js","./nB-x9BEp.js","../assets/state.C0UZEhxS.css","../assets/labels.Dxa6EyRI.css","./D0m3WNVh.js","./QJX7BlhI.js","./CTlovRev.js","../assets/planner.DOQVfcOi.css","./D_U_DYjx.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,Et as t,Mt as n,bt as r,vt as i}from"./DG3qFFTE.js";import{t as a}from"./uBIymjUX.js";import"./xihTtKlq.js";import{I as o,K as s,L as c,O as l,U as u,W as d,_ as f,dt as p,ft as m,h,lt as g,p as _,st as v,x as y}from"./B45qMR8U.js";import{g as ee}from"./BfeotTF9.js";import"./DF-0MxNw.js";import"./DIE02RSm.js";import{u as b}from"./DoGeTgSe.js";import{C as x,D as te,E as S,F as ne,I as C,L as re,N as ie,O as ae,S as oe,T as se,_ as ce,b as le,d as ue,g as de,h as fe,n as pe,r as me,v as he,w as ge,x as _e,z as ve}from"./C7boms_S.js";import{B as ye,G as be,J as xe,R as Se,V as Ce,W as we,X as Te,Y as Ee,a as De,b as w,c as Oe,d as ke,i as Ae,j as je,l as Me,n as Ne,o as Pe,q as Fe,t as T,v as Ie,x as E,z as Le}from"./nB-x9BEp.js";function Re(e){let t=e?.surfaces?.find(e=>e.kind===`widget`&&e.sectionDefault===!0);return t?{id:t.type,type:t.type,span:4,options:{}}:void 0}function ze(e){let t=e.lastIndexOf(`#`);if(t<=0||t===e.length-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return n.startsWith(`.`)||n.startsWith(`/`)||/\s/.test(n)||!/^[A-Za-z_$][\w$]*$/.test(r)?null:{specifier:n,exportName:r}}function D(e,t){let n=ze(e);return n?Promise.resolve(t(n.specifier,n.exportName)).then(t=>{if(t==null)throw Error(`export "${e}" was not found`);return t}):Promise.reject(Error(`invalid export ref "${e}"`))}function Be(e){let t;return()=>(t??=e(),t)}function Ve(e){return typeof e==`object`&&!!e&&`default`in e&&!!e.default}function He(e,t,n){let r=Be(()=>D(e.export,t)),i=e.optionsEditor?Be(()=>D(e.optionsEditor,t)):void 0,a=e.data?.load?Be(()=>D(e.data?.load,t)):void 0,o={type:e.type,title:e.label,options:e.options??[],loadComponent:async()=>{let e=await r();return Ve(e)?e.default:e}};return e.description!==void 0&&(o.description=e.description),e.icon!==void 0&&(o.icon=e.icon),e.version!==void 0&&(o.version=e.version),e.allowedIn&&(o.allowedIn=e.allowedIn),e.defaultSpan!==void 0&&(o.defaultSpan=e.defaultSpan),e.minSpan!==void 0&&(o.minSpan=e.minSpan),e.maxSpan!==void 0&&(o.maxSpan=e.maxSpan),n&&(o.migrate=n),i&&(o.loadOptionsEditor=async()=>{let e=await i();return Ve(e)?e.default:e}),a&&(o.load=async(t,n)=>{let r=await a();if(typeof r!=`function`)throw Error(`loader "${e.data?.load}" is not a function`);return r(t,n)}),o}async function Ue(e,t,n,r={}){let i=[],a=[],o=[];for(let s of t)if(!r.enabled||r.enabled(s.id))for(let t of s.surfaces??[]){if(t.kind!==`widget`)continue;let c=(e,n)=>a.push({recipeId:s.id,type:t.type,reason:e,message:n});if(e.has(t.type)&&!r.replace){c(`duplicate_type`,`"${t.type}" is already registered`);continue}let l;if(t.migrate)try{let e=await D(t.migrate,n);if(typeof e!=`function`)throw Error(`not a function`);l=e}catch(e){c(`unresolved`,`migrate "${t.migrate}": ${e instanceof Error?e.message:String(e)}`);continue}try{o.push(e.register(He(t,n,l),{replace:r.replace})),i.push(t.type)}catch(e){c(`invalid`,e instanceof Error?e.message:String(e))}}return{registered:i,skipped:a,dispose:()=>{for(let e of o.splice(0))e()}}}var We=[`identifier`,`status`,`date`,`party`,`total`,`money`];function Ge(e){for(let t of[`identifier`,`status`,`date`,`money`,`quantity`,`party`,`title`])if(e.includes(t))return t}function O(e,t,n={}){let r=new Set(n.exclude??[]),i=n.max??4,a=Object.keys(t).filter(t=>!r.has(t)&&t in e.fields),o=e=>a.find(n=>t[n]?.includes(e)),s=[],c=e=>{e&&!s.includes(e)&&s.push(e)};c(o(`identifier`)??o(`title`));for(let e of We)e!==`identifier`&&(e===`money`&&s.some(e=>t[e]?.includes(`money`))||c(e===`date`?a.find(e=>t[e]?.includes(`date`)&&e!==`createdAt`&&e!==`updatedAt`)??o(`date`):o(e)));return s.slice(0,i).map(n=>({key:n,label:k(n,e),...Ge(t[n]??[])?{role:Ge(t[n]??[])}:{}}))}function Ke(e,t,n={}){let r=new Set(n.exclude??[]),i=Object.keys(t).filter(t=>!r.has(t)&&t in e.fields),a=i.filter(t=>e.fields[t]?.type===`text`),o=a.find(e=>/^(?:description|title|name|label)$/.test(e))??a.find(e=>t[e]?.includes(`title`))??a.find(e=>!t[e]?.includes(`identifier`)),s=i.find(e=>t[e]?.includes(`quantity`)),c=i.filter(e=>t[e]?.includes(`money`)),l=c.find(e=>/unit|price|rate/i.test(e)),u=c.find(e=>/^(?:amount|lineTotal|total|lineAmount)$/.test(e))??[...c].reverse().find(e=>e!==l),d=[];return o&&d.push({key:o,label:k(o,e)}),s&&d.push({key:s,label:k(s,e),role:`quantity`}),l&&d.push({key:l,label:k(l,e),role:`money`,summarize:!1}),u&&u!==l&&d.push({key:u,label:k(u,e),role:`money`}),d}function k(e,t){let n=t.fields[e];return n&&(n.type===`foreignKey`||n.type===`crossPackageRef`)&&/.[a-z]Id$/.test(e)?S(e.slice(0,-2)):S(e)}var qe=[`text`,`integer`,`decimal`,`boolean`,`datetime`,`json`,`foreignKey`,`crossPackageRef`];function Je(e){return qe.includes(e)?e:`text`}var Ye=/(Date|^date|period(Start|End))$/;function Xe(e,t){return t.type===`datetime`&&!t.system&&Ye.test(t.name)&&!e.fields.some(e=>e.name===`allDay`)?`date`:void 0}function Ze(e){return ue(e)[0]}function Qe(e,t){let n=t.ui?{...t.ui}:void 0,r=l(t)?`money`:Xe(e,t);return{type:Je(t.type),required:t.required,nullable:!t.required,...t.default===void 0?{}:{default:t.default},...t.description?{description:t.description}:{},...n?{ui:n}:{},...t.enum?.length?{enum:[...t.enum]}:{},...r?{format:r}:{},...Ze(e)===t.name?{display:!0}:{}}}function $e(e,t){return e.includes(`:`)?e:`${t.slice(0,t.lastIndexOf(`:`))}:${e}`}function et(e,t){if(!t.related)return!1;let n=$e(t.related,e.id);return xe(g,n,s).some(t=>t.id===e.id)}function tt(e){return e.fields.flatMap(t=>{if(t.type!==`foreignKey`&&t.type!==`crossPackageRef`||!t.related)return[];let n=m($e(t.related,e.id));return n?[{field:t.name,kind:t.type===`crossPackageRef`?`crossPackageRef`:`foreignKey`,relatedCollection:n.model.collection,...et(e,t)?{role:`items`}:{}}]:[]})}function A(e){let t=tt(e);return{name:e.collection,objectRef:e.id,className:e.name,idField:`id`,fields:Object.fromEntries(e.fields.map(t=>[t.name,Qe(e,t)])),...t.length?{relationships:t}:{}}}function nt(e,t){return{objectRef:e.id,fields:Object.fromEntries(t.map((e,t)=>[e.name,{visibility:`basic`,label:e.label,help:e.help??null,order:t,required:e.required}]))}}function rt(e,t){let n=new Set(t);for(let t of e)for(let e of t.models)n.add(e);return n}function it(e){return _(e.replace(/_?id$/i,``)||e)}function at(e,t,n){let r=Ee(e,t),i=Te(e,t).filter(e=>e.model.exposed&&n.has(e.model.id)),a=new Set(xe(e,t,s).map(e=>e.id)),o=new Map;for(let e of i)o.set(e.model.id,(o.get(e.model.id)??0)+1);let c=i.map(e=>{let t=a.has(e.model.id)?`items`:`children`,n=A(e.model),i=ae(n),s=[e.fk];return{model:e.model.id,field:e.fk,label:(o.get(e.model.id)??0)>1?`${we(e.model.name,r)} (${it(e.fk).toLowerCase()})`:we(e.model.name,r),kind:t,columns:t===`items`?Ke(n,i,{exclude:s}):O(n,i,{exclude:s,max:5}),...t===`items`&&`sortOrder`in n.fields?{sort:`sortOrder`}:{}}});for(let n of be(e,t))c.push({model:n.model.id,field:n.fk,label:it(n.fk),kind:`reference`});return c}var ot=Symbol(`smrt-cookbook`);function st(){return t(ot)}function ct(e,t){let{sections:n}=t;if(!n)throw Error(`the cookbook widget context is missing`);let r=typeof e.section==`string`?e.section:``,i=r?n.find(e=>e.id===`section:${r}`||e.id===`custom:${r}`)?.id:t.overviewId;if(!i)throw Error(`unknown section ${r}`);return se(n,i)}function lt(e){return e?async(t,n)=>{let r=ct(t,n);try{let t=await e(n,r.items.map(e=>({...e})));if(!Array.isArray(t))return r;let i=new Set,a=[];for(let e of t){if(!e||typeof e.href!=`string`)continue;let t=typeof e.id==`string`&&e.id?e.id:e.href;i.has(t)&&(t=`${t}#${a.length}`),i.add(t),a.push({...e,id:t})}return{items:a}}catch(e){if(n.signal?.aborted)throw e;return r}}:ct}var ut=new Set([`foreignKey`,`crossPackageRef`]);function j(e,t){return`/m/${e}/${t}/`}function dt(e,t,n,r=`view`){let i=`${j(e,t)}${encodeURIComponent(n)}/`;return r===`edit`?`${i}edit/`:i}function ft(e,t,n,r){return`${j(e,t)}?${encodeURIComponent(n)}=${encodeURIComponent(r)}`}function pt(e,t){let n=new URLSearchParams(e);for(let e of t.fields){if(!ut.has(e.type))continue;let t=n.get(e.name);if(t)return{field:e.name,equals:t}}}function mt(e){return e?.equals===void 0?``:`${encodeURIComponent(e.field)}=${encodeURIComponent(e.equals)}`}function ht(e,t,n){let r=n.filter(t=>t.model.id===e&&t.filter);if(t){let e=r.find(e=>e.key===t)?.filter;return e?{field:e.field,equals:e.value}:void 0}let i=r[0]?.filter;if(!i)return;let a=r.map(e=>e.filter).filter(e=>e?.field===i.field).map(e=>String(e?.value));return{field:i.field,notIn:[...new Set(a)]}}function gt(e,t){if(!e)return!0;let n=String(t[e.field]??``);return e.equals===void 0?!e.notIn?.includes(n):n===e.equals}function _t(e){return e?.equals===void 0?{}:{[e.field]:e.equals}}var M=e=>typeof e==`number`&&Number.isSafeInteger(e)?e:null,vt=(e,t)=>e.fields.some(e=>e.name===t);function yt(e,t){let n=ae(A(e)),r=fe(t,n);return Object.values(r).some(e=>M(e)!==null)?r:void 0}function bt(e,t){return!!e.fields.find(e=>e.name===`status`)?.enum?.includes(`draft`)&&typeof t.status==`string`&&t.status!==``&&t.status!==`draft`}function xt(e,t,n){if(!bt(e,t)||![`subtotal`,`taxAmount`,`totalAmount`,`discountTotal`].every(t=>vt(e,t)))return;let r=M(t.subtotal),i=M(t.taxAmount),a=M(t.totalAmount),o=M(t.discountTotal)??0;if(r===null||i===null||a===null)return;let s=u(t,`exclusive`);return{subtotal:r,discount:o,tax:i,total:a,lineAmountType:s,roundingScope:d(t,`line`),showNetSubtotal:s===`inclusive`,taxes:v(n,s).flatMap(e=>e.taxComponentId?[{taxComponentId:e.taxComponentId,name:e.name,percent:e.percent,taxable:e.taxable,tax:e.tax}]:[])}}var N=ie();function P(e){let{source:t,href:n}=e;if(!t||!n)throw Error(`the planner widget context is missing`);return{source:t,href:n}}function F(e){let t=typeof e==`string`?m(e):void 0;if(!t)throw Error(`unknown model ${String(e)}`);return{model:t.model,packageId:t.pkg.id,path:j(t.pkg.id,t.model.name)}}var St=new Set([`foreignKey`,`crossPackageRef`]);function Ct(e,t,n){let r=e.filter;if(typeof r!=`string`||r===``)return;if(r!==`parent`)throw Error(`unknown filter ${r}`);let{record:i}=t;if(!i?.id)throw Error(`the parent filter needs a record`);let a=typeof e.parentField==`string`&&e.parentField?e.parentField:e.field,o=typeof a==`string`?a:``,s=n.fields.find(e=>e.name===o);if(!s||!St.has(s.type))throw Error(`${n.name} has no reference field ${o}`);return{field:o,id:i.id}}async function I(e,t,n){return n?e.listWhere(t,n.field,n.id):e.list(t)}function L(e,t,n){return e(n?ft(t.packageId,t.model.name,n.field,n.id):t.path)}var R=e=>typeof e==`number`&&Number.isFinite(e);async function wt(e,t){let{source:n,href:r}=P(t),i=F(e.model),{model:a}=i,o=Ct(e,t,a),s=await I(n,a,o),c=L(r,i,o),u=typeof e.measure==`string`?e.measure:``;if(u===`count`||u===``)return{value:s.length,format:`integer`,href:c};let d=a.fields.find(t=>t.name===e.field);if(!d||d.type!==`integer`&&d.type!==`decimal`)throw Error(`${u} needs a numeric field of ${a.name}`);let f=s.map(e=>e[d.name]).filter(R),p=0;if(f.length){if(u===`sum`||u===`avg`)p=f.reduce((e,t)=>e+t,0),u===`avg`&&(p/=f.length);else if(u===`min`)p=Math.min(...f);else if(u===`max`)p=Math.max(...f);else throw Error(`unknown measure ${u}`)}let m=l(d);return{value:m?Math.round(p):p,format:m?`money`:d.type===`integer`?`integer`:`decimal`,...m?{currency:`USD`}:{},href:c}}function Tt(e,t){return R(e)&&R(t)?e-t:String(e??``).localeCompare(String(t??``))}var Et=new Set([`createdAt`,`updatedAt`]),Dt=[`identifier`,`status`,`date`,`money`,`quantity`,`party`,`title`];function Ot(e=[]){return Dt.find(t=>e.includes(t))}function kt(e,t,n,r){let i=A(e),a=r?[r]:[],o=ge(n);if(o.length===0)return O(i,t,{exclude:a,max:5});let s=[...Ke(i,t,{exclude:a}),...O(i,t,{exclude:a,max:o.length+8})];return o.map(n=>{let r=e.fields.find(e=>e.name===n);if(!r)throw Error(`${e.name} has no field ${n}`);let i=s.find(e=>e.key===n);if(i)return i;let a=Ot(t[n]);return{key:n,label:St.has(r.type)?_(n.replace(/Id$/,``)):_(n),...a?{role:a}:{}}})}var At=new Set([`money`,`quantity`]);function jt(e,t){let n={};for(let r of e)(r.summarize??At.has(r.role))&&(n[r.key]=t.reduce((e,t)=>{let n=t[r.key];return R(n)?e+n:e},0));return n}function Mt(e,t){let n=te(A(e)),r=new Set(t.map(e=>n?e[n]:void 0).filter(e=>typeof e==`string`&&e!==``));return r.size===1?[...r][0]??`USD`:`USD`}async function Nt(e,t){let{source:n,href:r}=P(t),i=F(e.model),{model:a}=i,o=Ct(e,t,a),s=await I(n,a,o);if(typeof e.sort==`string`&&e.sort){if(!a.fields.find(t=>t.name===e.sort)&&!Et.has(e.sort))throw Error(`${a.name} has no field ${e.sort}`);let t=s.some(t=>t[e.sort]!==void 0)?e.sort:B(a)?.name;if(t){let n=e.direction===`asc`?1:-1;s=[...s].sort((e,r)=>n*Tt(e[t],r[t]))}}let c=kt(a,ae(A(a)),e.columns,o?.field),l=R(e.limit)?e.limit:5,u=s.slice(0,l),d=a.fields.filter(e=>St.has(e.type)&&c.some(t=>t.key===e.name)),f=await me(n,d,u),p=e=>Object.fromEntries(c.map(t=>{let n=e[t.key],r=d.find(e=>e.name===t.key);return r?.related&&typeof n==`string`&&n?[t.key,f.get(h(r.related,n))??``]:[t.key,n??null]})),m=jt(c,s),g=!Fe(a);return{rows:await Promise.all(u.map(async e=>({id:String(e.id),title:await pe(n,a,e,0,o?.field),...g?{href:r(dt(i.packageId,a.name,String(e.id)))}:{},cells:p(e)}))),total:s.length,...g?{href:L(r,i,o)}:{},columns:c,currency:Mt(a,s),...Object.keys(m).length?{summaries:m}:{}}}var Pt={"7d":7,"30d":30,"90d":90,"12m":365,all:null},z=864e5;function Ft(e){return e===`7d`||e===`30d`?`day`:e===`90d`?`week`:`month`}function It(e,t){let n=new Date(e);if(t===`month`)return Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),1);let r=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate());return t===`week`?r-(n.getUTCDay()+6)%7*z:r}function Lt(e,t){if(t===`month`){let t=new Date(e);return Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+1,1)}return e+(t===`week`?7:1)*z}function Rt(e,t){let n=new Date(e).toISOString();return t===`month`?n.slice(0,7):n.slice(0,10)}var zt=e=>e.type===`datetime`&&!e.system;function B(e){let t=e.fields.filter(zt);return t.find(e=>/^(issue|order|start|created)/i.test(e.name))??t[0]}function V(e){if(typeof e!=`string`&&typeof e!=`number`)return;let t=new Date(e).getTime();return Number.isFinite(t)?t:void 0}async function Bt(e,t){let{source:n,href:r}=P(t),i=F(e.model),{model:a}=i,o=Ct(e,t,a),s=typeof e.groupBy==`string`?e.groupBy:``,c=s?a.fields.find(e=>e.name===s):B(a);if(!c)throw Error(s?`${a.name} has no field ${s}`:`${a.name} has no date field to chart; choose a group-by field`);let u=typeof e.measure==`string`?e.measure:``,d;if(u&&u!==`count`){if(u!==`sum`&&u!==`avg`)throw Error(`unknown measure ${u}`);if(d=a.fields.find(t=>t.name===e.field),!d||d.type!==`integer`&&d.type!==`decimal`)throw Error(`${u} needs a numeric field of ${a.name}`)}let f=typeof e.period==`string`?e.period:`30d`;if(!Object.hasOwn(Pt,f))throw Error(`unknown period ${f}`);let p=Pt[f],m=zt(c),h=m?c:B(a),g=p!==null&&h?y-p*z:-1/0,_=await I(n,a,o);h&&g!==-1/0&&(_=_.filter(e=>{let t=V(e[h.name]);return t!==void 0&&t>=g&&t<=y}));let v=new Map,ee=(e,t,n)=>{let r=v.get(e)??{key:t,sum:0,n:0};if(d){let e=n[d.name];if(!R(e))return;r.sum+=e}r.n+=1,v.set(e,r)},b=Ft(f);if(m){let e=g===-1/0?Math.min(..._.map(e=>V(e[c.name])??y),y):g;for(let t=It(e,b);t<=y;t=Lt(t,b))v.set(Rt(t,b),{key:t,sum:0,n:0});for(let e of _){let t=V(e[c.name]);if(t===void 0)continue;let n=It(t,b);ee(Rt(n,b),n,e)}}else for(let e of _){let t=e[c.name],n=t==null||t===``?`(none)`:String(t);ee(n,n,e)}let x=d?l(d):!1,te=e=>{if(!d)return e.n;let t=u===`avg`&&e.n?e.sum/e.n:e.sum;return x?Math.round(t):t},S=[...v.entries()].map(([e,t])=>({label:e,value:te(t),key:t.key}));return S=m?S.sort((e,t)=>Number(e.key)-Number(t.key)):S.sort((e,t)=>t.value-e.value||e.label.localeCompare(t.label)),{points:S.map(({label:e,value:t})=>({label:e,value:t})),format:d?x?`money`:d.type===`integer`?`integer`:`decimal`:`integer`,...x?{currency:`USD`}:{},href:L(r,i,o)}}var Vt=async(e,t)=>{let{source:n,entryIndex:r}=e;if(!n||!r)throw Error(`the planner widget context is missing`);return Promise.all(t.map(async e=>{let t=r.get(e.id??``);if(!t)return e;let i=await n.list(t.model);return{...e,count:i.filter(e=>gt(t.scope,e)).length}}))};he(N,{metric:wt,records:Nt,chart:Bt,shortcuts:Vt,shortcuts:lt(Vt)});function Ht(e){let{relations:t,viewAllHref:n}=e;if(!t)throw Error(`the record page context is missing`);return{relations:t,records:Nt,viewAllHref:n}}async function Ut(e,t){let{source:n}=P(e),r=e.record;if(!r?.id)throw Error(`line items need a record`);let{model:i}=F(r.model),a=await n.get(i,r.id);if(!a)return{};let o=t.find(e=>e.kind===`items`),s=o?m(o.model)?.model:void 0,c=xt(i,a,o&&s?await n.listWhere(s,o.field,r.id):[]),l=c?void 0:yt(i,a),u=te(A(i)),d=u?a[u]:void 0;return{...c?{storedTotals:c}:{},...l?{totals:l}:{},...typeof d==`string`&&d?{currency:d}:{}}}N.register(ce((e,t)=>_e(Ht(t))(e,t))),N.register(de(async(e,t)=>{let n=Ht(t),{totals:r,storedTotals:i,currency:a}=await Ut(t,n.relations);return le({...n,totals:()=>r,storedTotals:()=>i,currency:()=>a})(e,t)}));var Wt=[`shortcuts`,`metric`,`records`,`chart`,`note`],Gt={"@happyvertical/smrt-reports/svelte":async()=>({SavedReportsWidget:(await a(async()=>{let{default:e}=await import(`./BWd9iJf7.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]),import.meta.url)).default})},Kt=async(e,t)=>{let n=Gt[e];if(n)return(await n())[t]},qt=w.filter(e=>e.surfaces?.some(e=>e.kind===`widget`)),Jt=qt.flatMap(e=>(e.surfaces??[]).flatMap(e=>e.kind===`widget`?[e.type]:[]));Ue(N,qt,Kt);var H=new Map(Se(w).map(e=>[`section:${e.id}`,e])),Yt=g.packages.flatMap(e=>e.models.map(e=>e.id)),Xt=[...Wt,...Jt];function Zt(e){let t=H.get(e);for(let e of t?.recipes??[]){let t=Ie(e)[0];if(t)return{id:t.model.id,name:_(t.model.name)}}}function Qt(e){let t=Re(H.get(e)?.recipes[0]);if(t&&Jt.includes(t.type))return[t];let n=[{id:`shortcuts`,type:`shortcuts`,span:4,options:{}}],r=Zt(e);return r&&n.push({id:`count`,type:`metric`,span:1,options:{title:f(r.name),model:r.id,measure:`count`}},{id:`latest`,type:`records`,span:3,options:{title:`${r.name} records`,model:r.id,limit:5}}),n}var $t=new Map;function en(e){if(!ve.test(e))return;let t=$t.get(e);return t||(t=C({id:e,allowed:Xt,models:Yt,defaults:Qt(e)}),$t.set(e,t)),t}function tn(e,t){return`detail:${e}.${t}`}var nn=new Map(g.packages.flatMap(e=>e.models.filter(e=>e.exposed).map(t=>[x(t.id),{packageId:e.id,model:t}])));function U(e){let[,t,n]=/^detail:([A-Za-z0-9_-]+)\.([A-Za-z0-9_]+)$/.exec(e)??[],r=t&&n?p(t,n):void 0;return t&&r?.exposed?{packageId:t,model:r}:nn.get(e)}var rn=new Set(g.packages.flatMap(e=>e.models.filter(e=>e.exposed).map(e=>e.id))),an=new Map;function on(e){let t=an.get(e);if(t)return t;let n=U(e);if(!n)return;let r=at(g,n.model.id,rn),i=oe(A(n.model),r,{id:e,maxMetrics:2*r.length});return t=C({...i,maxWidgets:Math.max(i.maxWidgets??24,i.defaults.length+24)}),an.set(e,t),t}function sn(e,t){let n=on(e),r=U(e);if(!n||!r)return;let i=at(g,r.model.id,t),a=0,o=n.defaults.filter(e=>e.type===`line-items`?i.some(e=>e.kind===`items`):e.type===`related`?i.some(e=>e.kind===`children`):t.has(String(e.options.model))?e.type!==`metric`||(a+=1,a<=4):!1);return C({...n,defaults:o})}function cn(e){return e.startsWith(`detail:`)?on(e):en(e)}function ln(e,t){return H.has(e)||e===`section:${je.id}`?!0:e.startsWith(`detail:`)?U(e)!==void 0:e.startsWith(`custom:`)&&ve.test(e)&&(t?.customSections??[]).some(t=>t.id===e)}var un=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function dn(e,t){let n=t.widgetId?`widget ${t.widgetId}${t.type?` (${t.type})`:``}`:`an entry`,r=t.options?.length?`: ${t.options.map(e=>`${e.key} ${e.code}`).join(`, `)}`:``;return`Overview ${e}: ${n} was dropped (${t.code}${r}).`}function fn(e,t){let n={...e};return e.added&&(n.added=e.added.filter(e=>!t.has(e.id))),e.changed&&(n.changed=Object.fromEntries(Object.entries(e.changed).filter(([e])=>!t.has(e)))),n}function pn(e,t){let n=cn(e);if(!n)return{override:null,issues:[{widgetId:null,type:null,code:`malformed`,message:`not an overview id`}]};let r=ne(n,t,N);if(r.ok)return{override:r.override,issues:[]};let i=re(t),a=new Set(r.issues.flatMap(e=>e.widgetId?[e.widgetId]:[]));if(!i.override)return{override:null,issues:r.issues};let o=ne(n,fn(i.override,a),N);return o.ok?{override:o.override,issues:r.issues}:{override:null,issues:[...r.issues,...o.issues]}}function mn(e,t){if(!un(e))return null;let n=[],r=[];for(let i of Object.keys(e).sort()){if(!ln(i,t)){r.push(`Overview ${i} is not a page in this app and was dropped.`);continue}let{override:a,issues:o}=pn(i,e[i]);for(let e of o)r.push(dn(i,e));a&&n.push([i,a])}return{overviews:Object.fromEntries(n),dropped:r}}var W=b,hn=`glass`,gn=`system`,_n=[`light`,`dark`,`system`],vn=[`none`,`sm`,`md`,`lg`,`xl`,`full`],yn=[`comfortable`,`touch`],bn=[`auto`,`standard`,`more`],G={"system-ui":`system-ui, -apple-system, "Segoe UI", sans-serif`,Inter:`Inter, system-ui, sans-serif`,Georgia:`Georgia, "Times New Roman", serif`,"ui-rounded":`ui-rounded, "SF Pro Rounded", system-ui, sans-serif`,"ui-monospace":`ui-monospace, "SF Mono", Menlo, monospace`},xn=/^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;function Sn(e){if(typeof e!=`string`)return null;let t=xn.exec(e.trim());if(!t)return null;let n=t[1].toLowerCase();return n.length===3&&(n=[...n].map(e=>e+e).join(``)),`#${n}`}var Cn=e=>typeof e==`object`&&!!e&&!Array.isArray(e);function wn(e){if(e===void 0)return{ok:!0,theme:void 0};if(!Cn(e))return{ok:!1,error:`The cookbook "theme" must be an object.`};let t={};if(e.preset!==void 0){if(typeof e.preset!=`string`||!W.includes(e.preset))return{ok:!1,error:`The theme preset must be one of ${W.join(`, `)}.`};t.preset=e.preset}if(e.colorScheme!==void 0){if(!_n.includes(e.colorScheme))return{ok:!1,error:`The theme colorScheme must be light, dark or system.`};t.colorScheme=e.colorScheme}for(let[n,r]of[[`borderRadius`,vn],[`density`,yn],[`contrast`,bn]]){let i=e[n];if(i!==void 0){if(!r.includes(i))return{ok:!1,error:`The theme ${n} must be one of ${r.join(`, `)}.`};t[n]=i}}if(e.fontFamily!==void 0){if(typeof e.fontFamily!=`string`||!Object.hasOwn(G,e.fontFamily))return{ok:!1,error:`The theme font must be one of ${Object.keys(G).join(`, `)}.`};t.fontFamily=e.fontFamily}if(e.custom!==void 0){if(!Cn(e.custom))return{ok:!1,error:`The theme "custom" must be an object.`};let n=Sn(e.custom.primary);if(!n)return{ok:!1,error:`The theme custom primary must be a hex colour like #c2410c.`};let r={primary:n};if(e.custom.fontFamily!==void 0){let t=e.custom.fontFamily;if(typeof t!=`string`||!Object.hasOwn(G,t))return{ok:!1,error:`The theme font must be one of ${Object.keys(G).join(`, `)}.`};r.fontFamily=t}t.custom=r}if(e.customCss!==void 0){if(typeof e.customCss!=`string`)return{ok:!1,error:`The theme customCss must be a string.`};if(Array.from(e.customCss).length>65536)return{ok:!1,error:`The theme customCss is too long (65,536 characters maximum).`};e.customCss&&(t.customCss=e.customCss)}return{ok:!0,theme:Object.keys(t).length?t:void 0}}function Tn(e){if(!e)return;let t={};return e.preset&&(t.preset=e.preset),e.colorScheme&&(t.colorScheme=e.colorScheme),e.borderRadius&&(t.borderRadius=e.borderRadius),e.density&&(t.density=e.density),e.contrast&&(t.contrast=e.contrast),e.fontFamily&&(t.fontFamily=e.fontFamily),e.custom&&(t.custom={...e.custom}),e.customCss&&(t.customCss=e.customCss),Object.keys(t).length?t:void 0}function En(e){let t=e?.colorScheme??`system`,n=e?.custom?`brand colour ${e.custom.primary}`:e?.preset??`glass`;return t===`system`?n:`${n}, ${t}`}var K=`section:`;function Dn(e,t=Le(w)){let n=Object.keys(t).sort((e,t)=>t.length-e.length);if(!n.length)return e;let r=e=>{if(!e.startsWith(K))return e;let r=e.slice(8);for(let e of n){if(r===e)return`${K}${t[e]}`;if(r.startsWith(`${e}:`))return`${K}${t[e]}${r.slice(e.length)}`}return e},i=e=>e.startsWith(K)&&n.includes(e.slice(8)),a=e=>[...new Set(e)],o={...e};if(e.sectionOrder&&(o.sectionOrder=a(e.sectionOrder.map(r))),e.hidden&&(o.hidden=a(e.hidden.filter(e=>!i(e)).map(r))),e.itemOrder){let t={};for(let[n,i]of Object.entries(e.itemOrder)){let e=r(n);t[e]=a([...t[e]??[],...i.map(r)])}o.itemOrder=t}return e.moved&&(o.moved=Object.fromEntries(Object.entries(e.moved).map(([e,t])=>[r(e),r(t)]))),o}function On(e,t=w){let n=new Map;for(let e of t){let t=Ce(e).id;for(let r of Ie(e))r.key&&n.set(`${K}${t}:${r.packageId}:${r.model.name}:${r.label}`,ye(r.packageId,r.model.name,r.key))}let r=e=>{let t=n.get(e);if(t)return t;if(!e.startsWith(K))return e;let r=e.slice(8).split(`:`);return r.length<3||!r[1]||!r[2]?e:ye(r[1],r[2])},i=e=>[...new Set(e)],a=(e,t)=>{let n={};for(let[i,a]of Object.entries(e)){let e=r(i);e in n||(n[e]=t(a))}return n},o={...e};return e.hidden&&(o.hidden=i(e.hidden.map(r))),e.itemOrder&&(o.itemOrder=a(e.itemOrder,e=>i(e.map(r)))),e.moved&&(o.moved=a(e.moved,r)),e.items&&(o.items=a(e.items,e=>e)),o}var q=`https://s-m-r-t.dev/schemas/cookbook/v1.json`,kn=new Set([`basic`,`advanced`,`hidden`]),An=new Set([`api`,`mcp`,`cli`]),J=e=>({ok:!1,error:e}),Y=e=>typeof e==`object`&&!!e&&!Array.isArray(e),X=e=>Array.isArray(e)&&e.every(e=>typeof e==`string`);function jn(e,t){if(!Y(e))return`${t} is not an object`;let{objectRef:n,fieldName:r}=e;if(typeof n!=`string`||!n)return`${t} has no objectRef`;if(typeof r!=`string`||!r)return`${t} has no fieldName`;if(e.scopeType!==`app`)return`${t} must have scopeType "app"`;let i={objectRef:n,fieldName:r,scopeType:`app`};for(let n of[`defaultValue`,`help`,`label`]){let r=e[n];if(r!==void 0){if(typeof r!=`string`&&r!==null)return`${t}.${n} is invalid`;i[n]=r}}if(e.visibility!==void 0){let n=e.visibility;if(n!==null&&!(typeof n==`string`&&kn.has(n)))return`${t}.visibility is invalid`;i.visibility=n}if(e.displayOrder!==void 0){let n=e.displayOrder;if(n!==null&&!(typeof n==`number`&&Number.isFinite(n)))return`${t}.displayOrder is invalid`;i.displayOrder=n}if(e.locked!==void 0){if(e.locked!==null&&typeof e.locked!=`boolean`)return`${t}.locked is invalid`;i.locked=e.locked}return i}function Mn(e){if(!Y(e)||e.version!==1)return`layout must be an object with version 1`;for(let t of[`sectionOrder`,`hidden`])if(e[t]!==void 0&&!X(e[t]))return`layout.${t} must be a list of strings`;for(let t of[`itemOrder`,`moved`,`panels`])if(e[t]!==void 0&&!Y(e[t]))return`layout.${t} must be an object`;let t=e.itemOrder;if(Y(t)){for(let[e,n]of Object.entries(t))if(e===`__proto__`||!X(n))return`layout.itemOrder.${e} must be a list of strings`}let n=e.moved;if(Y(n)){for(let[e,t]of Object.entries(n))if(e===`__proto__`||typeof t!=`string`)return`layout.moved.${e} must be a string`}return e}function Nn(e,t={}){if(!Y(e))return J(`This is not a cookbook: expected a JSON object.`);if(e.$schema!==void 0&&e.$schema!==`https://s-m-r-t.dev/schemas/cookbook/v1.json`&&e.$schema!==`https://s-m-r-t.dev/schemas/blueprint/v1.json`)return J(`This is not a cookbook: its "$schema" is not a cookbook schema this planner knows.`);let{version:n}=e;if(n===void 0)return J(`This is not a cookbook: it has no "version".`);if(typeof n!=`number`||!Number.isInteger(n))return J(`The cookbook "version" must be a whole number.`);if(n>1)return J(`This cookbook is version ${n}, newer than this planner understands (1). Update the planner or re-export it.`);if(n!==1)return J(`Cookbook version ${n} is not supported (this planner reads version 1).`);if(!X(e.recipes))return J(`The cookbook "recipes" must be a list of recipe ids.`);let r=e.recipes.filter(e=>!E.has(e)),i=[...new Set([...ke(e.recipes.filter(e=>E.has(e)),E),...r])].sort(),a=[];if(e.features!==void 0){if(!X(e.features))return J(`The cookbook "features" must be a list of model names.`);let t=new Set;for(let n of e.features){if(t.has(n))return J(`The cookbook lists the feature ${n} more than once.`);t.add(n)}a=[...e.features].sort()}let o=new Set([...i.flatMap(e=>E.get(e)?.models??[]),...a]);if(!Array.isArray(e.policies))return J(`The cookbook "policies" must be a list.`);let s=[];for(let[t,n]of e.policies.entries()){let e=jn(n,`policies[${t}]`);if(typeof e==`string`)return J(`Invalid cookbook: ${e}.`);(o.has(e.objectRef)||De(e))&&s.push(e)}let c;if(e.exposure!==void 0){if(!Y(e.exposure))return J(`The cookbook "exposure" must be an object.`);let t=[];for(let[n,r]of Object.entries(e.exposure)){if(!X(r)||!r.every(e=>An.has(e)))return J(`Invalid cookbook: exposure for ${n} must list api, mcp or cli.`);r.length&&o.has(n)&&t.push([n,[...r]])}c=Object.fromEntries(t)}let l;if(e.layout!==void 0){let t=Mn(e.layout);if(typeof t==`string`)return J(`Invalid cookbook: ${t}.`);l=On(Dn(t))}let u;if(e.theme!==void 0){let n=wn(e.theme);if(n.ok)u=n.theme;else if(!t.dropUnknownRecipes)return J(n.error)}let d,f=[];if(e.overviews!==void 0){if(t.overviews){let n=t.overviews(e.overviews,l);if(!n)return J(`The cookbook "overviews" must be an object.`);d=n.overviews,f=n.dropped}else{if(!Y(e.overviews))return J(`The cookbook "overviews" must be an object.`);Object.keys(e.overviews).length&&(f=[`Page customisations (overviews) are not kept by this host and were dropped.`])}}let p={$schema:q,version:1,recipes:i,features:a,policies:s};for(let t of[`name`,`description`]){let n=e[t];if(n!==void 0){if(typeof n!=`string`)return J(`The cookbook "${t}" must be a string.`);n.trim()&&(p[t]=n.trim())}}return c&&Object.keys(c).length&&(p.exposure=c),l&&(p.layout=l),u&&(p.theme=u),d&&Object.keys(d).length&&(p.overviews=d),f.length?{ok:!0,cookbook:p,dropped:f}:{ok:!0,cookbook:p}}var Pn=e=>({ok:!1,error:e});function Fn(e,t={}){return Nn(e,{...t,overviews:mn})}function In(e,t={}){let n;try{n=JSON.parse(e)}catch{return Pn(`This file is not valid JSON.`)}try{return Fn(n,t)}catch{return Pn(`This file is not a valid cookbook.`)}}var Z=`smrt-planner:cookbook-doc:v1`,Ln=`smrt-planner:blueprint:v1`,Rn=`smrt-planner:cookbook-doc:unreadable`;function zn(){try{return globalThis.localStorage??null}catch{return null}}function Bn(e){if(!e)return{status:`unavailable`};let t;try{t=e.getItem(Z)}catch{return{status:`unavailable`}}let n=null;try{n=e.getItem(Ln)}catch{}let r=t===null&&n!==null,i=r?n:t;if(i===null)return{status:`empty`};let a=In(i,{dropUnknownRecipes:!0});if(a.ok)return r&&Q(e,Z,JSON.stringify(a.cookbook)),{status:`loaded`,cookbook:a.cookbook,previousKept:n!==null,...a.dropped?{dropped:a.dropped}:{}};t=i;let o=Q(e,Rn,t);return{status:`unreadable`,reason:a.error,keptAside:o}}function Q(e,t,n){if(!e)return!1;try{return e.setItem(t,n),!0}catch{return!1}}function Vn(e,t){if(!e)return!1;try{return e.removeItem(t),!0}catch{return!1}}function Hn(e,t){return Q(e,Z,JSON.stringify(t))}function Un(e,t={}){let n={$schema:q,version:1,...Ne(e)};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.layout&&(n.layout=t.layout);let r=Tn(t.theme);r&&(n.theme=r);let i=t.overviews??{},a=Object.keys(i).sort();return a.length&&(n.overviews=Object.fromEntries(a.map(e=>[e,i[e]]))),n}var Wn=new Set([`basic`,`advanced`,`hidden`]),Gn=new Set([`api`,`mcp`,`cli`]);function Kn(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t+`=`.repeat((4-t.length%4)%4));return new TextDecoder().decode(Uint8Array.from(n,e=>e.charCodeAt(0)))}function qn(e){let t=new URLSearchParams(e);return t.has(`r`)||t.has(`o`)}function Jn(e){let t={rows:[],narrowed:{}};if(!e)return t;let n;try{n=JSON.parse(Kn(e))}catch{return t}if(!n||typeof n!=`object`)return t;let r=[];for(let[e,t]of Object.entries(n.r??{}))if(t&&typeof t==`object`)for(let[n,i]of Object.entries(t)){if(!i||typeof i!=`object`)continue;let t={objectRef:e,fieldName:n,scopeType:`app`};typeof i.v==`string`&&Wn.has(i.v)&&(t.visibility=i.v),typeof i.l==`string`&&(t.label=i.l),(typeof i.h==`string`||i.h===null)&&(t.help=i.h),(typeof i.d==`string`||i.d===null)&&(t.defaultValue=i.d),typeof i.o==`number`&&Number.isFinite(i.o)&&(t.displayOrder=i.o),typeof i.k==`boolean`&&(t.locked=i.k),r.push(t)}let i={};for(let[e,t]of Object.entries(n.x??{})){if(!Array.isArray(t))continue;let n=t.filter(e=>Gn.has(e));n.length&&(i[e]=n)}return{rows:r,narrowed:i}}function Yn(e){let t=new URLSearchParams(e),n=(t.get(`r`)??``).split(`,`).filter(Boolean),r=ke(Me(n,E),E),i=new Set(r.flatMap(e=>E.get(e)?.models??[])),{rows:a,narrowed:o}=Jn(t.get(`o`)??``),s={$schema:q,version:1,recipes:r,features:[],policies:a.filter(e=>i.has(e.objectRef))},c=Object.fromEntries(Object.entries(o).filter(([e])=>i.has(e)));return Object.keys(c).length&&(s.exposure=c),s}var Xn=`smrt-planner:shell`;function $(e){let t=Pe(e),n=e.policies.some(e=>e.defaultValue!==void 0&&De(e));c(Ae(e)||n?t.taxRate:void 0),o({pricesIncludeTax:t.pricesIncludeTax,taxRounding:t.taxRounding,currency:t.currency})}var Zn=new class{#e=r();get layout(){return e(this.#e)}set layout(e){i(this.#e,e,!0)}#t=r();get name(){return e(this.#t)}set name(e){i(this.#t,e,!0)}#n=r();get description(){return e(this.#n)}set description(e){i(this.#n,e,!0)}#r=r();get theme(){return e(this.#r)}set theme(e){i(this.#r,e,!0)}#i=r({});get overviews(){return e(this.#i)}set overviews(e){i(this.#i,e)}#a=r(`unknown`);get persist(){return e(this.#a)}set persist(e){i(this.#a,e,!0)}#o=r(!1);get loaded(){return e(this.#o)}set loaded(e){i(this.#o,e,!0)}hostManaged=!1;#s=r(``);get loadNotice(){return e(this.#s)}set loadNotice(e){i(this.#s,e,!0)}saveBlocked=!1;#c=r(!1);get keepLegacyUrl(){return e(this.#c)}set keepLegacyUrl(e){i(this.#c,e,!0)}replacedBeforeLoad=!1;previousKept=!1;storage=null;timer;snapshot(){return Un(n(T.data),{layout:n(this.layout),theme:n(this.theme),overviews:n(this.overviews),name:this.name,description:this.description})}overview(e){return Object.hasOwn(this.overviews,e)?this.overviews[e]:null}setOverview(e,t){let n=Object.fromEntries(Object.entries(this.overviews).filter(([t])=>t!==e));t&&(n[e]=t),this.overviews=n}setLayout(e){this.layout=ee(e)?void 0:e}apply(e){T.load(e),this.layout=e.layout,this.theme=e.theme,this.name=e.name,this.description=e.description,this.overviews={...e.overviews??{}},$(e)}get unavailableNotice(){let e=[...T.unavailableRecipes,...T.unavailableFeatures];if(!e.length)return``;let t=e.length;return`${t} ${t===1?`recipe`:`recipes`} in this cookbook ${t===1?`isn't`:`aren't`} available in this version: ${e.join(`, `)}. They are kept when you save or export.`}removeUnavailable(){T.removeUnavailable(),this.scheduleSave()}setTheme(e){this.theme=Tn(e)}settings(){return Pe(this.snapshot())}setSettings(e){let t=Oe(this.snapshot(),e);T.rows=t.policies.map(e=>({...e})),$(t)}replace(e){this.apply(e),this.loaded||(this.replacedBeforeLoad=!0),this.saveBlocked=!1,this.keepLegacyUrl=!1}reset(){T.clear(),$({policies:[]}),this.layout=void 0,this.theme=void 0,this.name=void 0,this.description=void 0,this.overviews={};try{globalThis.localStorage?.removeItem(Xn)}catch{}this.saveBlocked=!1,this.keepLegacyUrl=!1}importText(e){let t=In(e);return t.ok&&this.replace(t.cookbook),t}hydrate(e,t=zn()){this.storage=t;let n=Bn(t);n.status===`loaded`&&(this.previousKept=n.previousKept),n.status===`loaded`&&!this.replacedBeforeLoad?(this.apply(n.cookbook),n.dropped?.length&&(this.loadNotice=`Some saved page customisations could not be used and were removed: ${n.dropped.join(` `)}`)):n.status===`unreadable`&&(this.saveBlocked=!n.keptAside,this.loadNotice=n.keptAside?`The saved cookbook could not be read (${n.reason}) and was kept aside; starting empty.`:`The saved cookbook could not be read (${n.reason}). Starting empty without overwriting it; import or reset to save again.`);let r=!1;if(qn(e)&&(n.status===`loaded`&&!Q(t,`smrt-planner:cookbook-doc:backup`,JSON.stringify(n.cookbook))&&(this.saveBlocked=!0),this.apply(Yn(e)),r=!0),this.persist=n.status===`unavailable`?`memory`:`unknown`,this.loaded=!0,r){let e=this.save();this.keepLegacyUrl=!e}return r}save(){if(clearTimeout(this.timer),this.timer=void 0,!this.loaded)return!1;if(this.hostManaged)return!0;if(this.saveBlocked)return this.persist=`memory`,!1;let e=Hn(this.storage,this.snapshot());return this.persist=e?`ok`:`memory`,e&&this.previousKept&&(this.previousKept=!Vn(this.storage,Ln)),e&&(this.keepLegacyUrl=!1),e}scheduleSave(){this.loaded&&!this.hostManaged&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.save(),300))}flush(){this.timer!==void 0&&this.save()}};export{st as A,ht as C,pt as D,j as E,at as M,A as N,mt as O,nt as P,gt as S,ft as T,Sn as _,zn as a,en as b,q as c,gn as d,hn as f,En as g,W as h,Z as i,rt as j,dt as k,vn as l,G as m,Zn as n,Fn as o,yn as p,$ as r,In as s,Xn as t,bn as u,sn as v,_t as w,N as x,tn as y};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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,K as d,L as f,Lt as p,Ot as m,Pt as h,U as g,W as _,X as v,Y as y,a as b,bt as x,ct as S,d as C,ft as w,gt as T,ht as E,k as ee,mt as D,pt as O,q as k,st as A,v as j,vt as M}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as N}from"./Bv5jGtB8.js";import"./YUSKx8_q.js";import{ft as P,lt as te,p as F,u as I,ut as ne}from"./
|
|
1
|
+
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,K as d,L as f,Lt as p,Ot as m,Pt as h,U as g,W as _,X as v,Y as y,a as b,bt as x,ct as S,d as C,ft as w,gt as T,ht as E,k as ee,mt as D,pt as O,q as k,st as A,v as j,vt as M}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{a as N}from"./Bv5jGtB8.js";import"./YUSKx8_q.js";import{ft as P,lt as te,p as F,u as I,ut as ne}from"./B45qMR8U.js";import"./DK8Blf1Y.js";import"./DF-0MxNw.js";import"./DoGeTgSe.js";y([`click`]),y([`click`,`keydown`]),y([`click`]);var L=new Map(Object.entries({menu:`M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z`,search:`M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z`,close:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z`,"chevron-right":`M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z`,"chevron-left":`M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12l4.58-4.59z`,"chevron-down":`M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z`,check:`M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z`,add:`M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z`,mic:`M12 14c1.66 0 3-1.34 3-3V5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3z M17 11c0 2.76-2.24 5-5 5s-5-2.24-5-5H5c0 3.53 2.04 6.43 5 7.07V21h4v-2.93c2.96-.64 5-3.54 5-7.07h-2z`,alert:`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 5h2v6h-2zm0 8h2v2h-2z`,warning:`M1 21h22L12 2 1 21zm12-3h-2v-2h2zm0-4h-2v-4h2z`,info:`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 15h-2v-6h2zm0-8h-2V7h2z`,home:`M3 10 12 2 21 10v11h-6v-7H9v7H3z`,user:`M12 3a4 4 0 1 0 0 8 4 4 0 0 0 0-8zM4 21v-2c0-4 16-4 16 0v2H4z`,settings:`M10 2h4l1 3 3-1 3 3-1 3 3 1v4l-3 1 1 3-3 3-3-1-1 3h-4l-1-3-3 1-3-3 1-3-3-1v-4l3-1-1-3 3-3 3 1 1-3zm2 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8z`,trash:`M7 3h10v2h4v2H3V5h4V3zm-2 6h14v12H5V9zm4 2v8h2v-8H9zm4 0v8h2v-8h-2z`,edit:`M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z`,calendar:`M7 2h2v2h6V2h2v2h4v18H3V4h4V2zm-2 8v10h14V10H5zm2 2h4v4H7v-4z`,clock:`M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm-1 2h2v5.5l4 2.5-1 1.5-5-3V6z`,camera:`M9 3h6l2 3h4v15H3V6h4l2-3zm3 5a5 5 0 1 0 0 10 5 5 0 0 0 0-10zm0 2a3 3 0 1 1 0 6 3 3 0 0 1 0-6z`,upload:`M11 16V7l-4 4-1.5-1.5L12 3l6.5 6.5L17 11l-4-4v9h-2zM3 18h18v3H3v-3z`,download:`M11 3h2v9l4-4 1.5 1.5L12 16l-6.5-6.5L7 8l4 4V3zM3 18h18v3H3v-3z`})),R=x([]);function z(t){for(let n=e(R).length-1;n>=0;n--){let r=e(R)[n].paths.get(t);if(r!==void 0)return r}return L.get(t)}var B=d(`<svg xmlns="http://www.w3.org/2000/svg" data-smrt-component="Icon" class="svelte-em2a54"><path></path></svg>`);function V(t,i){m(i,!0);let a=b(i,`size`,3,24),o=b(i,`color`,3,`currentColor`),s=b(i,`viewBox`,3,`0 0 24 24`),c=n(()=>!!i[`aria-label`]),l=n(()=>i.path??(i.name?z(i.name):``)),u=n(()=>typeof a()==`number`?`${a()}px`:a());var d=B(),f=D(d);A(()=>{j(d,`width`,e(u)),j(d,`height`,e(u)),j(d,`viewBox`,s()),j(d,`fill`,o()),j(d,`aria-hidden`,!e(c)),j(d,`aria-label`,i[`aria-label`]),j(d,`role`,e(c)?`img`:void 0),j(f,`d`,e(l))}),g(t,d),r()}var re=c(`<p class="empty-description svelte-1x475nf"> </p>`),ie=c(`<a class="action-button svelte-1x475nf"> </a>`),ae=c(`<button type="button" class="action-button svelte-1x475nf"> </button>`),oe=c(`<div data-smrt-component="EmptyState"><div class="icon-container svelte-1x475nf"><!></div> <h3 class="empty-title svelte-1x475nf"> </h3> <!> <!></div>`);function se(e,n){let r=b(n,`icon`,3,`inbox`),a=b(n,`size`,3,`md`),c={document:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
2
2
|
<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z"/>
|
|
3
3
|
<path d="M14 2v6h6M16 13H8M16 17H8M10 9H8"/>
|
|
4
4
|
</svg>`,folder:`<svg width="100%" height="100%" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,B as t,Ct as n,Dt as r,Ft as i,G as a,H as o,L as s,Ot as c,Pt as l,U as u,ft as d,ht as f,mt as p,pt as m,st as h}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{xt as g}from"./
|
|
1
|
+
import{$ as e,B as t,Ct as n,Dt as r,Ft as i,G as a,H as o,L as s,Ot as c,Pt as l,U as u,ft as d,ht as f,mt as p,pt as m,st as h}from"./DG3qFFTE.js";import"./xihTtKlq.js";import{xt as g}from"./B45qMR8U.js";var _=a(`<li><code class="svelte-kxkftj"><b> </b> </code></li>`),v=a(`<li class="none svelte-kxkftj">None</li>`),y=a(`<li><code class="svelte-kxkftj"> </code></li>`),b=a(`<mark class="svelte-kxkftj">AI</mark>`),x=a(`<li><code class="svelte-kxkftj"> </code> <!></li>`),S=a(`<article class="svelte-kxkftj"><h3 class="svelte-kxkftj"> </h3> <div class="grid svelte-kxkftj"><div><h4 class="svelte-kxkftj">REST routes <span class="svelte-kxkftj"> </span></h4> <ul class="svelte-kxkftj"></ul></div> <div><h4 class="svelte-kxkftj">MCP tools <span class="svelte-kxkftj"> </span></h4> <ul class="svelte-kxkftj"></ul></div> <div><h4 class="svelte-kxkftj">CLI commands <span class="svelte-kxkftj"> </span></h4> <ul class="svelte-kxkftj"></ul></div> <div><h4 class="svelte-kxkftj">Methods <span class="svelte-kxkftj"> </span> AI-callable</h4> <ul class="svelte-kxkftj"></ul></div></div></article>`),C=a(`<p class="svelte-kxkftj">This app exposes no generated REST, MCP or CLI surface.</p>`),w=a(`<p class="lede svelte-kxkftj">For connecting other software or an AI assistant to this app. All of it is
|
|
2
2
|
generated by s-m-r-t from the model; none of it was written by hand.</p> <!>`,1),T=a(`<section class="panel svelte-kxkftj" aria-label="Connect other tools"><!></section>`);function E(a,E){c(E,!0);let D=n(()=>E.models.filter(e=>e.exposed));var O=T(),k=d(O);g(k,{title:`Connect other tools`,children:(n,r)=>{var a=w(),c=f(m(a),2);s(c,17,()=>e(D),e=>e.id,(n,r)=>{var a=S(),c=d(a),m=p(c,!0),g=f(c,2),C=d(g),w=d(C),T=f(d(w)),E=p(T,!0);i(w);var D=f(w,2);s(D,21,()=>e(r).rest,e=>e.method+e.path,(t,n)=>{var r=_(),a=d(r),s=d(a),c=p(s,!0),l=f(s);i(a),i(r),h(()=>{o(c,e(n).method),o(l,` /api${e(n).path??``}`)}),u(t,r)},e=>{var t=v();u(e,t)}),i(D),i(C);var O=f(C,2),k=d(O),A=f(d(k)),j=p(A,!0);i(k);var M=f(k,2);s(M,21,()=>e(r).mcp,e=>e.name,(t,n)=>{var r=y(),a=d(r),s=p(a,!0);i(r),h(()=>o(s,e(n).name)),u(t,r)},e=>{var t=v();u(e,t)}),i(M),i(O);var N=f(O,2),P=d(N),F=f(d(P)),I=p(F,!0);i(P);var L=f(P,2);s(L,21,()=>e(r).cli,e=>e.name,(t,n)=>{var r=y(),a=d(r),s=p(a,!0);i(r),h(()=>o(s,e(n).name)),u(t,r)},e=>{var t=v();u(e,t)}),i(L),i(N);var R=f(N,2),z=d(R),B=f(d(z)),V=p(B,!0);l(),i(z);var H=f(z,2);s(H,21,()=>e(r).methods,e=>e.name,(n,r)=>{var a=x(),s=d(a),c=p(s),l=f(s,2),m=e=>{var t=b();u(e,t)};t(l,t=>{e(r).aiCallable&&t(m)}),i(a),h(t=>o(c,`${e(r).name??``}(${t??``})`),[()=>e(r).parameters.join(`, `)]),u(n,a)},e=>{var t=v();u(e,t)}),i(H),i(R),i(g),i(a),h(t=>{o(m,e(r).name),o(E,e(r).rest.length),o(j,e(r).mcp.length),o(I,e(r).cli.length),o(V,t)},[()=>e(r).methods.filter(e=>e.aiCallable).length]),u(n,a)},e=>{var t=C();u(e,t)}),u(n,a)},$$slots:{default:!0}}),i(O),u(a,O),r()}export{E as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
import{$ as e,B as t,Ct as n,Dt as r,Ft as i,G as a,H as o,J as s,Ot as c,P as l,U as u,W as d,a as f,bt as p,ct as m,d as h,ft as g,ht as _,i as v,lt as y,pt as b,r as x,st as S,tt as C,vt as w}from"../chunks/DG3qFFTE.js";import{t as T}from"../chunks/uBIymjUX.js";import"../chunks/xihTtKlq.js";var E={},D=a(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=a(`<!> <!>`,1);function k(a,v){c(v,!0);let T=f(v,`components`,23,()=>[]),E=f(v,`data_0`,3,null),k=f(v,`data_1`,3,null);y(()=>v.stores.page.set(v.page)),m(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),k(),v.stores.page.notify()});let A=p(!1),j=p(!1),M=p(null);x(()=>{let t=v.stores.page.subscribe(()=>{e(A)&&(w(j,!0),C().then(()=>{w(M,document.title||`untitled page`,!0)}))});return w(A,!0),t});let N=n(()=>v.constructors[1]);var P=O(),F=b(P),I=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(t,n)=>{h(n(t,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(t,n)=>{var r=d(),i=b(r);l(i,()=>e(N),(e,t)=>{h(t(e,{get data(){return k()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),u(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)},L=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(e,t)=>{h(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)};t(F,e=>{v.constructors[1]?e(I):e(L,-1)});var R=_(F,2),z=n=>{var r=D(),a=g(r),c=t=>{var n=s();S(()=>o(n,e(M))),u(t,n)};t(a,t=>{e(j)&&t(c)}),i(r),u(n,r)};t(R,t=>{e(A)&&t(z)}),u(a,P),r()}var A=v(k),j=[()=>T(()=>import(`../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.C6N6B83E.js","../chunks/COiEfhsA.js","../chunks/DG3qFFTE.js","../chunks/CKd9O-eU.js","../chunks/Dt-HX3Vu.js","../chunks/xihTtKlq.js","../chunks/B45qMR8U.js","../chunks/YUSKx8_q.js","../chunks/DK8Blf1Y.js","../assets/currency-metadata.ksbBA8-C.css","../assets/app.BHwMQ9Zv.css","../chunks/BfeotTF9.js","../chunks/uBIymjUX.js","../chunks/Bv5jGtB8.js","../assets/feedback.qFktqYFY.css","../chunks/DF-0MxNw.js","../assets/SegmentedControl.DMqHG5fn.css","../chunks/DIE02RSm.js","../assets/webmcp-ui-context.hO24Ni5w.css","../chunks/DoGeTgSe.js","../assets/data.CVlX_W0i.css","../chunks/CUyVrfsu.js","../chunks/CsaWd8kG.js","../assets/forms.BRdbPdvs.css","../chunks/BYcBM-fh.js","../assets/AppShell.BkKNrxND.css","../chunks/Ct5r3XV1.js","../assets/workspace.C40zM0Mb.css","../chunks/DqrQeG8L.js","../chunks/CaiMTXlW.js","../chunks/C7zBd-pD.js","../chunks/D7hhQvDO.js","../chunks/CA-A9Ngs.js","../chunks/BxyJ_Q7v.js","../chunks/BQxY8kkL.js","../chunks/Ywu-998J.js","../chunks/C7boms_S.js","../chunks/nB-x9BEp.js","../assets/state.C0UZEhxS.css","../assets/labels.Dxa6EyRI.css","../chunks/D0m3WNVh.js","../chunks/QJX7BlhI.js","../assets/icons.BDx21rPt.css","../chunks/BeJxxDXZ.js","../chunks/Dg4KRWOz.js","../chunks/D_xoWitl.js","../chunks/d934w91N.js","../chunks/DKi2uwTq.js","../chunks/CTlovRev.js","../assets/planner.DOQVfcOi.css","../chunks/D_U_DYjx.js","../chunks/C6HSENij.js","../chunks/DziaAoFY.js","../chunks/CiNYyHrL.js","../chunks/BU0vd8nA.js","../chunks/Cmh0yR4f.js","../assets/SectionIcons.BGFcFuOf.css","../assets/SectionActions.BE1CPmxk.css","../chunks/BMgzWMdF.js","../chunks/CgAkqYsL.js","../assets/0.BaRFeYGU.css","../nodes/1.9pTjyJp5.js","../nodes/2.BHCkcrHF.js","../chunks/BlJ-05MM.js","../assets/AiSetup.CrvuNhMR.css","../chunks/DmvHEN1v.js","../assets/percent.BGI-foAF.css","../chunks/COQVmnKJ.js","../assets/2.CdEXvRg0.css","../nodes/3.D6l9gEJu.js","../assets/3.D518dbB5.css","../nodes/4.BUHWJvB3.js","../assets/4.B3vt1gMJ.css","../nodes/5.C1jfy8Yg.js","../nodes/6.LSyNtBLJ.js","../nodes/7.CC7rRIn7.js","../chunks/DRByVC-c.js","../chunks/C8kJ-wTn.js","../chunks/DWeCJh9N.js","../assets/FieldMapForm.C8SZ3t4N.css","../chunks/JBD5vUbP.js","../chunks/D71UrO5c.js","../assets/ModelPage.SIoeO-AU.css","../nodes/8.S9H6LDRX.js","../nodes/9.BPt57fDH.js","../nodes/10.BkbBDSaP.js","../assets/10.CdYxvH4G.css","../nodes/11.BcVi4XqZ.js","../chunks/ptmcJq5j.js","../assets/ConnectTools.DTleL8YA.css","../assets/11.nOT5Z4Fv.css","../nodes/12.j9PkVob2.js","../assets/12.F7A7zP4J.css","../nodes/13.BOUYEx8n.js","../assets/13.JoySu8W5.css","../nodes/14.CuMuuCU7.js","../assets/14.VAFbAoxW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{$ as e,B as t,Ct as n,Dt as r,Ft as i,G as a,H as o,J as s,Ot as c,P as l,U as u,W as d,a as f,bt as p,ct as m,d as h,ft as g,ht as _,i as v,lt as y,pt as b,r as x,st as S,tt as C,vt as w}from"../chunks/DG3qFFTE.js";import{t as T}from"../chunks/uBIymjUX.js";import"../chunks/xihTtKlq.js";var E={},D=a(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),O=a(`<!> <!>`,1);function k(a,v){c(v,!0);let T=f(v,`components`,23,()=>[]),E=f(v,`data_0`,3,null),k=f(v,`data_1`,3,null);y(()=>v.stores.page.set(v.page)),m(()=>{v.stores,v.page,v.constructors,T(),v.form,E(),k(),v.stores.page.notify()});let A=p(!1),j=p(!1),M=p(null);x(()=>{let t=v.stores.page.subscribe(()=>{e(A)&&(w(j,!0),C().then(()=>{w(M,document.title||`untitled page`,!0)}))});return w(A,!0),t});let N=n(()=>v.constructors[1]);var P=O(),F=b(P),I=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(t,n)=>{h(n(t,{get data(){return E()},get form(){return v.form},get params(){return v.page.params},children:(t,n)=>{var r=d(),i=b(r);l(i,()=>e(N),(e,t)=>{h(t(e,{get data(){return k()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),u(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)},L=t=>{let r=n(()=>v.constructors[0]);var i=d(),a=b(i);l(a,()=>e(r),(e,t)=>{h(t(e,{get data(){return E()},get form(){return v.form},get params(){return v.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),u(t,i)};t(F,e=>{v.constructors[1]?e(I):e(L,-1)});var R=_(F,2),z=n=>{var r=D(),a=g(r),c=t=>{var n=s();S(()=>o(n,e(M))),u(t,n)};t(a,t=>{e(j)&&t(c)}),i(r),u(n,r)};t(R,t=>{e(A)&&t(z)}),u(a,P),r()}var A=v(k),j=[()=>T(()=>import(`../nodes/0.C6N6B83E.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60]),import.meta.url),()=>T(()=>import(`../nodes/1.9pTjyJp5.js`),__vite__mapDeps([61,2,1,5,45,3,4]),import.meta.url),()=>T(()=>import(`../nodes/2.BHCkcrHF.js`),__vite__mapDeps([62,2,1,5,13,7,14,6,8,9,10,11,12,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,50,51,43,48,52,53,58,63,64,65,66,67,68]),import.meta.url),()=>T(()=>import(`../nodes/3.D6l9gEJu.js`),__vite__mapDeps([69,2,1,5,6,7,8,9,10,35,12,11,13,14,15,16,17,18,19,20,21,22,23,24,25,36,37,38,39,46,58,70]),import.meta.url),()=>T(()=>import(`../nodes/4.BUHWJvB3.js`),__vite__mapDeps([71,2,1,5,6,7,8,9,10,28,12,13,14,11,15,16,17,18,19,20,21,22,23,24,25,29,30,31,32,33,34,35,36,37,38,39,40,41,42,46,63,64,72]),import.meta.url),()=>T(()=>import(`../nodes/5.C1jfy8Yg.js`),__vite__mapDeps([73,2,1,3,4,5,44,46]),import.meta.url),()=>T(()=>import(`../nodes/6.LSyNtBLJ.js`),__vite__mapDeps([74,2,1,3,4,5,44,46]),import.meta.url),()=>T(()=>import(`../nodes/7.CC7rRIn7.js`),__vite__mapDeps([75,1,2,5,6,7,8,9,10,76,4,77,3,13,14,15,16,26,11,12,17,18,19,20,21,22,23,24,25,27,44,45,36,37,38,39,35,47,40,41,48,49,50,55,56,52,53,59,78,65,32,66,79,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/8.S9H6LDRX.js`),__vite__mapDeps([83,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,76,4,77,3,26,11,12,17,18,21,22,23,24,25,27,44,45,36,39,35,47,40,41,48,49,50,55,56,52,53,59,78,65,32,66,79,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/9.BPt57fDH.js`),__vite__mapDeps([84,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,76,4,77,3,26,11,12,17,18,21,22,23,24,25,27,44,45,36,39,35,47,40,41,48,49,50,55,56,52,53,59,78,65,32,66,79,80,81,82]),import.meta.url),()=>T(()=>import(`../nodes/10.BkbBDSaP.js`),__vite__mapDeps([85,2,1,5,6,7,8,9,10,17,18,22,15,16,23,67,43,11,12,13,14,19,20,21,24,25,26,27,86]),import.meta.url),()=>T(()=>import(`../nodes/11.BcVi4XqZ.js`),__vite__mapDeps([87,1,2,5,6,7,8,9,10,76,4,88,89,90]),import.meta.url),()=>T(()=>import(`../nodes/12.j9PkVob2.js`),__vite__mapDeps([91,1,2,5,6,7,8,9,10,15,16,22,23,37,13,14,19,20,38,55,56,76,4,78,36,17,18,39,50,52,65,21,32,12,66,79,92]),import.meta.url),()=>T(()=>import(`../nodes/13.BOUYEx8n.js`),__vite__mapDeps([93,1,2,5,6,7,8,9,10,37,13,14,15,16,19,20,38,55,56,76,4,80,88,89,94]),import.meta.url),()=>T(()=>import(`../nodes/14.CuMuuCU7.js`),__vite__mapDeps([95,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,45,3,4,36,37,38,39,35,41,50,55,56,54,57,59,81,96]),import.meta.url)],M=[],N={"/":[2],"/advanced-styles":[3],"/ai":[4],"/blueprint":[5],"/cookbook":[6],"/m/[package]/[model]":[7],"/m/[package]/[model]/[view]":[8],"/m/[package]/[model]/[view]/edit":[9],"/packages":[10],"/packages/[id]":[11],"/recipes/[id]":[12],"/recipes/[id]/help":[13],"/s/[section]":[14]},P={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},F=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.decode])),I=Object.fromEntries(Object.entries(P.transport).map(([e,t])=>[e,t.encode])),L=!1,R=(e,t)=>F[e](t),z=()=>T(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{R as decode,F as decoders,N as dictionary,I as encoders,z as get_error_template,L as hash,P as hooks,E as matchers,j as nodes,A as root,M as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{l as load_css,o as start}from"../chunks/CKd9O-eU.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,B as n,Ct as r,Dt as i,F as a,Ft as o,G as s,H as c,J as l,L as u,Lt as d,Ot as f,Pt as p,R as m,T as h,U as g,W as _,X as v,Y as y,Z as b,a as x,b as S,bt as C,ct as w,d as T,dt as E,ft as D,gt as O,ht as k,l as A,mt as j,nt as M,ot as N,pt as P,r as F,s as ee,st as I,ut as te,v as L,vt as R,wt as z}from"../chunks/DG3qFFTE.js";import{a as ne,i as re,n as B,r as ie,t as ae,u as oe}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,B as n,Ct as r,Dt as i,F as a,Ft as o,G as s,H as c,J as l,L as u,Lt as d,Ot as f,Pt as p,R as m,T as h,U as g,W as _,X as v,Y as y,Z as b,a as x,b as S,bt as C,ct as w,d as T,dt as E,ft as D,gt as O,ht as k,l as A,mt as j,nt as M,ot as N,pt as P,r as F,s as ee,st as I,ut as te,v as L,vt as R,wt as z}from"../chunks/DG3qFFTE.js";import{a as ne,i as re,n as B,r as ie,t as ae,u as oe}from"../chunks/CKd9O-eU.js";import"../chunks/xihTtKlq.js";import{a as se,dt as ce,i as le,n as V,o as ue,p as de,pt as fe,s as pe,t as H,ut as me}from"../chunks/B45qMR8U.js";import{n as U}from"../chunks/DK8Blf1Y.js";import{i as he,n as ge,t as _e}from"../chunks/BfeotTF9.js";import{n as ve}from"../chunks/Ct5r3XV1.js";import{u as W}from"../chunks/DIE02RSm.js";import{c as ye,d as be,h as xe,s as Se}from"../chunks/DoGeTgSe.js";import{A as G,C as Ce,D as we,E as Te,S as Ee,b as De,i as K,j as Oe,n as ke,r as Ae,s as je,t as Me}from"../chunks/DqrQeG8L.js";import"../chunks/BeJxxDXZ.js";import"../chunks/Dg4KRWOz.js";import{t as q}from"../chunks/D_xoWitl.js";import{D as Ne,O as Pe,m as Fe,n as J,o as Ie,t as Le}from"../chunks/Ywu-998J.js";import{B as Re,H as ze,N as Be,R as Ve,b as He,g as Ue,j as Y,s as We,t as X,tt as Ge,v as Ke}from"../chunks/nB-x9BEp.js";import{g as Z,h as qe,v as Je}from"../chunks/D0m3WNVh.js";import{n as Ye,t as Xe}from"../chunks/QJX7BlhI.js";import"../chunks/d934w91N.js";import{a as Ze,n as Qe,s as $e,t as et,u as tt}from"../chunks/DKi2uwTq.js";import{r as nt,t as rt}from"../chunks/D_U_DYjx.js";import{a as it,c as at,d as ot,f as st,i as ct,l as lt,m as ut,n as dt,o as ft,r as Q,t as pt}from"../chunks/C6HSENij.js";import{t as mt}from"../chunks/BU0vd8nA.js";import{a as ht,i as gt,n as _t,r as vt}from"../chunks/BMgzWMdF.js";import{n as $}from"../chunks/CgAkqYsL.js";var yt=e({prerender:()=>!0,trailingSlash:()=>bt}),bt=`always`,xt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20128%20128'%20role='img'%3e%3cdefs%3e%3clinearGradient%20id='flame'%20x1='26'%20y1='16'%20x2='101'%20y2='112'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23f05b2b'/%3e%3cstop%20offset='1'%20stop-color='%23c9381e'/%3e%3c/linearGradient%3e%3clinearGradient%20id='heat'%20x1='51'%20y1='49'%20x2='72'%20y2='111'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23ffd33d'/%3e%3cstop%20offset='1'%20stop-color='%23f2a817'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20fill='url(%23flame)'%20d='M64%205c-3%2018-15%2026-13%2043-9-5-13-13-13-22C20%2043%2015%2062%2022%2082c7%2022%2023%2037%2042%2041%2022-4%2039-21%2043-43%203-17-3-32-18-45%202%2011%200%2018-6%2025C84%2036%2075%2019%2064%205Z'%20/%3e%3cpath%20fill='url(%23heat)'%20d='M64%2045c-2%2015-14%2022-13%2038-5-4-8-9-9-15-7%2010-8%2020-4%2030%205%2012%2014%2020%2026%2023%2013-3%2023-12%2027-25%203-11%200-20-8-29%200%207-2%2012-6%2016%201-16-5-27-13-38Z'%20/%3e%3c!--%20The%20glasses%20render%20as%20two%20stacked%20stroke%20groups:%20a%20pale%20warm%20casing%20under%20a%20dark%20warm-charcoal%20stroke.%20The%20casing%20keeps%20the%20dark%20strokes%20legible%20where%20they%20leave%20the%20flame%20body%20(temple%20tips,%20lower%20rims)%20on%20dark%20backgrounds,%20and%20reads%20as%20a%20rim%20light%20against%20the%20flame%20on%20light%20ones.%20--%3e%3cg%20fill='none'%20stroke='%23ffe3ae'%20stroke-opacity='0.85'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20stroke-width='14'%20d='M7%2063c12-4%2027-5%2043-1M78%2062c16-4%2031-3%2043%201'/%3e%3crect%20x='12'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='14'/%3e%3crect%20x='70'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='14'/%3e%3cpath%20stroke-width='13'%20d='M57%2066c5-4%209-4%2014%200'/%3e%3c/g%3e%3cg%20fill='none'%20stroke='%2333221b'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20stroke-width='8'%20d='M7%2063c12-4%2027-5%2043-1M78%2062c16-4%2031-3%2043%201'/%3e%3crect%20x='12'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='8'/%3e%3crect%20x='70'%20y='58'%20width='46'%20height='35'%20rx='13'%20stroke-width='8'/%3e%3cpath%20stroke-width='7'%20d='M57%2066c5-4%209-4%2014%200'/%3e%3c/g%3e%3c/svg%3e`,St=s(`<a class="cap svelte-nioco2"><!></a>`),Ct=s(`<div class="ai-status svelte-nioco2" role="group" aria-label="AI models"></div>`);function wt(e,n){f(n,!1);let r={think:Ae,hear:Me,speak:ke};A();var a=Ct();u(a,5,()=>K.capabilities,e=>e.id,(e,n)=>{var i=St(),a=D(i);Ge(a,{get path(){return r[t(n).id]},size:20}),o(i),I(e=>{L(i,`href`,e),L(i,`data-state`,t(n).state),L(i,`aria-label`,t(n).label),L(i,`title`,t(n).label)},[()=>H(`/ai/`)]),g(e,i)}),o(a),g(e,a),i()}function Tt(e){let t=e.target;return!t||typeof t.closest!=`function`?!1:e.type===`input`?t.matches(`textarea, input[type="text"], input:not([type])`):e.type===`click`&&t.closest(`.smrt-dictation-button`)!==null}var Et=s(`<div><!></div>`);function Dt(e,n){f(n,!0);let a=x(n,`answered`,3,null),s=Qe(nt()),c=r(()=>J.settings().currency),l=r(()=>s.fieldsFor(n.proposal.spec.source)),u=C(O(a())),d=C(null);function p(e){R(u,e,!0),n.onoutcome?.(e)}function m(e){p({status:`saved`,report:{id:e.id,title:e.title}}),et(t(d),e)}var h=Et(),_=D(h);tt(_,{get proposal(){return n.proposal},get confirm(){return s.save},reportHref:e=>H(Ze(e)),onsaved:m,ondecline:()=>p({status:`declined`}),get outcome(){return t(u)},get fields(){return t(l)},get currency(){return t(c)}}),o(h),T(h,e=>R(d,e),()=>t(d)),g(e,h),i()}var Ot=s(`<span role="status" aria-live="polite"> </span> <progress max="100" aria-label="Speech model download" class="svelte-w5gfst"> </progress>`,1),kt=s(`<span class="error svelte-w5gfst" role="alert"> </span>`),At=s(`<span>The speech model is already on this device. Turn on voice typing to
|
|
2
2
|
talk to the assistant?</span>`),jt=s(`<span> </span>`),Mt=s(`<button type="button">Cancel</button>`),Nt=s(`<button type="button"> </button> <button type="button">Not now</button>`,1),Pt=s(`<div class="voice svelte-w5gfst" role="group" aria-label="Voice typing"><svg class="icon svelte-w5gfst" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V22h2v-3.08A7 7 0 0 0 19 12h-2Z"></path></svg> <div class="text svelte-w5gfst"><!></div> <div class="actions svelte-w5gfst"><!></div></div>`);function Ft(e,a){f(a,!0);let s=r(()=>Math.round(a.voice.size/1e6)),l=r(()=>Math.round(a.voice.progress*100)),u=r(()=>a.voice.status===`offer`||a.voice.status===`downloading`||a.voice.status===`error`);var d=_(),p=P(d),m=e=>{var r=Pt(),i=k(D(r),2),u=D(i),d=e=>{var n=Ot(),r=P(n),i=j(r),o=k(r,2),s=j(o);I(()=>{c(i,`${a.voice.cached?`Turning on voice typing`:`Downloading speech model`}
|
|
3
3
|
${t(l)??``}%`),S(o,t(l)),c(s,`${t(l)??``}%`)}),g(e,n)},f=e=>{var t=kt(),n=j(t);I(()=>c(n,`Voice typing could not start: ${a.voice.error??``}`)),g(e,t)},p=e=>{var t=At();g(e,t)},m=e=>{var n=jt(),r=j(n);I(e=>c(r,`Your browser can't do voice typing on its own. Download a ${e??``} speech model to talk to the assistant?`),[()=>Te(t(s))]),g(e,n)};n(u,e=>{a.voice.status===`downloading`?e(d):a.voice.status===`error`?e(f,1):a.voice.cached?e(p,2):e(m,-1)}),o(i);var h=k(i,2),_=D(h),y=e=>{var t=Mt();v(`click`,t,()=>a.voice.cancel()),g(e,t)},b=e=>{var t=Nt(),n=P(t),r=j(n,!0),i=k(n,2);I(()=>c(r,a.voice.status===`error`?`Try again`:a.voice.cached?`Turn on`:`Download`)),v(`click`,n,()=>void a.voice.enable()),v(`click`,i,()=>a.voice.dismiss()),g(e,t)};n(_,e=>{a.voice.status===`downloading`?e(y):e(b,-1)}),o(h),o(r),g(e,r)};n(p,e=>{t(u)&&e(m)}),g(e,d),i()}y([`click`]);var It=s(`<div class="offer svelte-12q53fs" role="group" aria-label="Theme change"><!></div>`),Lt=s(`<p class="offer-note svelte-12q53fs" role="status">Theme restored.</p>`),Rt=s(`<!> <!> <!>`,1),zt=s(`<li><b> </b> </li>`),Bt=s(`<ul class="offer-menu svelte-12q53fs"></ul>`),Vt=s(`<small class="svelte-12q53fs">Replaces your recipes, menu and sample records.</small>`),Ht=s(`<div class="offer svelte-12q53fs" role="group"><div class="offer-text svelte-12q53fs"><strong> </strong> <span class="svelte-12q53fs"> </span> <!></div> <!> <!> <!></div>`),Ut=s(`<p class="offer-note svelte-12q53fs" role="status"> </p>`),Wt=s(`<p class="offer-note svelte-12q53fs" role="alert"> </p>`),Gt=s(`<div class="panel svelte-12q53fs" role="status"><h2 class="svelte-12q53fs">Assistant unavailable</h2> <p class="svelte-12q53fs">The assistant runs a small model on your graphics card using WebGPU, and
|
|
4
4
|
this browser does not offer it. Try a recent Chrome, Edge or Safari on a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Dt as e,G as t,H as n,Ot as r,U as i,ht as a,mt as o,pt as s,st as c}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/
|
|
1
|
+
import{Dt as e,G as t,H as n,Ot as r,U as i,ht as a,mt as o,pt as s,st as c}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/D_xoWitl.js";var u=t(`<h1> </h1> <p> </p>`,1);function d(t,d){r(d,!0);var f=u(),p=s(f),m=o(p,!0),h=a(p,2),g=o(h,!0);c(()=>{n(m,l.status),n(g,l.error?.message)}),i(t,f),e()}export{d as component};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{$ as e,A as t,B as n,Ct as r,Dt as i,E as a,Ft as o,G as s,H as c,J as l,L as u,M as d,Ot as f,Pt as p,U as m,X as h,Y as g,_,at as v,bt as y,ft as b,ht as x,mt as S,p as C,pt as w,st as T,ut as E,v as D,vt as O}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{a as k,ht as ee,lt as A,mt as j,p as M,t as N,ut as P}from"../chunks/
|
|
1
|
+
import{$ as e,A as t,B as n,Ct as r,Dt as i,E as a,Ft as o,G as s,H as c,J as l,L as u,M as d,Ot as f,Pt as p,U as m,X as h,Y as g,_,at as v,bt as y,ft as b,ht as x,mt as S,p as C,pt as w,st as T,ut as E,v as D,vt as O}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{a as k,ht as ee,lt as A,mt as j,p as M,t as N,ut as P}from"../chunks/B45qMR8U.js";import{p as F}from"../chunks/DIE02RSm.js";import{i as I}from"../chunks/CsaWd8kG.js";import{t as L}from"../chunks/COQVmnKJ.js";var R=s(`<p class="svelte-disfw2">Nothing selected yet. Choose a package below.</p>`),z=s(`<li><a class="svelte-disfw2"> </a></li>`),B=s(`<ul class="chips svelte-disfw2"></ul> <button type="button" class="secondary svelte-disfw2">Clear selection</button>`,1),te=s(`<p class="meta svelte-disfw2"> </p>`),ne=s(`<li><h3 class="svelte-disfw2"><a> </a></h3> <p class="description svelte-disfw2"> </p> <p class="meta svelte-disfw2"><!></p> <!> <!></li>`),re=s(`<li class="none svelte-disfw2"> </li>`),ie=s(`<main class="svelte-disfw2"><header class="svelte-disfw2"><p class="meta svelte-disfw2"><a>Planner</a> / All packages</p> <h1 class="svelte-disfw2">All packages</h1> <p class="svelte-disfw2">The whole catalog, a package at a time. Recipes on the Planner page are
|
|
2
2
|
the smaller way in: they add one section of an app, not every model in a
|
|
3
3
|
package. Your picks live in the URL, so you can share the mock-up.</p></header> <section aria-label="Your selection" class="selection svelte-disfw2"><h2 class="svelte-disfw2">Your app</h2> <!> <p class="notice svelte-disfw2" role="status" aria-live="polite"> </p></section> <section aria-label="Package catalog"><h2 class="svelte-disfw2">Packages <small class="svelte-disfw2"> </small></h2> <label class="search svelte-disfw2"><span class="visually-hidden svelte-disfw2">Search packages</span> <input type="search" placeholder="Search packages, models and fields" class="svelte-disfw2"/></label> <ul class="cards svelte-disfw2"></ul></section></main>`);function V(s,g){f(g,!0);let V=y(``),H=y(``),U=r(()=>j(A.packages,e(V)));function ae(e){let t=new Set(k.ids),n=t.has(e);k.toggle(e);let r=k.ids.filter(n=>!t.has(n)&&n!==e);O(H,n?`Removed ${M(e)}.`:r.length?`Added ${M(e)} and the packages it needs: ${r.map(M).join(`, `)}.`:`Added ${M(e)}.`,!0)}var W=ie();t(`disfw2`,e=>{v(()=>{E.title=`All packages · smrt planner`})});var G=b(W),K=b(G),oe=b(K);p(),o(K),p(4),o(G);var q=x(G,2),J=x(b(q),2),se=e=>{var t=R();m(e,t)},ce=e=>{var t=B(),n=w(t);u(n,20,()=>k.ids,e=>e,(e,t)=>{var n=z(),r=b(n),i=S(r,!0);o(n),T((e,t)=>{D(r,`href`,e),c(i,t)},[()=>N(`/packages/${t}/`),()=>M(t)]),m(e,n)}),o(n);var r=x(n,2);h(`click`,r,()=>k.clear()),m(e,t)};n(J,e=>{k.ids.length===0?e(se):e(ce,-1)});var le=x(J,2),ue=S(le,!0);o(q);var Y=x(q,2),X=b(Y),de=x(b(X)),fe=S(de);o(X);var Z=x(X,2),Q=x(b(Z),2);_(Q),o(Z);var $=x(Z,2);u($,29,()=>e(U),e=>e.id,(t,i)=>{let s=r(()=>k.has(e(i).id)),u=r(()=>k.requiredBy(e(i).id));var f=ne();let p;var h=b(f),g=b(h),_=S(g,!0);o(h);var v=x(h,2),y=S(v,!0),C=x(v,2),w=b(C),E=t=>{var n=l();T((e,t)=>c(n,`${e??``} models · ${t??``} generated surfaces`),[()=>P(e(i)).length,()=>ee(e(i))]),m(t,n)},O=r(()=>P(e(i)).length),A=t=>{var n=l();T(()=>c(n,`${e(i).models.length??``} internal models · closed: no generated surfaces`)),m(t,n)};n(w,t=>{e(O)?t(E):t(A,-1)}),o(C);var j=x(C,2),R=t=>{var n=te(),r=S(n);T(e=>c(r,`Needs: ${e??``}`),[()=>e(i).dependencies.map(M).join(`, `)]),m(t,n)};n(j,t=>{e(i).dependencies.length&&t(R)});var z=x(j,2);{let t=r(()=>e(s)&&e(u).length>0),n=r(()=>`Include ${M(e(i).id)} in my app`),a=r(()=>e(s)&&e(u).length>0?`In your app (needed by ${e(u).map(M).join(`, `)})`:e(s)?`In your app`:`Add to my app`);I(z,{get checked(){return e(s)},get disabled(){return e(t)},onchange:()=>ae(e(i).id),get"aria-label"(){return e(n)},get label(){return e(a)}})}o(f),T((t,n)=>{p=a(f,1,`svelte-disfw2`,null,p,{selected:e(s)}),D(g,`href`,t),c(_,n),c(y,e(i).description)},[()=>N(`/packages/${e(i).id}/`),()=>M(e(i).id)]),d(f,()=>F,()=>({duration:L(`medium2`,300)})),m(t,f)},t=>{var n=re(),r=S(n);T(()=>c(r,`No packages match "${e(V)??``}".`)),m(t,n)}),o($),o(Y),o(W),T(t=>{D(oe,`href`,t),c(ue,e(H)),c(fe,`${e(U).length??``} of ${A.packages.length??``}`)},[()=>N(`/`)]),C(Q,()=>e(V),e=>O(V,e)),m(s,W),i()}g([`click`]);export{V as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,Ft as o,G as s,H as c,J as l,L as u,Ot as d,U as f,W as p,ft as m,ht as h,it as g,mt as _,pt as v,st as y,ut as b,v as x}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{lt as S,p as C,pt as w,t as T,ut as E}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,Ft as o,G as s,H as c,J as l,L as u,Ot as d,U as f,W as p,ft as m,ht as h,it as g,mt as _,pt as v,st as y,ut as b,v as x}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{lt as S,p as C,pt as w,t as T,ut as E}from"../chunks/B45qMR8U.js";import{t as D}from"../chunks/DRByVC-c.js";import{t as O}from"../chunks/ptmcJq5j.js";var k=e({entries:()=>A,load:()=>j}),A=()=>S.packages.map(e=>({id:e.id})),j=({params:e})=>(w(e.id)||D(404,`Unknown package ${e.id}`),{id:e.id}),M=s(`<!><a> </a>`,1),N=s(`<p class="meta svelte-1md22of">Needs: <!></p>`),P=s(`<li><a> </a> <span class="meta svelte-1md22of"> </span></li>`),F=s(`<main class="svelte-1md22of"><header class="svelte-1md22of"><h1 class="svelte-1md22of"> </h1> <p class="meta svelte-1md22of"><code> </code></p> <p class="svelte-1md22of"> </p> <!></header> <section class="svelte-1md22of"><h2 class="svelte-1md22of">Models</h2> <ul class="svelte-1md22of"></ul></section> <!></main>`),I=s(`<a>Back to the Planner</a>`),L=s(`<main class="svelte-1md22of"><h1 class="svelte-1md22of">Unknown package</h1> <p class="svelte-1md22of">No package is called <code> </code>.<!></p></main>`);function R(e,n){d(n,!0);let s=i(()=>w(n.id));var g=p(),b=v(g),S=e=>{var n=F(),i=m(n),a=m(i),d=_(a,!0),p=h(a,2),g=m(p),b=_(g);o(p);var S=h(p,2),w=_(S,!0),D=h(S,2),k=e=>{var n=N(),i=h(m(n));u(i,18,()=>t(s).dependencies,e=>e,(e,n,i)=>{var a=M(),o=v(a),s=e=>{var t=l(`,`);f(e,t)};r(o,e=>{t(i)>0&&e(s)});var u=h(o),d=_(u,!0);y((e,t)=>{x(u,`href`,e),c(d,t)},[()=>T(`/packages/${n}/`),()=>C(n)]),f(e,a)}),o(n),f(e,n)};r(D,e=>{t(s).dependencies.length&&e(k)}),o(i);var A=h(i,2),j=h(m(A),2);u(j,21,()=>E(t(s)),e=>e.id,(e,n)=>{var r=P(),i=m(r),a=_(i,!0),l=h(i,2),u=_(l);o(r),y((e,r)=>{x(i,`href`,e),c(a,t(n).name),c(u,`${r??``} fields`)},[()=>T(`/m/${t(s).id}/${t(n).name}/`),()=>t(n).fields.filter(e=>!e.system).length]),f(e,r)}),o(j),o(A);var I=h(A,2);O(I,{get models(){return t(s).models}}),o(n),y(e=>{c(d,e),c(b,`${t(s).packageName??``}@${t(s).version??``}`),c(w,t(s).description)},[()=>C(t(s).id)]),f(e,n)},D=e=>{var t=L(),i=h(m(t),2),a=h(m(i)),s=_(a,!0),l=h(a,2),u=e=>{var t=I();y(()=>x(t,`href`,n.backHref)),f(e,t)};r(l,e=>{n.backHref&&e(u)}),o(i),o(t),y(()=>c(s,n.id)),f(e,t)};r(b,e=>{t(s)?e(S):e(D,-1)}),f(e,g),a()}function z(e,t){d(t,!0),n(`88mplm`,e=>{g(e=>{b.title=`${e??``} · smrt planner`},[()=>C(t.data.id)])}),R(e,{get id(){return t.data.id}}),a()}export{z as component,k as universal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Ot as f,Pt as p,U as m,W as h,X as g,Y as _,Z as v,a as y,bt as b,ft as x,gt as S,ht as C,it as w,j as T,mt as E,pt as D,st as O,ut as k,v as A,vt as j}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{p as ee,t as M}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Ot as f,Pt as p,U as m,W as h,X as g,Y as _,Z as v,a as y,bt as b,ft as x,gt as S,ht as C,it as w,j as T,mt as E,pt as D,st as O,ut as k,v as A,vt as j}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{p as ee,t as M}from"../chunks/B45qMR8U.js";import{n as N}from"../chunks/DF-0MxNw.js";import{i as P}from"../chunks/CsaWd8kG.js";import{A as te,C as F,D as I,E as ne,H as L,O as re,S as R,T as ie,_ as ae,f as z,g as B,k as V,p as H,t as U,v as W,w as G,y as K}from"../chunks/nB-x9BEp.js";import{t as q}from"../chunks/Cmh0yR4f.js";import{t as J}from"../chunks/DRByVC-c.js";import{n as Y}from"../chunks/DWeCJh9N.js";var X=e({entries:()=>Z,load:()=>Q}),Z=()=>R.map(e=>({id:e.id})),Q=({params:e})=>(H(e.id)||J(404,`Unknown recipe section ${e.id}`),{id:e.id}),oe=c(`<fieldset class="field svelte-nbkntr"><legend><code> </code> <span class="type svelte-nbkntr"> </span></legend> <!> <div class="controls svelte-nbkntr"><label class="svelte-nbkntr"><span>Label</span> <!></label> <label class="svelte-nbkntr"><span>Help text</span> <!></label> <fieldset class="default svelte-nbkntr"><!></fieldset> <label class="svelte-nbkntr"><span>Order</span> <!></label></div></fieldset>`),se=c(`<p class="hint svelte-nbkntr"> </p>`),ce=c(`<form class="options svelte-nbkntr"><!> <p class="hint svelte-nbkntr">Stored in the <code> </code> table. Switch fields on or
|
|
2
2
|
off and set their label, help, default and order. Saved as field policies.</p> <fieldset class="svelte-nbkntr"><legend>Exposure (can only be narrowed)</legend> <div class="surfaces svelte-nbkntr"></div></fieldset> <!> <!> <div class="actions svelte-nbkntr"><button type="submit" class="svelte-nbkntr">Save options</button> <button type="button" class="secondary svelte-nbkntr">Reset to recipe defaults</button></div> <p class="status svelte-nbkntr" role="status" aria-live="polite"> </p></form>`);function le(e,n){f(n,!0);let c=y(n,`headingLevel`,3,3);function _(){return ie(n.model,n.hints,U.rows,U.narrowed[n.model.id]??[])}let w=b(S(_())),k=b(``),ee=i(()=>ne(n.model,n.hints)),M=i(()=>V(n.model,n.hints)),L=i(()=>Object.entries(n.hints?.fields??{}).filter(([,e])=>e.visibility===`hidden`).map(([e])=>e));function R(e){e.preventDefault(),U.save(n.model.id,te(n.model,n.hints,t(w)),re(n.model,n.hints,t(w))),j(k,`Options saved. The views below use them.`)}function ae(){U.reset(n.model.id),j(w,_(),!0),j(k,`Options reset to the recipe defaults.`)}function z(e,n){let r=Number(n);n.trim()!==``&&Number.isFinite(r)&&(t(w).fields[e].order=r)}var B=ce(),H=x(B);T(H,()=>`h${Math.min(c(),6)}`,!1,(e,t)=>{o(e,0,`svelte-nbkntr`);var r=u();O(()=>l(r,`${n.model.name??``} options`)),m(t,r)});var W=C(H,2),K=C(x(W)),q=E(K,!0);p(),s(W);var J=C(W,2),X=C(x(J),2);d(X,20,()=>F,e=>e,(e,r)=>{{let a=i(()=>`Expose ${n.model.name} over ${G[r]}${t(M)[r].available?``:` (none declared)`}`);P(e,{get checked(){return t(w).exposure[r]},get disabled(){return t(M)[r].locked},onchange:e=>t(w).exposure[r]=e.currentTarget.checked,get label(){return t(a)}})}}),s(X),s(J);var Z=C(J,2);d(Z,17,()=>t(ee),e=>e.field.name,(e,a)=>{let o=i(()=>t(a).field.name),c=i(()=>I(t(a))),u=i(()=>t(a).locked);var d=h(),f=D(d),p=e=>{var r=oe(),d=x(r),f=x(d),p=E(f,!0),h=C(f,2),g=E(h,!0);s(d);var _=C(d,2);{let e=i(()=>`Use field ${t(o)}${t(a).required?` (required)`:t(u)?` (locked)`:``}`);P(_,{get checked(){return t(w).fields[t(o)].use},get disabled(){return t(c)},onchange:e=>t(w).fields[t(o)].use=e.currentTarget.checked,get label(){return t(e)}})}var v=C(_,2),y=x(v),b=C(x(y),2);{let e=i(()=>`Label for ${t(o)}`);N(b,{get disabled(){return t(u)},get"aria-label"(){return t(e)},get value(){return t(w).fields[t(o)].label},set value(e){t(w).fields[t(o)].label=e}})}s(y);var S=C(y,2),T=C(x(S),2);{let e=i(()=>`Help text for ${t(o)}`);N(T,{get disabled(){return t(u)},get"aria-label"(){return t(e)},get value(){return t(w).fields[t(o)].help},set value(e){t(w).fields[t(o)].help=e}})}s(S);var D=C(S,2),k=x(D);{let e=i(()=>({...t(a).field,required:!1})),r=i(()=>`Default value for ${t(o)}`),s=i(()=>`default-${n.model.name}`);Y(k,{get field(){return t(e)},get modelId(){return n.model.id},creatable:!1,get label(){return t(r)},get idPrefix(){return t(s)},get value(){return t(w).fields[t(o)].default},onchange:e=>{t(w).fields[t(o)].default=e}})}s(D);var A=C(D,2),j=C(x(A),2);{let e=i(()=>`Order of ${t(o)}`);N(j,{type:`number`,get value(){return t(w).fields[t(o)].order},get disabled(){return t(u)},oninput:e=>z(t(o),e.currentTarget.value),get"aria-label"(){return t(e)}})}s(A),s(v),s(r),O(()=>{l(p,t(o)),l(g,t(a).field.type),D.disabled=t(u)}),m(e,r)};r(f,e=>{t(w).fields[t(o)]&&e(p)}),m(e,d)});var Q=C(Z,2),le=e=>{var n=se(),r=E(n);O(e=>l(r,`Hidden by the recipe: ${e??``}.`),[()=>t(L).join(`, `)]),m(e,n)};r(Q,e=>{t(L).length&&e(le)});var $=C(Q,2),ue=C(x($),2);s($);var de=C($,2),fe=E(de,!0);s(B),O(()=>{A(B,`aria-label`,`Options for ${n.model.name}`),l(q,n.model.collection),l(fe,t(k))}),v(`submit`,B,R),g(`click`,ue,ae),m(e,B),a()}_([`click`]);var $=c(`<h2 class="svelte-1e5i8ao"> </h2>`),ue=c(`<!><a> </a>`,1),de=c(`<p class="meta svelte-1e5i8ao">Needs: <!></p>`),fe=c(`<a> </a>`),pe=c(`<li><!> <span class="meta svelte-1e5i8ao"> </span></li>`),me=c(`<div class="options svelte-1e5i8ao"><!> <p class="meta svelte-1e5i8ao"> </p> <!></div>`),he=c(`<p class="meta svelte-1e5i8ao">Add this recipe to set its options.</p>`),ge=c(`<section class="recipe svelte-1e5i8ao"><header class="svelte-1e5i8ao"><!> <p class="svelte-1e5i8ao"> </p> <p class="meta svelte-1e5i8ao"><code> </code> </p> <!> <div class="actions"><button type="button"> </button></div></header> <div class="adds svelte-1e5i8ao"><!> <ul class="svelte-1e5i8ao"></ul></div> <!></section>`);function _e(e,n){f(n,!0);let c=y(n,`titled`,3,!1),p=i(()=>c()?`h3`:`h2`),h=i(()=>U.has(n.recipe.id)),_=i(()=>U.requiredBy(n.recipe.id)),v=i(()=>ae(n.recipe)),b=e=>z(e)?.label??e,S=e=>{let t=z(e);return M(`/recipes/${t?L(t):e}/`)};var w=ge(),k=x(w),j=x(k),N=e=>{var t=$(),r=E(t,!0);O(()=>l(r,n.recipe.label)),m(e,t)};r(j,e=>{c()&&e(N)});var P=C(j,2),te=E(P,!0),F=C(P,2),I=x(F),ne=E(I,!0),re=C(I);s(F);var R=C(F,2),ie=e=>{var i=de(),a=C(x(i));d(a,18,()=>n.recipe.requires,e=>e,(e,n,i)=>{var a=ue(),o=D(a),s=e=>{var t=u(`,`);m(e,t)};r(o,e=>{t(i)>0&&e(s)});var c=C(o),d=E(c,!0);O((e,t)=>{A(c,`href`,e),l(d,t)},[()=>S(n),()=>b(n)]),m(e,a)}),s(i),m(e,i)};r(R,e=>{n.recipe.requires.length&&e(ie)});var V=C(R,2),H=x(V);let G;var q=E(H,!0);s(V),s(k);var J=C(k,2),Y=x(J);T(Y,()=>t(p),!1,(e,t)=>{o(e,0,`svelte-1e5i8ao`);var n=u(`What it adds`);m(t,n)});var X=C(Y,2);d(X,21,()=>W(n.recipe),e=>e.model.id,(e,n)=>{var i=pe(),a=x(i),o=e=>{var r=fe(),i=E(r,!0);O(e=>{A(r,`href`,e),l(i,t(n).label)},[()=>M(B(t(n)))]),m(e,r)},c=e=>{var r=u();O(()=>l(r,t(n).label)),m(e,r)};r(a,e=>{t(h)?e(o):e(c,-1)});var d=C(a,2),f=E(d);s(i),O(()=>l(f,`list, create, edit and delete views for ${t(n).model.name??``}`)),m(e,i)}),s(X),s(J);var Z=C(J,2),Q=e=>{var r=me(),a=x(r);T(a,()=>t(p),!1,(e,t)=>{o(e,0,`svelte-1e5i8ao`);var n=u(`Options`);m(t,n)});var f=C(a,2),h=E(f),g=C(f,2);d(g,17,()=>t(v),({model:e})=>e.id,(e,r)=>{let a=()=>t(r).model;{let r=i(()=>n.recipe.options?.[a().id]),o=i(()=>c()?4:3);le(e,{get model(){return a()},get hints(){return t(r)},get headingLevel(){return t(o)}})}}),s(r),O(()=>l(h,`Generated from the parameters ${n.recipe.label??``}'s models declare. Saving
|
|
3
3
|
writes field policies, held in memory for now.`)),m(e,r)},oe=e=>{var t=he();m(e,t)};r(Z,e=>{t(h)?e(Q):e(oe,-1)}),s(w),O((e,r)=>{A(w,`aria-label`,n.recipe.label),l(te,n.recipe.summary),l(ne,n.recipe.id),l(re,` · from
|
|
4
4
|
${e??``}`),H.disabled=t(_).length>0,G=o(H,1,`svelte-1e5i8ao`,null,G,{secondary:t(h)}),l(q,r)},[()=>K(n.recipe)?ee(K(n.recipe)?.id??``):`unknown package`,()=>t(_).length?`Remove ${n.recipe.label} (needed by ${t(_).map(b).join(`, `)})`:t(h)?`Remove ${n.recipe.label} from my app`:`Add ${n.recipe.label} to my app`]),g(`click`,H,()=>t(h)?U.remove(n.recipe.id):U.add(n.recipe.id)),m(e,w),a()}_([`click`]);var ve=c(`<main class="svelte-1r2e3yg"><header class="svelte-1r2e3yg"><div class="bar svelte-1r2e3yg"><p class="meta svelte-1r2e3yg"><a>Planner</a> </p> <!></div> <h1 class="svelte-1r2e3yg"> </h1></header> <!></main>`);function ye(e,o){f(o,!0);let c=i(()=>H(o.data.id));var u=h();n(`1r2e3yg`,e=>{w(()=>{k.title=`${t(c)?.label??o.data.id??``} options · smrt planner`})});var p=D(u),g=e=>{var n=ve(),r=x(n),a=x(r),o=x(a),u=x(o),f=C(u);s(o);var p=C(o,2);q(p,{get section(){return t(c).id},get label(){return t(c).label},current:`options`}),s(a);var h=C(a,2),g=E(h);s(r);var _=C(r,2);d(_,17,()=>t(c).recipes,e=>e.id,(e,n)=>{{let r=i(()=>t(c).recipes.length>1);_e(e,{get recipe(){return t(n)},get titled(){return t(r)}})}}),s(n),O(e=>{A(u,`href`,e),l(f,` / ${t(c).label??``} options`),l(g,`${t(c).label??``} options`)},[()=>M(`/`)]),m(e,n)};r(p,e=>{t(c)&&e(g)}),m(e,u),a()}export{ye as component,X as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Lt as f,Ot as p,Pt as m,R as h,U as g,W as _,a as v,ft as y,ht as b,it as x,j as S,mt as C,pt as w,st as T,ut as E,v as D}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as O}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,E as o,Ft as s,G as c,H as l,J as u,L as d,Lt as f,Ot as p,Pt as m,R as h,U as g,W as _,a as v,ft as y,ht as b,it as x,j as S,mt as C,pt as w,st as T,ut as E,v as D}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{t as O}from"../chunks/B45qMR8U.js";import{S as k,_ as A,h as j,p as M,t as N}from"../chunks/nB-x9BEp.js";import{t as P}from"../chunks/Cmh0yR4f.js";import{t as F}from"../chunks/DRByVC-c.js";import{t as I}from"../chunks/JBD5vUbP.js";import{t as L}from"../chunks/ptmcJq5j.js";var R=e({entries:()=>z,load:()=>B}),z=()=>k.map(e=>({id:e.id})),B=({params:e})=>(M(e.id)||F(404,`Unknown recipe section ${e.id}`),{id:e.id}),V=(e,n=f)=>{var i=_(),a=w(i);d(a,17,n,h,(e,n)=>{var i=_(),a=w(i),o=e=>{var r=H();V(y(r),()=>t(n).children),s(r),g(e,r)},c=e=>{var r=U();V(y(r),()=>t(n).children),s(r),g(e,r)},d=e=>{var r=W(),i=C(r,!0);T(()=>l(i,t(n).text)),g(e,r)},f=e=>{var r=u();T(()=>l(r,t(n).text)),g(e,r)};r(a,e=>{t(n).type===`strong`?e(o):t(n).type===`em`?e(c,1):t(n).type===`code`?e(d,2):t(n).type===`text`&&e(f,3)}),g(e,i)}),g(e,i)},H=c(`<strong><!></strong>`),U=c(`<em><!></em>`),W=c(`<code> </code>`),G=c(`<p class="svelte-cw30hy"><!></p>`),K=c(`<li><!></li>`),q=c(`<ol class="svelte-cw30hy"></ol>`),J=c(`<ul class="svelte-cw30hy"></ul>`),Y=c(`<dt class="svelte-cw30hy"> </dt> <dd class="svelte-cw30hy"> </dd>`,1),X=c(`<section class="svelte-cw30hy"><!> <dl class="svelte-cw30hy"></dl></section>`),Z=c(`<section aria-label="Fields" class="svelte-cw30hy"><!> <!></section>`),Q=c(`<article class="help svelte-cw30hy"><!> <!></article>`);function $(e,n){p(n,!0);let c=v(n,`idPrefix`,3,``),f=v(n,`startLevel`,3,2),m=e=>Math.min(f()+e,6),x=i(()=>[...new Set(n.glossary.map(e=>e.model))].map(e=>({model:e,entries:n.glossary.filter(t=>t.model===e)})));var E=Q(),O=y(E);d(O,17,()=>n.blocks,h,(e,n)=>{var i=_(),a=w(i),c=e=>{var r=_(),i=w(r);S(i,()=>`h${m(t(n).level-2)}`,!1,(e,r)=>{o(e,0,`svelte-cw30hy`),V(r,()=>t(n).inlines)}),g(e,r)},l=e=>{var r=G();V(y(r),()=>t(n).inlines),s(r),g(e,r)},u=e=>{var r=q();d(r,21,()=>t(n).items,h,(e,n)=>{var r=K();V(y(r),()=>t(n).inlines),s(r),g(e,r)}),s(r),g(e,r)},f=e=>{var r=J();d(r,21,()=>t(n).items,h,(e,n)=>{var r=K();V(y(r),()=>t(n).inlines),s(r),g(e,r)}),s(r),g(e,r)};r(a,e=>{t(n).type===`heading`?e(c):t(n).type===`paragraph`?e(l,1):t(n).ordered?e(u,2):e(f,-1)}),g(e,i)});var k=b(O,2),A=e=>{var n=Z(),i=y(n);S(i,()=>`h${m(0)}`,!1,(e,t)=>{o(e,0,`svelte-cw30hy`);var n=u(`Fields`);g(t,n)});var a=b(i,2);d(a,17,()=>t(x),e=>e.model,(e,n)=>{var i=X(),a=y(i),f=e=>{var r=_(),i=w(r);S(i,()=>`h${m(1)}`,!1,(e,r)=>{o(e,0,`svelte-cw30hy`);var i=u();T(()=>l(i,t(n).model)),g(r,i)}),g(e,r)};r(a,e=>{t(x).length>1&&e(f)});var p=b(a,2);d(p,21,()=>t(n).entries,e=>e.name,(e,n)=>{var r=Y(),i=w(r),a=C(i,!0),o=b(i,2),s=C(o,!0);T(()=>{l(a,t(n).label),l(s,t(n).text)}),g(e,r)}),s(p),s(i),T(()=>{D(i,`id`,`${c()}fields-${t(n).model}`),D(i,`aria-label`,`${t(n).model} fields`)}),g(e,i)}),s(n),g(e,n)};r(k,e=>{t(x).length&&e(A)}),s(E),g(e,E),a()}var ee=c(`<h2 class="svelte-1o06wj"> </h2> <p class="meta svelte-1o06wj"> </p>`,1),te=c(`<p class="svelte-1o06wj"> </p>`),ne=c(`<section class="svelte-1o06wj"><!> <!></section>`);function re(e,n){p(n,!0);let o=v(n,`titled`,3,!1),c=i(()=>j(n.recipe,N.rows)),u=i(()=>n.recipe.help?I(n.recipe.help,t(c)):void 0);var d=ne(),f=y(d),m=e=>{var t=ee(),r=w(t),i=C(r,!0),a=b(r,2),o=C(a,!0);T(()=>{D(r,`id`,`help-${n.recipe.id}`),l(i,n.recipe.label),l(o,n.recipe.summary)}),g(e,t)};r(f,e=>{o()&&e(m)});var h=b(f,2),_=e=>{{let r=i(()=>`${n.recipe.id}-`),a=i(()=>o()?3:2);$(e,{get blocks(){return t(u).blocks},get glossary(){return t(u).glossary},get idPrefix(){return t(r)},get startLevel(){return t(a)}})}},x=e=>{var t=te(),r=C(t);T(()=>l(r,`There is no help for ${n.recipe.label??``} yet.`)),g(e,t)};r(h,e=>{t(u)?e(_):e(x,-1)}),s(d),T(()=>D(d,`aria-label`,n.recipe.label)),g(e,d),a()}var ie=c(`<main class="svelte-1nuwlgo"><header class="svelte-1nuwlgo"><div class="bar svelte-1nuwlgo"><p class="meta svelte-1nuwlgo"><a>Planner</a> / <a> </a> / Help</p> <!></div> <h1 class="svelte-1nuwlgo"> </h1></header> <!> <!></main>`);function ae(e,o){p(o,!0);let c=i(()=>M(o.data.id)),u=i(()=>{let e=new Set;return(t(c)?.recipes??[]).flatMap(t=>A(t).flatMap(({model:t})=>e.has(t.id)?[]:(e.add(t.id),[N.apply(t).model])))});var f=_();n(`1nuwlgo`,e=>{x(()=>{E.title=`${t(c)?.label??o.data.id??``} help · smrt planner`})});var h=w(f),v=e=>{var n=ie(),r=y(n),a=y(r),o=y(a),f=y(o),p=b(f,2),h=C(p,!0);m(),s(o);var _=b(o,2);P(_,{get section(){return t(c).id},get label(){return t(c).label},current:`help`}),s(a);var v=b(a,2),x=C(v);s(r);var S=b(r,2);d(S,17,()=>t(c).recipes,e=>e.id,(e,n)=>{{let r=i(()=>t(c).recipes.length>1);re(e,{get recipe(){return t(n)},get titled(){return t(r)}})}});var w=b(S,2);L(w,{get models(){return t(u)}}),s(n),T((e,n)=>{D(f,`href`,e),D(p,`href`,n),l(h,t(c).label),l(x,`${t(c).label??``} help`)},[()=>O(`/`),()=>O(`/recipes/${t(c).id}/`)]),g(e,n)};r(h,e=>{t(c)&&e(v)}),g(e,f),a()}export{ae as component,R as universal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,F as o,Ft as s,G as c,H as l,J as u,Lt as d,Ot as f,U as p,W as m,X as h,Y as g,a as _,bt as v,ct as y,ft as b,gt as x,ht as S,it as C,mt as w,n as T,nt as E,pt as D,st as O,ut as k,v as A,vt as j,z as ee}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{_ as M,dt as te,g as N,p as P,t as F,v as ne}from"../chunks/
|
|
1
|
+
import{n as e}from"../chunks/COiEfhsA.js";import{$ as t,A as n,B as r,Ct as i,Dt as a,F as o,Ft as s,G as c,H as l,J as u,Lt as d,Ot as f,U as p,W as m,X as h,Y as g,a as _,bt as v,ct as y,ft as b,gt as x,ht as S,it as C,mt as w,n as T,nt as E,pt as D,st as O,ut as k,v as A,vt as j,z as ee}from"../chunks/DG3qFFTE.js";import"../chunks/xihTtKlq.js";import{_ as M,dt as te,g as N,p as P,t as F,v as ne}from"../chunks/B45qMR8U.js";import{d as I}from"../chunks/BfeotTF9.js";import"../chunks/Ct5r3XV1.js";import{s as L,u as R}from"../chunks/DIE02RSm.js";import{t as z}from"../chunks/D_xoWitl.js";import{M as B,P as V,R as H,k as U}from"../chunks/C7boms_S.js";import{A as re,C as W,S as ie,b as ae,n as G,x as K}from"../chunks/Ywu-998J.js";import{B as q,H as oe,N as se,R as J,_ as ce,b as Y,g as X,j as Z,t as Q,v as $,x as le}from"../chunks/nB-x9BEp.js";import{n as ue}from"../chunks/QJX7BlhI.js";import{r as de}from"../chunks/D_U_DYjx.js";import{t as fe}from"../chunks/Cmh0yR4f.js";import{t as pe}from"../chunks/BU0vd8nA.js";import{r as me,t as he}from"../chunks/CgAkqYsL.js";import{t as ge}from"../chunks/D71UrO5c.js";var _e=8e3,ve=262144,ye=class extends Error{};function be(e,t,n){let r=new AbortController,i=()=>r.abort();n?.addEventListener(`abort`,i,{once:!0}),n?.aborted&&r.abort();let a,o=new Promise((e,n)=>{a=setTimeout(()=>{r.abort(),n(new ye(`widget load timed out`))},t)});return Promise.race([Promise.resolve().then(()=>e(r.signal)),o]).finally(()=>{a!==void 0&&clearTimeout(a),n?.removeEventListener(`abort`,i)})}function xe(e,t){if(e===void 0)return!0;try{let n=JSON.stringify(e);return n!==void 0&&n.length<=t}catch{return!1}}async function Se(e,t,n,r,i={}){let a=H(e,{registry:n,definition:t}),o=i.timeoutMs??_e,s=i.maxDataLength??ve,c=await Promise.all(a.document.widgets.map(async e=>{let a=n.get(e.type),c={...e,status:`ready`};if(!a?.load)return c;let l=t=>({...e,status:`error`,error:{code:t}});try{let n=await be(n=>a.load?.(e.options,{...r,overviewId:t.id,signal:n}),o,r.signal);return xe(n,s)?n===void 0?c:{...c,data:n}:l(`invalid_data`)}catch(t){return i.onError?.({id:e.id,type:e.type},t),l(t instanceof ye?`timeout`:`load_failed`)}}));return{overviewId:t.id,widgets:c,issues:a.issues}}var Ce=e({entries:()=>we,load:()=>Te}),we=()=>{let e=[...J(Y).map(e=>`section:${e.id}`),`section:${Z.id}`,...ue.flatMap(e=>(e.document.layout?.customSections??[]).map(e=>e.id))];return[...new Set(e)].map(e=>({section:me(e)}))},Te=({params:e})=>({sectionId:he(e.section)});function Ee(e,t){let n=e.flatMap(e=>$(e)),r=new Map;for(let e of n){let t=q(e.packageId,e.model.name,e.key);if(r.has(t))continue;let i=W(e.model.id,e.key,n);r.set(t,{id:t,model:e.model,path:X(e),...e.noun?{noun:e.noun}:{},...i?{scope:i}:{}})}for(let e of se(t)){if(r.has(e.id))continue;let t=te(e.packageId,e.modelName);t&&r.set(e.id,{id:e.id,model:t,path:X({packageId:e.packageId,model:t})})}return r}function De(e,t){let n=new Set(e),r=[];for(let e of t){let t=$(e).some(e=>n.has(q(e.packageId,e.model.name,e.key))),i=oe(e);t&&!r.some(e=>e.id===i)&&r.push({id:i,label:e.group?.label??e.label})}return r}var Oe=new Map(J(Y).map(e=>[e.id,e])),ke=new Map(ue.flatMap(e=>Object.entries(e.sectionDescriptions??{})));function Ae(e){if(e===`section:${Z.id}`)return{icon:Z.icon,description:Z.description};if(e.startsWith(`section:`)){let t=Oe.get(e.slice(8));if(!t)return{};let n=t.recipes.find(e=>e.group?.summary)?.group?.summary;return{icon:t.icon,description:t.description??n}}let t=ke.get(e);return t?{description:t}:{}}function je(e,t=`Planner`){return e?.trim()||t}function Me(e,t){let n=new Set,r=[],i=(e,t)=>{n.has(e)||(n.add(e),r.push({value:e,label:M(P(t))}))};for(let t of e)for(let{model:e}of ce(t))i(e.id,e.name);for(let e of t.values())i(e.model.id,e.model.name);return r}var Ne=c(`<p class="svelte-2penap"> </p>`),Pe=c(`<header class="section-heading svelte-2penap"><span class="mark svelte-2penap"><!></span> <div class="heading svelte-2penap"><h1 class="svelte-2penap"> </h1> <!></div> <!></header>`);function Fe(e,t){var n=Pe(),i=b(n),a=b(i);L(a,{get name(){return t.icon},size:28}),s(i);var c=S(i,2),u=b(c),f=w(u,!0),m=S(u,2),h=e=>{var n=Ne(),r=w(n,!0);O(()=>l(r,t.description)),p(e,n)};r(m,e=>{t.description&&e(h)}),s(c);var g=S(c,2);o(g,()=>t.actions??d),s(n),O(()=>l(f,t.title)),p(e,n)}async function Ie(e,t,n,r){let i=(await Se({widgets:[n]},e,K,{...t,signal:r,locale:`en-US`})).widgets[0];if(!i||i.status===`error`)throw Error(i?.error?.code??`load_failed`);return i.data}function Le(e,t,n){let r=e.id;return B({definition:e,registry:K,override:()=>t.overview(r),onchange:e=>t.setOverview(r,e),...n?{loadWidget:(t,r)=>Ie(e,n(),t,r)}:{}})}var Re=(e,t=d,n=d)=>{var r=ze(),i=w(r,!0);O(()=>l(i,n())),p(e,r)},ze=c(`<span class="section-heading svelte-1qn3h3g"> </span>`);function Be(e,n){f(n,!0);let i=_(n,`presentation`,3,`plain`),o=_(n,`href`,3,F),s=R(),c=de(),l=Le(E(()=>n.definition),G,()=>({source:c,sections:s.sections,entryIndex:n.entries,href:o()})),u=v(void 0);y(()=>{let e=l.document.widgets.map(e=>e.type),t=!0;return V(e,K).then(e=>{t&&j(u,e,!0)}),()=>{t=!1}});function d(){for(let e of l.document.widgets)l.reload(e.id)}let h=!0;y(()=>{JSON.stringify(s.sections),n.entries,h?h=!1:E(d)}),y(()=>c.onReset?.(()=>d())),T(()=>l.destroy());var g=m(),b=D(g),x=e=>{U(e,{get controller(){return l},get models(){return n.models},get label(){return n.label},get presentation(){return i()},get heading(){return Re},get components(){return t(u)}})};r(b,e=>{t(u)&&e(x)}),p(e,g),a()}var Ve=c(`<section class="entries svelte-1jqhb2e" aria-labelledby="section-entries"><h2 id="section-entries" class="svelte-1jqhb2e">Menu entries</h2> <!></section>`),He=c(`<!> <!>`,1),Ue=c(`<h1>Section not found</h1> <p>This section is not in your app. <a>Back to the Planner</a></p>`,1),We=c(`<main class="section-view svelte-1jqhb2e"><!></main>`);function Ge(e,n){f(n,!0);let c=(e,n=d)=>{var a=m(),o=D(a),s=e=>{var r=u();O(e=>l(r,e),[()=>ne(t(V).get(n().id)??0)]),p(e,r)},c=i(()=>t(V).has(n().id));r(o,e=>{t(c)&&e(s)}),p(e,a)},h=_(n,`href`,3,F),g=R(),C=de(),w=re(),T=i(()=>g.sections.find(e=>e.id===n.sectionId)),E=i(()=>w?.shell.sections.find(e=>e.id===n.sectionId)),k=i(()=>je(t(T)?.heading||t(E)?.label)),M=i(()=>t(T)?.icon??t(E)?.icon??`folder`),te=i(()=>Ae(n.sectionId).description??t(E)?.description),N=i(()=>t(T)?.items.map(e=>e.id)??[]),P=i(()=>Q.ids.flatMap(e=>{let t=le.get(e);return t?[t]:[]})),L=i(()=>Ee(t(P),Q.features)),z=i(()=>ae(n.sectionId)),B=i(()=>Me(t(P),t(L))),V=v(x(new Map)),H=0;async function U(){let e=++H,n=new Map;await Promise.all(t(N).map(async e=>{let r=t(L).get(e);if(!r)return;let i=await C.list(r.model);n.set(e,i.filter(e=>ie(r.scope,e)).length)})),e===H&&j(V,n,!0)}y(()=>{t(N),t(L),U()}),y(()=>C.onReset?.(()=>void U()));var W=m(),K=D(W),q=e=>{var a=We(),l=b(a),u=e=>{var a=He(),l=D(a);Fe(l,{get icon(){return t(M)},get title(){return t(k)},get description(){return t(te)},actions:e=>{var r=m(),i=D(r);o(i,()=>n.headerActions??d,()=>({title:t(k),itemIds:t(N)})),p(e,r)},$$slots:{actions:!0}});var u=S(l,2),f=e=>{var a=He(),o=D(a);ee(o,()=>n.sectionId,e=>{{let n=i(()=>`${t(k)} overview`);Be(e,{get definition(){return t(z)},get entries(){return t(L)},get models(){return t(B)},get href(){return h()},get label(){return t(n)}})}});var l=S(o,2),u=e=>{var t=Ve(),r=S(b(t),2);I(r,{get sectionId(){return n.sectionId},get meta(){return c}}),s(t),p(e,t)};r(l,e=>{g.editing&&e(u)}),p(e,a)},_=e=>{I(e,{get sectionId(){return n.sectionId},layout:`cards`,get meta(){return c},get actions(){return n.menuActions}})};r(u,e=>{t(z)?e(f):e(_,-1)}),p(e,a)},f=e=>{var t=Ue(),n=S(D(t),2),r=S(b(n));s(n),O(e=>A(r,`href`,e),[()=>h()(`/`)]),p(e,t)};r(l,e=>{t(T)?e(u):e(f,-1)}),s(a),p(e,a)};r(K,e=>{G.loaded&&e(q)}),p(e,W),a()}var Ke=c(`<a class="new svelte-sp05yg"> </a>`);function qe(e,o){f(o,!0);let s=(e,n)=>{let a=()=>(n?.()).title,o=()=>(n?.()).itemIds,s=i(()=>De(o(),t(_)));var c=m(),l=D(c),u=e=>{fe(e,{get section(){return t(s)[0].id},get label(){return t(s)[0].label}})},d=e=>{pe(e,{get label(){return a()},get groups(){return t(s)}})};r(l,e=>{t(s).length===1?e(u):t(s).length>1&&e(d,1)}),p(e,c)},c=(e,n=d)=>{let a=i(()=>y(n()));var o=m(),s=D(o),c=e=>{var r=Ke(),i=w(r);O(()=>{A(r,`href`,n().href),l(i,`New ${t(a)??``}`)}),h(`click`,r,()=>b(n())),p(e,r)};r(s,e=>{t(a)&&e(c)}),p(e,o)},u=R(),g=i(()=>je(u.sections.find(e=>e.id===o.sectionId)?.heading)),_=i(()=>Q.ids.flatMap(e=>{let t=le.get(e);return t?[t]:[]})),v=i(()=>Ee(t(_),Q.features)),y=e=>{let n=t(v).get(e.id);return n?N(e.label,n.noun):void 0};function b(e){ge(new URL(e.href,z.url).pathname)}n(`sp05yg`,e=>{C(()=>{k.title=`${t(g)??``} · smrt planner`})}),Ge(e,{get sectionId(){return o.sectionId},get headerActions(){return s},get menuActions(){return c}}),a()}g([`click`]);function Je(e,t){f(t,!0),qe(e,{get sectionId(){return t.data.sectionId}}),a()}export{Je as component,Ce as universal};
|