qrdx 0.0.50 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +212 -8
- package/dist/angular.js +252 -0
- package/dist/angular.js.map +1 -0
- package/dist/angular.mjs +226 -0
- package/dist/angular.mjs.map +1 -0
- package/dist/core.js +31 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +31 -0
- package/dist/core.mjs.map +1 -0
- package/dist/element-define.browser.mjs +2 -0
- package/dist/element-define.browser.mjs.map +1 -0
- package/dist/element-define.js +2 -0
- package/dist/element-define.js.map +1 -0
- package/dist/element-define.mjs +2 -0
- package/dist/element-define.mjs.map +1 -0
- package/dist/element.browser.mjs +91 -0
- package/dist/element.browser.mjs.map +1 -0
- package/dist/element.js +2 -0
- package/dist/element.js.map +1 -0
- package/dist/element.mjs +2 -0
- package/dist/element.mjs.map +1 -0
- package/dist/frames-index.js +1 -1
- package/dist/frames-index.js.map +1 -1
- package/dist/frames-index.mjs +1 -1
- package/dist/frames-index.mjs.map +1 -1
- package/dist/frames-official.js +1 -1
- package/dist/frames-official.js.map +1 -1
- package/dist/frames-official.mjs +1 -1
- package/dist/frames-official.mjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/dist/node.js +2 -5
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +2 -5
- package/dist/node.mjs.map +1 -1
- package/dist/preact.js +2 -0
- package/dist/preact.js.map +1 -0
- package/dist/preact.mjs +2 -0
- package/dist/preact.mjs.map +1 -0
- package/dist/qr-code-canvas.js +1 -1
- package/dist/qr-code-canvas.js.map +1 -1
- package/dist/qr-code-canvas.mjs +1 -1
- package/dist/qr-code-canvas.mjs.map +1 -1
- package/dist/solid.js +2 -0
- package/dist/solid.js.map +1 -0
- package/dist/solid.mjs +2 -0
- package/dist/solid.mjs.map +1 -0
- package/dist/src/angular.d.ts +94 -0
- package/dist/src/api.d.ts +8 -2
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/art.d.ts +4 -3
- package/dist/src/art.d.ts.map +1 -1
- package/dist/src/body-patterns.d.ts +3 -2
- package/dist/src/body-patterns.d.ts.map +1 -1
- package/dist/src/core.d.ts +5 -0
- package/dist/src/core.d.ts.map +1 -0
- package/dist/src/corner-dot.d.ts +3 -2
- package/dist/src/corner-dot.d.ts.map +1 -1
- package/dist/src/element-define.d.ts +3 -0
- package/dist/src/element-define.d.ts.map +1 -0
- package/dist/src/element.d.ts +150 -0
- package/dist/src/element.d.ts.map +1 -0
- package/dist/src/engine.d.ts +44 -0
- package/dist/src/engine.d.ts.map +1 -0
- package/dist/src/export.d.ts +5 -0
- package/dist/src/export.d.ts.map +1 -0
- package/dist/src/frame-spec.d.ts +22 -4
- package/dist/src/frame-spec.d.ts.map +1 -1
- package/dist/src/frame-text.d.ts +19 -0
- package/dist/src/frame-text.d.ts.map +1 -0
- package/dist/src/frame.d.ts +18 -11
- package/dist/src/frame.d.ts.map +1 -1
- package/dist/src/frames/builtin.d.ts +53 -5
- package/dist/src/frames/builtin.d.ts.map +1 -1
- package/dist/src/frames/catalogue/all.d.ts.map +1 -1
- package/dist/src/frames/catalogue/automotive.d.ts +5 -0
- package/dist/src/frames/catalogue/automotive.d.ts.map +1 -0
- package/dist/src/frames/catalogue/beauty-wellness.d.ts +5 -0
- package/dist/src/frames/catalogue/beauty-wellness.d.ts.map +1 -0
- package/dist/src/frames/catalogue/business.d.ts.map +1 -1
- package/dist/src/frames/catalogue/call-to-action.d.ts.map +1 -1
- package/dist/src/frames/catalogue/counts.d.ts +15 -10
- package/dist/src/frames/catalogue/counts.d.ts.map +1 -1
- package/dist/src/frames/catalogue/events.d.ts.map +1 -1
- package/dist/src/frames/catalogue/food-drink.d.ts.map +1 -1
- package/dist/src/frames/catalogue/health-learning.d.ts.map +1 -1
- package/dist/src/frames/catalogue/holidays.d.ts.map +1 -1
- package/dist/src/frames/catalogue/index.d.ts.map +1 -1
- package/dist/src/frames/catalogue/nonprofit.d.ts +5 -0
- package/dist/src/frames/catalogue/nonprofit.d.ts.map +1 -0
- package/dist/src/frames/catalogue/places.d.ts.map +1 -1
- package/dist/src/frames/catalogue/real-estate.d.ts +5 -0
- package/dist/src/frames/catalogue/real-estate.d.ts.map +1 -0
- package/dist/src/frames/catalogue/seasons.d.ts.map +1 -1
- package/dist/src/frames/catalogue/shopping.d.ts.map +1 -1
- package/dist/src/frames/catalogue/sports-fitness.d.ts +5 -0
- package/dist/src/frames/catalogue/sports-fitness.d.ts.map +1 -0
- package/dist/src/frames/catalogue/tags.d.ts.map +1 -1
- package/dist/src/frames/collections.d.ts.map +1 -1
- package/dist/src/frames/official-types.d.ts +1 -1
- package/dist/src/frames/official-types.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -38
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/jsx/index.d.ts +2 -0
- package/dist/src/jsx/index.d.ts.map +1 -0
- package/dist/src/jsx/jsx-dev-runtime.d.ts +5 -0
- package/dist/src/jsx/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/src/jsx/jsx-runtime.d.ts +30 -0
- package/dist/src/jsx/jsx-runtime.d.ts.map +1 -0
- package/dist/src/jsx/runtime.d.ts +73 -0
- package/dist/src/jsx/runtime.d.ts.map +1 -0
- package/dist/src/logo.d.ts +3 -2
- package/dist/src/logo.d.ts.map +1 -1
- package/dist/src/node.d.ts.map +1 -1
- package/dist/src/plain.d.ts +31 -0
- package/dist/src/plain.d.ts.map +1 -0
- package/dist/src/preact.d.ts +29 -0
- package/dist/src/preact.d.ts.map +1 -0
- package/dist/src/qr-code-canvas.d.ts +1 -1
- package/dist/src/qr-code-canvas.d.ts.map +1 -1
- package/dist/src/qr-code-props.d.ts +22 -0
- package/dist/src/qr-code-props.d.ts.map +1 -0
- package/dist/src/qr-code-svg.d.ts +10 -0
- package/dist/src/qr-code-svg.d.ts.map +1 -0
- package/dist/src/qr-code.d.ts +2 -10
- package/dist/src/qr-code.d.ts.map +1 -1
- package/dist/src/react-elements.d.ts +3 -0
- package/dist/src/react-elements.d.ts.map +1 -0
- package/dist/src/render/attributes.d.ts +33 -0
- package/dist/src/render/attributes.d.ts.map +1 -0
- package/dist/src/render/dom.d.ts +8 -0
- package/dist/src/render/dom.d.ts.map +1 -0
- package/dist/src/render/hyperscript.d.ts +10 -0
- package/dist/src/render/hyperscript.d.ts.map +1 -0
- package/dist/src/render/string.d.ts +8 -0
- package/dist/src/render/string.d.ts.map +1 -0
- package/dist/src/scan-score.d.ts +4 -3
- package/dist/src/scan-score.d.ts.map +1 -1
- package/dist/src/solid.d.ts +21 -0
- package/dist/src/solid.d.ts.map +1 -0
- package/dist/src/svg.d.ts +14 -0
- package/dist/src/svg.d.ts.map +1 -0
- package/dist/src/template/arrow.d.ts +1 -0
- package/dist/src/template/arrow.d.ts.map +1 -1
- package/dist/src/template/default.d.ts +1 -0
- package/dist/src/template/default.d.ts.map +1 -1
- package/dist/src/template/dot-ring-layout.d.ts +44 -0
- package/dist/src/template/dot-ring-layout.d.ts.map +1 -0
- package/dist/src/template/dot-ring.d.ts +41 -0
- package/dist/src/template/dot-ring.d.ts.map +1 -0
- package/dist/src/template/halloween.d.ts +1 -0
- package/dist/src/template/halloween.d.ts.map +1 -1
- package/dist/src/template/index.d.ts +1 -0
- package/dist/src/template/index.d.ts.map +1 -1
- package/dist/src/template/square-border.d.ts +1 -0
- package/dist/src/template/square-border.d.ts.map +1 -1
- package/dist/src/template/standard-box.d.ts +1 -0
- package/dist/src/template/standard-box.d.ts.map +1 -1
- package/dist/src/template/striked-box.d.ts +1 -0
- package/dist/src/template/striked-box.d.ts.map +1 -1
- package/dist/src/template-placement.d.ts +8 -0
- package/dist/src/template-placement.d.ts.map +1 -0
- package/dist/src/templates.d.ts.map +1 -1
- package/dist/src/utils.d.ts +9 -3
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/vanilla-api.d.ts +47 -0
- package/dist/src/vanilla-api.d.ts.map +1 -0
- package/dist/src/vanilla-browser.d.ts +4 -0
- package/dist/src/vanilla-browser.d.ts.map +1 -0
- package/dist/src/vanilla.d.ts +4 -0
- package/dist/src/vanilla.d.ts.map +1 -0
- package/dist/src/vue.d.ts +56 -0
- package/dist/src/vue.d.ts.map +1 -0
- package/dist/types/frame-spec.d.ts +149 -14
- package/dist/types/frame-spec.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +2 -2
- package/dist/types/index.mjs.map +1 -1
- package/dist/types/public.d.ts +3 -0
- package/dist/types/public.d.ts.map +1 -0
- package/dist/types/qr.d.ts +43 -7
- package/dist/types/qr.d.ts.map +1 -1
- package/dist/types/react.d.ts +5 -0
- package/dist/types/react.d.ts.map +1 -0
- package/dist/types/template.d.ts +7 -1
- package/dist/types/template.d.ts.map +1 -1
- package/dist/vanilla.browser.mjs +92 -0
- package/dist/vanilla.browser.mjs.map +1 -0
- package/dist/vanilla.js +2 -0
- package/dist/vanilla.js.map +1 -0
- package/dist/vanilla.mjs +2 -0
- package/dist/vanilla.mjs.map +1 -0
- package/dist/vue.js +2 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +2 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +130 -8
- package/src/angular.ts +218 -0
- package/src/api.tsx +16 -140
- package/src/art.tsx +18 -16
- package/src/body-patterns.tsx +5 -3
- package/src/core.ts +13 -0
- package/src/corner-dot.tsx +4 -2
- package/src/download.tsx +1 -1
- package/src/element-define.ts +9 -0
- package/src/element.ts +608 -0
- package/src/engine.ts +181 -0
- package/src/export.ts +212 -0
- package/src/frame-spec.ts +314 -54
- package/src/frame-text.ts +111 -0
- package/src/frame.tsx +24 -286
- package/src/frames/builtin/badge.json +108 -0
- package/src/frames/builtin/banner-bottom.json +2 -1
- package/src/frames/builtin/banner-top-bottom.json +72 -0
- package/src/frames/builtin/banner-top.json +59 -0
- package/src/frames/builtin/border.json +62 -0
- package/src/frames/builtin/chat-bubble.json +54 -0
- package/src/frames/builtin/circle.json +2 -1
- package/src/frames/builtin/envelope.json +81 -0
- package/src/frames/builtin/focus.json +88 -0
- package/src/frames/builtin/gradient-border.json +76 -0
- package/src/frames/builtin/menu-card.json +108 -0
- package/src/frames/builtin/phone.json +75 -0
- package/src/frames/builtin/polaroid.json +56 -0
- package/src/frames/builtin/rounded-border.json +8 -4
- package/src/frames/builtin/speech-bubble-top.json +76 -0
- package/src/frames/builtin/speech-bubble.json +76 -0
- package/src/frames/builtin/sticker.json +78 -0
- package/src/frames/builtin/tag.json +55 -0
- package/src/frames/builtin.ts +181 -12
- package/src/frames/catalogue/all.ts +1190 -0
- package/src/frames/catalogue/automotive.ts +63 -0
- package/src/frames/catalogue/beauty-wellness.ts +61 -0
- package/src/frames/catalogue/business.ts +68 -0
- package/src/frames/catalogue/call-to-action.ts +60 -0
- package/src/frames/catalogue/counts.ts +15 -10
- package/src/frames/catalogue/events.ts +90 -0
- package/src/frames/catalogue/food-drink.ts +78 -0
- package/src/frames/catalogue/health-learning.ts +62 -14
- package/src/frames/catalogue/holidays.ts +336 -0
- package/src/frames/catalogue/index.ts +5173 -16
- package/src/frames/catalogue/nonprofit.ts +65 -0
- package/src/frames/catalogue/places.ts +92 -18
- package/src/frames/catalogue/real-estate.ts +79 -0
- package/src/frames/catalogue/seasons.ts +64 -0
- package/src/frames/catalogue/shopping.ts +68 -0
- package/src/frames/catalogue/sports-fitness.ts +81 -0
- package/src/frames/catalogue/tags.ts +738 -0
- package/src/frames/collections.ts +5 -0
- package/src/frames/official/add-engraving.json +90 -0
- package/src/frames/official/add-to-calendar.json +98 -0
- package/src/frames/official/adopt-me.json +72 -0
- package/src/frames/official/africa-day.json +110 -0
- package/src/frames/official/aftercare-guide.json +98 -0
- package/src/frames/official/alterations.json +142 -0
- package/src/frames/official/annual-report.json +85 -0
- package/src/frames/official/aquarium-feeding.json +113 -0
- package/src/frames/official/archery-lesson.json +106 -0
- package/src/frames/official/arrival-guide.json +71 -0
- package/src/frames/official/art-class.json +137 -0
- package/src/frames/official/ask-a-stylist.json +112 -0
- package/src/frames/official/assembly-guide.json +93 -0
- package/src/frames/official/autumn-apple-picking.json +81 -0
- package/src/frames/official/autumn-mushroom.json +72 -0
- package/src/frames/official/autumn-pumpkin-patch.json +83 -0
- package/src/frames/official/avurudu-pot.json +87 -0
- package/src/frames/official/badminton-session.json +104 -0
- package/src/frames/official/bake-sale.json +158 -0
- package/src/frames/official/bakery-board.json +80 -0
- package/src/frames/official/barber-booking.json +64 -0
- package/src/frames/official/bath-ritual.json +70 -0
- package/src/frames/official/bathroom-showroom.json +113 -0
- package/src/frames/official/battery-check.json +95 -0
- package/src/frames/official/beach-conditions.json +113 -0
- package/src/frames/official/beach-info-sticker.json +81 -0
- package/src/frames/official/beach-lifeguard.json +71 -0
- package/src/frames/official/beauty-rewards.json +81 -0
- package/src/frames/official/become-a-member.json +79 -0
- package/src/frames/official/bike-service.json +113 -0
- package/src/frames/official/blood-donor-drop.json +87 -0
- package/src/frames/official/blood-donor-sticker.json +94 -0
- package/src/frames/official/book-a-call.json +105 -0
- package/src/frames/official/book-a-cleaning.json +92 -0
- package/src/frames/official/book-a-consultation.json +101 -0
- package/src/frames/official/book-a-court.json +74 -0
- package/src/frames/official/book-a-facial.json +108 -0
- package/src/frames/official/book-a-massage.json +80 -0
- package/src/frames/official/book-a-vaccine.json +88 -0
- package/src/frames/official/book-day-arch.json +71 -0
- package/src/frames/official/book-day-list.json +114 -0
- package/src/frames/official/book-this-room.json +80 -0
- package/src/frames/official/boxing-class.json +81 -0
- package/src/frames/official/brewery-tour.json +89 -0
- package/src/frames/official/bridal-beauty.json +80 -0
- package/src/frames/official/brunch-menu.json +79 -0
- package/src/frames/official/bubble-tea.json +81 -0
- package/src/frames/official/bulk-orders.json +108 -0
- package/src/frames/official/burger-order.json +80 -0
- package/src/frames/official/call-a-server.json +115 -0
- package/src/frames/official/camp-check-in.json +74 -0
- package/src/frames/official/camp-fire-rules.json +114 -0
- package/src/frames/official/camp-map.json +85 -0
- package/src/frames/official/car-detailing.json +102 -0
- package/src/frames/official/car-details.json +90 -0
- package/src/frames/official/car-for-sale.json +74 -0
- package/src/frames/official/car-service.json +92 -0
- package/src/frames/official/carnival-mask.json +76 -0
- package/src/frames/official/carnival-pass.json +85 -0
- package/src/frames/official/carnival-plume.json +71 -0
- package/src/frames/official/carpool.json +79 -0
- package/src/frames/official/catering-order.json +79 -0
- package/src/frames/official/charging-prices.json +105 -0
- package/src/frames/official/charity-shop.json +75 -0
- package/src/frames/official/check-symptoms.json +80 -0
- package/src/frames/official/cheese-pairing.json +91 -0
- package/src/frames/official/chess-club.json +64 -0
- package/src/frames/official/chess-lessons.json +83 -0
- package/src/frames/official/childrens-day-carp.json +114 -0
- package/src/frames/official/childrens-day-sticker.json +88 -0
- package/src/frames/official/choose-your-plan.json +113 -0
- package/src/frames/official/choose-your-wash.json +86 -0
- package/src/frames/official/chuseok-gift-tag.json +59 -0
- package/src/frames/official/chuseok-moon.json +99 -0
- package/src/frames/official/chuseok-songpyeon.json +114 -0
- package/src/frames/official/clean-beauty.json +94 -0
- package/src/frames/official/click-and-collect.json +85 -0
- package/src/frames/official/clock-in.json +101 -0
- package/src/frames/official/club-fees.json +94 -0
- package/src/frames/official/coach-sign-up.json +108 -0
- package/src/frames/official/community-notices.json +107 -0
- package/src/frames/official/compare-specs.json +112 -0
- package/src/frames/official/consultation-form.json +120 -0
- package/src/frames/official/continued-online.json +81 -0
- package/src/frames/official/cookie-box.json +88 -0
- package/src/frames/official/cooking-class.json +89 -0
- package/src/frames/official/cowork-desk.json +82 -0
- package/src/frames/official/cowork-meeting-room.json +107 -0
- package/src/frames/official/coworking-pass.json +89 -0
- package/src/frames/official/cricket-club.json +158 -0
- package/src/frames/official/cupcake-order.json +108 -0
- package/src/frames/official/damage-report.json +114 -0
- package/src/frames/official/dashboard-lights.json +106 -0
- package/src/frames/official/delivery-instructions.json +98 -0
- package/src/frames/official/diy-how-to.json +87 -0
- package/src/frames/official/donate-coats.json +74 -0
- package/src/frames/official/donate-food.json +80 -0
- package/src/frames/official/donation-jar.json +101 -0
- package/src/frames/official/donut-shop.json +94 -0
- package/src/frames/official/dragon-boat-race.json +83 -0
- package/src/frames/official/dragon-boat-ticket.json +98 -0
- package/src/frames/official/dragon-boat-zongzi.json +81 -0
- package/src/frames/official/dress-fitting.json +64 -0
- package/src/frames/official/driving-lessons.json +110 -0
- package/src/frames/official/dumpling-house.json +82 -0
- package/src/frames/official/durga-puja-lotus.json +114 -0
- package/src/frames/official/dussehra-seal.json +187 -0
- package/src/frames/official/earth-day-globe.json +77 -0
- package/src/frames/official/earth-day-pledge.json +66 -0
- package/src/frames/official/earth-day-recycle.json +109 -0
- package/src/frames/official/enkutatash-daisy.json +87 -0
- package/src/frames/official/enkutatash-seal.json +179 -0
- package/src/frames/official/environment-day.json +83 -0
- package/src/frames/official/event-anniversary.json +107 -0
- package/src/frames/official/event-awards.json +93 -0
- package/src/frames/official/event-baby-gifts.json +113 -0
- package/src/frames/official/event-baby-shower.json +70 -0
- package/src/frames/official/event-birth-announcement.json +71 -0
- package/src/frames/official/event-book-fair.json +142 -0
- package/src/frames/official/event-booth.json +98 -0
- package/src/frames/official/event-craft-fair.json +96 -0
- package/src/frames/official/event-cupcake.json +81 -0
- package/src/frames/official/event-engagement.json +116 -0
- package/src/frames/official/event-film-festival.json +92 -0
- package/src/frames/official/event-food-festival.json +108 -0
- package/src/frames/official/event-fun-run.json +107 -0
- package/src/frames/official/event-gala.json +121 -0
- package/src/frames/official/event-game-night.json +97 -0
- package/src/frames/official/event-grad-diploma.json +126 -0
- package/src/frames/official/event-grad-party.json +108 -0
- package/src/frames/official/event-grad-seal.json +186 -0
- package/src/frames/official/event-grad-stream.json +94 -0
- package/src/frames/official/event-guest-book.json +121 -0
- package/src/frames/official/event-hackathon.json +82 -0
- package/src/frames/official/event-keynote.json +74 -0
- package/src/frames/official/event-match-lineup.json +66 -0
- package/src/frames/official/event-meetup.json +86 -0
- package/src/frames/official/event-memorial.json +124 -0
- package/src/frames/official/event-milestone.json +168 -0
- package/src/frames/official/event-night-market.json +88 -0
- package/src/frames/official/event-open-mic.json +94 -0
- package/src/frames/official/event-party-hat.json +74 -0
- package/src/frames/official/event-prom.json +82 -0
- package/src/frames/official/event-quince.json +70 -0
- package/src/frames/official/event-retirement.json +92 -0
- package/src/frames/official/event-reunion.json +98 -0
- package/src/frames/official/event-runner-tracker.json +101 -0
- package/src/frames/official/event-season-ticket.json +89 -0
- package/src/frames/official/event-session-feedback.json +89 -0
- package/src/frames/official/event-setlist.json +70 -0
- package/src/frames/official/event-short-films.json +113 -0
- package/src/frames/official/event-slides.json +85 -0
- package/src/frames/official/event-speaker-qa.json +112 -0
- package/src/frames/official/event-talent-show.json +130 -0
- package/src/frames/official/event-tour-merch.json +63 -0
- package/src/frames/official/event-tournament.json +98 -0
- package/src/frames/official/event-trivia.json +79 -0
- package/src/frames/official/event-workshop.json +127 -0
- package/src/frames/official/eye-exam.json +70 -0
- package/src/frames/official/eyewear-try-on.json +99 -0
- package/src/frames/official/fan-club.json +152 -0
- package/src/frames/official/farm-stand.json +109 -0
- package/src/frames/official/farmers-market.json +74 -0
- package/src/frames/official/festa-della-repubblica.json +100 -0
- package/src/frames/official/festa-junina-bonfire.json +81 -0
- package/src/frames/official/festa-junina-corn.json +72 -0
- package/src/frames/official/festa-junina-flags.json +110 -0
- package/src/frames/official/fiestas-patrias-chile.json +76 -0
- package/src/frames/official/find-a-charger.json +107 -0
- package/src/frames/official/find-a-doctor.json +85 -0
- package/src/frames/official/find-it-in-store.json +101 -0
- package/src/frames/official/find-our-office.json +80 -0
- package/src/frames/official/first-aid-guide.json +109 -0
- package/src/frames/official/fish-market.json +113 -0
- package/src/frames/official/fitness-challenge.json +1 -1
- package/src/frames/official/fitness-equipment.json +1 -1
- package/src/frames/official/fitness-kettlebell.json +1 -1
- package/src/frames/official/fitness-schedule.json +1 -1
- package/src/frames/official/fitness-test.json +94 -0
- package/src/frames/official/fitness-timer.json +1 -1
- package/src/frames/official/fitness-trial.json +1 -1
- package/src/frames/official/fitness-yoga.json +1 -1
- package/src/frames/official/food-day-wheat.json +109 -0
- package/src/frames/official/food-support.json +102 -0
- package/src/frames/official/food-truck-location.json +80 -0
- package/src/frames/official/freedom-day-south-africa.json +109 -0
- package/src/frames/official/furnished-rental.json +101 -0
- package/src/frames/official/game-night.json +79 -0
- package/src/frames/official/ganesh-marigold.json +71 -0
- package/src/frames/official/ganesh-modak.json +81 -0
- package/src/frames/official/ganesh-pandal.json +109 -0
- package/src/frames/official/garden-design.json +70 -0
- package/src/frames/official/garden-plant-label.json +98 -0
- package/src/frames/official/garden-plot.json +74 -0
- package/src/frames/official/german-unity-day.json +100 -0
- package/src/frames/official/get-a-quote.json +113 -0
- package/src/frames/official/get-it-delivered.json +82 -0
- package/src/frames/official/get-started-rocket.json +80 -0
- package/src/frames/official/get-the-brochure.json +116 -0
- package/src/frames/official/gift-ideas.json +86 -0
- package/src/frames/official/gift-message.json +85 -0
- package/src/frames/official/give-blood.json +88 -0
- package/src/frames/official/giving-jar.json +89 -0
- package/src/frames/official/golf-scorecard.json +120 -0
- package/src/frames/official/grand-opening.json +158 -0
- package/src/frames/official/green-ribbon.json +123 -0
- package/src/frames/official/grill-menu.json +92 -0
- package/src/frames/official/gudi-padwa.json +81 -0
- package/src/frames/official/hanami-arch.json +71 -0
- package/src/frames/official/hanami-picnic.json +90 -0
- package/src/frames/official/hanami-sakura.json +81 -0
- package/src/frames/official/hand-washing.json +106 -0
- package/src/frames/official/handyman.json +130 -0
- package/src/frames/official/hari-raya-haji.json +122 -0
- package/src/frames/official/hari-raya-ketupat.json +81 -0
- package/src/frames/official/hari-raya-open-house.json +114 -0
- package/src/frames/official/hari-raya-pelita.json +77 -0
- package/src/frames/official/harvest-basket.json +87 -0
- package/src/frames/official/harvest-corn.json +115 -0
- package/src/frames/official/harvest-hay.json +89 -0
- package/src/frames/official/harvest-market.json +109 -0
- package/src/frames/official/hear-it-spoken.json +86 -0
- package/src/frames/official/hijri-new-year-stamp.json +77 -0
- package/src/frames/official/hijri-new-year.json +122 -0
- package/src/frames/official/historic-marker.json +176 -0
- package/src/frames/official/home-valuation.json +87 -0
- package/src/frames/official/homework-help.json +79 -0
- package/src/frames/official/hostel-check-in.json +113 -0
- package/src/frames/official/hostel-house-rules.json +136 -0
- package/src/frames/official/hostel-local-tips.json +86 -0
- package/src/frames/official/hot-shave.json +121 -0
- package/src/frames/official/house-rules.json +121 -0
- package/src/frames/official/how-it-works.json +98 -0
- package/src/frames/official/how-to-apply.json +93 -0
- package/src/frames/official/impact-report.json +90 -0
- package/src/frames/official/independence-argentina.json +105 -0
- package/src/frames/official/independence-bangladesh.json +64 -0
- package/src/frames/official/independence-colombia.json +108 -0
- package/src/frames/official/independence-ghana.json +105 -0
- package/src/frames/official/independence-indonesia.json +92 -0
- package/src/frames/official/independence-nigeria.json +100 -0
- package/src/frames/official/independence-pakistan.json +95 -0
- package/src/frames/official/independence-peru.json +100 -0
- package/src/frames/official/independence-poland.json +92 -0
- package/src/frames/official/independence-ukraine.json +92 -0
- package/src/frames/official/intake-forms.json +114 -0
- package/src/frames/official/inti-raymi-sun.json +183 -0
- package/src/frames/official/jamhuri-day.json +116 -0
- package/src/frames/official/janmashtami-feather.json +77 -0
- package/src/frames/official/janmashtami-flute.json +81 -0
- package/src/frames/official/join-a-league.json +94 -0
- package/src/frames/official/join-the-cleanup.json +110 -0
- package/src/frames/official/join-the-waitlist.json +102 -0
- package/src/frames/official/join-the-webinar.json +108 -0
- package/src/frames/official/juice-bar.json +70 -0
- package/src/frames/official/juneteenth-seal.json +187 -0
- package/src/frames/official/juneteenth-star.json +81 -0
- package/src/frames/official/kids-haircuts.json +75 -0
- package/src/frames/official/kids-menu.json +107 -0
- package/src/frames/official/kindness-day.json +109 -0
- package/src/frames/official/kings-day-crown.json +88 -0
- package/src/frames/official/kwanzaa-bands.json +100 -0
- package/src/frames/official/kwanzaa-harvest.json +77 -0
- package/src/frames/official/kwanzaa-kinara.json +81 -0
- package/src/frames/official/lantern-festival-riddles.json +77 -0
- package/src/frames/official/lantern-festival-tangyuan.json +122 -0
- package/src/frames/official/large-print.json +80 -0
- package/src/frames/official/lash-bar.json +86 -0
- package/src/frames/official/last-chance.json +94 -0
- package/src/frames/official/late-night-menu.json +77 -0
- package/src/frames/official/learn-the-signs.json +107 -0
- package/src/frames/official/library-card.json +90 -0
- package/src/frames/official/library-catalog.json +120 -0
- package/src/frames/official/library-ebooks.json +107 -0
- package/src/frames/official/library-hours.json +107 -0
- package/src/frames/official/live-scores.json +101 -0
- package/src/frames/official/lohri-bonfire.json +81 -0
- package/src/frames/official/lohri-dhol.json +114 -0
- package/src/frames/official/lost-and-found.json +85 -0
- package/src/frames/official/lost-pet-tag.json +84 -0
- package/src/frames/official/loy-krathong-float.json +88 -0
- package/src/frames/official/loy-krathong-moon.json +96 -0
- package/src/frames/official/loy-krathong-program.json +128 -0
- package/src/frames/official/make-a-claim.json +74 -0
- package/src/frames/official/makeup-artist.json +94 -0
- package/src/frames/official/mardi-gras-seal.json +183 -0
- package/src/frames/official/marina-welcome.json +172 -0
- package/src/frames/official/maslenitsa-pancakes.json +81 -0
- package/src/frames/official/maslenitsa-sun.json +183 -0
- package/src/frames/official/math-practice.json +136 -0
- package/src/frames/official/meal-plan.json +121 -0
- package/src/frames/official/meet-the-maker.json +91 -0
- package/src/frames/official/meet-the-team.json +82 -0
- package/src/frames/official/membership-card.json +108 -0
- package/src/frames/official/mid-autumn-gift.json +105 -0
- package/src/frames/official/mid-autumn-lantern-walk.json +96 -0
- package/src/frames/official/mid-autumn-mooncake.json +81 -0
- package/src/frames/official/mid-autumn-rabbit.json +77 -0
- package/src/frames/official/mid-autumn-seal.json +178 -0
- package/src/frames/official/monsoon-boots.json +88 -0
- package/src/frames/official/monsoon-chai.json +82 -0
- package/src/frames/official/monsoon-cloud.json +114 -0
- package/src/frames/official/monsoon-paper-boat.json +71 -0
- package/src/frames/official/monsoon-umbrella.json +81 -0
- package/src/frames/official/mortgage-calculator.json +94 -0
- package/src/frames/official/moving-checklist.json +108 -0
- package/src/frames/official/muertos-marigold.json +87 -0
- package/src/frames/official/muertos-ofrenda.json +129 -0
- package/src/frames/official/muertos-pan.json +78 -0
- package/src/frames/official/muertos-papel-picado.json +120 -0
- package/src/frames/official/muertos-seal.json +185 -0
- package/src/frames/official/museum-artist-note.json +124 -0
- package/src/frames/official/museum-exhibit-label.json +106 -0
- package/src/frames/official/museum-gallery-map.json +99 -0
- package/src/frames/official/museum-ticket.json +86 -0
- package/src/frames/official/music-lessons.json +64 -0
- package/src/frames/official/nail-studio.json +70 -0
- package/src/frames/official/national-day-belgium.json +100 -0
- package/src/frames/official/national-day-singapore.json +120 -0
- package/src/frames/official/navratri-dandiya.json +88 -0
- package/src/frames/official/navratri-garba-pass.json +90 -0
- package/src/frames/official/navratri-lamp.json +72 -0
- package/src/frames/official/neighborhood-guide.json +98 -0
- package/src/frames/official/nowruz-goldfish.json +71 -0
- package/src/frames/official/nowruz-party.json +90 -0
- package/src/frames/official/nowruz-sabzeh.json +81 -0
- package/src/frames/official/nowruz-seal.json +187 -0
- package/src/frames/official/nutrition-facts.json +98 -0
- package/src/frames/official/obon-lantern.json +81 -0
- package/src/frames/official/obon-sign.json +109 -0
- package/src/frames/official/ocean-day-waves.json +114 -0
- package/src/frames/official/onam-boat-race.json +83 -0
- package/src/frames/official/onam-kasavu.json +122 -0
- package/src/frames/official/onam-pookalam.json +175 -0
- package/src/frames/official/onam-sadya.json +114 -0
- package/src/frames/official/online-class.json +82 -0
- package/src/frames/official/open-an-account.json +88 -0
- package/src/frames/official/open-house-sign-in.json +104 -0
- package/src/frames/official/orthodox-christmas-candle.json +71 -0
- package/src/frames/official/orthodox-christmas-star.json +76 -0
- package/src/frames/official/orthodox-easter-arch.json +77 -0
- package/src/frames/official/orthodox-easter-pysanka.json +87 -0
- package/src/frames/official/orthodox-easter-seal.json +185 -0
- package/src/frames/official/pancake-day.json +114 -0
- package/src/frames/official/parcel-room.json +98 -0
- package/src/frames/official/parent-meeting.json +108 -0
- package/src/frames/official/park-bench-walks.json +121 -0
- package/src/frames/official/park-dog-rules.json +88 -0
- package/src/frames/official/park-map.json +92 -0
- package/src/frames/official/park-playground.json +64 -0
- package/src/frames/official/park-report.json +118 -0
- package/src/frames/official/parking-find-car.json +89 -0
- package/src/frames/official/parking-permit.json +74 -0
- package/src/frames/official/pay-at-the-pump.json +108 -0
- package/src/frames/official/pay-for-parking.json +89 -0
- package/src/frames/official/pay-it-forward.json +102 -0
- package/src/frames/official/pay-your-rent.json +105 -0
- package/src/frames/official/peace-day-dove.json +66 -0
- package/src/frames/official/permission-form.json +120 -0
- package/src/frames/official/personal-trainer.json +76 -0
- package/src/frames/official/physio-exercises.json +86 -0
- package/src/frames/official/pick-your-own.json +158 -0
- package/src/frames/official/pink-ribbon-seal.json +180 -0
- package/src/frames/official/pink-ribbon.json +82 -0
- package/src/frames/official/plant-a-tree.json +88 -0
- package/src/frames/official/plant-based-menu.json +103 -0
- package/src/frames/official/plant-care.json +84 -0
- package/src/frames/official/podcast.json +107 -0
- package/src/frames/official/pohela-boishakh-mela.json +116 -0
- package/src/frames/official/pohela-boishakh.json +120 -0
- package/src/frames/official/polling-place.json +109 -0
- package/src/frames/official/pongal-offers.json +120 -0
- package/src/frames/official/pongal-pot.json +81 -0
- package/src/frames/official/pongal-sun.json +183 -0
- package/src/frames/official/pool-timetable.json +113 -0
- package/src/frames/official/portfolio-card.json +110 -0
- package/src/frames/official/posadas-candle.json +71 -0
- package/src/frames/official/posadas-pinata.json +114 -0
- package/src/frames/official/pre-order-bread.json +110 -0
- package/src/frames/official/press-kit.json +136 -0
- package/src/frames/official/price-list.json +111 -0
- package/src/frames/official/pride-flag.json +124 -0
- package/src/frames/official/pride-heart.json +83 -0
- package/src/frames/official/pride-rainbow.json +81 -0
- package/src/frames/official/privacy-notice.json +115 -0
- package/src/frames/official/property-floor-plan.json +1 -1
- package/src/frames/official/property-for-sale.json +1 -1
- package/src/frames/official/property-house-light.json +1 -1
- package/src/frames/official/property-house.json +1 -1
- package/src/frames/official/property-key.json +1 -1
- package/src/frames/official/property-open-house.json +1 -1
- package/src/frames/official/property-rent.json +1 -1
- package/src/frames/official/property-virtual-tour.json +1 -1
- package/src/frames/official/purim-mask.json +109 -0
- package/src/frames/official/purim-pastry.json +71 -0
- package/src/frames/official/puthandu-sun.json +101 -0
- package/src/frames/official/questions-cloud.json +65 -0
- package/src/frames/official/race-entry.json +90 -0
- package/src/frames/official/race-photos.json +93 -0
- package/src/frames/official/rakhi-envelope.json +75 -0
- package/src/frames/official/rakhi-gift-tag.json +59 -0
- package/src/frames/official/rakhi-thread.json +114 -0
- package/src/frames/official/ramadan-dates.json +81 -0
- package/src/frames/official/ramadan-suhoor.json +94 -0
- package/src/frames/official/rate-your-ride.json +103 -0
- package/src/frames/official/read-a-sample.json +108 -0
- package/src/frames/official/read-the-ebook.json +116 -0
- package/src/frames/official/read-the-faq.json +88 -0
- package/src/frames/official/read-the-reviews.json +110 -0
- package/src/frames/official/read-the-story.json +90 -0
- package/src/frames/official/read-the-transcript.json +142 -0
- package/src/frames/official/reading-challenge.json +97 -0
- package/src/frames/official/rebook-visit.json +86 -0
- package/src/frames/official/recipe-card.json +120 -0
- package/src/frames/official/red-ribbon.json +66 -0
- package/src/frames/official/refill-reminder.json +104 -0
- package/src/frames/official/register-interest.json +82 -0
- package/src/frames/official/register-to-vote.json +80 -0
- package/src/frames/official/renovation-quote.json +80 -0
- package/src/frames/official/rent-a-bike.json +95 -0
- package/src/frames/official/rent-this-item.json +95 -0
- package/src/frames/official/rental-car-guide.json +115 -0
- package/src/frames/official/report-a-problem.json +114 -0
- package/src/frames/official/report-a-repair.json +79 -0
- package/src/frames/official/report-a-street-issue.json +113 -0
- package/src/frames/official/republic-day-india-bands.json +120 -0
- package/src/frames/official/republic-day-india.json +182 -0
- package/src/frames/official/request-maintenance.json +74 -0
- package/src/frames/official/resident-portal.json +98 -0
- package/src/frames/official/restaurant-gift-card.json +94 -0
- package/src/frames/official/restock-alert.json +98 -0
- package/src/frames/official/restroom-feedback.json +86 -0
- package/src/frames/official/return-your-cup.json +130 -0
- package/src/frames/official/return-your-rental.json +113 -0
- package/src/frames/official/reyes-crown.json +78 -0
- package/src/frames/official/reyes-rosca.json +89 -0
- package/src/frames/official/ring-size.json +107 -0
- package/src/frames/official/roadside-help.json +92 -0
- package/src/frames/official/rosh-hashanah-apple.json +81 -0
- package/src/frames/official/rosh-hashanah-honey.json +71 -0
- package/src/frames/official/rosh-hashanah-shofar.json +128 -0
- package/src/frames/official/run-club.json +79 -0
- package/src/frames/official/safety-information.json +92 -0
- package/src/frames/official/salon-prices.json +92 -0
- package/src/frames/official/sankranti-kite.json +114 -0
- package/src/frames/official/sankranti-sky.json +98 -0
- package/src/frames/official/sankranti-sticker.json +90 -0
- package/src/frames/official/save-for-later.json +79 -0
- package/src/frames/official/scan-for-the-answer.json +86 -0
- package/src/frames/official/scan-for-the-checklist.json +108 -0
- package/src/frames/official/scan-for-the-latest.json +74 -0
- package/src/frames/official/scan-for-translations.json +108 -0
- package/src/frames/official/scan-here-arrow.json +76 -0
- package/src/frames/official/scan-here-post.json +89 -0
- package/src/frames/official/scan-me-banner.json +147 -0
- package/src/frames/official/scan-me-cloud.json +73 -0
- package/src/frames/official/scan-me-folded.json +74 -0
- package/src/frames/official/scan-me-stack.json +93 -0
- package/src/frames/official/scan-to-unlock.json +107 -0
- package/src/frames/official/scent-finder.json +94 -0
- package/src/frames/official/scholarships.json +108 -0
- package/src/frames/official/school-backpack.json +81 -0
- package/src/frames/official/school-bus-routes.json +83 -0
- package/src/frames/official/school-lunch-menu.json +81 -0
- package/src/frames/official/school-supply-list.json +80 -0
- package/src/frames/official/school-uniform.json +109 -0
- package/src/frames/official/school-welcome-apple.json +71 -0
- package/src/frames/official/science-fair.json +89 -0
- package/src/frames/official/season-schedule.json +66 -0
- package/src/frames/official/see-more-stack.json +91 -0
- package/src/frames/official/see-our-pitch.json +85 -0
- package/src/frames/official/see-the-full-list.json +107 -0
- package/src/frames/official/see-the-map.json +79 -0
- package/src/frames/official/send-flowers.json +93 -0
- package/src/frames/official/seollal-knot.json +122 -0
- package/src/frames/official/service-times.json +115 -0
- package/src/frames/official/shade-finder.json +113 -0
- package/src/frames/official/sham-el-nessim.json +81 -0
- package/src/frames/official/shoe-size-check.json +95 -0
- package/src/frames/official/shogatsu-kadomatsu.json +81 -0
- package/src/frames/official/sign-rider.json +1 -1
- package/src/frames/official/sign-the-agreement.json +120 -0
- package/src/frames/official/sign-the-petition.json +120 -0
- package/src/frames/official/site-hoarding.json +158 -0
- package/src/frames/official/site-induction.json +120 -0
- package/src/frames/official/size-guide.json +80 -0
- package/src/frames/official/skate-park-rules.json +109 -0
- package/src/frames/official/skincare-routine.json +85 -0
- package/src/frames/official/sofa-fabric.json +84 -0
- package/src/frames/official/songkran-bands.json +123 -0
- package/src/frames/official/songkran-bowl.json +81 -0
- package/src/frames/official/songkran-drop.json +90 -0
- package/src/frames/official/songkran-waves.json +96 -0
- package/src/frames/official/spa-gift.json +90 -0
- package/src/frames/official/spa-menu.json +124 -0
- package/src/frames/official/split-the-bill.json +77 -0
- package/src/frames/official/sponsor-a-pet.json +102 -0
- package/src/frames/official/sponsor-my-run.json +136 -0
- package/src/frames/official/sports-camp.json +142 -0
- package/src/frames/official/spring-cleaning.json +107 -0
- package/src/frames/official/spring-showers.json +71 -0
- package/src/frames/official/spring-watering-can.json +114 -0
- package/src/frames/official/staff-handbook.json +121 -0
- package/src/frames/official/staff-rota.json +112 -0
- package/src/frames/official/start-a-return.json +92 -0
- package/src/frames/official/start-charging.json +104 -0
- package/src/frames/official/start-here-arrow.json +79 -0
- package/src/frames/official/start-saving.json +74 -0
- package/src/frames/official/storage-units.json +79 -0
- package/src/frames/official/student-portal.json +80 -0
- package/src/frames/official/style-gallery.json +111 -0
- package/src/frames/official/summer-camp.json +90 -0
- package/src/frames/official/summer-pool.json +95 -0
- package/src/frames/official/summer-reading.json +81 -0
- package/src/frames/official/summer-sunglasses.json +114 -0
- package/src/frames/official/summer-watermelon.json +89 -0
- package/src/frames/official/sushi-menu.json +115 -0
- package/src/frames/official/swim-lessons.json +70 -0
- package/src/frames/official/tabaski.json +114 -0
- package/src/frames/official/table-tennis.json +116 -0
- package/src/frames/official/take-a-closer-look.json +94 -0
- package/src/frames/official/takeout-order.json +98 -0
- package/src/frames/official/talk-to-someone.json +115 -0
- package/src/frames/official/talk-to-the-agent.json +115 -0
- package/src/frames/official/tanabata-stars.json +170 -0
- package/src/frames/official/tanabata-wishes.json +114 -0
- package/src/frames/official/tea-menu.json +70 -0
- package/src/frames/official/tea-time.json +124 -0
- package/src/frames/official/teachers-day-apple.json +81 -0
- package/src/frames/official/teachers-day-note.json +109 -0
- package/src/frames/official/team-jersey.json +77 -0
- package/src/frames/official/team-kit.json +85 -0
- package/src/frames/official/tee-time.json +85 -0
- package/src/frames/official/tennis-court.json +94 -0
- package/src/frames/official/test-drive.json +88 -0
- package/src/frames/official/test-results.json +85 -0
- package/src/frames/official/tet-apricot.json +114 -0
- package/src/frames/official/tet-banh-chung.json +81 -0
- package/src/frames/official/tire-change.json +74 -0
- package/src/frames/official/town-hall.json +158 -0
- package/src/frames/official/toy-finder.json +81 -0
- package/src/frames/official/trace-your-coffee.json +87 -0
- package/src/frames/official/trade-it-in.json +97 -0
- package/src/frames/official/transit-bike-share.json +94 -0
- package/src/frames/official/transit-bus-arrivals.json +113 -0
- package/src/frames/official/transit-fare.json +97 -0
- package/src/frames/official/transit-ferry.json +88 -0
- package/src/frames/official/transit-next-trains.json +119 -0
- package/src/frames/official/transit-report.json +99 -0
- package/src/frames/official/transit-train-timetable.json +98 -0
- package/src/frames/official/try-the-demo.json +106 -0
- package/src/frames/official/ugadi-leaves.json +66 -0
- package/src/frames/official/unlock-this-car.json +82 -0
- package/src/frames/official/upload-receipts.json +108 -0
- package/src/frames/official/vaisakhi-bands.json +120 -0
- package/src/frames/official/vaisakhi-dhol.json +81 -0
- package/src/frames/official/vaisakhi-wheat.json +73 -0
- package/src/frames/official/validate-parking.json +91 -0
- package/src/frames/official/vehicle-history.json +106 -0
- package/src/frames/official/vesak-candle.json +122 -0
- package/src/frames/official/vesak-lantern.json +114 -0
- package/src/frames/official/vesak-lotus.json +71 -0
- package/src/frames/official/vesak-seal.json +179 -0
- package/src/frames/official/virtual-try-on.json +93 -0
- package/src/frames/official/visiting-hours.json +90 -0
- package/src/frames/official/visitor-info.json +78 -0
- package/src/frames/official/visitor-map.json +92 -0
- package/src/frames/official/visitor-sign-in.json +98 -0
- package/src/frames/official/visitor-town-map.json +108 -0
- package/src/frames/official/visitor-wildlife.json +70 -0
- package/src/frames/official/volunteer.json +74 -0
- package/src/frames/official/vote-for-us.json +103 -0
- package/src/frames/official/walk-in-queue.json +102 -0
- package/src/frames/official/wash-club.json +81 -0
- package/src/frames/official/watch-repair.json +115 -0
- package/src/frames/official/watch-the-experiment.json +93 -0
- package/src/frames/official/water-day-drop.json +81 -0
- package/src/frames/official/water-refill.json +95 -0
- package/src/frames/official/weekly-deals.json +107 -0
- package/src/frames/official/wellness-retreat.json +85 -0
- package/src/frames/official/whats-inside.json +91 -0
- package/src/frames/official/wholesale.json +85 -0
- package/src/frames/official/wifi-cafe-cup.json +81 -0
- package/src/frames/official/wifi-cowork.json +63 -0
- package/src/frames/official/wifi-hostel-board.json +80 -0
- package/src/frames/official/wifi-library.json +96 -0
- package/src/frames/official/wifi-reception.json +118 -0
- package/src/frames/official/wifi-rental.json +91 -0
- package/src/frames/official/wifi-venue.json +80 -0
- package/src/frames/official/wifi-waiting-room.json +89 -0
- package/src/frames/official/window-quote.json +121 -0
- package/src/frames/official/wine-pairings.json +142 -0
- package/src/frames/official/wine-staff-pick.json +100 -0
- package/src/frames/official/winery-tasting.json +94 -0
- package/src/frames/official/winter-lift-pass.json +90 -0
- package/src/frames/official/winter-sale.json +120 -0
- package/src/frames/official/winter-skating.json +71 -0
- package/src/frames/official/winter-snowman.json +81 -0
- package/src/frames/official/womens-day-mimosa.json +81 -0
- package/src/frames/official/womens-day-seal.json +179 -0
- package/src/frames/official/yalda-poem.json +122 -0
- package/src/frames/official/yalda-pomegranate.json +81 -0
- package/src/frames/official/yalda-watermelon.json +72 -0
- package/src/frames/official/yard-sign-coming-soon.json +115 -0
- package/src/frames/official/yard-sign-for-sale.json +150 -0
- package/src/frames/official/yard-sign-sold.json +162 -0
- package/src/frames/official/yard-sign-viewing.json +121 -0
- package/src/frames/official/yoga-day-lotus.json +81 -0
- package/src/frames/official/your-prescription.json +107 -0
- package/src/frames/official/youth-club.json +104 -0
- package/src/frames/official/zoo-animal-facts.json +109 -0
- package/src/frames/official-types.ts +6 -1
- package/src/frames/official.ts +4 -4
- package/src/index.tsx +6 -361
- package/src/jsx/index.ts +3 -0
- package/src/jsx/jsx-dev-runtime.ts +14 -0
- package/src/jsx/jsx-runtime.ts +34 -0
- package/src/jsx/runtime.ts +209 -0
- package/src/logo.tsx +5 -3
- package/src/node.ts +3 -3
- package/src/plain.tsx +194 -0
- package/src/preact.ts +80 -0
- package/src/qr-code-canvas.tsx +1 -1
- package/src/qr-code-props.ts +115 -0
- package/src/qr-code-svg.tsx +17 -0
- package/src/qr-code.tsx +34 -114
- package/src/react-elements.ts +13 -0
- package/src/render/attributes.ts +404 -0
- package/src/render/dom.ts +90 -0
- package/src/render/hyperscript.ts +66 -0
- package/src/render/string.ts +70 -0
- package/src/scan-score.ts +15 -8
- package/src/solid.ts +75 -0
- package/src/svg.ts +27 -0
- package/src/template/arrow.tsx +1 -0
- package/src/template/default.tsx +1 -0
- package/src/template/dot-ring-layout.ts +230 -0
- package/src/template/dot-ring.tsx +165 -0
- package/src/template/halloween.tsx +1 -0
- package/src/template/index.ts +1 -0
- package/src/template/square-border.tsx +1 -0
- package/src/template/standard-box.tsx +1 -0
- package/src/template/striked-box.tsx +1 -0
- package/src/template-placement.ts +149 -0
- package/src/templates.tsx +16 -1
- package/src/utils/print-shared.ts +1 -1
- package/src/utils.tsx +24 -23
- package/src/vanilla-api.ts +146 -0
- package/src/vanilla-browser.ts +11 -0
- package/src/vanilla.ts +10 -0
- package/src/vue.ts +220 -0
- package/types/frame-spec.ts +214 -10
- package/types/index.ts +4 -2
- package/types/public.ts +4 -0
- package/types/qr.ts +20 -6
- package/types/react.ts +8 -0
- package/types/template.ts +10 -3
- package/dist/src/frame-styles.d.ts +0 -50
- package/dist/src/frame-styles.d.ts.map +0 -1
- package/src/frame-styles.ts +0 -1095
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var W$=Object.defineProperty;var or=(e,t)=>{for(var r in t)W$(e,r,{get:t[r],enumerable:true});};var Cn;(i=>{class e{constructor(a,c,u,l){this.version=a;this.errorCorrectionLevel=c;if(a<e.MIN_VERSION||a>e.MAX_VERSION)throw new RangeError("Version value out of range");if(l<-1||l>7)throw new RangeError("Mask value out of range");this.size=a*4+17;let f=[];for(let m=0;m<this.size;m++)f.push(false);for(let m=0;m<this.size;m++)this.modules.push(f.slice()),this.isFunction.push(f.slice());this.drawFunctionPatterns();let p=this.addEccAndInterleave(u);if(this.drawCodewords(p),l==-1){let m=1e9;for(let h=0;h<8;h++){this.applyMask(h),this.drawFormatBits(h);let d=this.getPenaltyScore();d<m&&(l=h,m=d),this.applyMask(h);}}n(0<=l&&l<=7),this.mask=l,this.applyMask(l),this.drawFormatBits(l),this.isFunction=[];}version;errorCorrectionLevel;static encodeText(a,c){let u=i.QrSegment.makeSegments(a);return e.encodeSegments(u,c)}static encodeBinary(a,c){let u=i.QrSegment.makeBytes(a);return e.encodeSegments([u],c)}static encodeSegments(a,c,u=1,l=40,f=-1,p=true){if(!(e.MIN_VERSION<=u&&u<=l&&l<=e.MAX_VERSION)||f<-1||f>7)throw new RangeError("Invalid value");let m,h;for(m=u;;m++){let y=e.getNumDataCodewords(m,c)*8,b=o.getTotalBits(a,m);if(b<=y){h=b;break}if(m>=l)throw new RangeError("Data too long")}for(let y of [e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])p&&h<=e.getNumDataCodewords(m,y)*8&&(c=y);let d=[];for(let y of a){t(y.mode.modeBits,4,d),t(y.numChars,y.mode.numCharCountBits(m),d);for(let b of y.getData())d.push(b);}n(d.length==h);let g=e.getNumDataCodewords(m,c)*8;n(d.length<=g),t(0,Math.min(4,g-d.length),d),t(0,(8-d.length%8)%8,d),n(d.length%8==0);for(let y=236;d.length<g;y^=253)t(y,8,d);let _=[];for(;_.length*8<d.length;)_.push(0);return d.forEach((y,b)=>_[b>>>3]|=y<<7-(b&7)),new e(m,c,_,f)}size;mask;modules=[];isFunction=[];getModule(a,c){return 0<=a&&a<this.size&&0<=c&&c<this.size&&this.modules[c][a]}getModules(){return this.modules}drawFunctionPatterns(){for(let u=0;u<this.size;u++)this.setFunctionModule(6,u,u%2==0),this.setFunctionModule(u,6,u%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let a=this.getAlignmentPatternPositions(),c=a.length;for(let u=0;u<c;u++)for(let l=0;l<c;l++)u==0&&l==0||u==0&&l==c-1||u==c-1&&l==0||this.drawAlignmentPattern(a[u],a[l]);this.drawFormatBits(0),this.drawVersion();}drawFormatBits(a){let c=this.errorCorrectionLevel.formatBits<<3|a,u=c;for(let f=0;f<10;f++)u=u<<1^(u>>>9)*1335;let l=(c<<10|u)^21522;n(l>>>15==0);for(let f=0;f<=5;f++)this.setFunctionModule(8,f,r(l,f));this.setFunctionModule(8,7,r(l,6)),this.setFunctionModule(8,8,r(l,7)),this.setFunctionModule(7,8,r(l,8));for(let f=9;f<15;f++)this.setFunctionModule(14-f,8,r(l,f));for(let f=0;f<8;f++)this.setFunctionModule(this.size-1-f,8,r(l,f));for(let f=8;f<15;f++)this.setFunctionModule(8,this.size-15+f,r(l,f));this.setFunctionModule(8,this.size-8,true);}drawVersion(){if(this.version<7)return;let a=this.version;for(let u=0;u<12;u++)a=a<<1^(a>>>11)*7973;let c=this.version<<12|a;n(c>>>18==0);for(let u=0;u<18;u++){let l=r(c,u),f=this.size-11+u%3,p=Math.floor(u/3);this.setFunctionModule(f,p,l),this.setFunctionModule(p,f,l);}}drawFinderPattern(a,c){for(let u=-4;u<=4;u++)for(let l=-4;l<=4;l++){let f=Math.max(Math.abs(l),Math.abs(u)),p=a+l,m=c+u;0<=p&&p<this.size&&0<=m&&m<this.size&&this.setFunctionModule(p,m,f!=2&&f!=4);}}drawAlignmentPattern(a,c){for(let u=-2;u<=2;u++)for(let l=-2;l<=2;l++)this.setFunctionModule(a+l,c+u,Math.max(Math.abs(l),Math.abs(u))!=1);}setFunctionModule(a,c,u){this.modules[c][a]=u,this.isFunction[c][a]=true;}addEccAndInterleave(a){let c=this.version,u=this.errorCorrectionLevel;if(a.length!=e.getNumDataCodewords(c,u))throw new RangeError("Invalid argument");let l=e.NUM_ERROR_CORRECTION_BLOCKS[u.ordinal][c],f=e.ECC_CODEWORDS_PER_BLOCK[u.ordinal][c],p=Math.floor(e.getNumRawDataModules(c)/8),m=l-p%l,h=Math.floor(p/l),d=[],g=e.reedSolomonComputeDivisor(f);for(let y=0,b=0;y<l;y++){let S=a.slice(b,b+h-f+(y<m?0:1));b+=S.length;let v=e.reedSolomonComputeRemainder(S,g);y<m&&S.push(0),d.push(S.concat(v));}let _=[];for(let y=0;y<d[0].length;y++)d.forEach((b,S)=>{(y!=h-f||S>=m)&&_.push(b[y]);});return n(_.length==p),_}drawCodewords(a){if(a.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let u=this.size-1;u>=1;u-=2){u==6&&(u=5);for(let l=0;l<this.size;l++)for(let f=0;f<2;f++){let p=u-f,h=(u+1&2)==0?this.size-1-l:l;!this.isFunction[h][p]&&c<a.length*8&&(this.modules[h][p]=r(a[c>>>3],7-(c&7)),c++);}}n(c==a.length*8);}applyMask(a){if(a<0||a>7)throw new RangeError("Mask value out of range");for(let c=0;c<this.size;c++)for(let u=0;u<this.size;u++){let l;switch(a){case 0:l=(u+c)%2==0;break;case 1:l=c%2==0;break;case 2:l=u%3==0;break;case 3:l=(u+c)%3==0;break;case 4:l=(Math.floor(u/3)+Math.floor(c/2))%2==0;break;case 5:l=u*c%2+u*c%3==0;break;case 6:l=(u*c%2+u*c%3)%2==0;break;case 7:l=((u+c)%2+u*c%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[c][u]&&l&&(this.modules[c][u]=!this.modules[c][u]);}}getPenaltyScore(){let a=0;for(let f=0;f<this.size;f++){let p=false,m=0,h=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[f][d]==p?(m++,m==5?a+=e.PENALTY_N1:m>5&&a++):(this.finderPenaltyAddHistory(m,h),p||(a+=this.finderPenaltyCountPatterns(h)*e.PENALTY_N3),p=this.modules[f][d],m=1);a+=this.finderPenaltyTerminateAndCount(p,m,h)*e.PENALTY_N3;}for(let f=0;f<this.size;f++){let p=false,m=0,h=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][f]==p?(m++,m==5?a+=e.PENALTY_N1:m>5&&a++):(this.finderPenaltyAddHistory(m,h),p||(a+=this.finderPenaltyCountPatterns(h)*e.PENALTY_N3),p=this.modules[d][f],m=1);a+=this.finderPenaltyTerminateAndCount(p,m,h)*e.PENALTY_N3;}for(let f=0;f<this.size-1;f++)for(let p=0;p<this.size-1;p++){let m=this.modules[f][p];m==this.modules[f][p+1]&&m==this.modules[f+1][p]&&m==this.modules[f+1][p+1]&&(a+=e.PENALTY_N2);}let c=0;for(let f of this.modules)c=f.reduce((p,m)=>p+(m?1:0),c);let u=this.size*this.size,l=Math.ceil(Math.abs(c*20-u*10)/u)-1;return n(0<=l&&l<=9),a+=l*e.PENALTY_N4,n(0<=a&&a<=2568888),a}getAlignmentPatternPositions(){if(this.version==1)return [];{let a=Math.floor(this.version/7)+2,c=this.version==32?26:Math.ceil((this.version*4+4)/(a*2-2))*2,u=[6];for(let l=this.size-7;u.length<a;l-=c)u.splice(1,0,l);return u}}static getNumRawDataModules(a){if(a<e.MIN_VERSION||a>e.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*a+128)*a+64;if(a>=2){let u=Math.floor(a/7)+2;c-=(25*u-10)*u-55,a>=7&&(c-=36);}return n(208<=c&&c<=29648),c}static getNumDataCodewords(a,c){return Math.floor(e.getNumRawDataModules(a)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][a]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][a]}static reedSolomonComputeDivisor(a){if(a<1||a>255)throw new RangeError("Degree out of range");let c=[];for(let l=0;l<a-1;l++)c.push(0);c.push(1);let u=1;for(let l=0;l<a;l++){for(let f=0;f<c.length;f++)c[f]=e.reedSolomonMultiply(c[f],u),f+1<c.length&&(c[f]^=c[f+1]);u=e.reedSolomonMultiply(u,2);}return c}static reedSolomonComputeRemainder(a,c){let u=c.map(l=>0);for(let l of a){let f=l^u.shift();u.push(0),c.forEach((p,m)=>u[m]^=e.reedSolomonMultiply(p,f));}return u}static reedSolomonMultiply(a,c){if(a>>>8||c>>>8)throw new RangeError("Byte out of range");let u=0;for(let l=7;l>=0;l--)u=u<<1^(u>>>7)*285,u^=(c>>>l&1)*a;return n(u>>>8==0),u}finderPenaltyCountPatterns(a){let c=a[1];n(c<=this.size*3);let u=c>0&&a[2]==c&&a[3]==c*3&&a[4]==c&&a[5]==c;return (u&&a[0]>=c*4&&a[6]>=c?1:0)+(u&&a[6]>=c*4&&a[0]>=c?1:0)}finderPenaltyTerminateAndCount(a,c,u){return a&&(this.finderPenaltyAddHistory(c,u),c=0),c+=this.size,this.finderPenaltyAddHistory(c,u),this.finderPenaltyCountPatterns(u)}finderPenaltyAddHistory(a,c){c[0]==0&&(a+=this.size),c.pop(),c.unshift(a);}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]}i.QrCode=e;function t(s,a,c){if(a<0||a>31||s>>>a)throw new RangeError("Value out of range");for(let u=a-1;u>=0;u--)c.push(s>>>u&1);}function r(s,a){return (s>>>a&1)!=0}function n(s){if(!s)throw new Error("Assertion error")}class o{constructor(a,c,u){this.mode=a;this.numChars=c;this.bitData=u;if(c<0)throw new RangeError("Invalid argument");this.bitData=u.slice();}mode;numChars;bitData;static makeBytes(a){let c=[];for(let u of a)t(u,8,c);return new o(o.Mode.BYTE,a.length,c)}static makeNumeric(a){if(!o.isNumeric(a))throw new RangeError("String contains non-numeric characters");let c=[];for(let u=0;u<a.length;){let l=Math.min(a.length-u,3);t(parseInt(a.substr(u,l),10),l*3+1,c),u+=l;}return new o(o.Mode.NUMERIC,a.length,c)}static makeAlphanumeric(a){if(!o.isAlphanumeric(a))throw new RangeError("String contains unencodable characters in alphanumeric mode");let c=[],u;for(u=0;u+2<=a.length;u+=2){let l=o.ALPHANUMERIC_CHARSET.indexOf(a.charAt(u))*45;l+=o.ALPHANUMERIC_CHARSET.indexOf(a.charAt(u+1)),t(l,11,c);}return u<a.length&&t(o.ALPHANUMERIC_CHARSET.indexOf(a.charAt(u)),6,c),new o(o.Mode.ALPHANUMERIC,a.length,c)}static makeSegments(a){return a==""?[]:o.isNumeric(a)?[o.makeNumeric(a)]:o.isAlphanumeric(a)?[o.makeAlphanumeric(a)]:[o.makeBytes(o.toUtf8ByteArray(a))]}static makeEci(a){let c=[];if(a<0)throw new RangeError("ECI assignment value out of range");if(a<128)t(a,8,c);else if(a<16384)t(2,2,c),t(a,14,c);else if(a<1e6)t(6,3,c),t(a,21,c);else throw new RangeError("ECI assignment value out of range");return new o(o.Mode.ECI,0,c)}static isNumeric(a){return o.NUMERIC_REGEX.test(a)}static isAlphanumeric(a){return o.ALPHANUMERIC_REGEX.test(a)}getData(){return this.bitData.slice()}static getTotalBits(a,c){let u=0;for(let l of a){let f=l.mode.numCharCountBits(c);if(l.numChars>=1<<f)return 1/0;u+=4+f+l.bitData.length;}return u}static toUtf8ByteArray(a){a=encodeURI(a);let c=[];for(let u=0;u<a.length;u++)a.charAt(u)!="%"?c.push(a.charCodeAt(u)):(c.push(parseInt(a.substr(u+1,2),16)),u+=2);return c}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}i.QrSegment=o;})(Cn||={});(t=>{(n=>{class r{constructor(i,s){this.ordinal=i;this.formatBits=s;}ordinal;formatBits;static LOW=new r(0,1);static MEDIUM=new r(1,0);static QUARTILE=new r(2,3);static HIGH=new r(3,2)}n.Ecc=r;})(t.QrCode||={});})(Cn||={});(t=>{(n=>{class r{constructor(i,s){this.modeBits=i;this.numBitsCharCount=s;}modeBits;numBitsCharCount;static NUMERIC=new r(1,[10,12,14]);static ALPHANUMERIC=new r(2,[9,11,13]);static BYTE=new r(4,[8,16,16]);static KANJI=new r(8,[8,10,12]);static ECI=new r(7,[0,0,0]);numCharCountBits(i){return this.numBitsCharCount[Math.floor((i+7)/17)]}}n.Mode=r;})(t.QrSegment||={});})(Cn||={});var Le=Cn;var qe={L:Le.QrCode.Ecc.LOW,M:Le.QrCode.Ecc.MEDIUM,Q:Le.QrCode.Ecc.QUARTILE,H:Le.QrCode.Ecc.HIGH},ve=128,Mt="Q",ze="#FFFFFF",Ge="#000000";var Te=0;var ps=.1;function Ze(e,t="#000000"){return e?typeof e=="string"?e:e.type==="solid"?e.color:e.type==="image"?e.underlay||t:(e.type==="linear"||e.type==="radial"||e.type==="angular")&&e.stops[0]?.color||t:t}var A={};or(A,{$brand:()=>Vu,$input:()=>_m,$output:()=>ym,INVALID:()=>Xe,NEVER:()=>Qu,TimePrecision:()=>Em,ZodAny:()=>yd,ZodArray:()=>$d,ZodBase64:()=>uc,ZodBase64URL:()=>lc,ZodBigInt:()=>co,ZodBigIntFormat:()=>pc,ZodBoolean:()=>ao,ZodCIDRv4:()=>ac,ZodCIDRv6:()=>cc,ZodCUID:()=>ec,ZodCUID2:()=>tc,ZodCatch:()=>Ud,ZodCodec:()=>Ii,ZodCompileAsyncError:()=>St,ZodCompileUnsupportedError:()=>te,ZodCreditCard:()=>ud,ZodCustom:()=>Li,ZodCustomStringFormat:()=>Kr,ZodDate:()=>Pi,ZodDefault:()=>Nd,ZodDiscriminatedUnion:()=>Sd,ZodE164:()=>fc,ZodEmail:()=>Xa,ZodEmoji:()=>Ya,ZodEnum:()=>oo,ZodError:()=>aw,ZodExactOptional:()=>yc,ZodFile:()=>Id,ZodFirstPartyTypeKind:()=>rh,ZodFunction:()=>Yd,ZodGUID:()=>Ka,ZodIBAN:()=>ld,ZodIPv4:()=>ic,ZodIPv6:()=>sc,ZodISODate:()=>hr,ZodISODateTime:()=>dr,ZodISODuration:()=>yr,ZodISOTime:()=>gr,ZodInstanceOf:()=>th,ZodIntersection:()=>vd,ZodIssueCode:()=>lw,ZodJWT:()=>mc,ZodKSUID:()=>oc,ZodLazy:()=>Hd,ZodLiteral:()=>Md,ZodMAC:()=>cd,ZodMap:()=>Rd,ZodNaN:()=>Qd,ZodNanoID:()=>Ja,ZodNever:()=>bd,ZodNonOptional:()=>_c,ZodNull:()=>hd,ZodNullable:()=>Td,ZodNumber:()=>so,ZodNumberFormat:()=>Yr,ZodObject:()=>Ai,ZodOptional:()=>Ei,ZodPipe:()=>Mi,ZodPrefault:()=>Fd,ZodPreprocess:()=>Vd,ZodPromise:()=>Kd,ZodReadonly:()=>jd,ZodRealError:()=>ut,ZodRecord:()=>no,ZodSet:()=>Ed,ZodString:()=>io,ZodStringFormat:()=>de,ZodSuccess:()=>Bd,ZodSymbol:()=>pd,ZodTemplateLiteral:()=>Wd,ZodTransform:()=>Ld,ZodTuple:()=>Pd,ZodType:()=>H,ZodULID:()=>rc,ZodURL:()=>Ci,ZodUUID:()=>Tt,ZodUndefined:()=>dd,ZodUnion:()=>Ri,ZodUnknown:()=>_d,ZodVoid:()=>xd,ZodXID:()=>nc,ZodXor:()=>wd,_ZodString:()=>Ha,_default:()=>Od,_function:()=>Vy,any:()=>wy,array:()=>ki,base64:()=>ry,base64url:()=>ny,bigint:()=>yy,boolean:()=>md,catch:()=>Gd,check:()=>jy,cidrv4:()=>ey,cidrv6:()=>ty,clone:()=>ce,codec:()=>By,coerce:()=>oh,compile:()=>wm,config:()=>Ae,core:()=>Ht,creditCard:()=>iy,cuid:()=>j1,cuid2:()=>q1,currencyCode:()=>fy,custom:()=>qy,date:()=>vy,decode:()=>td,decodeAsync:()=>nd,deepPartial:()=>s_,describe:()=>Wy,discriminatedUnion:()=>Ey,e164:()=>oy,email:()=>N1,emoji:()=>Q1,encode:()=>ed,encodeAsync:()=>rd,endsWith:()=>jn,enum:()=>hc,exactOptional:()=>zd,file:()=>Oy,flattenError:()=>Xo,float32:()=>py,float64:()=>dy,formatError:()=>Ko,fromJSONSchema:()=>o_,function:()=>Vy,getDiscriminatedOption:()=>Vf,getErrorMap:()=>mw,globalRegistry:()=>Ve,gt:()=>Lt,gte:()=>pt,guid:()=>O1,hash:()=>my,hex:()=>ly,hostname:()=>uy,httpUrl:()=>G1,iban:()=>sy,includes:()=>Qn,input:()=>c_,instanceof:()=>Xy,int:()=>qa,int32:()=>hy,int64:()=>_y,intersection:()=>Cd,invertCodec:()=>Uy,ipv4:()=>K1,ipv6:()=>J1,iso:()=>zi,json:()=>Yy,jwt:()=>ay,keyof:()=>Cy,ksuid:()=>X1,lazy:()=>Xd,length:()=>jr,literal:()=>Ny,locales:()=>ca,looseObject:()=>Ay,looseRecord:()=>Iy,lowercase:()=>Un,lt:()=>It,lte:()=>mt,mac:()=>Y1,map:()=>Ly,maxLength:()=>Vr,maxSize:()=>lr,memoizer:()=>hi,meta:()=>Hy,mime:()=>Wn,minLength:()=>Wt,minSize:()=>zt,multipleOf:()=>ur,nan:()=>Zy,nanoid:()=>V1,nativeEnum:()=>Ty,negative:()=>Na,never:()=>dc,nonnegative:()=>Fa,nonoptional:()=>Zd,nonpositive:()=>Oa,normalize:()=>Hn,null:()=>gd,nullable:()=>vi,nullish:()=>Fy,number:()=>fd,object:()=>Py,optional:()=>Hr,output:()=>u_,overwrite:()=>vt,parse:()=>Xp,parseAsync:()=>Kp,partialRecord:()=>My,pipe:()=>Wa,positive:()=>Ta,prefault:()=>Dd,preprocess:()=>Jy,prettifyError:()=>Xu,promise:()=>Qy,properties:()=>qn,property:()=>Da,readonly:()=>qd,record:()=>Ad,refine:()=>Jd,regex:()=>Bn,regexes:()=>_t,registry:()=>la,safeDecode:()=>id,safeDecodeAsync:()=>ad,safeEncode:()=>od,safeEncodeAsync:()=>sd,safeParse:()=>Yp,safeParseAsync:()=>Jp,set:()=>zy,setErrorMap:()=>fw,size:()=>Qr,slugify:()=>Jn,startsWith:()=>Vn,strictObject:()=>ky,string:()=>Si,stringFormat:()=>cy,stringbool:()=>Ky,success:()=>Dy,superRefine:()=>eh,symbol:()=>xy,templateLiteral:()=>Gy,toJSONSchema:()=>Ga,toLowerCase:()=>Kn,toUpperCase:()=>Yn,toZod:()=>Zo,transform:()=>gc,treeifyError:()=>Hu,trim:()=>Xn,tuple:()=>kd,uint32:()=>gy,uint64:()=>by,ulid:()=>W1,undefined:()=>$y,union:()=>uo,unknown:()=>Wr,uppercase:()=>Gn,url:()=>U1,util:()=>F,uuid:()=>F1,uuidv4:()=>D1,uuidv6:()=>Z1,uuidv7:()=>B1,validate:()=>Yo,validateAsync:()=>Jo,void:()=>Sy,withParser:()=>fa,xid:()=>H1,xor:()=>Ry});var Ht={};or(Ht,{$ZodAny:()=>Nf,$ZodArray:()=>Uf,$ZodAsyncError:()=>at,$ZodBase64:()=>vf,$ZodBase64URL:()=>Cf,$ZodBigInt:()=>Ys,$ZodBigIntFormat:()=>If,$ZodBoolean:()=>ui,$ZodCIDRv4:()=>wf,$ZodCIDRv6:()=>Sf,$ZodCUID:()=>lf,$ZodCUID2:()=>ff,$ZodCatch:()=>am,$ZodCheck:()=>ge,$ZodCheckBigIntFormat:()=>Nl,$ZodCheckEndsWith:()=>Wl,$ZodCheckGreaterThan:()=>Ns,$ZodCheckIncludes:()=>jl,$ZodCheckLengthEquals:()=>Ul,$ZodCheckLessThan:()=>Ts,$ZodCheckLowerCase:()=>Ql,$ZodCheckMaxLength:()=>Zl,$ZodCheckMaxSize:()=>Ol,$ZodCheckMimeType:()=>Kl,$ZodCheckMinLength:()=>Bl,$ZodCheckMinSize:()=>Fl,$ZodCheckMultipleOf:()=>zl,$ZodCheckNumberFormat:()=>Tl,$ZodCheckOverwrite:()=>Yl,$ZodCheckProperties:()=>Xl,$ZodCheckProperty:()=>Hl,$ZodCheckRegex:()=>Gl,$ZodCheckSizeEquals:()=>Dl,$ZodCheckStartsWith:()=>ql,$ZodCheckStringFormat:()=>On,$ZodCheckUpperCase:()=>Vl,$ZodCodec:()=>fi,$ZodCreditCard:()=>kf,$ZodCustom:()=>dm,$ZodCustomStringFormat:()=>Ef,$ZodCyclicError:()=>ia,$ZodDate:()=>Zf,$ZodDefault:()=>nm,$ZodDiscriminatedUnion:()=>jf,$ZodE164:()=>Pf,$ZodEmail:()=>nf,$ZodEmoji:()=>cf,$ZodEncodeError:()=>ar,$ZodEnum:()=>Kf,$ZodError:()=>Wu,$ZodExactOptional:()=>tm,$ZodFile:()=>Jf,$ZodFunction:()=>mm,$ZodGUID:()=>tf,$ZodIBAN:()=>Af,$ZodIPv4:()=>bf,$ZodIPv6:()=>xf,$ZodISODate:()=>gf,$ZodISODateTime:()=>hf,$ZodISODuration:()=>_f,$ZodISOTime:()=>yf,$ZodIntersection:()=>qf,$ZodJWT:()=>Rf,$ZodKSUID:()=>df,$ZodLazy:()=>mi,$ZodLiteral:()=>Yf,$ZodMAC:()=>$f,$ZodMap:()=>Hf,$ZodNaN:()=>cm,$ZodNanoID:()=>uf,$ZodNever:()=>Ff,$ZodNonOptional:()=>im,$ZodNull:()=>Tf,$ZodNullable:()=>rm,$ZodNumber:()=>Ks,$ZodNumberFormat:()=>Mf,$ZodObject:()=>t1,$ZodObjectJIT:()=>Gf,$ZodOptional:()=>ea,$ZodPipe:()=>ta,$ZodPrefault:()=>om,$ZodPreprocess:()=>um,$ZodPromise:()=>pm,$ZodReadonly:()=>lm,$ZodRealError:()=>ct,$ZodRecord:()=>Wf,$ZodRegistry:()=>ua,$ZodSet:()=>Xf,$ZodString:()=>Zr,$ZodStringFormat:()=>ue,$ZodSuccess:()=>sm,$ZodSymbol:()=>Lf,$ZodTemplateLiteral:()=>fm,$ZodTransform:()=>em,$ZodTuple:()=>Js,$ZodType:()=>q,$ZodULID:()=>mf,$ZodURL:()=>af,$ZodUUID:()=>rf,$ZodUndefined:()=>zf,$ZodUnion:()=>li,$ZodUnknown:()=>Of,$ZodVoid:()=>Df,$ZodXID:()=>pf,$ZodXor:()=>Qf,$brand:()=>Vu,$constructor:()=>k,$input:()=>_m,$output:()=>ym,Doc:()=>Dr,INVALID:()=>Xe,JSONSchema:()=>I1,JSONSchemaGenerator:()=>Qa,NEVER:()=>Qu,TimePrecision:()=>Em,URL_BAD_FORMAT:()=>of,URL_UNPARSEABLE:()=>oi,ZodCompileAsyncError:()=>St,ZodCompileUnsupportedError:()=>te,_any:()=>qm,_array:()=>ep,_base64:()=>Ma,_base64url:()=>Ia,_bigint:()=>Zm,_boolean:()=>Fm,_catch:()=>W4,_check:()=>g1,_cidrv4:()=>Ra,_cidrv6:()=>Ea,_coercedBigint:()=>Bm,_coercedBoolean:()=>Dm,_coercedDate:()=>Ym,_coercedNumber:()=>Im,_coercedString:()=>Pm,_creditCard:()=>Am,_cuid:()=>wa,_cuid2:()=>Sa,_custom:()=>rp,_date:()=>Km,_decode:()=>vs,_decodeAsync:()=>Ps,_default:()=>V4,_discriminatedUnion:()=>L4,_e164:()=>La,_email:()=>da,_emoji:()=>xa,_encode:()=>Ss,_encodeAsync:()=>Cs,_endsWith:()=>jn,_enum:()=>D4,_file:()=>tp,_float32:()=>zm,_float64:()=>Tm,_gt:()=>Lt,_gte:()=>pt,_guid:()=>ha,_iban:()=>Rm,_includes:()=>Qn,_int:()=>Lm,_int32:()=>Nm,_int64:()=>Um,_intersection:()=>z4,_ipv4:()=>ka,_ipv6:()=>Aa,_isoDate:()=>_i,_isoDateTime:()=>yi,_isoDuration:()=>xi,_isoTime:()=>bi,_jwt:()=>za,_ksuid:()=>Pa,_lazy:()=>Y4,_length:()=>jr,_literal:()=>B4,_lowercase:()=>Un,_lt:()=>It,_lte:()=>mt,_mac:()=>km,_map:()=>O4,_max:()=>mt,_maxLength:()=>Vr,_maxSize:()=>lr,_mime:()=>Wn,_min:()=>pt,_minLength:()=>Wt,_minSize:()=>zt,_multipleOf:()=>ur,_nan:()=>Jm,_nanoid:()=>$a,_nativeEnum:()=>Z4,_negative:()=>Na,_never:()=>Hm,_nonnegative:()=>Fa,_nonoptional:()=>j4,_nonpositive:()=>Oa,_normalize:()=>Hn,_null:()=>jm,_nullable:()=>Q4,_number:()=>Mm,_optional:()=>G4,_overwrite:()=>vt,_parse:()=>Ln,_parseAsync:()=>zn,_pipe:()=>H4,_positive:()=>Ta,_promise:()=>J4,_properties:()=>qn,_property:()=>Da,_readonly:()=>X4,_record:()=>N4,_refine:()=>np,_regex:()=>Bn,_safeDecode:()=>As,_safeDecodeAsync:()=>Es,_safeEncode:()=>ks,_safeEncodeAsync:()=>Rs,_safeParse:()=>Tn,_safeParseAsync:()=>Nn,_set:()=>F4,_size:()=>Qr,_slugify:()=>Jn,_startsWith:()=>Vn,_string:()=>Cm,_stringFormat:()=>qr,_stringbool:()=>ap,_success:()=>q4,_superRefine:()=>op,_symbol:()=>Qm,_templateLiteral:()=>K4,_toLowerCase:()=>Kn,_toUpperCase:()=>Yn,_transform:()=>U4,_trim:()=>Xn,_tuple:()=>T4,_uint32:()=>Om,_uint64:()=>Gm,_ulid:()=>va,_undefined:()=>Vm,_union:()=>M4,_unknown:()=>Wm,_uppercase:()=>Gn,_url:()=>gi,_uuid:()=>ga,_uuidv4:()=>ya,_uuidv6:()=>_a,_uuidv7:()=>ba,_void:()=>Xm,_xid:()=>Ca,_xor:()=>I4,base64Charset:()=>js,base64urlCharset:()=>ci,canParseURL:()=>sf,clone:()=>ce,compile:()=>wm,compileFn:()=>ma,config:()=>Ae,createStandardJSONSchemaMethod:()=>eo,createToJSONSchemaMethod:()=>up,decode:()=>D5,decodeAsync:()=>B5,describe:()=>ip,encode:()=>F5,encodeAsync:()=>Z5,extractDefs:()=>mr,finalize:()=>pr,flattenError:()=>Xo,formatError:()=>Ko,getDiscriminatedOption:()=>Vf,globalConfig:()=>Be,globalRegistry:()=>Ve,handleUnrepresentable:()=>Ne,initializeContext:()=>fr,isBackEdge:()=>aa,isRecursiveSchema:()=>sa,isValidBase64:()=>ai,isValidBase64URL:()=>qs,isValidCIDRv6:()=>Vs,isValidCreditCard:()=>Ws,isValidIBAN:()=>Hs,isValidIPv6:()=>si,isValidJWT:()=>Xs,locales:()=>ca,memoizer:()=>hi,mergeValues:()=>Fn,meta:()=>sp,parse:()=>$s,parseAsync:()=>ws,parseURLObject:()=>Yg,prettifyError:()=>Xu,process:()=>le,processSchema:()=>le,regexes:()=>_t,registry:()=>la,safeDecode:()=>G5,safeDecodeAsync:()=>V5,safeEncode:()=>U5,safeEncodeAsync:()=>Q5,safeParse:()=>L5,safeParseAsync:()=>z5,standardProps:()=>Bs,stripTabAndNewline:()=>ii,toDotPath:()=>Mg,toJSONSchema:()=>Ga,toZod:()=>Zo,treeifyError:()=>Hu,urlHostnameOk:()=>Gs,urlProtocolOk:()=>Qs,util:()=>F,validate:()=>Yo,validateAsync:()=>Jo,validateURL:()=>Us,version:()=>Jl,withParser:()=>fa});var F={};or(F,{BIGINT_FORMAT_RANGES:()=>Vo,CONSTANT_CATCH:()=>bs,Class:()=>Lu,NUMBER_FORMAT_RANGES:()=>Qo,aborted:()=>He,allowsEval:()=>Nu,assert:()=>J$,assertEqual:()=>H$,assertIs:()=>K$,assertNever:()=>Y$,assertNotEqual:()=>X$,assignProp:()=>Qe,attachSchema:()=>jo,base64ToUint8Array:()=>Cg,base64urlToUint8Array:()=>_5,cached:()=>Rn,captureStackTrace:()=>gs,cleanEnum:()=>y5,cleanRegex:()=>jt,clone:()=>ce,cloneDef:()=>r5,codePointLength:()=>Or,constantCatch:()=>Uu,createTransparentProxy:()=>c5,defineLazy:()=>zu,defineLazyInternal:()=>X,derived:()=>w5,esc:()=>We,escapeRegex:()=>yt,explicitlyAborted:()=>Du,extend:()=>f5,finalizeIssue:()=>st,floatSafeRemainder:()=>Bo,getElementAtPath:()=>n5,getEnumValues:()=>kn,getLengthableOrigin:()=>Wo,getParsedType:()=>a5,getSizableOrigin:()=>qo,hexToUint8Array:()=>x5,hide:()=>Ho,installLazyProp:()=>P5,isObject:()=>Nr,isPlainObject:()=>gt,issue:()=>In,joinValues:()=>ds,jsonStringifyReplacer:()=>An,members:()=>Bu,merge:()=>p5,mergeDefs:()=>wt,normalizeParams:()=>T,nullish:()=>hs,numKeys:()=>s5,objectClone:()=>e5,omit:()=>l5,optionalKeys:()=>Fu,own:()=>sr,parsedType:()=>Zu,partial:()=>d5,pick:()=>u5,prefixIssues:()=>it,primitiveTypes:()=>Ou,promiseAllObject:()=>o5,propertyKeyTypes:()=>Go,randomString:()=>i5,rawShape:()=>En,required:()=>h5,safeExtend:()=>m5,shallowClone:()=>Uo,sizeCaps:()=>Mn,slugify:()=>Tu,stringifyPrimitive:()=>ys,toZod:()=>Zo,uint8ArrayToBase64:()=>Pg,uint8ArrayToBase64url:()=>b5,uint8ArrayToHex:()=>$5,unwrapMessage:()=>Pn});function H$(e){return e}function X$(e){return e}function Zo(){return e=>e}function K$(e){}function Y$(e){throw new Error("Unexpected value in exhaustive check")}function J$(e){}function kn(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function ds(e,t="|"){return e.map(r=>ys(r)).join(t)}function An(e,t){return typeof t=="bigint"?t.toString():t}var Iu=class{constructor(t){this._getter=t,this._value=void 0;}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function Rn(e){return new Iu(e)}function hs(e){return e==null}function jt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Bo(e,t){let r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var $g=Symbol("evaluating");function zu(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==$g)return n===void 0&&(n=$g,n=r()),n},set(o){Object.defineProperty(e,t,{value:o});},configurable:true});}function e5(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Qe(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function En(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Vt(e){return En(e._zod.def)??e._zod.def.shape}function wg(e,t,r){Object.defineProperty(e,t,{get(){let n=r();return Qe(this,t,n),n},enumerable:true,configurable:true});}function Sg(e,t,r){t in e?Qe(e,t,r):e[t]=r;}function Tr(e,t,r,n){let o=Vt(t);for(let i of r){let s=Object.getOwnPropertyDescriptor(o,i);s.enumerable&&(s.get?wg(e,i,()=>{let a=t._zod.def.shape[i];return n?n(a,i):a}):Sg(e,i,n?n(s.value,i):s.value));}}function t5(e,t){for(let r of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?wg(e,r,()=>t[r]):Sg(e,r,n.value));}}function wt(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n);}return Object.defineProperties({},t)}function r5(e){return wt(e._zod.def)}function n5(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function o5(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function i5(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function We(e){return JSON.stringify(e)}function Tu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var gs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Nr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Nu=Rn(()=>{if(Be.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function gt(e){if(Nr(e)===false)return false;let t=e.constructor;if(t===void 0||typeof t!="function")return true;let r=t.prototype;return !(Nr(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function Uo(e){return gt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function s5(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var a5=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Go=new Set(["string","number","symbol"]),Ou=new Set(["string","number","bigint","boolean","symbol","undefined"]);function yt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ce(e,t,r){let n=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(n._zod.parent=e),n}function T(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function c5(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function ys(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Fu(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Qo={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Vo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function u5(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return Tr(i,e,_s(e,t)),ce(e,wt(r,{shape:i,checks:[]}))}function _s(e,t){let r=Vt(e),n=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o);}return n}function l5(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(_s(e,t)),s={};return Tr(s,e,Reflect.ownKeys(Vt(e)).filter(a=>!i.has(a))),ce(e,wt(r,{shape:s,checks:[]}))}function f5(e,t){if(!gt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=Vt(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return ce(e,wt(e._zod.def,{shape:vg(e,t)}))}function vg(e,t){let r={};return Tr(r,e,Reflect.ownKeys(Vt(e))),t5(r,t),r}function m5(e,t){if(!gt(t))throw new Error("Invalid input to safeExtend: expected a plain object");return ce(e,wt(e._zod.def,{shape:vg(e,t)}))}function p5(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Tr(r,e,Reflect.ownKeys(Vt(e))),Tr(r,t,Reflect.ownKeys(Vt(t)));let n=wt(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ce(e,n)}function d5(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let a=r?new Set(_s(t,r)):void 0,c={};return Tr(c,t,Reflect.ownKeys(Vt(t)),e&&((u,l)=>a&&!a.has(l)?u:new e({type:"optional",innerType:u}))),ce(t,wt(t._zod.def,{shape:c,checks:[]}))}function h5(e,t,r){let n=r?new Set(_s(t,r)):void 0,o={};return Tr(o,t,Reflect.ownKeys(Vt(t)),(i,s)=>n&&!n.has(s)?i:new e({type:"nonoptional",innerType:i})),ce(t,wt(t._zod.def,{shape:o}))}function He(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function Du(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===false)return true;return false}function it(e,t){return t.map(r=>{var n;return (n=r).path??(n.path=[]),r.path.unshift(e),r})}function Pn(e){return typeof e=="string"?e:e?.message}function Mn(e){let t=[];for(let r of e??[]){let n=r._zod.def;if(!/_(length|size)$|_equals$/.test(n.check))break;let o=n.maximum??n.length??n.size;o>=0&&t.push([o,r]);}return t}function jo(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r);}function st(e,t,r){var n;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:Pn(e.inst?._zod.def?.error?.(e))??Pn(i?.(e))??Pn(t?.error?.(e))??Pn(r.customError?.(e))??Pn(r.localeError?.(e))??"Invalid input",a={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(a[c]=e[c]);return a.path??(a.path=[]),a.message=s,t?.reportInput&&(a.input=e.input),a}function qo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var g5=/[\uD800-\uDBFF]/;function Or(e){let t=e.length;if(!g5.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function Wo(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Zu(e){let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"nan":"number";case "object":{if(e===null)return "null";if(Array.isArray(e))return "array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function In(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function y5(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Cg(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function Pg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _5(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Cg(t+r)}function b5(e){return Pg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function x5(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function $5(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Lu=class{constructor(...t){}};function Bu(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:false}):S5(e,r,n.value);}}function sr(e,t,r,n=true){return Object.defineProperty(e,t,{configurable:true,writable:true,enumerable:n,value:r}),r}function Ho(e,t,r){return sr(e,t,r,false)}function w5(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:true,enumerable:true,get(){return sr(this,r,n(this))},set(o){sr(this,r,o);}});}return t}function S5(e,t,r){Object.defineProperty(e,t,{configurable:true,get(){return this==null?r:sr(this,t,r.bind(this))},set(n){sr(this,t,n);}});}function v5(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var Mu,ir=false,C5={configurable:true,get(){ir=true;}};function X(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&Mu!==e._zod){Mu=void 0;return}Mu=e._zod,Object.defineProperty(n,t,{configurable:true,get(){Object.defineProperty(this,t,C5);let o=ir;ir=false;try{let i=r(this);return ir?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),ir=ir||o,i}catch(i){throw delete this[t],ir=ir||o,i}},set(o){Object.defineProperty(this,t,{configurable:true,writable:true,value:o});}});}function P5(e,t,r,n){let o=v5(e,t);o&&Object.defineProperty(o,t,{configurable:true,get(){let i={configurable:true,writable:true,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:true,writable:true,enumerable:n,value:i});}});}var bs="~constantCatch";function Uu(e){let t=()=>e;return t[bs]=true,t}var kg,Qu=Object.freeze({status:"aborted"}),Gu={value:void 0,enumerable:false},Ag="captureStackTrace"in Error?Error:null;function k5(e){let t=Ag;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0;}catch{return Ag=null,new e}try{return new e}finally{t.stackTraceLimit=r;}}}return new e}function k(e,t,r,n){let o={};function i(p){this.def=p,this.constr=f,this.traits=new Set;}i.prototype=o;let s=r,a=s&&new WeakSet;function c(p,m){if(p._zod){if(p._zod.traits.has(e))return}else {Gu.value=new i(m);try{Object.defineProperty(p,"_zod",Gu);}finally{Gu.value=void 0;}}if(p._zod.traits.add(e),t(p,m),a){let d=Object.getPrototypeOf(p),g=p._zod.constr.prototype,_=d;for(;_&&_!==g;)_=Object.getPrototypeOf(_);let y=_??d;a.has(y)||(a.add(y),Bu(y,s));}let h=f.prototype;for(let d in h)Object.prototype.hasOwnProperty.call(h,d)&&(d in p||(p[d]=h[d].bind(p)));}let u=n?.Parent??Object;class l extends u{}Object.defineProperty(l,"name",{value:e});function f(p){let m=n?.Parent?k5(l):this;c(m,p);let h=m._zod.deferred;if(h){for(let g of h)g();m._zod.deferred=void 0;}let d=globalThis.__zod_globalConfig?.postProcessor;return d&&d(m),m}return Object.defineProperty(f,"init",{value:c}),Object.defineProperty(f,Symbol.hasInstance,{value:p=>n?.Parent&&p instanceof n.Parent?true:p?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}var Vu=Symbol("zod_brand"),at=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},ar=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}};(kg=globalThis).__zod_globalConfig??(kg.__zod_globalConfig={});var Be=globalThis.__zod_globalConfig;function Ae(e){return e&&Object.assign(Be,e),Be}function A5(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,An,2)),e.message}function R5(e){this._zod.message=e;}var E5={get:A5,set:R5,enumerable:true,configurable:true},qu={value:void 0,enumerable:false},Rg=new WeakSet([Object.prototype,Error.prototype]),Eg=(e,t)=>{e.name="$ZodError",qu.value=t,Object.defineProperty(e,"issues",qu),qu.value=void 0,Object.defineProperty(e,"message",E5);let r=Object.getPrototypeOf(e);Rg.has(r)||(Rg.add(r),Object.defineProperty(r,"toString",{configurable:true,enumerable:false,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:true,writable:true}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:true,writable:true});}}));},Wu=k("$ZodError",Eg),ct=k("$ZodError",Eg,void 0,{Parent:Error});function M5(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:true,enumerable:true,configurable:true}):e[t]=r()),e[t]}function Xo(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?M5(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return {formErrors:n,fieldErrors:r}}function Ko(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else {let a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else {let c=r,u=0;for(;u<a.length;){let l=a[u],f=u===a.length-1;if(l==="_errors"){f&&c._errors.push(t(s)),u++;continue}Object.prototype.hasOwnProperty.call(c,l)||Object.defineProperty(c,l,{value:{_errors:[]},enumerable:true,writable:true,configurable:true});let p=c[l];f&&p._errors.push(t(s)),c=p,u++;}}}};return n(e),r}function Hu(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var s;for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>n({issues:c},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else {let c=[...i,...a.path];if(c.length===0){r.errors.push(t(a));continue}let u=r,l=0;for(;l<c.length;){let f=c[l],p=l===c.length-1;typeof f=="string"?(u.properties??(u.properties={}),Object.prototype.hasOwnProperty.call(u.properties,f)||Object.defineProperty(u.properties,f,{value:{errors:[]},enumerable:true,writable:true,configurable:true}),u=u.properties[f]):(u.items??(u.items=[]),(s=u.items)[f]??(s[f]={errors:[]}),u=u.items[f]),p&&u.errors.push(t(a)),l++;}}};return n(e),r}function Mg(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function Xu(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${Mg(n.path)}`);return t.join(`
|
|
2
|
+
`)}function xs(e,t){return {callee:t?.callee??e,Err:t?.Err}}var Ln=e=>{let t=(r,n,o,i)=>{let s=o?{...o,async:false}:{async:false},a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new at;if(a.issues.length){let c=new(i?.Err??e)(a.issues.map(u=>st(u,s,Ae())));throw gs(c,i?.callee??t),c}return a.value};return t},$s=Ln(ct),zn=e=>{let t=async(r,n,o,i)=>{let s=o?{...o,async:true}:{async:true},a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(i?.Err??e)(a.issues.map(u=>st(u,s,Ae())));throw gs(c,i?.callee??t),c}return a.value};return t},ws=zn(ct),Tn=e=>(t,r,n)=>{let o=n?{...n,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new at;return i.issues.length?Ig(e,i.issues,o):{success:true,data:i.value}},L5=Tn(ct);function Ig(e,t,r){let n;return {success:false,get error(){return n||(n=new e(t.map(o=>st(o,r,Ae()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0;}}}var Nn=e=>async(t,r,n)=>{let o=n?{...n,async:true}:{async:true},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?Ig(e,i.issues,o):{success:true,data:i.value}},z5=Nn(ct),T5=Symbol.for("zod.compile.invalid"),N5=Symbol.for("zod.compile.fallback"),Yo=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==T5)return true;if(n.definite===true&&r===void 0)return false}return O5(e,t,r)});function O5(e,t,r){let n=r?{...r,async:false,abortEarly:true}:{async:false,abortEarly:true},o=e._zod.bag.fallbackRun,i;if(o?(n[N5]=true,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new at;return i.issues.length===0}var Jo=async(e,t,r)=>{let n=r?{...r,async:true,abortEarly:true}:{async:true,abortEarly:true},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Ss=e=>{let t=Ln(e),r=(n,o,i,s)=>{let a=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,a,xs(r,s))};return r},F5=Ss(ct),vs=e=>{let t=Ln(e),r=(n,o,i,s)=>t(n,o,i,xs(r,s));return r},D5=vs(ct),Cs=e=>{let t=zn(e),r=async(n,o,i,s)=>{let a=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,a,xs(r,s))};return r},Z5=Cs(ct),Ps=e=>{let t=zn(e),r=async(n,o,i,s)=>await t(n,o,i,xs(r,s));return r},B5=Ps(ct),ks=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Tn(e)(t,r,o)},U5=ks(ct),As=e=>(t,r,n)=>Tn(e)(t,r,n),G5=As(ct),Rs=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Nn(e)(t,r,o)},Q5=Rs(ct),Es=e=>async(t,r,n)=>Nn(e)(t,r,n),V5=Es(ct);var _t={};or(_t,{anyString:()=>Sl,base64:()=>dl,base64url:()=>hl,bigint:()=>Cl,boolean:()=>Pl,browserEmail:()=>J5,cidrv4:()=>ml,cidrv6:()=>pl,creditCard:()=>Ms,cuid:()=>Yu,cuid2:()=>Ju,currencyCode:()=>bl,date:()=>xl,datetime:()=>wl,domain:()=>yl,duration:()=>il,e164:()=>_l,email:()=>al,emoji:()=>cl,extendedDuration:()=>j5,guid:()=>sl,hex:()=>Ml,hostname:()=>gl,html5Email:()=>X5,httpProtocol:()=>ei,iban:()=>Is,idnEmail:()=>Y5,integer:()=>ti,ipv4:()=>ul,ipv6:()=>ll,ksuid:()=>rl,lowercase:()=>Rl,mac:()=>fl,md5_base64:()=>n3,md5_base64url:()=>o3,md5_hex:()=>r3,nanoid:()=>nl,nanoidOfLength:()=>ol,null:()=>kl,number:()=>qt,rfc5322Email:()=>K5,sha1_base64:()=>s3,sha1_base64url:()=>a3,sha1_hex:()=>i3,sha256_base64:()=>u3,sha256_base64url:()=>l3,sha256_hex:()=>c3,sha384_base64:()=>m3,sha384_base64url:()=>p3,sha384_hex:()=>f3,sha512_base64:()=>h3,sha512_base64url:()=>g3,sha512_hex:()=>d3,string:()=>vl,time:()=>$l,ulid:()=>el,undefined:()=>Al,unicodeEmail:()=>Lg,uppercase:()=>El,uuid:()=>Fr,uuid4:()=>q5,uuid6:()=>W5,uuid7:()=>H5,xid:()=>tl});var Yu=/^[cC][0-9a-z]{6,}$/,Ju=/^[0-9a-z]+$/,el=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,tl=/^[0-9a-vA-V]{20}$/,rl=/^[A-Za-z0-9]{27}$/,nl=/^[a-zA-Z0-9_-]{21}$/;function ol(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var il=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,j5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,sl=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fr=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,q5=Fr(4),W5=Fr(6),H5=Fr(7),al=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,X5=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,K5=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Lg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Y5=Lg,J5=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,e3="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function cl(){return new RegExp(e3,"u")}var ul=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ll=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,fl=e=>{let t=yt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ml=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,pl=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dl=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hl=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,gl=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,yl=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,ei=/^https?$/,_l=/^\+[1-9]\d{6,14}$/,Ms=/^\d(?:[ -]?\d){11,18}$/,bl=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Is=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,zg="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function t3(e){return new RegExp(`^${e}$`)}var xl=t3(zg);function Ku(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $l(e){return new RegExp(`^${Ku(e)}$`)}function wl(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${Ku({precision:e.precision,seconds:true})}(?:${t.join("|")})`,n=e.local?`${r}|${Ku({precision:e.precision})}`:r;return new RegExp(`^${zg}T(?:${n})$`)}var Sl=/^[\s\S]{0,}$/,vl=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Cl=/^-?\d+n?$/,ti=/^-?\d+$/,qt=/^-?\d+(?:\.\d+)?$/,Pl=/^(?:true|false)$/i,kl=/^null$/i;var Al=/^undefined$/i;var Rl=/^[^A-Z]*$/,El=/^[^a-z]*$/,Ml=/^[0-9a-fA-F]*$/;function ri(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ni(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var r3=/^[0-9a-fA-F]{32}$/,n3=ri(22,"=="),o3=ni(22),i3=/^[0-9a-fA-F]{40}$/,s3=ri(27,"="),a3=ni(27),c3=/^[0-9a-fA-F]{64}$/,u3=ri(43,"="),l3=ni(43),f3=/^[0-9a-fA-F]{96}$/,m3=ri(64,""),p3=ni(64),d3=/^[0-9a-fA-F]{128}$/,h3=ri(86,"=="),g3=ni(86);var ge=k("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),Il=e=>{let t=e.value;return !hs(t)&&t.size!==void 0},Ll=e=>{let t=e.value;return !hs(t)&&t.length!==void 0},Ls={number:"number",bigint:"bigint",object:"date"},Ts=k("$ZodCheckLessThan",(e,t)=>{ge.init(e,t);let r=Ls[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:Ls[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Ns=k("$ZodCheckGreaterThan",(e,t)=>{ge.init(e,t);let r=Ls[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:Ls[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),zl=k("$ZodCheckMultipleOf",(e,t)=>{ge.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Bo(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),Tl=k("$ZodCheckNumberFormat",(e,t)=>{ge.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Qo[t.format];e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:true,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:true,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:true,inst:e,continue:!t.abort});};}),Nl=k("$ZodCheckBigIntFormat",(e,t)=>{ge.init(e,t);let[r,n]=Vo[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:true,inst:e,continue:!t.abort});};}),Ol=k("$ZodCheckMaxSize",(e,t)=>{var r;ge.init(e,t),(r=e._zod.def).when??(r.when=Il),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:qo(o),code:"too_big",maximum:t.maximum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),Fl=k("$ZodCheckMinSize",(e,t)=>{var r;ge.init(e,t),(r=e._zod.def).when??(r.when=Il),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:qo(o),code:"too_small",minimum:t.minimum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),Dl=k("$ZodCheckSizeEquals",(e,t)=>{var r;ge.init(e,t),(r=e._zod.def).when??(r.when=Il),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let s=i>t.size;n.issues.push({origin:qo(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:n.value,inst:e,continue:!t.abort});};}),Zl=k("$ZodCheckMaxLength",(e,t)=>{var r;ge.init(e,t),(r=e._zod.def).when??(r.when=Ll),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?Or(o):i)<=t.maximum)return;let a=Wo(o);n.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),Bl=k("$ZodCheckMinLength",(e,t)=>{var r;ge.init(e,t),(r=e._zod.def).when??(r.when=Ll),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?Or(o):i)>=t.minimum)return;let a=Wo(o);n.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:true,input:o,inst:e,continue:!t.abort});};}),Ul=k("$ZodCheckLengthEquals",(e,t)=>{var r;ge.init(e,t),(r=e._zod.def).when??(r.when=Ll),e._zod.check=n=>{let o=n.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?Or(o):i;if(s===t.length)return;let a=Wo(o),c=s>t.length;n.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:n.value,inst:e,continue:!t.abort});};}),On=k("$ZodCheckStringFormat",(e,t)=>{var r,n;ge.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(n=e._zod).check??(n.check=()=>{});}),Gl=k("$ZodCheckRegex",(e,t)=>{On.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),Ql=k("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Rl),On.init(e,t);}),Vl=k("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=El),On.init(e,t);}),jl=k("$ZodCheckIncludes",(e,t)=>{ge.init(e,t);let r=yt(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort});};}),ql=k("$ZodCheckStartsWith",(e,t)=>{ge.init(e,t);let r=new RegExp(`^${yt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort});};}),Wl=k("$ZodCheckEndsWith",(e,t)=>{ge.init(e,t);let r=new RegExp(`.*${yt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort});};});function zs(e,t,r){e.issues.length&&t.issues.push(...it(r,e.issues));}var Hl=k("$ZodCheckProperty",(e,t)=>{ge.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>zs(o,r,t.property));zs(n,r,t.property);};}),Xl=k("$ZodCheckProperties",(e,t)=>{ge.init(e,t),Ho(e,Symbol.iterator,function*(){yield e;});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(s=>[s,t.shape[s]]));let o=n.value,i;for(let[s,a]of r){let c=a._zod.run({value:o[s],issues:[]},{});c instanceof Promise?(i??(i=[]),i.push(c.then(u=>zs(u,n,s)))):zs(c,n,s);}if(i)return Promise.all(i).then(()=>{})};}),Kl=k("$ZodCheckMimeType",(e,t)=>{ge.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort});};}),Yl=k("$ZodCheckOverwrite",(e,t)=>{ge.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var Dr=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r;}indented(t){this.indent+=1;try{t(this);}finally{this.indent-=1;}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
3
|
+
`).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s);}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
4
|
+
${r.join(`
|
|
5
|
+
`)}
|
|
6
|
+
};`)(...Object.values(this.closed))}};var Jl={major:4,minor:6,patch:7};var q=k("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Jl;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let s of i._zod.onattach)s(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let i=(a,c,u)=>{if(a.memo)return a;let l=He(a),f;for(let p of c){if(p._zod.def.when){if(Du(a)||!p._zod.def.when(a))continue}else if(l)continue;let m=a.issues.length,h=p._zod.check(a);if(h instanceof Promise&&u?.async===false)throw new at;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,a.issues.length!==m&&(jo(a.issues,m,e),l||(l=He(a,m)));});else {if(a.issues.length===m)continue;jo(a.issues,m,e),l||(l=He(a,m));}}return f?f.then(()=>a):a},s=(a,c,u)=>{if(He(a))return a.aborted=true,a;let l=i(c,o,u);if(l instanceof Promise){if(u.async===false)throw new at;return l.then(f=>e._zod.parse(f,u))}return e._zod.parse(l,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:true});return l instanceof Promise?l.then(f=>s(f,a,c)):s(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===false)throw new at;return u.then(l=>i(l,o,c))}return i(u,o,c)};}},{get"~standard"(){return Ho(this,"~standard",Bs(this))},set"~standard"(e){sr(this,"~standard",e);}}),Kg=(e,t)=>e.issues.length?{issues:e.issues.map(r=>st(r,t,Ae()))}:{value:e.value};async function y3(e,t){let r={async:true};return Kg(await e._zod.run({value:t,issues:[]},r),r)}function Bs(e){return {validate:t=>{let r={async:false};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return Kg(n,r)}catch{}return y3(e,t)},vendor:"zod",version:1}}var Zr=k("$ZodString",(e,t)=>{q.init(e,t),e._zod.pattern=t.pattern??Sl,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),ue=k("$ZodStringFormat",(e,t)=>{On.init(e,t),Zr.init(e,t);}),tf=k("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=sl),ue.init(e,t);}),rf=k("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Fr(n));}else t.pattern??(t.pattern=Fr());ue.init(e,t);}),nf=k("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=al),ue.init(e,t);}),of=1,oi=2;function sf(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return false}}function Us(e,t){return !("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?sf(e)||oi:Yg(e,t)}function Yg(e,t){if(!t.normalize&&t.protocol?.source===ei.source&&!/^https?:\/\//i.test(e))return of;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??oi}return new URL(e)}catch{return oi}}var _3=/[\t\n\r]/g;function ii(e){return e.replace(_3,"")}function Gs(e,t){return t.lastIndex=0,t.test(e.hostname)}function Qs(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var af=k("$ZodURL",(e,t)=>{ue.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=Us(n,t);if(o===of){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===oi){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=ii(n);return}t.hostname&&!Gs(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!Qs(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:ii(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),cf=k("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=cl()),ue.init(e,t);}),uf=k("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?nl:ol(t.length)),ue.init(e,t);}),lf=k("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Yu),ue.init(e,t);}),ff=k("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ju),ue.init(e,t);}),mf=k("$ZodULID",(e,t)=>{t.pattern??(t.pattern=el),ue.init(e,t);}),pf=k("$ZodXID",(e,t)=>{t.pattern??(t.pattern=tl),ue.init(e,t);}),df=k("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=rl),ue.init(e,t);}),hf=k("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=wl(t)),ue.init(e,t);}),gf=k("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=xl),ue.init(e,t);}),yf=k("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=$l(t)),ue.init(e,t);}),_f=k("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=il),ue.init(e,t);}),bf=k("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=ul),ue.init(e,t);}),b3=/^[0-9a-fA-F:.]+$/;function si(e){return b3.test(e)?sf(`http://[${e}]`):false}var xf=k("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=ll),ue.init(e,t),e._zod.check=r=>{si(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});};}),$f=k("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=fl(t.delimiter)),ue.init(e,t);}),wf=k("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=ml),ue.init(e,t);});function Vs(e){let t=e.split("/");if(t.length!==2)return false;let[r,n]=t;if(!n)return false;let o=Number(n);return `${o}`!==n||o<0||o>128?false:si(r)}var Sf=k("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=pl),ue.init(e,t),e._zod.check=r=>{Vs(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});};});function ai(e){if(e==="")return true;if(/\s/.test(e)||e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var js=/^[0-9a-zA-Z+/]*={0,2}$/,vf=k("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=js),ue.init(e,t),e._zod.check=r=>{ai(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};}),ci=/^[A-Za-z0-9_-]*$/;function qs(e){if(!ci.test(e))return false;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ai(r)}var Cf=k("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ci),ue.init(e,t),e._zod.check=r=>{qs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Pf=k("$ZodE164",(e,t)=>{t.pattern??(t.pattern=_l),ue.init(e,t);}),x3=/[- ]/g;function $3(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o;}return n%10===0}function Ws(e){return Ms.test(e)?$3(e.replace(x3,"")):false}var kf=k("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=Ms),ue.init(e,t),e._zod.check=r=>{Ws(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort});};});function w3(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97;}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97;}return t===1}function Hs(e){return Is.test(e)?w3(e):false}var Af=k("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Is),ue.init(e,t),e._zod.check=r=>{Hs(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort});};});function Xs(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[n]=r;if(!n)return !1;let o=JSON.parse(atob(n));return !("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return false}}var Rf=k("$ZodJWT",(e,t)=>{ue.init(e,t),e._zod.check=r=>{Xs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Ef=k("$ZodCustomStringFormat",(e,t)=>{ue.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),Ks=k("$ZodNumber",(e,t)=>{q.init(e,t),e._zod.pattern=qt,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r};}),Mf=k("$ZodNumberFormat",(e,t)=>{Tl.init(e,t),Ks.init(e,t);}),ui=k("$ZodBoolean",(e,t)=>{q.init(e,t),e._zod.pattern=Pl,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r};}),Ys=k("$ZodBigInt",(e,t)=>{q.init(e,t),e._zod.pattern=Cl,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),If=k("$ZodBigIntFormat",(e,t)=>{Nl.init(e,t),Ys.init(e,t);}),Lf=k("$ZodSymbol",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r};}),zf=k("$ZodUndefined",(e,t)=>{q.init(e,t),e._zod.pattern=Al,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r};}),Tf=k("$ZodNull",(e,t)=>{q.init(e,t),e._zod.pattern=kl,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r};}),Nf=k("$ZodAny",(e,t)=>{q.init(e,t),e._zod.parse=r=>r;}),Of=k("$ZodUnknown",(e,t)=>{q.init(e,t),e._zod.parse=r=>r;}),Ff=k("$ZodNever",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),Df=k("$ZodVoid",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r};}),Zf=k("$ZodDate",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r};});function Bf(e,t){let r=Mn(e._zod.def.checks);if(!r.length)return;let n=Math.min(...r.map(i=>i[0])),o=e._zod.parse;e._zod.parse=(i,s)=>{let a=t(i.value);if(a>n&&!s?.skipChecks&&s?.direction!=="backward"){for(let[c,u]of Mn(e._zod.def.checks))if(a>c&&u._zod.def.when(i)){let l=i.issues.length;return u._zod.check(i),i.issues[l].continue=false,jo(i.issues,l,e),i}}return o(i,s)};}var S3=e=>Array.isArray(e)?e.length:-1,v3=e=>e instanceof Map?e.size:-1,C3=e=>e instanceof Set?e.size:-1;function Ng(e,t,r){e.issues.length&&t.issues.push(...it(r,e.issues)),t.value[r]=e.value;}var Uf=k("$ZodArray",(e,t)=>{q.init(e,t);let r=Be.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let s=[],a=o?.abortEarly;for(let c=0;c<i.length;c++){let u=i[c],l=t.element._zod.run({value:u,issues:[]},o);if(l instanceof Promise)s.push(l.then(f=>Ng(f,n,c)));else if(Ng(l,n,c),a&&l.issues.length!==0&&He(l))break}return s.length?Promise.all(s).then(()=>n):n},Bf(e,S3);});function Zs(e,t,r,n,o,i){let s=r in n,a=i==="optional";if(!(!s&&a&&o==="optional")){if(e.issues.length){if(o!==void 0&&a&&!s)return;t.issues.push(...it(r,e.issues));}if(!s&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(s||o==="defaulted"&&!a)&&(t.value[r]=void 0):t.value[r]=e.value;}}var P3=[];function Jg(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:P3,o=n.length?[...t,...n]:t;for(let s of o)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);let i=Fu(e.shape);return {...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function e1(e,t,r,n,o,i,s){let a=[],c=o.keySet,u=o.catchall._zod,l=u.def.type,f=u.optin,p=u.optout,m=0;for(let h in t){if(s&&r.issues.length!==m){if(He(r,m))break;m=r.issues.length;}if(c.has(h))continue;if(h==="__proto__"){l==="never"&&a.push(h);continue}if(l==="never"){a.push(h);continue}let d=u.run({value:t[h],issues:[]},n);d instanceof Promise?e.push(d.then(g=>Zs(g,r,h,t,f,p))):Zs(d,r,h,t,f,p);}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i,continue:true}),e.length?Promise.all(e).then(()=>r):r}var t1=k("$ZodObject",(e,t)=>{q.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let u=()=>{let l={...n};return Object.defineProperty(t,"shape",{value:l}),u.raw=l,l};u.raw=n,Object.defineProperty(t,"shape",{get:u});}let o=Rn(()=>Jg(t));X(e,"propValues",u=>{let l=u.def.shape,f={};for(let p in l){let m=l[p]._zod;if(m.values){Object.prototype.hasOwnProperty.call(f,p)||Qe(f,p,new Set);for(let h of m.values)f[p].add(h);m.optin!==void 0&&f[p].add(void 0);}}return f});let i=Nr,s=t.catchall,a,c=Be.memoizer;c?.attach(e),e._zod.parse=(u,l)=>{a??(a=o.value);let f=u.value;if(!i(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value=c?c.alloc(e,u,{},l):{};let p=[],m=a.shape,h=l?.abortEarly,d=u.issues.length;for(let g of a.allKeys){if(h&&u.issues.length!==d){if(He(u,d))break;d=u.issues.length;}if(g==="__proto__")continue;let _=m[g],y=_._zod.optin,b=_._zod.optout,S=_._zod.run({value:f[g],issues:[]},l);S instanceof Promise?p.push(S.then(v=>Zs(v,u,g,f,y,b))):Zs(S,u,g,f,y,b);}return s?e1(p,f,u,l,o.value,e,h===true):p.length?Promise.all(p).then(()=>u):u};}),Gf=k("$ZodObjectJIT",(e,t)=>{t1.init(e,t);let r=e._zod.parse,n=Rn(()=>Jg(t)),o=Be.memoizer,i=m=>{let h=n.value,d=h.symbolKeys,g=new Dr(["payload","ctx"],{shape:m,inst:e,memo:o,syms:d}),_=v=>`shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`,y=(v,w)=>`
|
|
7
|
+
let ${v}_ab = false;
|
|
8
|
+
for (let i = 0; i < ${v}.issues.length; i++) {
|
|
9
|
+
const iss = ${v}.issues[i];
|
|
10
|
+
iss.path = iss.path ? [${w}, ...iss.path] : [${w}];
|
|
11
|
+
payload.issues.push(iss);
|
|
12
|
+
if (iss.continue !== true) ${v}_ab = true;
|
|
13
|
+
}
|
|
14
|
+
if (${v}_ab && ctx && ctx.abortEarly) {
|
|
15
|
+
payload.value = newResult;
|
|
16
|
+
return payload;
|
|
17
|
+
}`;g.write("const input = payload.value;");let b=Object.create(null),S=0;for(let v of h.allKeys)b[v]=`key_${S++}`;g.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let v of h.allKeys){if(v==="__proto__")continue;let w=b[v],x=typeof v=="symbol"?`syms[${d.indexOf(v)}]`:We(v),P=`${x} in input`,C=m[v],E=C?._zod?.optin,I=E!==void 0,L=C?._zod?.optout==="optional";if(g.write(`const ${w} = ${_(x)};`),I&&L){let z=E==="optional"?`${w}_present`:`${w}.value !== undefined || ${w}_present`;g.write(`
|
|
18
|
+
const ${w}_present = ${P};
|
|
19
|
+
if (!${w}.issues.length || ${w}_present) {
|
|
20
|
+
if (${w}.issues.length) {${y(w,x)}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (${z}) {
|
|
24
|
+
newResult[${x}] = ${w}.value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
`);}else I?(g.write(`
|
|
29
|
+
if (${w}.issues.length) {${y(w,x)}
|
|
30
|
+
}
|
|
31
|
+
`),E==="defaulted"?g.write(`newResult[${x}] = ${w}.value;`):g.write(`
|
|
32
|
+
if (${w}.value !== undefined || ${P}) {
|
|
33
|
+
newResult[${x}] = ${w}.value;
|
|
34
|
+
}
|
|
35
|
+
`)):g.write(`
|
|
36
|
+
const ${w}_present = ${P};
|
|
37
|
+
if (${w}.issues.length) {${y(w,x)}
|
|
38
|
+
}
|
|
39
|
+
if (!${w}_present && !${w}.issues.length) {
|
|
40
|
+
payload.issues.push({
|
|
41
|
+
code: "invalid_type",
|
|
42
|
+
expected: "nonoptional",
|
|
43
|
+
input: undefined,
|
|
44
|
+
path: [${x}]
|
|
45
|
+
});
|
|
46
|
+
if (ctx && ctx.abortEarly) {
|
|
47
|
+
payload.value = newResult;
|
|
48
|
+
return payload;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (${w}_present) {
|
|
53
|
+
newResult[${x}] = ${w}.value;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
`);}return g.write("payload.value = newResult;"),g.write("return payload;"),g.compile()},s,a=Nr,c=!Be.jitless,l=c&&Nu.value,f=t.catchall,p;e._zod.parse=(m,h)=>{p??(p=n.value);let d=m.value;return a(d)?c&&l&&h?.async===false&&h.jitless!==true?(s||(s=i(t.shape)),m=s(m,h),f?e1([],d,m,h,p,e,h?.abortEarly===true):m):r(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),m)};});function Og(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!He(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>st(s,n,Ae())))}),t)}var li=k("$ZodUnion",(e,t)=>{q.init(e,t),X(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),X(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),X(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),X(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>jt(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=false,s=[];for(let a of t.options){let c=a._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=true;else {if(c.issues.length===0)return c;s.push(c);}}return i?Promise.all(s).then(a=>Og(a,n,e,o)):Og(s,n,e,o)};});function Fg(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>st(s,n,Ae())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:false,matches:o}),t)}var Qf=k("$ZodXor",(e,t)=>{li.init(e,t),t.inclusive=false;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=false,s=[];for(let a of t.options){let c=a._zod.run({value:n.value,issues:[]},o);c instanceof Promise?(s.push(c),i=true):s.push(c);}return i?Promise.all(s).then(a=>Fg(a,n,e,o)):Fg(s,n,e,o)};});function Vf(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=r1(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function r1(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null);}else t.set(o,r);}return t}var jf=k("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=false,li.init(e,t);let r=e._zod.parse;X(e,"propValues",o=>{let i={},s=0;for(let a of o.def.options){let c=a._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(a)}"`);c[o.def.discriminator]?.has(void 0)&&s++;for(let[u,l]of Object.entries(c)){Object.prototype.hasOwnProperty.call(i,u)||Qe(i,u,new Set);for(let f of l)i[u].add(f);}}return !o.def.unionFallback&&s>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let s=En(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=Rn(()=>r1(t));e._zod.parse=(o,i)=>{let s=o.value;if(!Nr(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let a=s?.[t.discriminator],c=n.value.get(a);return c&&(a!==void 0||i.direction!=="backward")?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(u=>n.value.get(u)!==null),input:s,path:[t.discriminator],inst:e}),o)};}),qf=k("$ZodIntersection",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Dg(r,c,u)):Dg(r,i,s)};});function Fn(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(gt(e)&>(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let s=Fn(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data;}return {valid:true,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=Fn(o,i);if(!s.valid)return {valid:false,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function Dg(e,t,r){let n=new Map,o,i=new Map,s=(u,l)=>{let f;if(u.code==="unrecognized_keys"&&!u.path?.length)o??(o=u),f=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&u.path?.length===1){let p=String(u.path[0]);i.has(p)||i.set(p,u),f=[p];}else return false;for(let p of f)n.has(p)||n.set(p,{}),n.get(p)[l]=true;return true};for(let u of t.issues)s(u,"l")||e.issues.push(u);for(let u of r.issues)s(u,"r")||e.issues.push(u);let a=[...n].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){let u=o?a.filter(l=>o.keys.includes(l)):[];u.length&&e.issues.push({...o,keys:u});for(let l of a)!u.includes(l)&&i.has(l)&&e.issues.push(i.get(l));}let c=Fn(t.value,r.value);if(!c.valid){if(He(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Js=k("$ZodTuple",(e,t)=>{q.init(e,t);let r=t.items,n=Be.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let s=o.value;if(!Array.isArray(s))return o.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let a=[],c=Zg(r,"optin"),u=Zg(r,"optout");if(!t.rest){if(s.length<c)return o.issues.push({code:"too_small",minimum:c,inclusive:true,input:s,inst:e,origin:"array"}),o;s.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:true,input:s,inst:e,origin:"array"});}let l=new Array(r.length),f=t.rest?i?.abortEarly:void 0,p=false;for(let m=0;m<r.length;m++){let h=r[m]._zod.run({value:s[m],issues:[]},i);h instanceof Promise?a.push(h.then(d=>{l[m]=d;})):(l[m]=h,f&&!p&&h.issues.length&&(p=He(h)));}if(t.rest&&!p){let m=r.length-1,h=s.slice(r.length),d=o.issues.length;for(let g of h){if(f&&o.issues.length!==d){if(He(o,d))break;d=o.issues.length;}m++;let _=t.rest._zod.run({value:g,issues:[]},i);_ instanceof Promise?a.push(_.then(y=>Bg(y,o,m))):Bg(_,o,m);}}return a.length?Promise.all(a).then(()=>Ug(l,o,r,s,u)):Ug(l,o,r,s,u)};});function Zg(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Bg(e,t,r){e.issues.length&&t.issues.push(...it(r,e.issues)),t.value[r]=e.value;}function Ug(e,t,r,n,o){for(let i=0;i<r.length;i++){let s=e[i],a=i<n.length;if(!a&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(s.issues.length){if(!a&&i>=o){t.value.length=i;break}t.issues.push(...it(i,s.issues));}t.value[i]=s.value;}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var Wf=k("$ZodRecord",(e,t)=>{q.init(e,t);let r=Be.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!gt(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let s=[],a=t.keyType._zod.values;if(a&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let c=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){if(c.add(typeof l=="number"?l.toString():l),l==="__proto__")continue;let f=t.keyType._zod.run({value:l,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(f.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(h=>st(h,o,Ae())),input:l,path:[l],inst:e});continue}let p=f.value;if(p==="__proto__")continue;let m=t.valueType._zod.run({value:i[l],issues:[]},o);m instanceof Promise?s.push(m.then(h=>{h.issues.length&&n.issues.push(...it(l,h.issues)),n.value[p]=h.value;})):(m.issues.length&&n.issues.push(...it(l,m.issues)),n.value[p]=m.value);}let u;for(let l in i)if(!c.has(l))if(t.mode==="loose"){if(l==="__proto__")continue;n.value[l]=i[l];}else u=u??[],u.push(l);u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u,continue:true});}else {n.value=r?r.alloc(e,n,{},o):{};let c;for(let u of Reflect.ownKeys(i)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&qt.test(u)&&l.issues.length){let h=t.keyType._zod.run({value:Number(u),issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(l=h);}if(l.issues.length){t.mode==="loose"?n.value[u]=i[u]:a?(c=c??[],c.push(u)):n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(h=>st(h,o,Ae())),input:u,path:[u],inst:e});continue}let p=l.value;if(p==="__proto__")continue;let m=t.valueType._zod.run({value:i[u],issues:[]},o);m instanceof Promise?s.push(m.then(h=>{h.issues.length&&n.issues.push(...it(u,h.issues)),n.value[p]=h.value;})):(m.issues.length&&n.issues.push(...it(u,m.issues)),n.value[p]=m.value);}c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:true});}return s.length?Promise.all(s).then(()=>n):n};}),Hf=k("$ZodMap",(e,t)=>{q.init(e,t);let r=Be.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let s=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let a=o?.abortEarly,c=n.issues.length;for(let[u,l]of i){if(a&&n.issues.length!==c){if(He(n,c))break;c=n.issues.length;}let f=t.keyType._zod.run({value:u,issues:[]},o),p=t.valueType._zod.run({value:l,issues:[]},o);f instanceof Promise||p instanceof Promise?s.push(Promise.all([f,p]).then(([m,h])=>{Gg(m,h,n,u,i,e,o);})):Gg(f,p,n,u,i,e,o);}return s.length?Promise.all(s).then(()=>n):n},Bf(e,v3);});function Gg(e,t,r,n,o,i,s){e.issues.length&&(Go.has(typeof n)?r.issues.push(...it(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(a=>st(a,s,Ae()))})),t.issues.length&&(Go.has(typeof n)?r.issues.push(...it(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(a=>st(a,s,Ae()))})),r.value.set(e.value,t.value);}var Xf=k("$ZodSet",(e,t)=>{q.init(e,t);let r=Be.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let s=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let a=o?.abortEarly,c=n.issues.length;for(let u of i){if(a&&n.issues.length!==c){if(He(n,c))break;c=n.issues.length;}let l=t.valueType._zod.run({value:u,issues:[]},o);l instanceof Promise?s.push(l.then(f=>Qg(f,n))):Qg(l,n);}return s.length?Promise.all(s).then(()=>n):n},Bf(e,C3);});function Qg(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var Kf=k("$ZodEnum",(e,t)=>{q.init(e,t);let r=kn(t.entries),n=new Set(r);e._zod.values=n,X(e,"pattern",o=>{let i=kn(o.def.entries).filter(s=>Go.has(typeof s));return new RegExp(i.length?`^(${i.map(s=>yt(s.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o};}),Yf=k("$ZodLiteral",(e,t)=>{q.init(e,t);let r=new Set(t.values);e._zod.values=r,X(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?yt(i):i?yt(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n};}),Jf=k("$ZodFile",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r};}),em=k("$ZodTransform",(e,t)=>{q.init(e,t),e._zod.optin="optional",Be.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ar(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return (o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new at;return r.value=o,r};});function Vg(e,t){return e.value=t.issues.length?void 0:t.value,e}var ea=k("$ZodOptional",(e,t)=>{q.init(e,t),X(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",X(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),X(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${jt(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Vg(r,i)):Vg(r,o)}return t.innerType._zod.run(r,n)};}),tm=k("$ZodExactOptional",(e,t)=>{ea.init(e,t),X(e,"values",r=>r.def.innerType._zod.values),X(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n);}),rm=k("$ZodNullable",(e,t)=>{q.init(e,t),X(e,"optin",r=>r.def.innerType._zod.optin),X(e,"optout",r=>r.def.innerType._zod.optout),X(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${jt(n.source)}|null)$`):void 0}),X(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n);}),nm=k("$ZodDefault",(e,t)=>{q.init(e,t),e._zod.optin="defaulted",X(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>jg(i,t)):jg(o,t)};});function jg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var om=k("$ZodPrefault",(e,t)=>{q.init(e,t),e._zod.optin="defaulted",X(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n));}),im=k("$ZodNonOptional",(e,t)=>{q.init(e,t),X(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>qg(i,e)):qg(o,e)};});function qg(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var sm=k("$ZodSuccess",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ar("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)};});function Wg(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>st(o,n,Ae()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=true),e)}var am=k("$ZodCatch",(e,t)=>{q.init(e,t),X(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),X(e,"optout",r=>r.def.innerType._zod.optout),X(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>Wg(r,i,t,n)):Wg(r,o,t,n)};}),cm=k("$ZodNaN",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),ta=k("$ZodPipe",(e,t)=>{q.init(e,t),X(e,"values",r=>r.def.in._zod.values),X(e,"optin",r=>r.def.in._zod.optin),X(e,"optout",r=>r.def.out._zod.optout),X(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Os(s,t.in,n)):Os(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>Os(i,t.out,n)):Os(o,t.out,n)};});function Os(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var fi=k("$ZodCodec",(e,t)=>{q.init(e,t),X(e,"values",r=>r.def.in._zod.values),X(e,"optin",r=>r.def.in._zod.optin),X(e,"optout",r=>r.def.out._zod.optout),X(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(s=>Fs(s,t,n)):Fs(i,t,n)}else {let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>Fs(s,t,n)):Fs(i,t,n)}};});function Fs(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>Ds(e,i,t.out,r)):Ds(e,o,t.out,r)}else {let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>Ds(e,i,t.in,r)):Ds(e,o,t.in,r)}}function Ds(e,t,r,n){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},n)}var um=k("$ZodPreprocess",(e,t)=>{ta.init(e,t);}),lm=k("$ZodReadonly",(e,t)=>{q.init(e,t),X(e,"propValues",r=>r.def.innerType._zod.propValues),X(e,"values",r=>r.def.innerType._zod.values),X(e,"optin",r=>r.def.innerType?._zod?.optin),X(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(Hg):Hg(o)};});function Hg(e){return e.memo||(e.value=Object.freeze(e.value)),e}function k3(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let a of t.checks??[]){let c=a._zod.def;c.pattern&&(r=c.pattern),n||(n=!!c.format?.includes("int"));let u=c.minimum??c.length,l=c.maximum??c.length;u!==void 0&&(o===void 0||u>o)&&(o=u),l!==void 0&&(i===void 0||l<i)&&(i=l);}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return "(?!)";if(o!==void 0||i!==void 0)return vl({minimum:o,maximum:i}).source;let s=e._zod.pattern;return (n&&s===qt?ti:s)?.source}function ef(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=ef(n);return r&&o&&i&&i!==o?r.replace(jt(o),()=>jt(i)):r}if(t.options){let o=t.options.map(ef);if(o.every(Boolean))return `^(${o.map(i=>jt(i)).join("|")})$`}return k3(e)}var fm=k("$ZodTemplateLiteral",(e,t)=>{q.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=ef(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(jt(o));}else if(n===null||Ou.has(typeof n))r.push(yt(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n);}),mm=k("$ZodFunction",(e,t)=>(q.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?$s(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?$s(e._def.output,i):i},"_zod",{value:e._zod,enumerable:false})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await ws(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await ws(e._def.output,i):i},"_zod",{value:e._zod,enumerable:false})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new Js({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),pm=k("$ZodPromise",(e,t)=>{q.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n));}),mi=k("$ZodLazy",(e,t)=>{q.init(e,t),zu(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),X(e,"pattern",r=>r.innerType?._zod?.pattern),X(e,"propValues",r=>r.innerType?._zod?.propValues),X(e,"optin",r=>r.innerType?._zod?.optin??void 0),X(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n);}),dm=k("$ZodCustom",(e,t)=>{ge.init(e,t),q.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>Xg(i,r,n,e));Xg(o,r,n,e);};});function Xg(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(In(o));}}var ia=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError";}},gm="~memo",o1=[];function i1(e){return e!==null&&typeof e=="object"}function hm(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var s1=new WeakMap,Dn=0,oa=1,pi=2;function di(e,t,r){let n=s1.get(e);if(n!==void 0)return n?pi:Dn;if(t.has(e))return pi;t.add(e);let o=Dn,i=l=>{if(o!==pi&&l?._zod){let f=di(l,t,r);f>o&&(o=f);}},s=(l,f)=>{let p=Dn;for(let m of Reflect.ownKeys(l)){let h=Object.getOwnPropertyDescriptor(l,m);if(!h.enumerable)continue;let d=h.get?oa:h.value?._zod?di(h.value,t,r):Dn;d>p&&(p=d);}return p},a=l=>{l>o&&(o=l);},c=e._zod.def,u=c.type;switch(u){case "object":{let l=En(c);a(l?s(l):oa),i(c.catchall);break}case "array":i(c.element);break;case "tuple":for(let l of c.items)i(l);i(c.rest);break;case "record":case "map":i(c.keyType),i(c.valueType);break;case "set":i(c.valueType);break;case "union":for(let l of c.options)i(l);break;case "intersection":i(c.left),i(c.right);break;case "optional":case "nullable":case "default":case "prefault":case "catch":case "readonly":case "nonoptional":case "promise":case "success":i(c.innerType);break;case "pipe":i(c.in),i(c.out);break;case "function":i(c.input),i(c.output);break;case "lazy":{let l=c._cachedInner??(r?e._zod.innerType:void 0);a(l?di(l,t,false):oa);break}case "template_literal":case "string":case "number":case "int":case "boolean":case "bigint":case "symbol":case "undefined":case "null":case "void":case "never":case "any":case "unknown":case "date":case "nan":case "enum":case "literal":case "file":case "transform":case "custom":break;default:for(let l in c){let f=Object.getOwnPropertyDescriptor(c,l);if(!f||f.get)continue;let p=f.value;if(!(!p||typeof p!="object")){if(p._zod)i(p);else if(Array.isArray(p))for(let m of p)i(m);}}}return t.delete(e),A3(e,o)}function A3(e,t){return t!==oa&&s1.set(e,t===pi),t}function sa(e){return di(e,new Set,true)!==Dn}function R3(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var ra,na=[],E3={alloc(e,t,r){let n=ra;if(!n)return r;ra=void 0;let o={value:r,issues:null};return n.set(t.value,o),na.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&aa(i,o.value))throw new ia;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n);});},attach(e){var t;let r,n=false,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let s=e._zod.parse,a=(c,u)=>{if(r===void 0){let _=di(e,new Set,false);if(_===Dn)return e._zod.parse=s,e._zod.run===a&&(e._zod.run=s),s(c,u);_===pi||n?r=true:n=true;}let l=c.value;if(!i1(l))return s(c,u);let f=u[gm];f||(f={buckets:new WeakMap,backEdges:void 0},u[gm]=f);let p;o===u?p=i:(p=R3(f,e),o=u,i=p);let m=p.get(l);if(m)return c.value=m.value,m.issues?m.issues.length&&c.issues.push(...hm(m.issues)):(c.memo=true,f.backEdges??(f.backEdges=new WeakSet),f.backEdges.add(m.value)),c;ra=p;let h=na.length,d=s(c,u);ra=void 0;let g=na.length>h?na.pop():void 0;return d instanceof Promise?d.then(_=>(g&&(g.issues=_.issues.length?hm(_.issues):o1),_)):(g&&(g.issues=d.issues.length?hm(d.issues):o1),d)};e._zod.parse=a,e._zod.run===s&&(e._zod.run=a);});}};function hi(){return E3}function aa(e,t){let r=e[gm]?.backEdges;return r!==void 0&&i1(t)&&r.has(t)}var ca={};var a1,ym=Symbol("ZodOutput"),_m=Symbol("ZodInput"),ua=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function la(){return new ua}(a1=globalThis).__zod_globalRegistry??(a1.__zod_globalRegistry=la());var Ve=globalThis.__zod_globalRegistry;var Xe=Symbol.for("zod.compile.invalid"),c1=Symbol.for("zod.compile.fallback"),St=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError";}},te=class extends Error{constructor(t,r=true){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r;}};function I3(e,t){try{return ma(e,{assertOnly:!0})}catch{return t}}function wm(e,t){try{let r=ma(e),n=fa(e,r);return n._zod.bag.validator=I3(e,r),n}catch(r){if(t?.strict)throw r;return e}}function fa(e,t){if(sa(e))throw new te("a schema whose subtree contains a reference cycle");let r=ce(e),n=e._zod.run,o=n.__originalRun??n,i=(s,a)=>{if(a?.async||a?.direction==="backward"||a?.skipChecks||a?.[c1]||a&&aa(a,s.value))return o(s,a);let c=t(s.value);return c!==Xe?(s.value=c,s):(a&&(a[c1]=true),o(s,a))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||L3(r,e,t),r}function L3(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(s,a)=>{let c=r(s);return c!==Xe?{success:true,data:c}:i(s,a)};}if(typeof o.parse=="function"){let i=o.parse;n.parse=(s,a)=>{let c=r(s);return c!==Xe?c:i(s,a)};}}function ma(e,t){let r=true;try{r=sa(e);}catch{}if(r)throw new te("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:true},o=new Dr(["input"]),i=Ce(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let s=["INVALID",...n.constants.keys()],a=[Xe,...n.constants.values()],c=o.content.join(`
|
|
57
|
+
`),u=t?.debug?s.length>0?`// Constants: ${s.join(", ")}
|
|
58
|
+
${c}`:c:"",l=Function,f=`return (input) => {
|
|
59
|
+
${c}
|
|
60
|
+
}`,p;try{p=new l(...s,f)(...a);}catch(m){throw new te(`this schema (generated code failed to evaluate: ${m.message})`)}return t?.debug&&(p.code=u),p.definite=n.definite,p}function V(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Ur(e,t){return e.definite=false,V(e,t)}function U(e){return `v${e.varCounter++}`}function z3(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return Xe;let n=r;return n.issues.length===0?n.value:Xe}function je(e,t,r,n,o=true){let i=e.content.length,s=t.constants.size,a=t.constantCounter,c=t.varCounter;try{return Ce(e,t,r,n,o)}catch(u){if(!(u instanceof te)||!u.islandable)throw u;if(e.content.length=i,t.constants.size>s){let l=Array.from(t.constants.keys()).slice(s);for(let f of l)t.constants.delete(f);}return t.constantCounter=a,t.varCounter=c,T3(e,t,r,n)}}function T3(e,t,r,n){t.definite=false;let o=V(t,r),i=V(t,z3),s=U(t);return e.write(`const ${s} = ${i}(${o}, ${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}var N3=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function O3(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let s of o){let a=s._zod.def;if(a.when&&!N3.has(a.check))throw new te('check with a custom "when" condition');switch(a.check){case "greater_than":F3(e,t,a,i);break;case "less_than":D3(e,t,a,i);break;case "multiple_of":Z3(e,t,a,i);break;case "number_format":d1(e,a,i);break;case "min_length":{let c=cr(a.minimum,"min_length"),u=bm(e,t,i,`${i}.length >= ${c} && ${i}.length < ${a.minimum*2}`);e.write(`if (${u} < ${c}) return INVALID;`);break}case "max_length":{let c=cr(a.maximum,"max_length"),u=bm(e,t,i,`${i}.length > ${c}`);e.write(`if (${u} > ${c}) return INVALID;`);break}case "length_equals":{let c=cr(a.length,"length_equals"),u=bm(e,t,i,`${i}.length >= ${c} && ${i}.length <= ${a.length*2}`);e.write(`if (${u} !== ${c}) return INVALID;`);break}case "min_size":e.write(`if (${i}.size < ${cr(a.minimum,"min_size")}) return INVALID;`);break;case "max_size":e.write(`if (${i}.size > ${cr(a.maximum,"max_size")}) return INVALID;`);break;case "size_equals":e.write(`if (${i}.size !== ${cr(a.size,"size_equals")}) return INVALID;`);break;case "string_format":i=h1(e,t,a,i);break;case "custom":i=j3(e,t,s,i);break;case "bigint_format":B3(e,a,i);break;case "mime_type":U3(e,t,a,i);break;case "property":Q3(e,t,a,i);break;case "properties":G3(e,t,a,i);break;case "overwrite":{let c=U(t);V3(e,t,s,i,c),i=c;break}default:throw new te(`check type ${a.check}`)}}return i}function bm(e,t,r,n){let o=V(t,Or),i=U(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function cr(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new te(`${t} bound of type ${typeof e}`);return `${e}`}function p1(e,t){if(typeof t=="bigint")return `${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new te("comparison check with NaN bound");return `${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new te("comparison check with Invalid Date bound");return V(e,t)}throw new te(`comparison check bound of type ${typeof t}`)}function F3(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${p1(t,r.value)}) return INVALID;`);}function D3(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${p1(t,r.value)}) return INVALID;`);}function Z3(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new te("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`);}else {let o=V(t,Bo);e.write(`if (${o}(${n}, ${cr(r.value,"multiple_of")}) !== 0) return INVALID;`);}}function d1(e,t,r){let n=t.format;switch(n){case "safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case "int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case "uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case "float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case "float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new te(`number format ${n}`)}}function B3(e,t,r){let n=t.format;if(n)switch(n){case "int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case "uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new te(`bigint format ${n}`)}}function U3(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=V(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`);}}function G3(e,t,r,n){if(r.when)throw new te('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let s=typeof i=="symbol"?V(t,i):We(i),a=U(t);e.write(`const ${a} = ${n}[${s}];`),je(e,t,o[i],a,false);}}function Q3(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;Ce(e,t,r.schema,o);}function V3(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new te("overwrite check without a transform function");if(Gr(i))throw new St("z.compile: async overwrite transforms are not supported");let s=V(t,i);e.write(`const ${o} = ${s}(${n});`);}function xm(){throw new at}function Sm(e){this.issues.push(e);}function j3(e,t,r,n){let o=r._zod.def;if(o.fn){if(Gr(o.fn))throw new St("z.compile: async .refine() predicates are not supported");let i=Ur(t,o.fn),s=V(t,xm),a=U(t);return e.write(`const ${a} = ${i}(${n});`),e.write(`if (${a} instanceof Promise) ${s}();`),e.write(`if (!${a}) return INVALID;`),n}if(r._zod.check){if(Gr(r._zod.check))throw new St("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,a=Ur(t,u=>{let l={value:u,issues:[],addIssue:Sm};return i(l)instanceof Promise&&xm(),l.issues.length===0?l.value:Xe}),c=U(t);return e.write(`const ${c} = ${a}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new te("custom check without a predicate or check function")}var q3=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function h1(e,t,r,n,o=true){let i=r.format;if(i==="base64"){let u=V(t,ai);return e.write(`if (!${u}(${n})) return INVALID;`),n}if(i==="base64url"){let u=V(t,qs);return e.write(`if (!${u}(${n})) return INVALID;`),n}if(i==="jwt"){let u=V(t,Xs),l=V(t,r.alg??null);return e.write(`if (!${u}(${n}, ${l})) return INVALID;`),n}if(i==="ipv6"){let u=V(t,si);return e.write(`if (!${u}(${n})) return INVALID;`),n}if(i==="cidrv6"){let u=V(t,Vs);return e.write(`if (!${u}(${n})) return INVALID;`),n}if(i==="credit_card"){let u=V(t,Ws);return e.write(`if (!${u}(${n})) return INVALID;`),n}if(i==="iban"){let u=V(t,Hs);return e.write(`if (!${u}(${n})) return INVALID;`),n}let s=r;if(i==="url"||i==="httpurl"||s.normalize||s.hostname!==void 0||s.protocol!==void 0){let u=V(t,Us),l=V(t,r),f=U(t),p=U(t);if(e.write(`const ${f} = ${n}.trim();`),e.write(`const ${p} = ${u}(${f}, ${l});`),e.write(`if (typeof ${p} === "number") return INVALID;`),s.hostname!==void 0){let d=V(t,Gs);e.write(`if (!${d}(${p}, ${l}.hostname)) return INVALID;`);}if(s.protocol!==void 0){let d=V(t,Qs);e.write(`if (!${d}(${p}, ${l}.protocol)) return INVALID;`);}if(!o)return null;let m=U(t),h=s.normalize?`${p}.href`:`${V(t,ii)}(${f})`;return e.write(`const ${m} = ${h};`),m}let a=r.fn;if(a){if(Gr(a))throw new te(`async string format ${i}`);let u=V(t,a);return e.write(`if (!${u}(${n})) return INVALID;`),n}if(q3.has(i)&&r.pattern){let u=V(t,r.pattern);return e.write(`${u}.lastIndex = 0;`),e.write(`if (!${u}.test(${n})) return INVALID;`),n}let c=r.format;switch(c){case "regex":throw new te("regex format without a pattern");case "lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case "uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case "includes":e.write(`if (!${n}.includes(${We(r.includes)})) return INVALID;`);break;case "starts_with":{let u=r.prefix;e.write(`if (${n}.slice(0, ${u.length}) !== ${We(u)}) return INVALID;`);break}case "ends_with":{let u=r.suffix;e.write(`if (${n}.slice(-${u.length}) !== ${We(u)}) return INVALID;`);break}default:throw new te(`string format ${c}`)}return n}function Ce(e,t,r,n,o=true){let i=r._zod.def,s=i.type;if(i.coerce)throw new te(`coercion (z.coerce.${s}())`);let a=o||!!i.checks?.length,c;switch(s){case "string":c=W3(e,t,r,n,a);break;case "number":c=H3(e,r,n);break;case "boolean":c=X3(e,n);break;case "bigint":c=K3(e,r,n);break;case "symbol":c=Y3(e,n);break;case "undefined":c=J3(e,n);break;case "null":c=e4(e,n);break;case "any":case "unknown":c=n;break;case "never":e.write("return INVALID;"),c=n;break;case "void":c=t4(e,n);break;case "nan":c=r4(e,n);break;case "date":c=n4(e,n);break;case "object":c=o4(e,t,r,n,a);break;case "optional":c=i4(e,t,r,n,a);break;case "nullable":c=c4(e,t,r,n,a);break;case "array":c=u4(e,t,r,n,a);break;case "literal":c=l4(e,t,r,n);break;case "enum":c=f4(e,t,r,n);break;case "readonly":{let u=l1(e,t,r,n),l=U(t);e.write(`const ${l} = Object.freeze(${u});`),c=l;break}case "success":l1(e,t,r,n),c="true";break;case "default":case "prefault":c=m4(e,t,r,n);break;case "nonoptional":c=p4(e,t,r,n);break;case "tuple":c=d4(e,t,r,n);break;case "union":c=h4(e,t,r,n);break;case "intersection":c=_4(e,t,r,n);break;case "record":c=b4(e,t,r,n);break;case "map":c=$4(e,t,r,n);break;case "set":c=w4(e,t,r,n);break;case "file":c=S4(e,n);break;case "template_literal":c=v4(e,t,r,n);break;case "lazy":c=C4(e,t,r,n);break;case "pipe":c=P4(e,t,r,n);break;case "custom":c=k4(e,t,r,n);break;case "transform":c=E4(e,t,r,n);break;case "catch":c=R4(e,t,r,n);break;default:throw new te(`schema type ${s}`)}return c===null?null:O3(e,t,r,c)}function W3(e,t,r,n,o=true){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:h1(e,t,i,n,o)}function H3(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&d1(e,{format:n.format},r),r}function X3(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function K3(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case "int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case "uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function Y3(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function J3(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function e4(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function t4(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function r4(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function n4(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function o4(e,t,r,n,o=true){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let s=i.shape,a=Object.keys(s),c=Object.getOwnPropertySymbols(s),u=c.length?[...a,...c]:a,l=y=>typeof y=="symbol"?V(t,y):We(y),f=y=>typeof y=="symbol"?`[${l(y)}]`:We(y),p=s;if(a.includes("__proto__"))throw new te('object shape key "__proto__"');let m=new Map;for(let y of u){let b=p[y],S=l(y),v=U(t);if(e.write(`const ${v} = ${n}[${S}];`),b._zod.optin!==void 0){let w=U(t);e.write(`let ${w} = (() => {`),e.indented(x=>{let P=je(x,t,b,v);x.write(`return ${P};`);}),e.write("})();"),b._zod.optout==="optional"?(e.write(`if (${w} === INVALID) {`),e.indented(x=>{x.write(`if (${S} in ${n}) return INVALID;`),x.write(`${w} = undefined;`);}),e.write("}")):e.write(`if (${w} === INVALID) return INVALID;`),m.set(y,w);}else {a4(b)&&e.write(`if (!(${S} in ${n})) return INVALID;`);let w=je(e,t,b,v,o);w!==null&&m.set(y,w);}}let h=i.catchall,d="none";if(h){let y=h._zod.def.type;if(y==="never"){let b=a.map(S=>`k !== ${We(S)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(S=>{S.write(`if (${b}) return INVALID;`);}),e.write("}");}else (y==="unknown"||y==="any")&&!h._zod.def.checks?.length?d="passthrough":d="schema";}let g=U(t),_=u.some(y=>u1(p[y])||$m(p[y]));if(!o){if(d==="schema"){let y=a.length>0?V(t,new Set(a)):null;e.write(`for (const k in ${n}) {`),e.indented(b=>{b.write('if (k === "__proto__") continue;'),y&&b.write(`if (${y}.has(k)) continue;`);let S=U(t);b.write(`const ${S} = ${n}[k];`),je(b,t,h,S,false);}),e.write("}");}return null}if(_){e.write(`const ${g} = {};`);for(let y of u){let b=l(y),S=m.get(y);$m(p[y])?e.write(`if (${b} in ${n}) ${g}[${b}] = ${S};`):u1(p[y])?e.write(`if (${S} !== undefined || ${b} in ${n}) ${g}[${b}] = ${S};`):e.write(`${g}[${b}] = ${S};`);}}else {let y=u.map(b=>`${f(b)}: ${m.get(b)}`).join(", ");e.write(`const ${g} = { ${y} };`);}if(d!=="none"){let y=a.length>0?V(t,new Set(a)):null;e.write(`for (const k in ${n}) {`),e.indented(b=>{if(b.write('if (k === "__proto__") continue;'),y&&b.write(`if (${y}.has(k)) continue;`),d==="passthrough")b.write(`${g}[k] = ${n}[k];`);else {let S=U(t);b.write(`const ${S} = ${n}[k];`);let v=je(b,t,h,S);b.write(`${g}[k] = ${v};`);}}),e.write("}");}return g}function i4(e,t,r,n,o=true){let i=r._zod.def;if(s4(r))return Ce(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let a=U(t),c=U(t);return e.write(`let ${a};`),e.write(`if (${n} === undefined) {`),e.indented(u=>{u.write(`const ${c} = (() => {`),u.indented(l=>{let f=Ce(l,t,i.innerType,n);l.write(`return ${f};`);}),u.write("})();"),u.write(`if (${c} !== INVALID) ${a} = ${c};`);}),e.write("} else {"),e.indented(u=>{let l=Ce(u,t,i.innerType,n);u.write(`${a} = ${l};`);}),e.write("}"),a}let s=o?U(t):null;return s&&e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(a=>{let c=Ce(a,t,i.innerType,n,o);s&&c!==null&&a.write(`${s} = ${c};`);}),e.write("}"),s}function s4(e){return e._zod.traits?.has("$ZodExactOptional")===true}function a4(e){return e._zod.optin===void 0&&Br(e)}function Br(e){if(e._zod.def.coerce)return true;let t=e._zod.def;switch(t.type){case "any":case "unknown":case "undefined":case "void":case "default":case "prefault":case "transform":case "custom":case "lazy":return true;case "string":case "number":case "boolean":case "bigint":case "symbol":case "null":case "never":case "nan":case "date":case "object":case "array":case "tuple":case "record":case "map":case "set":case "file":case "template_literal":return false;case "nonoptional":return t.innerType?Br(t.innerType):false;case "literal":return !!t.values?.includes(void 0);case "enum":return !!e._zod.values?.has(void 0);case "optional":case "nullable":case "readonly":case "success":return t.innerType?Br(t.innerType):true;case "catch":return true;case "union":return t.options?t.options.some(Br):true;case "intersection":return !t.left||!t.right?true:Br(t.left)&&Br(t.right);case "pipe":return t.in?Br(t.in):true;default:return true}}function $m(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function u1(e){return (e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Zn(e)}function Zn(e){let t=e._zod.def;switch(t.type){case "string":case "number":case "boolean":case "bigint":case "symbol":case "null":case "nan":case "date":case "object":case "array":case "tuple":case "record":case "map":case "set":case "file":case "template_literal":case "never":case "success":return false;case "literal":return !!t.values?.includes(void 0);case "enum":return !!e._zod.values?.has(void 0);case "optional":return true;case "nullable":case "readonly":case "nonoptional":return t.innerType?Zn(t.innerType):true;case "union":return t.options?t.options.some(Zn):true;case "intersection":return !t.left||!t.right||Zn(t.left)||Zn(t.right);case "pipe":return t.out?Zn(t.out):true;default:return true}}function c4(e,t,r,n,o=true){let i=r._zod.def,s=o?U(t):null;return s&&e.write(`let ${s} = null;`),e.write(`if (${n} !== null) {`),e.indented(a=>{let c=Ce(a,t,i.innerType,n,o);s&&c!==null&&a.write(`${s} = ${c};`);}),e.write("}"),s}function vm(e,t,r){for(let[n,o]of Mn(t._zod.def.checks))e.write(`if (${r} > ${cr(n,o._zod.def.check)}) return INVALID;`);}function u4(e,t,r,n,o=true){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`),vm(e,r,`${n}.length`);let s=o?U(t):null,a=U(t),c=U(t);return s&&e.write(`const ${s} = new Array(${n}.length);`),e.write(`for (let ${a} = 0; ${a} < ${n}.length; ${a}++) {`),e.indented(u=>{u.write(`const ${c} = ${n}[${a}];`);let l=je(u,t,i.element,c,o);s&&l!==null&&u.write(`${s}[${a}] = ${l};`);}),e.write("}"),s}function l4(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let a=V(t,new Set(i));return e.write(`if (!${a}.has(${n})) return INVALID;`),n}let s=i[0];if(typeof s=="number"&&Number.isNaN(s)){let a=V(t,new Set(i));return e.write(`if (!${a}.has(${n})) return INVALID;`),n}if(typeof s=="string")e.write(`if (${n} !== ${We(s)}) return INVALID;`);else if(typeof s=="number"||typeof s=="boolean")e.write(`if (${n} !== ${s}) return INVALID;`);else if(s===null)e.write(`if (${n} !== null) return INVALID;`);else if(s===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof s=="bigint")e.write(`if (${n} !== ${s}n) return INVALID;`);else throw new te(`literal type ${typeof s}`);return n}function f4(e,t,r,n){let o=r._zod.values;if(!o)throw new te("enum schema without enumerated values");let i=V(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function l1(e,t,r,n){let o=r._zod.def;return Ce(e,t,o.innerType,n)}function m4(e,t,r,n){let o=r._zod.def,s=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!s)return Ce(e,t,o.innerType,n);let c=V(t,s),u=U(t);return e.write(`let ${u} = ${n};`),e.write(`if (${n} === undefined) ${u} = ${c}();`),Ce(e,t,o.innerType,u)}let a=U(t);if(s){let c=V(t,s),u=V(t,Uo);e.write(`let ${a};`),e.write(`if (${n} === undefined) {`),e.indented(l=>{l.write(`${a} = ${u}(${c}());`);}),e.write("} else {"),e.indented(l=>{let f=Ce(l,t,o.innerType,n);l.write(`${a} = ${f} === undefined ? ${u}(${c}()) : ${f};`);}),e.write("}");}else e.write(`let ${a};`),e.write(`if (${n} !== undefined) {`),e.indented(c=>{let u=Ce(c,t,o.innerType,n);c.write(`${a} = ${u};`);}),e.write("}");return a}function p4(e,t,r,n){let o=r._zod.def,i=Ce(e,t,o.innerType,n),s=U(t);return e.write(`const ${s} = ${i};`),e.write(`if (${s} === undefined) return INVALID;`),s}function d4(e,t,r,n){let o=r._zod.def,i=o.items,s=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let a=f1(i,"optin"),c=f1(i,"optout");s?e.write(`if (${n}.length < ${a}) return INVALID;`):e.write(`if (${n}.length < ${a} || ${n}.length > ${i.length}) return INVALID;`);let u=U(t);e.write(`const ${u} = [];`);for(let l=0;l<i.length;l++){let f=i[l];if(l>=c)e.write(`if (${u}.length === ${l}) {`),e.indented(p=>{p.write(`if (${l} < ${n}.length) {`),p.indented(m=>{let h=U(t);m.write(`const ${h} = ${n}[${l}];`);let d=je(m,t,f,h);m.write(`${u}[${l}] = ${d};`);}),p.write("} else {"),p.indented(m=>{if($m(f)){m.write(`${u}.length = ${l};`);return}let h=U(t),d=U(t);m.write(`const ${h} = undefined;`),m.write(`const ${d} = (() => {`),m.indented(g=>{let _=je(g,t,f,h);g.write(`return ${_};`);}),m.write("})();"),m.write(`if (${d} === INVALID || ${d} === undefined) ${u}.length = ${l};`),m.write(`else ${u}[${l}] = ${d};`);}),p.write("}");}),e.write("}");else {let p=U(t);e.write(`const ${p} = ${n}[${l}];`);let m=je(e,t,f,p);e.write(`${u}[${l}] = ${m};`);}}if(s){let l=U(t),f=U(t);e.write(`for (let ${l} = ${i.length}; ${l} < ${n}.length; ${l}++) {`),e.indented(p=>{p.write(`const ${f} = ${n}[${l}];`);let m=je(p,t,s,f);p.write(`${u}[${l}] = ${m};`);}),e.write("}");}return u}function f1(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function h4(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return g4(e,t,o,n);if(o.inclusive===false)throw new te("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return Ce(e,t,i[0],n);if(i.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(i.flatMap(l=>l._zod.def.values)),u=V(t,c);return e.write(`if (!${u}.has(${n})) return INVALID;`),n}let a=U(t);e.write(`let ${a};`);for(let c=0;c<i.length;c++){let u=i[c];c===0?e.write(`${a} = (() => {`):e.write(`if (${a} === INVALID) ${a} = (() => {`),e.indented(l=>{let f=Ce(l,t,u,n);l.write(`return ${f};`);}),e.write("})();");}return e.write(`if (${a} === INVALID) return INVALID;`),a}function g4(e,t,r,n){if(r.unionFallback)throw new te("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=U(t),i=U(t);e.write(`const ${o} = ${n}?.[${We(r.discriminator)}];`),e.write(`let ${i};`);let s=true,a=new Set;for(let c of r.options){let u=c._zod.propValues?.[r.discriminator];if(!u||u.size===0)throw new te("discriminated union option without static discriminator values");for(let p of u){if(a.has(p))throw new te(`duplicate discriminator value ${String(p)}`);a.add(p);}let l=Array.from(u,p=>y4(t,o,p)),f=s?"if":"else if";e.write(`${f} (${l.join(" || ")}) {`),e.indented(p=>{let m=Ce(p,t,c,n);p.write(`${i} = ${m};`);}),e.write("}"),s=false;}return e.write("else { return INVALID; }"),i}function y4(e,t,r){if(typeof r=="string")return `${t} === ${We(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return `${t} === ${r}`;if(r===null)return `${t} === null`;if(r===void 0)return `${t} === undefined`;if(typeof r=="bigint")return `${t} === ${r}n`;if(typeof r=="symbol"){let n=V(e,r);return `${t} === ${n}`}throw new te(`literal discriminator value ${String(r)}`)}function _4(e,t,r,n){let o=r._zod.def;t.definite=false;let i=je(e,t,o.left,n),s=je(e,t,o.right,n),a=V(t,Fn),c=U(t);return e.write(`const ${c} = ${a}(${i}, ${s});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function b4(e,t,r,n){let o=r._zod.def,i=V(t,gt);e.write(`if (!${i}(${n})) return INVALID;`);let s=U(t),a=U(t),c=U(t);e.write(`const ${s} = {};`);let u=o,l=u.partial?void 0:o.keyType._zod.values;if(l){let m=[];for(let d of l){if(!(typeof d=="string"||typeof d=="number"||typeof d=="symbol"))throw new te(`record key value ${String(d)}`);let g=typeof d=="number"?d.toString():d;if(g==="__proto__")throw new te('record key "__proto__"');m.push(g);let _=V(t,d),y=Ce(e,t,o.keyType,_),b=U(t);e.write(`const ${b} = ${n}[${x4(t,g)}];`);let S=je(e,t,o.valueType,b);e.write(`${s}[${y}] = ${S};`);}let h=V(t,new Set(m));return e.write(`for (const ${a} in ${n}) {`),e.indented(d=>{d.write(`if (${h}.has(${a})) continue;`),u.mode==="loose"?d.write(`if (${a} !== "__proto__") ${s}[${a}] = ${n}[${a}];`):d.write("return INVALID;");}),e.write("}"),s}let f=o.keyType._zod.def;if(!(f.type==="string"&&f.format===void 0&&!f.coerce&&(f.checks?.length??0)===0)){let m=o.mode==="loose",h=ma(o.keyType);h.definite===false&&(t.definite=false);let d=V(t,h),g=V(t,qt),_=U(t);return m1(e,t,n,a,y=>{y.write(`let ${_} = ${d}(${a});`),y.write(`if (${_} === INVALID && typeof ${a} === "string" && ${g}.test(${a})) ${_} = ${d}(Number(${a}));`),m?y.write(`if (${_} === INVALID) { ${s}[${a}] = ${n}[${a}]; continue; }`):y.write(`if (${_} === INVALID) return INVALID;`),y.write(`if (${_} === "__proto__") continue;`);let b=U(t);y.write(`const ${b} = ${n}[${a}];`);let S=je(y,t,o.valueType,b);y.write(`${s}[${_}] = ${S};`);}),s}return m1(e,t,n,a,m=>{m.write(`const ${c} = ${n}[${a}];`);let h=je(m,t,o.valueType,c);m.write(`${s}[${a}] = ${h};`);},"return INVALID;"),s}function m1(e,t,r,n,o,i){let s=V(t,Object.prototype.propertyIsEnumerable),a=U(t),c=U(t),u=U(t);e.write(`const ${a} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${u} = 0; ${u} < ${c}.length; ${u}++) {`),e.indented(l=>{l.write(`const ${n} = ${c}[${u}];`),l.write(`if (${n} === "__proto__" || !${s}.call(${r}, ${n})) continue;`),o(l);}),e.write("}"),e.write(`for (let ${u} = 0; ${u} < ${a}.length; ${u}++) {`),e.indented(l=>{l.write(`const ${n} = ${a}[${u}];`),l.write(`if (!${s}.call(${r}, ${n})) continue;`),i?l.write(i):o(l);}),e.write("}");}function x4(e,t){return typeof t=="string"?We(t):V(e,t)}function $4(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`),vm(e,r,`${n}.size`);let i=U(t),s=U(t),a=U(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${s}, ${a}] of ${n}) {`),e.indented(c=>{let u=Ce(c,t,o.keyType,s),l=Ce(c,t,o.valueType,a);c.write(`${i}.set(${u}, ${l});`);}),e.write("}"),i}function w4(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`),vm(e,r,`${n}.size`);let i=U(t),s=U(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${s} of ${n}) {`),e.indented(a=>{let c=Ce(a,t,o.valueType,s);a.write(`${i}.add(${c});`);}),e.write("}"),i}function S4(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function v4(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=V(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`);}return n}function C4(e,t,r,n){let o=r._zod.def,i=Ur(t,o.getter),s=V(t,{parser:null});e.write(`if (!${s}.parser) {`),e.indented(c=>{c.write(`const inner = ${i}();`),c.write(`${s}.parser = function(input) {`),c.indented(u=>{u.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),u.write("return result.issues.length === 0 ? result.value : INVALID;");}),c.write("};");}),e.write("}");let a=U(t);return e.write(`const ${a} = ${s}.parser(${n});`),e.write(`if (${a} === INVALID) return INVALID;`),a}function P4(e,t,r,n){let o=r._zod.def,i=Ce(e,t,o.in,n);if(o.transform){if(Gr(o.transform))throw new St("z.compile: async transforms in pipes are not supported");let s=o.transform,c=Ur(t,l=>{let f={value:l,issues:[],addIssue:Sm},p=s(l,f);return p instanceof Promise?Xe:f.issues.length===0?p:Xe}),u=U(t);return e.write(`const ${u} = ${c}(${i});`),e.write(`if (${u} === INVALID) return INVALID;`),Ce(e,t,o.out,u)}else return Ce(e,t,o.out,i)}function Gr(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function k4(e,t,r,n){let o=r._zod.def;if(o.fn){if(Gr(o.fn))throw new St("z.compile: async custom predicates are not supported");let i=Ur(t,o.fn),s=V(t,xm),a=U(t);e.write(`const ${a} = ${i}(${n});`),e.write(`if (${a} instanceof Promise) ${s}();`),e.write(`if (!${a}) return INVALID;`);}else throw new te("custom schema without a predicate function");return n}function A4(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return Xe;let o=n;return o.issues.length===0?o.value:t()}function R4(e,t,r,n){let o=r._zod.def;if(!o.catchValue[bs])throw new te("catch with a callback (only a constant catch value compiles)",false);let i=U(t);e.write(`let ${i} = (() => {`),e.indented(u=>{let l=je(u,t,o.innerType,n);u.write(`return ${l};`);}),e.write("})();");let s=V(t,o.innerType),a=Ur(t,o.catchValue),c=V(t,A4);return e.write(`if (${i} === INVALID) {`),e.indented(u=>{u.write(`${i} = ${c}(${s}, ${a}, ${n});`),u.write(`if (${i} === INVALID) return INVALID;`);}),e.write("}"),i}function E4(e,t,r,n){let o=r._zod.def;if(o.transform){if(Gr(o.transform))throw new St("z.compile: async transforms are not supported");let i=o.transform,a=Ur(t,u=>{let l={value:u,issues:[],addIssue:Sm},f=i(u,l);return f instanceof Promise?Xe:l.issues.length===0?f:Xe}),c=U(t);return e.write(`const ${c} = ${a}(${n});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return n}function pa(e){return e.checks&&(e.checks=[...e.checks]),e}function Cm(e,t){return new e(pa({type:"string",...T(t)}))}function Pm(e,t){return new e(pa({type:"string",coerce:true,...T(t)}))}function da(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...T(t)})}function ha(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...T(t)})}function ga(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...T(t)})}function ya(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...T(t)})}function _a(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...T(t)})}function ba(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...T(t)})}function gi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...T(t)})}function xa(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...T(t)})}function $a(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...T(t)})}function wa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...T(t)})}function Sa(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...T(t)})}function va(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...T(t)})}function Ca(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...T(t)})}function Pa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...T(t)})}function ka(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...T(t)})}function Aa(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...T(t)})}function km(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:false,...T(t)})}function Ra(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...T(t)})}function Ea(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...T(t)})}function Ma(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...T(t)})}function Ia(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...T(t)})}function La(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...T(t)})}function Am(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:false,...T(t)})}function Rm(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:false,...T(t)})}function za(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...T(t)})}var Em={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function yi(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...T(t)})}function _i(e,t){return new e({type:"string",format:"date",check:"string_format",...T(t)})}function bi(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...T(t)})}function xi(e,t){return new e({type:"string",format:"duration",check:"string_format",...T(t)})}function Mm(e,t){return new e(pa({type:"number",checks:[],...T(t)}))}function Im(e,t){return new e(pa({type:"number",coerce:true,checks:[],...T(t)}))}function Lm(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...T(t)})}function zm(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...T(t)})}function Tm(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...T(t)})}function Nm(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...T(t)})}function Om(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...T(t)})}function Fm(e,t){return new e({type:"boolean",...T(t)})}function Dm(e,t){return new e({type:"boolean",coerce:true,...T(t)})}function Zm(e,t){return new e({type:"bigint",...T(t)})}function Bm(e,t){return new e({type:"bigint",coerce:true,...T(t)})}function Um(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...T(t)})}function Gm(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...T(t)})}function Qm(e,t){return new e({type:"symbol",...T(t)})}function Vm(e,t){return new e({type:"undefined",...T(t)})}function jm(e,t){return new e({type:"null",...T(t)})}function qm(e){return new e({type:"any"})}function Wm(e){return new e({type:"unknown"})}function Hm(e,t){return new e({type:"never",...T(t)})}function Xm(e,t){return new e({type:"void",...T(t)})}function Km(e,t){return new e({type:"date",...T(t)})}function Ym(e,t){return new e({type:"date",coerce:true,...T(t)})}function Jm(e,t){return new e({type:"nan",...T(t)})}function It(e,t){return new Ts({check:"less_than",...T(t),value:e,inclusive:false})}function mt(e,t){return new Ts({check:"less_than",...T(t),value:e,inclusive:true})}function Lt(e,t){return new Ns({check:"greater_than",...T(t),value:e,inclusive:false})}function pt(e,t){return new Ns({check:"greater_than",...T(t),value:e,inclusive:true})}function Ta(e){return Lt(0,e)}function Na(e){return It(0,e)}function Oa(e){return mt(0,e)}function Fa(e){return pt(0,e)}function ur(e,t){return new zl({check:"multiple_of",...T(t),value:e})}function lr(e,t){return new Ol({check:"max_size",...T(t),maximum:e})}function zt(e,t){return new Fl({check:"min_size",...T(t),minimum:e})}function Qr(e,t){return new Dl({check:"size_equals",...T(t),size:e})}function Vr(e,t){return new Zl({check:"max_length",...T(t),maximum:e})}function Wt(e,t){return new Bl({check:"min_length",...T(t),minimum:e})}function jr(e,t){return new Ul({check:"length_equals",...T(t),length:e})}function Bn(e,t){return new Gl({check:"string_format",format:"regex",...T(t),pattern:e})}function Un(e){return new Ql({check:"string_format",format:"lowercase",...T(e)})}function Gn(e){return new Vl({check:"string_format",format:"uppercase",...T(e)})}function Qn(e,t){return new jl({check:"string_format",format:"includes",...T(t),includes:e})}function Vn(e,t){return new ql({check:"string_format",format:"starts_with",...T(t),prefix:e})}function jn(e,t){return new Wl({check:"string_format",format:"ends_with",...T(t),suffix:e})}function Da(e,t,r){return new Hl({check:"property",property:e,schema:t,...T(r)})}function qn(e,t){return new Xl({check:"properties",shape:e,...T(t)})}function Wn(e,t){return new Kl({check:"mime_type",mime:e,...T(t)})}function vt(e){return new Yl({check:"overwrite",tx:e})}function Hn(e){return vt(t=>t.normalize(e))}function Xn(){return vt(e=>e.trim())}function Kn(){return vt(e=>e.toLowerCase())}function Yn(){return vt(e=>e.toUpperCase())}function Jn(){return vt(e=>Tu(e))}function ep(e,t,r){return new e({type:"array",element:t,...T(r)})}function M4(e,t,r){return new e({type:"union",options:t,...T(r)})}function I4(e,t,r){return new e({type:"union",options:t,inclusive:false,...T(r)})}function L4(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...T(n)})}function z4(e,t,r){return new e({type:"intersection",left:t,right:r})}function T4(e,t,r,n){let o=r instanceof q,i=o?n:r,s=o?r:null;return new e({type:"tuple",items:t,rest:s,...T(i)})}function N4(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...T(n)})}function O4(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...T(n)})}function F4(e,t,r){return new e({type:"set",valueType:t,...T(r)})}function D4(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,...T(r)})}function Z4(e,t,r){return new e({type:"enum",entries:t,...T(r)})}function B4(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...T(r)})}function tp(e,t){return new e({type:"file",...T(t)})}function U4(e,t){return new e({type:"transform",transform:t})}function G4(e,t){return new e({type:"optional",innerType:t})}function Q4(e,t){return new e({type:"nullable",innerType:t})}function V4(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Uo(r)}})}function j4(e,t,r){return new e({type:"nonoptional",innerType:t,...T(r)})}function q4(e,t){return new e({type:"success",innerType:t})}function W4(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:Uu(r)})}function H4(e,t,r){return new e({type:"pipe",in:t,out:r})}function X4(e,t){return new e({type:"readonly",innerType:t})}function K4(e,t,r){return new e({type:"template_literal",parts:t,...T(r)})}function Y4(e,t){return new e({type:"lazy",getter:t})}function J4(e,t){return new e({type:"promise",innerType:t})}function rp(e,t,r){let n=T(r);return n.abort??(n.abort=true),new e({type:"custom",check:"custom",fn:t,...n})}function np(e,t,r){return new e({type:"custom",check:"custom",fn:t,...T(r)})}function op(e,t){let r=g1(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(In(o,n.value,r._zod.def));else {let i=o;i.fatal&&(i.continue=false),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(In(i));}},e(n.value,n)),t);return r}function g1(e,t){let r=new ge({check:"custom",...T(t)});return r._zod.check=e,r}function ip(e){let t=new ge({check:"describe"});return t._zod.onattach=[r=>{let n=Ve.get(r)??{};Ve.add(r,{...n,description:e});}],t._zod.check=()=>{},t}function sp(e){let t=new ge({check:"meta"});return t._zod.onattach=[r=>{let n=Ve.get(r)??{};Ve.add(r,{...n,...e});}],t._zod.check=()=>{},t}function ap(e,t){let r=T(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(m=>typeof m=="string"?m.toLowerCase():m),o=o.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(n),s=new Set(o),a=e.Codec??fi,c=e.Boolean??ui,u=e.String??Zr,l=new u({type:"string",error:r.error}),f=new c({type:"boolean",error:r.error}),p=new a({type:"pipe",in:l,out:f,transform:((m,h)=>{let d=m;return r.case!=="sensitive"&&(d=d.toLowerCase()),i.has(d)?true:s.has(d)?false:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:h.value,inst:p,continue:false}),{})}),reverseTransform:((m,h)=>m===true?n[0]||"true":o[0]||"false"),error:r.error});return p._zod.bag.truthy=n,p._zod.bag.falsy=o,p._zod.bag.case=r.case??"insensitive",p}function qr(e,t,r,n={}){let o=T(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function $i(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&Qe(e,n,r[n]);return e}function fr(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Ve,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Ne(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return false;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),true}function le(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else {let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else {let p=s.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,p,l);}let f=e._zod.parent;f&&(s.ref||(s.ref=f),le(f,t,l),t.seen.get(f).isParent=true);}let c=t.metadataRegistry.get(e);return c&&$i(s.schema,c),t.io==="input"&&Ke(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function y1(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function mr(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=n.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0]);}}let o=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let f=e.external.registry.get(s[0])?.id,p=e.external.uri??(h=>h);if(f)return {ref:p(f)};let m=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=m,{defId:m,ref:`${p("__shared")}#/${a}/${y1(m)}`}}let c="#",u=`${c}/${a}/`;if(s[1]===r&&!s[1].schema.id)return {ref:c};let l=s[1].schema.id??`__schema${e.counter++}`;return {defId:l,ref:u+y1(l)}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=o(s);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let f in l)delete l[f];l.$ref=c;};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
61
|
+
|
|
62
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}a.count>1&&e.reused==="ref"&&i(s);}e.external&&(e.sharedDefsExtractedFor=e.external);}function x1(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;x1(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s);}}delete e.anyOf,e.type=r.length===1?r[0]:r;}var $1=new Set(["type","properties","required","additionalProperties"]),_1=["oneOf","anyOf"];function b1(e){let t=e.additionalProperties;return t===void 0||t===false||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function cp(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let s in i)if(!$1.has(s))return null;t.push(i);}let r={},n=new Set;for(let i of t){for(let s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;let a=[];for(let u of t){let l=u.properties?.[s]??b1(u);l!=null&&(a.some(f=>JSON.stringify(f)===JSON.stringify(l))||a.push(l));}let c=a.length===1?a[0]:cp(a)??{allOf:a};Qe(r,s,c);}for(let s of i.required??[])n.add(s);}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===false))o.additionalProperties=false;else {let i=[];for(let s of t){let a=b1(s);a&&!i.some(c=>JSON.stringify(c)===JSON.stringify(a))&&i.push(a);}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i});}return o}function ew(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of $1)if(o in e)return;let r=t.filter(o=>_1.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=cp(t);else {let o=r[0],i=_1.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;let s=t.filter(c=>c!==o),a=o[i].map(c=>cp([...s,c]));if(a.some(c=>!c))return;n={[i]:a};}n&&(delete e.allOf,$i(e,n));}function pr(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=a=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},f=c.ref;if(c.ref=null,f){n(f);let m=e.seen.get(f),h=m.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):$i(u,h),$i(u,l),a._zod.parent===f)for(let g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(h.$ref&&m.def)for(let g in u)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(u[g])===JSON.stringify(m.def[g])&&delete u[g];}let p=a._zod.parent;if(p&&p!==f){n(p);let m=e.seen.get(p);if(m?.schema.$ref&&(u.$ref=m.schema.$ref,m.def))for(let h in u)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(u[h])===JSON.stringify(m.def[h])&&delete u[h];}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]});};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let a of [...e.seen.entries()].reverse())n(a[0]);if(e.target!=="openapi-3.0")for(let a of e.seen.entries())x1(a[1].def??a[1].schema);for(let a of e.deferred)a();if(e.intersections.length){let a=new Map;for(let c of e.seen.values())for(let u of [c.schema,c.def]){let l=u?.allOf;if(!Array.isArray(l))continue;let f=a.get(l);f?f.push(u):a.set(l,[u]);}for(let c of e.intersections)for(let u of a.get(c)??[])ew(u);}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a);}$i(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let a of e.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,Qe(s,c.defId,c.def));}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:eo(t,"input",e.processors),output:eo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function Ke(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return true;if(n.type==="array")return Ke(n.element,r);if(n.type==="set")return Ke(n.valueType,r);if(n.type==="lazy")return Ke(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return Ke(n.innerType,r);if(n.type==="intersection")return Ke(n.left,r)||Ke(n.right,r);if(n.type==="record"||n.type==="map")return Ke(n.keyType,r)||Ke(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?true:Ke(n.in,r)||Ke(n.out,r);if(n.type==="object"){for(let o in n.shape)if(Ke(n.shape[o],r))return true;return false}if(n.type==="union"){for(let o of n.options)if(Ke(o,r))return true;return false}if(n.type==="tuple"){for(let o of n.items)if(Ke(o,r))return true;return !!(n.rest&&Ke(n.rest,r))}return false}var up=(e,t={})=>r=>{let n=fr({...r,processors:t});return le(e,n),mr(n,e),pr(n,e)},eo=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},s=fr({...o??{},target:i,io:t,processors:r});return le(e,s),mr(s,e),pr(s,e)};var to=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r);},ro=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r);},w1=(e,t)=>{to(e,"minimum",t),ro(e,"maximum",t);},P1=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t);},k1=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t);},A1=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t];},R1=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=true);},S1=(e,t)=>to(e,"minimum",t.minimum),v1=(e,t)=>ro(e,"maximum",t.maximum),C1=e=>(t,r)=>{R1(t,r.format);let[n,o]=e[r.format];to(t,"minimum",n),ro(t,"maximum",o);},tw={greater_than:(e,t)=>to(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>ro(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>P1(e,t.value),number_format:C1(Qo),bigint_format:C1(Vo),min_length:S1,max_length:v1,length_equals:(e,t)=>w1(e,t.length),min_size:S1,max_size:v1,size_equals:(e,t)=>w1(e,t.size),string_format:(e,t)=>{R1(e,t.format),t.pattern&&k1(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=true);},mime_type:(e,t)=>A1(e,t.mime)};function Oe(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)tw[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&to(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&to(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ro(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ro(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&P1(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=true)),o.mime&&A1(t,o.mime);for(let i of o.patterns??[])k1(t,i);return t}var rw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nw=new Map([[js,dl],[ci,hl]]),E1=e=>nw.get(e)??e,mp=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u,laxFormat:l}=Oe(e);if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=rw[a]??a,o.format===""&&delete o.format,(a==="time"||l)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){let f=[...c].map(E1);f.length===1?o.pattern=f[0].source:f.length>1&&(o.allOf=[...f.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))]);}},pp=(e,t,r,n)=>{let o=r,{minimum:i,maximum:s,multipleOf:a,exclusiveMaximum:c,exclusiveMinimum:u,isInt:l}=Oe(e);o.type=l?"integer":"number";let f=typeof u=="number"&&u>=(i??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(f?m?(o.minimum=u,o.exclusiveMinimum=true):o.exclusiveMinimum=u:typeof i=="number"&&(o.minimum=i),p?m?(o.maximum=c,o.exclusiveMaximum=true):o.exclusiveMaximum=c:typeof s=="number"&&(o.maximum=s),a){let h=new Set;for(let _ of a)Number.isFinite(_)&&_!==0?h.add(Math.abs(_)):Ne(e,t,o,n,`A multipleOf divisor of ${_} cannot be represented in JSON Schema`);let[d,...g]=h;d!==void 0&&(o.multipleOf=d),g.length&&(o.allOf=[...o.allOf??[],...g.map(_=>({multipleOf:_}))]);}},dp=(e,t,r,n)=>{r.type="boolean";},hp=(e,t,r,n)=>{Ne(e,t,r,n,"BigInt cannot be represented in JSON Schema");},gp=(e,t,r,n)=>{Ne(e,t,r,n,"Symbols cannot be represented in JSON Schema");},yp=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=true,r.enum=[null]):r.type="null";},_p=(e,t,r,n)=>{Ne(e,t,r,n,"Undefined cannot be represented in JSON Schema");},bp=(e,t,r,n)=>{Ne(e,t,r,n,"Void cannot be represented in JSON Schema");},xp=(e,t,r,n)=>{r.not={};},$p=(e,t,r,n)=>{},wp=(e,t,r,n)=>{},Sp=(e,t,r,n)=>{Ne(e,t,r,n,"Date cannot be represented in JSON Schema");},vp=(e,t,r,n)=>{let o=e._zod.def,i=kn(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i;},Cp=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let s of o.values)if(s===void 0){if(Ne(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(Ne(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s));}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s;}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i;},Pp=(e,t,r,n)=>{Ne(e,t,r,n,"NaN cannot be represented in JSON Schema");},kp=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source;},Ap=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:s,mime:a}=Oe(e);i!==void 0&&(o.minLength=i),s!==void 0&&(o.maxLength=s),a&&(a.length===0?o.not={}:a.length===1?o.contentMediaType=a[0]:o.anyOf=a.map(c=>({contentMediaType:c})));},Rp=(e,t,r,n)=>{r.type="boolean";},Ep=(e,t,r,n)=>{Ne(e,t,r,n,"Custom types cannot be represented in JSON Schema");},Mp=(e,t,r,n)=>{Ne(e,t,r,n,"Function types cannot be represented in JSON Schema");},Ip=(e,t,r,n)=>{Ne(e,t,r,n,"Transforms cannot be represented in JSON Schema");},Lp=(e,t,r,n)=>{Ne(e,t,r,n,"Map cannot be represented in JSON Schema");},zp=(e,t,r,n)=>{Ne(e,t,r,n,"Set cannot be represented in JSON Schema");},Tp=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:s,maximum:a}=Oe(e);typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=le(i.element,t,{...n,path:[...n.path,"items"]});};function wi(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?wi(t.out):t.type==="catch"?wi(t.innerType):e._zod.optin}var Np=(e,t,r,n)=>{let o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&Ne(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let u in s)Qe(o.properties,u,le(s[u],t,{...n,path:[...n.path,"properties",u]}));let c=[];for(let u of Object.keys(s)){let l=i.shape[u];(t.io==="input"?wi(l)===void 0:l._zod.optout===void 0)&&c.push(u);}c.length>0&&(o.required=c),i.catchall?._zod.def.type==="never"?o.additionalProperties=false:i.catchall?i.catchall&&(o.additionalProperties=le(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=false);},Ba=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===false,s=o.options.map((a,c)=>le(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=s:r.anyOf=s;},Op=(e,t,r,n)=>{let o=e._zod.def,i=le(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=le(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c,t.intersections.push(c);},Fp=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((d,g)=>le(d,t,{...n,path:[...n.path,s,g]})),u=i.rest?le(i.rest,t,{...n,path:[...n.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,l=i.items.length;for(;l>0;){let d=i.items[l-1];if(!(t.io==="input"?wi(d)!==void 0:d._zod.optout==="optional"))break;l--;}let f=i.items.length,p=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=c,p?o.items=false:u&&(o.items=u),l>0&&(o.minItems=l),p&&(o.maxItems=f)):t.target==="openapi-3.0"?(o.items={anyOf:c},u&&o.items.anyOf.push(u),l>0&&(o.minItems=l),p&&(o.maxItems=f)):(o.items=c,p?o.additionalItems=false:u&&(o.additionalItems=u),l>0&&(o.minItems=l),p&&(o.maxItems=f));let{minimum:m,maximum:h}=Oe(e);typeof m=="number"&&(o.minItems=m),typeof h=="number"&&(o.maxItems=h);};function lp(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let h=e.get(t)?.def;if(!h)return t;let d=lp(e,h,r);return d===h?t:d}for(let h of ["anyOf","oneOf"]){let d=t[h];if(!Array.isArray(d))continue;let g=d.map(_=>lp(e,_,r));g.some((_,y)=>_!==d[y])&&(t={...t,[h]:g});}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(h=>h==="number"||h==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(h=>typeof h=="number"))return t;let{minimum:s,maximum:a,exclusiveMinimum:c,exclusiveMaximum:u,multipleOf:l,format:f,id:p,...m}=t;return m.enum?m.enum=m.enum.map(h=>typeof h=="number"?String(h):h):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?qt:ti).source)),m}var fp=new WeakMap;function ow(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of fp.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===true||r.has(i))continue;let s=lp(t,i,new Set);s!==i&&r.set(i,s);}if(r.size)for(let n of e.seen.values())for(let o of [n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i);}}var Dp=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let s=i.keyType,a=Oe(s).patterns;if(i.mode==="loose"&&a&&a.size>0){let l=le(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let f of a)Qe(o.patternProperties,E1(f).source,l);}else {if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=le(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let l=fp.get(t);l||(l=[],fp.set(t,l),t.deferred.push(()=>ow(t))),l.push(e);}o.additionalProperties=le(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]});}let c=s._zod.values,u=t.io==="input"&&wi(i.valueType)!==void 0;if(c&&!i.partial&&!u){let l=[...c].filter(f=>typeof f=="string"||typeof f=="number");l.length>0&&(o.required=l.map(String));}},Zp=(e,t,r,n)=>{let o=e._zod.def,i=le(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=true):r.anyOf=[i,{type:"null"}];},Bp=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;},Up=Symbol();function M1(e,t,r,n,o){let i=false,s=JSON.stringify(e,(a,c)=>typeof c!="bigint"?c:(i=true,null));return i?(Ne(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),Up):JSON.parse(s)}var Gp=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s=M1(o.defaultValue,e,t,r,n);s!==Up&&(r.default=s);},Qp=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let s=M1(o.defaultValue,e,t,r,n);s!==Up&&(r._prefault=s);},Vp=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0);}catch{Ne(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s;},jp=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;le(s,t,n);let a=t.seen.get(e);a.ref=s;},qp=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=true;},Wp=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;},Ua=(e,t,r,n)=>{let o=e._zod.def;le(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;},Hp=(e,t,r,n)=>{let o=e._zod.innerType;le(o,t,n);let i=t.seen.get(e);i.ref=o;},Za={string:mp,number:pp,boolean:dp,bigint:hp,symbol:gp,null:yp,undefined:_p,void:bp,never:xp,any:$p,unknown:wp,date:Sp,enum:vp,literal:Cp,nan:Pp,template_literal:kp,file:Ap,success:Rp,custom:Ep,function:Mp,transform:Ip,map:Lp,set:zp,array:Tp,object:Np,union:Ba,intersection:Op,tuple:Fp,record:Dp,nullable:Zp,nonoptional:Bp,default:Gp,prefault:Qp,catch:Vp,pipe:jp,readonly:qp,promise:Wp,optional:Ua,lazy:Hp};function Ga(e,t){if("_idmap"in e){let n=e,o=fr({...t,processors:Za}),i={};for(let c of n._idmap.entries()){let[u,l]=c;le(l,o);}let s={},a={registry:n,uri:t?.uri,defs:i};o.external=a;for(let c of n._idmap.entries()){let[u,l]=c;mr(o,l),Qe(s,u,pr(o,l));}if(Object.keys(i).length>0){let c=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i};}return {schemas:s}}let r=fr({...t,processors:Za});return le(e,r),mr(r,e),pr(r,e)}var Qa=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t;}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=fr({processors:Za,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}});}process(t,r={path:[],schemaPath:[]}){return le(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,mr(this.ctx,t);let n=pr(this.ctx,t),{"~standard":o,...i}=n;return i}};var I1={};var lo={};or(lo,{ZodAny:()=>yd,ZodArray:()=>$d,ZodBase64:()=>uc,ZodBase64URL:()=>lc,ZodBigInt:()=>co,ZodBigIntFormat:()=>pc,ZodBoolean:()=>ao,ZodCIDRv4:()=>ac,ZodCIDRv6:()=>cc,ZodCUID:()=>ec,ZodCUID2:()=>tc,ZodCatch:()=>Ud,ZodCodec:()=>Ii,ZodCreditCard:()=>ud,ZodCustom:()=>Li,ZodCustomStringFormat:()=>Kr,ZodDate:()=>Pi,ZodDefault:()=>Nd,ZodDiscriminatedUnion:()=>Sd,ZodE164:()=>fc,ZodEmail:()=>Xa,ZodEmoji:()=>Ya,ZodEnum:()=>oo,ZodExactOptional:()=>yc,ZodFile:()=>Id,ZodFunction:()=>Yd,ZodGUID:()=>Ka,ZodIBAN:()=>ld,ZodIPv4:()=>ic,ZodIPv6:()=>sc,ZodISODate:()=>hr,ZodISODateTime:()=>dr,ZodISODuration:()=>yr,ZodISOTime:()=>gr,ZodInstanceOf:()=>th,ZodIntersection:()=>vd,ZodJWT:()=>mc,ZodKSUID:()=>oc,ZodLazy:()=>Hd,ZodLiteral:()=>Md,ZodMAC:()=>cd,ZodMap:()=>Rd,ZodNaN:()=>Qd,ZodNanoID:()=>Ja,ZodNever:()=>bd,ZodNonOptional:()=>_c,ZodNull:()=>hd,ZodNullable:()=>Td,ZodNumber:()=>so,ZodNumberFormat:()=>Yr,ZodObject:()=>Ai,ZodOptional:()=>Ei,ZodPipe:()=>Mi,ZodPrefault:()=>Fd,ZodPreprocess:()=>Vd,ZodPromise:()=>Kd,ZodReadonly:()=>jd,ZodRecord:()=>no,ZodSet:()=>Ed,ZodString:()=>io,ZodStringFormat:()=>de,ZodSuccess:()=>Bd,ZodSymbol:()=>pd,ZodTemplateLiteral:()=>Wd,ZodTransform:()=>Ld,ZodTuple:()=>Pd,ZodType:()=>H,ZodULID:()=>rc,ZodURL:()=>Ci,ZodUUID:()=>Tt,ZodUndefined:()=>dd,ZodUnion:()=>Ri,ZodUnknown:()=>_d,ZodVoid:()=>xd,ZodXID:()=>nc,ZodXor:()=>wd,_ZodString:()=>Ha,_default:()=>Od,_function:()=>Vy,any:()=>wy,array:()=>ki,base64:()=>ry,base64url:()=>ny,bigint:()=>yy,boolean:()=>md,catch:()=>Gd,check:()=>jy,cidrv4:()=>ey,cidrv6:()=>ty,codec:()=>By,creditCard:()=>iy,cuid:()=>j1,cuid2:()=>q1,currencyCode:()=>fy,custom:()=>qy,date:()=>vy,describe:()=>Wy,discriminatedUnion:()=>Ey,e164:()=>oy,email:()=>N1,emoji:()=>Q1,enum:()=>hc,exactOptional:()=>zd,file:()=>Oy,float32:()=>py,float64:()=>dy,function:()=>Vy,guid:()=>O1,hash:()=>my,hex:()=>ly,hostname:()=>uy,httpUrl:()=>G1,iban:()=>sy,instanceof:()=>Xy,int:()=>qa,int32:()=>hy,int64:()=>_y,intersection:()=>Cd,invertCodec:()=>Uy,ipv4:()=>K1,ipv6:()=>J1,json:()=>Yy,jwt:()=>ay,keyof:()=>Cy,ksuid:()=>X1,lazy:()=>Xd,literal:()=>Ny,looseObject:()=>Ay,looseRecord:()=>Iy,mac:()=>Y1,map:()=>Ly,meta:()=>Hy,nan:()=>Zy,nanoid:()=>V1,nativeEnum:()=>Ty,never:()=>dc,nonoptional:()=>Zd,null:()=>gd,nullable:()=>vi,nullish:()=>Fy,number:()=>fd,object:()=>Py,optional:()=>Hr,partialRecord:()=>My,pipe:()=>Wa,prefault:()=>Dd,preprocess:()=>Jy,promise:()=>Qy,readonly:()=>qd,record:()=>Ad,refine:()=>Jd,set:()=>zy,strictObject:()=>ky,string:()=>Si,stringFormat:()=>cy,stringbool:()=>Ky,success:()=>Dy,superRefine:()=>eh,symbol:()=>xy,templateLiteral:()=>Gy,transform:()=>gc,tuple:()=>kd,uint32:()=>gy,uint64:()=>by,ulid:()=>W1,undefined:()=>$y,union:()=>uo,unknown:()=>Wr,url:()=>U1,uuid:()=>F1,uuidv4:()=>D1,uuidv6:()=>Z1,uuidv7:()=>B1,void:()=>Sy,xid:()=>H1,xor:()=>Ry});var sw=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case "invalid_type":{let s=o(i.expected),a=Zu(i.input),c=o(a,i.input);return `Invalid input: expected ${s}, received ${c}`}case "invalid_value":return i.values.length===1?`Invalid input: expected ${ys(i.values[0])}`:`Invalid option: expected one of ${ds(i.values,"|")}`;case "too_big":{let s=i.exact?"exactly ":i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case "too_small":{let s=i.exact?"exactly ":i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case "invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${i.divisor}`;case "unrecognized_keys":return `Unrecognized key${i.keys.length>1?"s":""}: ${ds(i.keys,", ")}`;case "invalid_key":return `Invalid key in ${i.origin}`;case "invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(a=>`'${a}'`).join(" | ")}`:i.inclusive===false?"Invalid input: more than one option matched":"Invalid input";case "invalid_element":return `Invalid value in ${i.origin}`;default:return "Invalid input"}}};function L1(){return {localeError:sw()}}var Va={};or(Va,{endsWith:()=>jn,gt:()=>Lt,gte:()=>pt,includes:()=>Qn,length:()=>jr,lowercase:()=>Un,lt:()=>It,lte:()=>mt,maxLength:()=>Vr,maxSize:()=>lr,mime:()=>Wn,minLength:()=>Wt,minSize:()=>zt,multipleOf:()=>ur,negative:()=>Na,nonnegative:()=>Fa,nonpositive:()=>Oa,normalize:()=>Hn,overwrite:()=>vt,positive:()=>Ta,properties:()=>qn,property:()=>Da,regex:()=>Bn,size:()=>Qr,slugify:()=>Jn,startsWith:()=>Vn,toLowerCase:()=>Kn,toUpperCase:()=>Yn,trim:()=>Xn,uppercase:()=>Gn});var z1=new WeakSet([Object.prototype,Error.prototype]);function ja(e,t,r){Object.defineProperty(e,t,{configurable:true,enumerable:false,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:true,writable:true}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:true,writable:true});}});}var T1=(e,t)=>{Wu.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);z1.has(r)||(z1.add(r),ja(r,"format",n=>o=>Ko(n,o)),ja(r,"flatten",n=>o=>Xo(n,o)),ja(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,An,2);}),ja(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,An,2);}),Object.defineProperty(r,"isEmpty",{configurable:true,enumerable:false,get(){return this.issues.length===0}}));},aw=k("ZodError",T1),ut=k("ZodError",T1,void 0,{Parent:Error});var Xp=Ln(ut),Kp=zn(ut),Yp=Tn(ut),Jp=Nn(ut),ed=Ss(ut),td=vs(ut),rd=Cs(ut),nd=Ps(ut),od=ks(ut),id=As(ut),sd=Rs(ut),ad=Es(ut);function uw(){Be.localeError||Ae(L1());}function Xr(){Be.memoizer||Ae({memoizer:hi()});}var H=k("ZodType",(e,t)=>(uw(),q.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(F.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:true})},with(...e){return this.check(...e)},clone(e,t){return ce(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Jd(e,t))},superRefine(e,t){return this.check(eh(e,t))},overwrite(e){return this.check(vt(e))},optional(){return Hr(this)},exactOptional(){return zd(this)},nullable(){return vi(this)},nullish(){return Hr(vi(this))},nonoptional(e){return Zd(this,e)},array(){return ki(this)},or(e){return uo([this,e])},and(e){return Cd(this,e)},transform(e){return Wa(this,gc(e))},default(e){return Od(this,e)},prefault(e){return Dd(this,e)},catch(e){return Gd(this,e)},pipe(e){return Wa(this,e)},readonly(){return qd(this)},describe(e){let t=this.clone();return Ve.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ve.get(this);let t=this.clone();return Ve.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return F.hide(this,"~standard",{...Bs(this),jsonSchema:{input:eo(this,"input"),output:eo(this,"output")}})},set"~standard"(e){F.own(this,"~standard",e);},parse:function e(t,r){return Xp(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Kp(this,t,r,{callee:e})},safeParse(e,t){return Yp(this,e,t)},async safeParseAsync(e,t){return Jp(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){F.own(this,"spa",e);},validate(e,t){return Yo(this,e,t)},validateAsync(e,t){return Jo(this,e,t)},encode:function e(t,r){return ed(this,t,r,{callee:e})},decode:function e(t,r){return td(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await rd(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await nd(this,t,r,{callee:e})},safeEncode(e,t){return od(this,e,t)},safeDecode(e,t){return id(this,e,t)},async safeEncodeAsync(e,t){return sd(this,e,t)},async safeDecodeAsync(e,t){return ad(this,e,t)},toJSONSchema(e){return up(this,{})(e)},get description(){return Ve.get(this)?.description},get _def(){return this._zod.def}}),Ha=k("_ZodString",(e,t)=>{Zr.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mp(e,r,n);},F.derived({format:e=>Oe(e).format??null,minLength:e=>Oe(e).minimum??null,maxLength:e=>Oe(e).maximum??null},{regex(...e){return this.check(Bn(...e))},includes(...e){return this.check(Qn(...e))},startsWith(...e){return this.check(Vn(...e))},endsWith(...e){return this.check(jn(...e))},min(...e){return this.check(Wt(...e))},max(...e){return this.check(Vr(...e))},length(...e){return this.check(jr(...e))},nonempty(...e){return this.check(Wt(1,...e))},lowercase(e){return this.check(Un(e))},uppercase(e){return this.check(Gn(e))},trim(){return this.check(Xn())},normalize(...e){return this.check(Hn(...e))},toLowerCase(){return this.check(Kn())},toUpperCase(){return this.check(Yn())},slugify(){return this.check(Jn())}})),io=k("ZodString",(e,t)=>{Zr.init(e,t),Ha.init(e,t);},{email(e){return this.check(da(Xa,e))},url(e){return this.check(gi(Ci,e))},jwt(e){return this.check(za(mc,e))},emoji(e){return this.check(xa(Ya,e))},guid(e){return this.check(ha(Ka,e))},uuid(e){return this.check(ga(Tt,e))},uuidv4(e){return this.check(ya(Tt,e))},uuidv6(e){return this.check(_a(Tt,e))},uuidv7(e){return this.check(ba(Tt,e))},nanoid(e){return this.check($a(Ja,e))},cuid(e){return this.check(wa(ec,e))},cuid2(e){return this.check(Sa(tc,e))},ulid(e){return this.check(va(rc,e))},base64(e){return this.check(Ma(uc,e))},base64url(e){return this.check(Ia(lc,e))},xid(e){return this.check(Ca(nc,e))},ksuid(e){return this.check(Pa(oc,e))},ipv4(e){return this.check(ka(ic,e))},ipv6(e){return this.check(Aa(sc,e))},cidrv4(e){return this.check(Ra(ac,e))},cidrv6(e){return this.check(Ea(cc,e))},e164(e){return this.check(La(fc,e))},datetime(e){return this.check(yi(dr,e))},date(e){return this.check(_i(hr,e))},time(e){return this.check(bi(gr,e))},duration(e){return this.check(xi(yr,e))}});function Si(e){return Cm(io,e)}var de=k("ZodStringFormat",(e,t)=>{ue.init(e,t),Ha.init(e,t);}),dr=k("ZodISODateTime",(e,t)=>{hf.init(e,t),de.init(e,t);}),hr=k("ZodISODate",(e,t)=>{gf.init(e,t),de.init(e,t);}),gr=k("ZodISOTime",(e,t)=>{yf.init(e,t),de.init(e,t);}),yr=k("ZodISODuration",(e,t)=>{_f.init(e,t),de.init(e,t);}),Xa=k("ZodEmail",(e,t)=>{nf.init(e,t),de.init(e,t);});function N1(e){return da(Xa,e)}var Ka=k("ZodGUID",(e,t)=>{tf.init(e,t),de.init(e,t);});function O1(e){return ha(Ka,e)}var Tt=k("ZodUUID",(e,t)=>{rf.init(e,t),de.init(e,t);});function F1(e){return ga(Tt,e)}function D1(e){return ya(Tt,e)}function Z1(e){return _a(Tt,e)}function B1(e){return ba(Tt,e)}var Ci=k("ZodURL",(e,t)=>{af.init(e,t),de.init(e,t);});function U1(e){return gi(Ci,e)}function G1(e){return gi(Ci,{protocol:ei,hostname:yl,...F.normalizeParams(e)})}var Ya=k("ZodEmoji",(e,t)=>{cf.init(e,t),de.init(e,t);});function Q1(e){return xa(Ya,e)}var Ja=k("ZodNanoID",(e,t)=>{uf.init(e,t),de.init(e,t);});function V1(e){return $a(Ja,e)}var ec=k("ZodCUID",(e,t)=>{lf.init(e,t),de.init(e,t);});function j1(e){return wa(ec,e)}var tc=k("ZodCUID2",(e,t)=>{ff.init(e,t),de.init(e,t);});function q1(e){return Sa(tc,e)}var rc=k("ZodULID",(e,t)=>{mf.init(e,t),de.init(e,t);});function W1(e){return va(rc,e)}var nc=k("ZodXID",(e,t)=>{pf.init(e,t),de.init(e,t);});function H1(e){return Ca(nc,e)}var oc=k("ZodKSUID",(e,t)=>{df.init(e,t),de.init(e,t);});function X1(e){return Pa(oc,e)}var ic=k("ZodIPv4",(e,t)=>{bf.init(e,t),de.init(e,t);});function K1(e){return ka(ic,e)}var cd=k("ZodMAC",(e,t)=>{$f.init(e,t),de.init(e,t);});function Y1(e){return km(cd,e)}var sc=k("ZodIPv6",(e,t)=>{xf.init(e,t),de.init(e,t);});function J1(e){return Aa(sc,e)}var ac=k("ZodCIDRv4",(e,t)=>{wf.init(e,t),de.init(e,t);});function ey(e){return Ra(ac,e)}var cc=k("ZodCIDRv6",(e,t)=>{Sf.init(e,t),de.init(e,t);});function ty(e){return Ea(cc,e)}var uc=k("ZodBase64",(e,t)=>{vf.init(e,t),de.init(e,t);});function ry(e){return Ma(uc,e)}var lc=k("ZodBase64URL",(e,t)=>{Cf.init(e,t),de.init(e,t);});function ny(e){return Ia(lc,e)}var fc=k("ZodE164",(e,t)=>{Pf.init(e,t),de.init(e,t);});function oy(e){return La(fc,e)}var ud=k("ZodCreditCard",(e,t)=>{kf.init(e,t),de.init(e,t);});function iy(e){return Am(ud,e)}var ld=k("ZodIBAN",(e,t)=>{Af.init(e,t),de.init(e,t);});function sy(e){return Rm(ld,e)}var mc=k("ZodJWT",(e,t)=>{Rf.init(e,t),de.init(e,t);});function ay(e){return za(mc,e)}var Kr=k("ZodCustomStringFormat",(e,t)=>{Ef.init(e,t),de.init(e,t);});function cy(e,t,r={}){return qr(Kr,e,t,r)}function uy(e){return qr(Kr,"hostname",gl,e)}function ly(e){return qr(Kr,"hex",Ml,e)}function fy(e){return qr(Kr,"currency_code",bl,e)}function my(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=_t[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return qr(Kr,n,o,t)}var so=k("ZodNumber",(e,t)=>{Ks.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pp(e,r,n,o),e.isFinite=true;},F.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Oe(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Oe(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Oe(e);return !!t||!!r?.some(Number.isSafeInteger)},format:e=>Oe(e).format??null},{gt(e,t){return this.check(Lt(e,t))},gte(e,t){return this.check(pt(e,t))},min(e,t){return this.check(pt(e,t))},lt(e,t){return this.check(It(e,t))},lte(e,t){return this.check(mt(e,t))},max(e,t){return this.check(mt(e,t))},int(e){return this.check(qa(e))},safe(e){return this.check(qa(e))},positive(e){return this.check(Lt(0,e))},nonnegative(e){return this.check(pt(0,e))},negative(e){return this.check(It(0,e))},nonpositive(e){return this.check(mt(0,e))},multipleOf(e,t){return this.check(ur(e,t))},step(e,t){return this.check(ur(e,t))},finite(){return this}}));function fd(e){return Mm(so,e)}var Yr=k("ZodNumberFormat",(e,t)=>{Mf.init(e,t),so.init(e,t);});function qa(e){return Lm(Yr,e)}function py(e){return zm(Yr,e)}function dy(e){return Tm(Yr,e)}function hy(e){return Nm(Yr,e)}function gy(e){return Om(Yr,e)}var ao=k("ZodBoolean",(e,t)=>{ui.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dp(e,r,n);});function md(e){return Fm(ao,e)}var co=k("ZodBigInt",(e,t)=>{Ys.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>hp(e,r,n,o);},F.derived({minValue:e=>Oe(e).minimum??null,maxValue:e=>Oe(e).maximum??null,format:e=>Oe(e).format??null},{gte(e,t){return this.check(pt(e,t))},min(e,t){return this.check(pt(e,t))},gt(e,t){return this.check(Lt(e,t))},lt(e,t){return this.check(It(e,t))},lte(e,t){return this.check(mt(e,t))},max(e,t){return this.check(mt(e,t))},positive(e){return this.check(Lt(BigInt(0),e))},negative(e){return this.check(It(BigInt(0),e))},nonpositive(e){return this.check(mt(BigInt(0),e))},nonnegative(e){return this.check(pt(BigInt(0),e))},multipleOf(e,t){return this.check(ur(e,t))}}));function yy(e){return Zm(co,e)}var pc=k("ZodBigIntFormat",(e,t)=>{If.init(e,t),co.init(e,t);});function _y(e){return Um(pc,e)}function by(e){return Gm(pc,e)}var pd=k("ZodSymbol",(e,t)=>{Lf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gp(e,r,n,o);});function xy(e){return Qm(pd,e)}var dd=k("ZodUndefined",(e,t)=>{zf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_p(e,r,n,o);});function $y(e){return Vm(dd,e)}var hd=k("ZodNull",(e,t)=>{Tf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yp(e,r,n);});function gd(e){return jm(hd,e)}var yd=k("ZodAny",(e,t)=>{Nf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$p();});function wy(){return qm(yd)}var _d=k("ZodUnknown",(e,t)=>{Of.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wp();});function Wr(){return Wm(_d)}var bd=k("ZodNever",(e,t)=>{Ff.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xp(e,r,n);});function dc(e){return Hm(bd,e)}var xd=k("ZodVoid",(e,t)=>{Df.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bp(e,r,n,o);});function Sy(e){return Xm(xd,e)}var Pi=k("ZodDate",(e,t)=>{Zf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sp(e,r,n,o),e.min=(r,n)=>e.check(pt(r,n)),e.max=(r,n)=>e.check(mt(r,n));},F.derived({minDate:e=>{let{minimum:t}=Oe(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Oe(e);return t?new Date(t):null}},{}));function vy(e){return Km(Pi,e)}var $d=k("ZodArray",(e,t)=>{Xr(),Uf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Tp(e,r,n,o),e.element=t.element;},{min(e,t){return this.check(Wt(e,t))},nonempty(e){return this.check(Wt(1,e))},max(e,t){return this.check(Vr(e,t))},length(e,t){return this.check(jr(e,t))},unwrap(){return this.element}});function ki(e,t){return ep($d,e,t)}function Cy(e){let t=e._zod.def.shape;return hc(Object.keys(t))}var Ai=k("ZodObject",(e,t)=>{Xr(),Gf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Np(e,r,n,o),F.installLazyProp(e,"shape",r=>r._zod.def.shape,false);},{keyof(){return hc(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(F.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(F.mergeDefs(this._zod.def,{catchall:Wr()}))},loose(){return this.clone(F.mergeDefs(this._zod.def,{catchall:Wr()}))},strict(){return this.clone(F.mergeDefs(this._zod.def,{catchall:dc()}))},strip(){return this.clone(F.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return F.extend(this,e)},safeExtend(e){return F.safeExtend(this,e)},merge(e){return F.merge(this,e)},pick(e){return F.pick(this,e)},omit(e){return F.omit(this,e)},partial(...e){return F.partial(Ei,this,e[0])},exactPartial(...e){return F.partial(yc,this,e[0],"exactPartial")},required(...e){return F.required(_c,this,e[0])}});function Py(e,t){let r={type:"object",shape:e??{},...F.normalizeParams(t)};return new Ai(r)}function ky(e,t){return new Ai({type:"object",shape:e,catchall:dc(),...F.normalizeParams(t)})}function Ay(e,t){return new Ai({type:"object",shape:e,catchall:Wr(),...F.normalizeParams(t)})}var Ri=k("ZodUnion",(e,t)=>{li.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ba(e,r,n,o),e.options=t.options;});function uo(e,t){return new Ri({type:"union",options:e,...F.normalizeParams(t)})}var wd=k("ZodXor",(e,t)=>{Ri.init(e,t),Qf.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ba(e,r,n,o),e.options=t.options;});function Ry(e,t){return new wd({type:"union",options:e,inclusive:false,...F.normalizeParams(t)})}var Sd=k("ZodDiscriminatedUnion",(e,t)=>{Ri.init(e,t),jf.init(e,t);});function Ey(e,t,r){return new Sd({type:"union",options:t,discriminator:e,...F.normalizeParams(r)})}var vd=k("ZodIntersection",(e,t)=>{qf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Op(e,r,n,o);});function Cd(e,t){return new vd({type:"intersection",left:e,right:t})}var Pd=k("ZodTuple",(e,t)=>{Xr(),Js.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Fp(e,r,n,o);},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Ei({type:"optional",innerType:t}))})}});function kd(e,t,r){let n=t instanceof q,o=n?r:t,i=n?t:null;return new Pd({type:"tuple",items:e,rest:i,...F.normalizeParams(o)})}var no=k("ZodRecord",(e,t)=>{Xr(),Wf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Dp(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType;});function Ad(e,t,r){return !t||!t._zod?new no({type:"record",keyType:Si(),valueType:e,...F.normalizeParams(t)}):new no({type:"record",keyType:e,valueType:t,...F.normalizeParams(r)})}function My(e,t,r){return new no({type:"record",keyType:e,valueType:t,...F.normalizeParams(r),partial:true})}function Iy(e,t,r){return new no({type:"record",keyType:e,valueType:t,mode:"loose",...F.normalizeParams(r)})}var Rd=k("ZodMap",(e,t)=>{Xr(),Hf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Lp(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(zt(...r)),e.nonempty=r=>e.check(zt(1,r)),e.max=(...r)=>e.check(lr(...r)),e.size=(...r)=>e.check(Qr(...r));});function Ly(e,t,r){return new Rd({type:"map",keyType:e,valueType:t,...F.normalizeParams(r)})}var Ed=k("ZodSet",(e,t)=>{Xr(),Xf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zp(e,r,n,o),e.min=(...r)=>e.check(zt(...r)),e.nonempty=r=>e.check(zt(1,r)),e.max=(...r)=>e.check(lr(...r)),e.size=(...r)=>e.check(Qr(...r));});function zy(e,t){return new Ed({type:"set",valueType:e,...F.normalizeParams(t)})}var oo=k("ZodEnum",(e,t)=>{Kf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(n,o,i)=>vp(e,n,o),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new oo({...t,checks:[],...F.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new oo({...t,checks:[],...F.normalizeParams(o),entries:i})};});function hc(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new oo({type:"enum",entries:r,...F.normalizeParams(t)})}function Ty(e,t){return new oo({type:"enum",entries:e,...F.normalizeParams(t)})}var Md=k("ZodLiteral",(e,t)=>{Yf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Cp(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function Ny(e,t){return new Md({type:"literal",values:Array.isArray(e)?e:[e],...F.normalizeParams(t)})}var Id=k("ZodFile",(e,t)=>{Jf.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ap(e,r,n),e.min=(r,n)=>e.check(zt(r,n)),e.max=(r,n)=>e.check(lr(r,n)),e.mime=(r,n)=>e.check(Wn(Array.isArray(r)?r:[r],n));});function Oy(e){return tp(Id,e)}var Ld=k("ZodTransform",(e,t)=>{Xr(),em.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ip(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new ar(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(F.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(F.issue(s));}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)};});function gc(e){return new Ld({type:"transform",transform:e})}var Ei=k("ZodOptional",(e,t)=>{ea.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ua(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function Hr(e){return new Ei({type:"optional",innerType:e})}var yc=k("ZodExactOptional",(e,t)=>{tm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ua(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function zd(e){return new yc({type:"optional",innerType:e})}var Td=k("ZodNullable",(e,t)=>{rm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Zp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function vi(e){return new Td({type:"nullable",innerType:e})}function Fy(e){return Hr(vi(e))}var Nd=k("ZodDefault",(e,t)=>{nm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Gp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function Od(e,t){return new Nd({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():F.shallowClone(t)}})}var Fd=k("ZodPrefault",(e,t)=>{om.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function Dd(e,t){return new Fd({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():F.shallowClone(t)}})}var _c=k("ZodNonOptional",(e,t)=>{im.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function Zd(e,t){return new _c({type:"nonoptional",innerType:e,...F.normalizeParams(t)})}var Bd=k("ZodSuccess",(e,t)=>{sm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Rp(e,r,n),e.unwrap=()=>e._zod.def.innerType;});function Dy(e){return new Bd({type:"success",innerType:e})}var Ud=k("ZodCatch",(e,t)=>{am.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function Gd(e,t){return new Ud({type:"catch",innerType:e,catchValue:typeof t=="function"?t:F.constantCatch(t)})}var Qd=k("ZodNaN",(e,t)=>{cm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pp(e,r,n,o);});function Zy(e){return Jm(Qd,e)}var Mi=k("ZodPipe",(e,t)=>{ta.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>jp(e,r,n,o),e.in=t.in,e.out=t.out;});function Wa(e,t){return new Mi({type:"pipe",in:e,out:t})}var Ii=k("ZodCodec",(e,t)=>{Mi.init(e,t),fi.init(e,t);});function By(e,t,r){return new Ii({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function Uy(e){let t=e._zod.def;return new Ii({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Vd=k("ZodPreprocess",(e,t)=>{Mi.init(e,t),um.init(e,t);}),jd=k("ZodReadonly",(e,t)=>{lm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function qd(e){return new jd({type:"readonly",innerType:e})}var Wd=k("ZodTemplateLiteral",(e,t)=>{fm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kp(e,r,n);});function Gy(e,t){return new Wd({type:"template_literal",parts:e,...F.normalizeParams(t)})}var Hd=k("ZodLazy",(e,t)=>{mi.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hp(e,r,n,o),e.unwrap=()=>e._zod.def.getter();});function Xd(e){return new Hd({type:"lazy",getter:e})}var Kd=k("ZodPromise",(e,t)=>{pm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Wp(e,r,n,o),e.unwrap=()=>e._zod.def.innerType;});function Qy(e){return new Kd({type:"promise",innerType:e})}var Yd=k("ZodFunction",(e,t)=>{mm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Mp(e,r,n,o);});function Vy(e){return new Yd({type:"function",input:Array.isArray(e?.input)?kd(e?.input):e?.input??ki(Wr()),output:e?.output??Wr()})}var Li=k("ZodCustom",(e,t)=>{dm.init(e,t),H.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ep(e,r,n,o);});function jy(e){let t=new ge({check:"custom"});return t._zod.check=e,t}function qy(e,t){return rp(Li,e??(()=>true),t)}function Jd(e,t={}){return np(Li,e,t)}function eh(e,t){return op(e,t)}var Wy=ip,Hy=sp,th=k("ZodInstanceOf",(e,t)=>{Li.init(e,t);},{properties(e,t){return this.check(qn(e,t))}});function Xy(e,t={}){let r=new th({type:"custom",check:"custom",fn:n=>n instanceof e,abort:true,...F.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]});},r}var Ky=(...e)=>ap({Codec:Ii,Boolean:ao,String:io},...e);function Yy(e){let t=Xd(()=>uo([Si(e),fd(),md(),gd(),ki(t),Ad(Si(),t)]));return t}function Jy(e,t){return new Vd({type:"pipe",in:gc(e),out:t})}var lw={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function fw(e){Ae({customError:e});}function mw(){return Ae().customError}var rh;rh||(rh={});var zi={};or(zi,{ZodISODate:()=>hr,ZodISODateTime:()=>dr,ZodISODuration:()=>yr,ZodISOTime:()=>gr,date:()=>dw,datetime:()=>pw,duration:()=>gw,time:()=>hw});function pw(e){return yi(dr,e)}function dw(e){return _i(hr,e)}function hw(e){return bi(gr,e)}function gw(e){return xi(yr,e)}var O={...lo,...Va,iso:zi},yw=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function _w(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function e_(e,t){return e.map((r,n)=>n<t?r:r.optional())}function bw(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function xw(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:bw(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function $w(e,t){return O.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:true,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:true}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:true,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:true}),t.keySchema)for(let s of i){let a=t.keySchema.safeParse(s);a.success||n.issues.push({code:"invalid_key",origin:"record",issues:a.error.issues,input:s,path:[s],continue:true});}}).pipe(e)}function nh(e,t){if(e===null)return "z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return `${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let s of e){let a=nh(s,t);if(a===null)return null;i.push(a);}return `a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let s=nh(e[i],t);if(s===null)return null;o.push(`${i.length}:${i}=${s}`);}return `o${o.length}:{${o.join(",")}}`}finally{t.delete(e);}}var ww=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Sw=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Ti(e){return typeof e!="object"||e===null?false:Array.isArray(e)?e.some(Ti):typeof e.$ref=="string"?true:Object.entries(e).some(([t,r])=>ww.has(t)?Ti(r):!Sw.has(t)||typeof r!="object"||r===null?false:Object.values(r).some(Ti))}function t_(e){return e===1?"element":"elements"}function vw(e,t){return O.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===true){let i=new Map;for(let s=0;s<o.length;s++){let a=nh(o[s],new Set);if(a===null)continue;let c=i.get(a);if(c===void 0){i.set(a,s);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${s} duplicates the one at index ${c}`,input:o,path:[s],continue:true});}}if(t.containsSchema){let i=t.minContains??1,s=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,a=0;for(let c of o)if(t.containsSchema.safeParse(c).success&&++a>=s)break;a<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${t_(i)}; found ${a}`,input:o,continue:true}),t.maxContains!==void 0&&a>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${t_(t.maxContains)}`,input:o,continue:true});}}}).pipe(e)}function r_(e,t){if(e!==false)return e===void 0||e===true?O.any():Ye(e,t)}var Cw=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function n_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return O.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return O.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=xw(o,t),s=Ye(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===true&&o.length===1&&o[0]===null)return O.null();if(o.length===0)return O.never();if(o.length===1)return O.literal(o[0]);if(o.every(s=>typeof s=="string"))return O.enum(o);let i=o.map(s=>O.literal(s));return i.length<2?i[0]:O.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return O.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let s={...e,type:i};return n_(s,t)});return o.length===0?O.never():o.length===1?o[0]:O.union(o)}if(!r)return O.any();let n;switch(r){case "string":{let o=O.string();if(e.format){let i=e.format;i==="email"?o=o.check(O.email()):i==="uri"||i==="uri-reference"?o=o.check(O.url()):i==="uuid"||i==="guid"?o=o.check(O.uuid()):i==="date-time"?o=o.check(O.iso.datetime({offset:true})):i==="date"?o=o.check(O.iso.date()):i==="time"?o=o.check(O.regex(Cw)):i==="duration"?o=o.check(O.iso.duration()):i==="hostname"?o=o.check(O.hostname()):i==="ipv4"?o=o.check(O.ipv4()):i==="ipv6"?o=o.check(O.ipv6()):i==="mac"?o=o.check(O.mac()):i==="cidr"?o=o.check(O.cidrv4()):i==="cidr-v6"?o=o.check(O.cidrv6()):i==="base64"?o=o.check(O.base64()):i==="base64url"?o=o.check(O.base64url()):i==="e164"?o=o.check(O.e164()):i==="credit_card"?o=o.check(O.creditCard()):i==="iban"?o=o.check(O.iban()):i==="jwt"?o=o.check(O.jwt()):i==="emoji"?o=o.check(O.emoji()):i==="nanoid"?o=o.check(O.nanoid()):i==="cuid"?o=o.check(O.cuid()):i==="cuid2"?o=o.check(O.cuid2()):i==="ulid"?o=o.check(O.ulid()):i==="xid"?o=o.check(O.xid()):i==="ksuid"&&(o=o.check(O.ksuid()));}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case "number":case "integer":{let o=r==="integer"?O.number().int():O.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==true&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==true&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===true&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===true&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case "boolean":{n=O.boolean();break}case "null":{n=O.null();break}case "object":{let o={},i=e.properties||{},s=new Set(e.required||[]),a=typeof e.additionalProperties=="object"?Ye(e.additionalProperties,t):void 0;for(let[f,p]of Object.entries(i)){let m=Ye(p,t);Qe(o,f,s.has(f)?m:m.optional());}if(e.patternProperties){let f=e.patternProperties,p=Object.keys(f),m=[];for(let d of p){let g=Ye(f[d],t),_=O.string().regex(new RegExp(d));m.push(O.looseRecord(_,g));}let h=[];if(Object.keys(o).length>0&&h.push(O.object(o).passthrough()),h.push(...m),h.length===0)n=O.object({}).passthrough();else if(h.length===1)n=h[0];else {let d=O.intersection(h[0],h[1]);for(let g=2;g<h.length;g++)d=O.intersection(d,h[g]);n=d;}if(e.additionalProperties===false){let d=Object.keys(o),g=p.map(y=>new RegExp(y)),_=n;n=n.check(y=>{if(!gt(y.value))return;let b=[];for(let S of Object.keys(y.value))d.includes(S)||g.some(v=>v.test(S))||b.push(S);b.length&&y.issues.push({code:"unrecognized_keys",keys:b,input:y.value,inst:_});});}}else {let f=O.object(o);e.additionalProperties===false?n=f.strict():a?n=f.catchall(a):n=f.passthrough();}let c=e.propertyNames!==void 0&&e.propertyNames!==true,u=typeof e.minProperties=="number"?e.minProperties:void 0,l=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||u!==void 0||l!==void 0){let f;if(c){let p=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;f=Ye(p,t);}n=$w(n,{keySchema:f,minProperties:u,maxProperties:l});}break}case "array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=typeof e.minItems=="number"?e.minItems:0,a=o.map(f=>Ye(f,t)),c=e_(a,s),u=Array.isArray(i)?void 0:r_(i,t),l=O.tuple(c);n=u?l.rest(u):l,typeof e.minItems=="number"&&(n=n.check(O.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(O.maxLength(e.maxItems)));}else if(Array.isArray(i)){let s=typeof e.minItems=="number"?e.minItems:0,a=i.map(f=>Ye(f,t)),c=e_(a,s),u=r_(e.additionalItems,t),l=O.tuple(c);n=u?l.rest(u):l,typeof e.minItems=="number"&&(n=n.check(O.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(O.maxLength(e.maxItems)));}else if(i!==void 0){let s=Ye(i,t),a=O.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),n=a;}else n=O.array(O.any());(e.uniqueItems===true||e.contains!==void 0)&&(n=vw(n,{uniqueItems:e.uniqueItems===true,containsSchema:e.contains!==void 0?Ye(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function Ye(e,t){if(typeof e=="boolean")return e?O.any():O.never();let r=n_(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>Ye(u,t)),c=O.union(a);r=n?O.intersection(r,c):c;}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>Ye(u,t)),c=O.xor(a);r=n?O.intersection(r,c):c;}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:O.any();else {let a=n?r:Ye(e.allOf[0],t),c=n?0:1;for(let u=c;u<e.allOf.length;u++)a=O.intersection(a,Ye(e.allOf[u],t));r=a;}e.nullable===true&&t.version==="openapi-3.0"&&(r=O.nullable(r)),e.readOnly===true&&(r=O.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(o[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(o[a]=e[a]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Ti(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let a of ["minProperties","maxProperties"])e[a]!==void 0&&(o[a]=e[a]);}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Ti(e.contains)&&(o.contains=e.contains);for(let a of ["uniqueItems","minContains","maxContains"])e[a]!==void 0&&(o[a]=e[a]);}for(let a of Object.keys(e))yw.has(a)||Qe(o,a,e[a]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function o_(e,t){if(typeof e=="boolean")return e?O.any():O.never();let r;try{r=JSON.parse(JSON.stringify(e));}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=_w(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??Ve};return Ye(r,i)}var i_=Symbol("z.visit/resolving");function Ni(e,t){let r=typeof t=="function"?t:(s,a)=>{let c=t[s._zod.def.type];return c?c(s,a):s},n=new Map;function o(s){let a=n.get(s);if(a===i_)return new mi({type:"lazy",getter:()=>n.get(s)});if(a!==void 0)return a;n.set(s,i_);let c=i(s),u=r(c,c!==s);return n.set(s,u),u}function i(s){let a=s._zod.def,c=a.type;switch(c){case "object":{let u=a.shape,l=Object.keys(u),f=false,p={};for(let h of l){let d=o(u[h]);d!==u[h]&&(f=true),p[h]=d;}let m=a.catchall;return a.catchall&&(m=o(a.catchall),m!==a.catchall&&(f=true)),f?ce(s,{...a,shape:p,catchall:m}):s}case "array":{let u=o(a.element);return u===a.element?s:ce(s,{...a,element:u})}case "tuple":{let u=a.items,l=false,f=[];for(let m of u){let h=o(m);h!==m&&(l=true),f.push(h);}let p=a.rest;return a.rest&&(p=o(a.rest),p!==a.rest&&(l=true)),l?ce(s,{...a,items:f,rest:p}):s}case "record":case "map":{let u=o(a.keyType),l=o(a.valueType);return u===a.keyType&&l===a.valueType?s:ce(s,{...a,keyType:u,valueType:l})}case "set":{let u=o(a.valueType);return u===a.valueType?s:ce(s,{...a,valueType:u})}case "union":{let u=a.options,l=false,f=[];for(let p of u){let m=o(p);m!==p&&(l=true),f.push(m);}return l?ce(s,{...a,options:f}):s}case "intersection":{let u=o(a.left),l=o(a.right);return u===a.left&&l===a.right?s:ce(s,{...a,left:u,right:l})}case "optional":case "nullable":case "default":case "prefault":case "catch":case "readonly":case "nonoptional":case "promise":case "success":{let u=o(a.innerType);return u===a.innerType?s:ce(s,{...a,innerType:u})}case "pipe":{let u=o(a.in),l=o(a.out);return u===a.in&&l===a.out?s:ce(s,{...a,in:u,out:l})}case "function":{let u=o(a.input),l=o(a.output);return u===a.input&&l===a.output?s:ce(s,{...a,input:u,output:l})}case "lazy":{let u=a.getter,{_cachedInner:l,...f}=a;return ce(s,{...f,getter:()=>o(u())})}case "template_literal":case "string":case "number":case "int":case "boolean":case "bigint":case "symbol":case "undefined":case "null":case "void":case "never":case "any":case "unknown":case "date":case "nan":case "enum":case "literal":case "file":case "transform":case "custom":return s;default:return s}}return o(e)}function s_(e){return Ni(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:uo(r.options)}})}function Pw(e,t){if(!t?.length)return e;let r=e._zod.def;return ce(e,wt(r,{checks:[...r.checks??[],...t]}),{parent:true})}function a_(e){return Pw(e.out,e.checks)}function kw(e){return e.in._zod.traits.has("$ZodTransform")?a_(e):e.in}function c_(e){return Ni(e,{pipe:t=>kw(t._zod.def),default:(t,r)=>r?Hr(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function u_(e){return Ni(e,{pipe:t=>a_(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var oh={};or(oh,{bigint:()=>Mw,boolean:()=>Ew,date:()=>Iw,number:()=>Rw,string:()=>Aw});function Aw(e){return Pm(io,e)}function Rw(e){return Im(so,e)}function Ew(e){return Dm(ao,e)}function Mw(e){return Bm(co,e)}function Iw(e){return Ym(Pi,e)}var Fi=["logo","halftone"],f_=A.enum(Fi),Oi={logo:["blend","badge"],halftone:["color","mono"]},m_=A.enum([...Oi.logo,...Oi.halftone]),Xt=192,l_=e=>Math.ceil(e/3)*4,p_=A.object({width:A.number().int().min(1).max(Xt),height:A.number().int().min(1).max(Xt),data:A.string().max(l_(Xt*Xt*4))}).refine(e=>e.data.length===l_(e.width*e.height*4),{message:"Art image data does not match its width and height"}),ih=A.object({mode:f_,image:p_,intensity:A.number().min(0).max(1).optional(),variant:m_.optional(),matchEyes:A.boolean().optional()});var Lw=A.enum(["solid","linear","radial","angular","image"]),d_=A.object({type:A.literal("solid"),color:A.string()}),bc=A.object({color:A.string(),offset:A.number().min(0).max(100)}),h_=A.object({type:A.literal("linear"),stops:A.array(bc).min(2),angle:A.number().optional().default(0)}),g_=A.object({type:A.literal("radial"),stops:A.array(bc).min(2)}),y_=A.object({type:A.literal("angular"),stops:A.array(bc).min(2),angle:A.number().optional().default(0)}),__=A.enum(["cover","contain","tile"]),b_=A.enum(["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"]),x_=A.object({type:A.literal("image"),src:A.string().min(1),fit:__.optional().default("cover"),scale:A.number().min(.1).max(4).optional().default(1),position:b_.optional().default("center"),opacity:A.number().min(0).max(1).optional().default(1),underlay:A.string().optional()}),_r=A.union([A.string(),d_,h_,g_,y_,x_]);function bt(e,t="#000000"){return e?typeof e=="string"?{type:"solid",color:e}:e:{type:"solid",color:t}}function fo(e){return !e||typeof e=="string"?false:e.type==="linear"||e.type==="radial"||e.type==="angular"}function sh(e){return typeof e=="object"&&e!==null&&e.type==="image"}function zw(e,t="#000000"){let r=bt(e,t);return r.type==="solid"?r.color:r.type==="image"?r.underlay||t:r.stops[0]?.color||t}function $_(e="center"){let[t,r]=e.split("-");return e==="center"?"center":r?`${r} ${t}`:t==="top"||t==="bottom"?`center ${t}`:`${t} center`}function Tw(e){if(!e)return "#000000";if(typeof e=="string")return e;let t=bt(e);if(t.type==="solid")return t.color;if(t.type==="image"){let o=t.fit==="tile"?`${25*(t.scale??1)}% auto`:(t.scale??1)===1?t.fit==="contain"?"contain":"cover":`${100*(t.scale??1)}% auto`,i=t.fit==="tile"?"repeat":"no-repeat";return `${`url("${t.src.replace(/"/g,"%22")}")`} ${$_(t.position)} / ${o} ${i}, ${t.underlay??"transparent"}`}let n=[...t.stops].sort((o,i)=>o.offset-i.offset).map(o=>`${o.color} ${o.offset}%`).join(", ");return t.type==="linear"?`linear-gradient(${(t.angle??0)+90}deg, ${n})`:t.type==="angular"?`conic-gradient(from ${t.angle??0}deg, ${n})`:`radial-gradient(circle, ${n})`}var Nw=A.object({x:A.number(),y:A.number(),w:A.number(),h:A.number()});var ah=["square","rounded","circle","message","message-reverse","diya","diya-reverse","rounded-triangle","leaf","drop","plus","cross-rounded","hexagon","octagon","flower","heart","squircle","dots","extra-rounded","leaf-reverse","drop-reverse"],w_=["diamond","star","banner"],ch=A.enum([...ah,...w_]),Ow=A.enum(ah);var uh=["square","rounded","gear","circle","diya","extra-rounded","message","pointy","leaf","drop","octagon","bevel","squircle","cushion","shield","petal","leaf-reverse"],S_=["curly"],lh=A.enum([...uh,...S_]),Fw=A.enum(uh);var v_=["none","banner-bottom","banner-top","border","rounded-border","speech-bubble","banner-top-bottom","speech-bubble-top","chat-bubble","circle","polaroid","phone","ticket","badge","envelope","tag","menu-card","sticker","gradient-border","focus"],Nt=24,fh="Scan me",xc=.5,Jr=1.5,C_=A.enum(v_),$c=A.object({style:C_,text:A.string().max(Nt).optional(),color:A.string().optional(),textColor:A.string().optional(),secondaryText:A.string().max(Nt).optional(),secondaryColor:A.string().optional(),fontScale:A.number().min(xc).max(Jr).optional()});function fe(e,t=3){let r=10**t;return Math.round(e*r)/r+0}function $(e,t=3){return String(fe(e,t))}function M(e,...t){let r=e[0]??"";for(let n=0;n<t.length;n++){let o=t[n];r+=(typeof o=="number"?$(o):o)+(e[n+1]??"");}return r}var Dw={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Zw=/^[MmLlHhVvCcSsQqTtAaZz0-9.,+\-\s]*$/,mh=/[+-]?(?:\d+\.?\d*|\.\d+)/y;function Di(e,t=Number.POSITIVE_INFINITY){if(!Zw.test(e))return null;let r=[],n=0,o=()=>{for(;n<e.length&&/[\s,]/.test(e[n]);)n++;},i=()=>{o(),mh.lastIndex=n;let c=mh.exec(e);if(!c)return null;let u=c[0],l=u.indexOf(".");if(l>=0&&u.length-l-1>t)return null;n=mh.lastIndex;let f=Number(u);return Number.isFinite(f)?f:null},s=()=>{o();let c=e[n];return c==="0"||c==="1"?(n++,c==="1"?1:0):null},a=()=>(o(),n<e.length&&/[0-9.+-]/.test(e[n]));for(o();n<e.length;){let c=e[n],u=c.toUpperCase(),l=Dw[u];if(l===void 0||r.length===0&&u!=="M")return null;if(n++,l===0){r.push({command:c,values:[]}),o();continue}let f=c,p=true;for(;p||a();){let m=[];for(let h=0;h<l;h++){let d=u==="A"&&(h===3||h===4)?s():i();if(d===null)return null;m.push(d);}r.push({command:f,values:m}),u==="M"&&(f=c==="M"?"L":"l"),p=false;}o();}return r}function P_(e){let t=0;for(let{command:r}of e)t+=r.toUpperCase()==="A"?4:1;return t}function ph(e,t=1,r=0,n=0){let o="";for(let{command:i,values:s}of e){let a=i.toUpperCase(),c=i===a,u=c?r:0,l=c?n:0,f;switch(a){case "Z":f=[];break;case "H":f=[$(s[0]*t+u)];break;case "V":f=[$(s[0]*t+l)];break;case "A":f=[$(Math.abs(s[0])*t),$(Math.abs(s[1])*t),$(s[2]),String(s[3]),String(s[4]),$(s[5]*t+u),$(s[6]*t+l)];break;default:f=s.map((p,m)=>$(p*t+(m%2===0?u:l)));}o+=i+f.join(" ");}return o}function wc(e,t=.25){let r=[],n=[],o=[0,0],i=[0,0],s=()=>{n.length>2&&r.push(n),n=[];};for(let a of e)if(a.op==="M")s(),o=[a.x,a.y],i=o,n.push(o);else if(a.op==="L")i=[a.x,a.y],n.push(i);else if(a.op==="C"){let c=i,u=[a.x1,a.y1],l=[a.x2,a.y2],f=[a.x,a.y],p=Math.hypot(u[0]-c[0],u[1]-c[1])+Math.hypot(l[0]-u[0],l[1]-u[1])+Math.hypot(f[0]-l[0],f[1]-l[1]),m=Math.max(2,Math.min(64,Math.ceil(Math.sqrt(p/(4*t)))));for(let h=1;h<=m;h++){let d=h/m,g=1-d;n.push([g*g*g*c[0]+3*g*g*d*u[0]+3*g*d*d*l[0]+d*d*d*f[0],g*g*g*c[1]+3*g*g*d*u[1]+3*g*d*d*l[1]+d*d*d*f[1]]);}i=f;}else s(),i=o;return s(),r}function mo(e,t){let r=[o=>o[0]-t.x0,o=>t.x1-o[0],o=>o[1]-t.y0,o=>t.y1-o[1]],n=e;for(let o of r){if(n.length===0)break;let i=n;n=[];for(let s=0;s<i.length;s++){let a=i[s],c=i[(s+i.length-1)%i.length],u=o(a),l=o(c);u>=0?(l<0&&n.push(k_(c,a,l,u)),n.push(a)):l>=0&&n.push(k_(c,a,l,u));}}return n.length>2?n:[]}function k_(e,t,r,n){let o=r/(r-n);return [e[0]+(t[0]-e[0])*o,e[1]+(t[1]-e[1])*o]}function A_(e){return e.filter(t=>t.length>2).map(t=>`M${t.map(([r,n])=>`${$(r)} ${$(n)}`).join("L")}Z`).join("")}function en(e){let t=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=(s,a)=>{t=Math.min(t,s),r=Math.min(r,a),n=Math.max(n,s),o=Math.max(o,a);};for(let s of e)s.op==="C"?(i(s.x1,s.y1),i(s.x2,s.y2),i(s.x,s.y)):s.op!=="Z"&&i(s.x,s.y);return Number.isFinite(t)?{x0:t,y0:r,x1:n,y1:o}:null}var Bw={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function M_(e){return e.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(t,r)=>{if(r[0]==="#"){let n=r[1].toLowerCase()==="x"?Number.parseInt(r.slice(2),16):Number.parseInt(r.slice(1),10);return Number.isInteger(n)&&n>0&&n<=1114111&&!(n>=55296&&n<=57343)?String.fromCodePoint(n):t}return Bw[r.toLowerCase()]??t})}var Uw=60,dh=62,hh=47,Gw=61,R_=34,E_=39,yh=/\s*/y,Qw=/[^\s/>]*/y,Vw=/[^\s>]*/y,jw=/[^\s=]*/y;function po(e,t,r){return e.lastIndex=r,e.test(t)?e.lastIndex:r}function qw(e,t){let r=e.length,n=w=>{let x=Number.POSITIVE_INFINITY,P=-1;return C=>((C<x||P>=0&&P<C)&&(x=C,P=e.indexOf(w,C)),P)},o=n("-->"),i=n("?>"),s=n("]]>"),a=n(">"),c,u=w=>{let x=e.charCodeAt(w);if(x!==R_&&x!==E_)return w+1;let P=e.indexOf(e[w],w+1);return P<0?r:P+1},l=w=>{for(let x=w;x<r&&!c?.[x];x=u(x)){let P=e.charCodeAt(x);if(P===dh||P===hh&&e.charCodeAt(x+1)===dh)return x}c??=new Uint8Array(r);for(let x=w;x<r&&!c[x];x=u(x))c[x]=1;return -1},f=-1,p=-1,m=-1,h=-1,d=w=>{let x=w+1;if(x<f||x>=p){f=x,p=po(Qw,e,x),m=-1;for(let C=p;C>x;C--){let E=e.charCodeAt(C);if((C===p||E===R_||E===E_)&&(h=l(C),h>=0)){m=C;break}}}if(m<=x)return -1;let P=e.charCodeAt(h)===hh;return t.open(e.slice(x,m),e.slice(m,h),P),h+(P?2:1)},g=-1,_=-1,y=-1,b=w=>{let x=w+2;if(x<g||x>=_){g=x,_=po(Vw,e,x);let P=po(yh,e,_);y=_>x&&e.charCodeAt(P)===dh?P:-1;}return y},S=w=>{if(e.startsWith("<!--",w)){let x=o(w+4);if(x>=0)return x+3}if(e.startsWith("<?",w)){let x=i(w+2);if(x>=0)return x+2}if(e.startsWith("<![CDATA[",w)){let x=s(w+9);if(x>=0)return t.cdata(e.slice(w+9,x)),x+3}if(e.startsWith("<!",w)){let x=a(w+2);if(x>=0)return x+1}if(e.charCodeAt(w+1)===hh){let x=b(w);return x<0?-1:(t.close(),x+1)}return d(w)},v=0;for(;v<r;)if(e.charCodeAt(v)===Uw){let w=S(v);v=w<0?v+1:w;}else {let w=e.indexOf("<",v),x=w<0?r:w;t.text(e.slice(v,x)),v=x;}}function Ww(e){let t={},r=0;for(;r<e.length;){let n=po(jw,e,r);if(n===r){r++;continue}let o=po(yh,e,n);if(e.charCodeAt(o)===Gw){let i=po(yh,e,o+1),s=e[i],a=s==='"'||s==="'"?e.indexOf(s,i+1):-1;if(a>=0){t[e.slice(r,n)]=M_(e.slice(i+1,a)),r=a+1;continue}}r=n;}return t}function br(e){let t={name:"#root",attrs:{},children:[],text:""},r=[t],n=()=>r.at(-1);qw(e,{open(i,s,a){let c=Ww(s),u={name:i,attrs:c,children:[],text:""};n().children.push(u),a||r.push(u);},close(){r.length>1&&r.pop();},text(i){n().text+=M_(i);},cdata(i){n().text+=i;}});let o=i=>{for(let s of i.children){if(s.name==="svg")return s;let a=o(s);if(a)return a}return null};return o(t)}var ho=[1,0,0,1,0,0];function Se(e,t){let[r,n,o,i,s,a]=e,[c,u,l,f,p,m]=t;return [r*c+o*u,n*c+i*u,r*l+o*f,n*l+i*f,r*p+o*m+s,n*p+i*m+a]}function re(e,t,r){return [e[0]*t+e[2]*r+e[4],e[1]*t+e[3]*r+e[5]]}function go(e){return Math.sqrt(Math.abs(e[0]*e[3]-e[1]*e[2]))}function Ot(e){return e?(e.match(/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi)??[]).map(Number):[]}function xt(e){let t=ho;if(!e)return t;for(let[,r,n]of e.matchAll(/(matrix|translate|scale|rotate|skewX|skewY)\s*\(([^)]*)\)/g)){let o=Ot(n),i=ho;switch(r){case "matrix":o.length===6&&(i=o);break;case "translate":i=[1,0,0,1,o[0]??0,o[1]??0];break;case "scale":i=[o[0]??1,0,0,o[1]??o[0]??1,0,0];break;case "rotate":{let s=(o[0]??0)*Math.PI/180,a=Math.cos(s),c=Math.sin(s),[u,l]=[o[1]??0,o[2]??0];i=Se(Se([1,0,0,1,u,l],[a,c,-c,a,0,0]),[1,0,0,1,-u,-l]);break}case "skewX":i=[1,0,Math.tan((o[0]??0)*Math.PI/180),1,0,0];break;case "skewY":i=[1,Math.tan((o[0]??0)*Math.PI/180),0,1,0,0];break;}t=Se(t,i);}return t}var gh=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/y;function Hw(e,t,r,n,o,i,s,a,c){if(e===a&&t===c)return [];let u=Math.abs(r),l=Math.abs(n);if(u===0||l===0)return [{op:"L",x:a,y:c}];let f=o*Math.PI/180,p=Math.cos(f),m=Math.sin(f),h=(e-a)/2,d=(t-c)/2,g=p*h+m*d,_=-m*h+p*d,y=g*g/(u*u)+_*_/(l*l);y>1&&(u*=Math.sqrt(y),l*=Math.sqrt(y));let b=u*u*l*l-u*u*_*_-l*l*g*g,S=u*u*_*_+l*l*g*g,v=(i===s?-1:1)*Math.sqrt(Math.max(0,b/S)),w=v*u*_/l,x=-v*l*g/u,P=p*w-m*x+(e+a)/2,C=m*w+p*x+(t+c)/2,E=(ee,G,K,pe)=>Math.atan2(ee*pe-G*K,ee*K+G*pe),I=E(1,0,(g-w)/u,(_-x)/l),L=E((g-w)/u,(_-x)/l,(-g-w)/u,(-_-x)/l);!s&&L>0?L-=2*Math.PI:s&&L<0&&(L+=2*Math.PI);let z=Math.max(1,Math.ceil(Math.abs(L)/(Math.PI/2)-1e-9)),D=L/z,B=4/3*Math.tan(D/4),N=(ee,G)=>[P+u*p*ee-l*m*G,C+u*m*ee+l*p*G],j=[];for(let ee=0;ee<z;ee++){let G=I+ee*D,K=G+D,[pe,Ie]=N(Math.cos(G)-B*Math.sin(G),Math.sin(G)+B*Math.cos(G)),[$e,Z]=N(Math.cos(K)+B*Math.sin(K),Math.sin(K)-B*Math.cos(K)),[Y,J]=ee===z-1?[a,c]:N(Math.cos(K),Math.sin(K));j.push({op:"C",x1:pe,y1:Ie,x2:$e,y2:Z,x:Y,y:J});}return j}function Kt(e){let t=[],r=0,n=0,o=0,i=0,s=0,a="",c=null,u=null,l=()=>{for(;r<e.length&&/[\s,]/.test(e[r]);)r++;},f=()=>{l(),gh.lastIndex=r;let h=gh.exec(e);return h?(r=gh.lastIndex,Number(h[0])):null},p=()=>{l();let h=e[r];return h==="0"||h==="1"?(r++,h==="1"):null},m=h=>{let d=[];for(let g=0;g<h;g++){let _=f();if(_===null)return null;d.push(_);}return d};for(;l(),!(r>=e.length);){let h=e[r];if(/[MmLlHhVvCcSsQqTtAaZz]/.test(h))a=h,r++;else if(!a||a==="Z"||a==="z")break;let d=a===a.toLowerCase(),g=d?n:0,_=d?o:0,y=a.toUpperCase();if(y==="Z"){t.push({op:"Z"}),n=i,o=s,c=null,u=null;continue}if(y==="A"){let w=m(3),x=p(),P=p(),C=m(2);if(!(w&&C)||x===null||P===null)break;let[E,I,L]=w,z=C[0]+g,D=C[1]+_;t.push(...Hw(n,o,E,I,L,x,P,z,D)),n=z,o=D,c=null,u=null;continue}let b={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2}[y]??0,S=m(b);if(!S)break;let v=S;switch(y){case "M":n=v[0]+g,o=v[1]+_,i=n,s=o,t.push({op:"M",x:n,y:o}),a=d?"l":"L",c=null,u=null;break;case "L":case "H":case "V":y!=="V"&&(n=v[0]+g),y==="V"?o=v[0]+_:y==="L"&&(o=v[1]+_),t.push({op:"L",x:n,y:o}),c=null,u=null;break;case "C":case "S":{let w,x;y==="C"?(w=[v[0]+g,v[1]+_],x=v.slice(2)):(w=c?[2*n-c[0],2*o-c[1]]:[n,o],x=v);let P=[x[0]+g,x[1]+_],C=[x[2]+g,x[3]+_];t.push({op:"C",x1:w[0],y1:w[1],x2:P[0],y2:P[1],x:C[0],y:C[1]}),[n,o]=C,c=P,u=null;break}case "Q":case "T":{let w,x;y==="Q"?(w=[v[0]+g,v[1]+_],x=[v[2]+g,v[3]+_]):(w=u?[2*n-u[0],2*o-u[1]]:[n,o],x=[v[0]+g,v[1]+_]),t.push({op:"C",x1:n+2/3*(w[0]-n),y1:o+2/3*(w[1]-o),x2:x[0]+2/3*(w[0]-x[0]),y2:x[1]+2/3*(w[1]-x[1]),x:x[0],y:x[1]}),[n,o]=x,u=w,c=null;break}}}return t}var Sc=.5522847498;function Ft(e,t,r,n){if(r<=0||n<=0)return [];let o=r*Sc,i=n*Sc;return [{op:"M",x:e+r,y:t},{op:"C",x1:e+r,y1:t+i,x2:e+o,y2:t+n,x:e,y:t+n},{op:"C",x1:e-o,y1:t+n,x2:e-r,y2:t+i,x:e-r,y:t},{op:"C",x1:e-r,y1:t-i,x2:e-o,y2:t-n,x:e,y:t-n},{op:"C",x1:e+o,y1:t-n,x2:e+r,y2:t-i,x:e+r,y:t},{op:"Z"}]}function Dt(e,t,r,n,o=0,i=0){if(r<=0||n<=0)return [];let s=Math.min(Math.max(o,0),r/2),a=Math.min(Math.max(i,0),n/2);if(s===0||a===0)return [{op:"M",x:e,y:t},{op:"L",x:e+r,y:t},{op:"L",x:e+r,y:t+n},{op:"L",x:e,y:t+n},{op:"Z"}];let c=s*Sc,u=a*Sc,l=e+r,f=t+n;return [{op:"M",x:e+s,y:t},{op:"L",x:l-s,y:t},{op:"C",x1:l-s+c,y1:t,x2:l,y2:t+a-u,x:l,y:t+a},{op:"L",x:l,y:f-a},{op:"C",x1:l,y1:f-a+u,x2:l-s+c,y2:f,x:l-s,y:f},{op:"L",x:e+s,y:f},{op:"C",x1:e+s-c,y1:f,x2:e,y2:f-a+u,x:e,y:f-a},{op:"L",x:e,y:t+a},{op:"C",x1:e,y1:t+a-u,x2:e+s-c,y2:t,x:e+s,y:t},{op:"Z"}]}var Cc="qrdx.frame",Pc=1,_o="custom",we={minArtboard:50,maxArtboard:2e3,maxCoordinate:4e3,maxDecimals:3,maxShapes:64,maxLabels:8,maxPolygonPoints:256,maxPathLength:16e3,maxSegments:2e3,maxGradientSteps:64,maxGradientWork:16e3,maxBytes:32768,minQrShare:.5,minPadding:.04,defaultPadding:.08,maxTextLength:Nt},T_=["wifi","star","heart","phone","headphones","calendar","user","chat","bag","bell","cup","card","check","info","home","pin","share","download","clock","snowflake","pumpkin","tree","sparkle","gift"],Bi=.95,N_=200,O_=["frame","text","accent","background"],Xw=/[\t\n\v\f\r\u0085\u2028\u2029]/g,Kw=/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u115f\u1160\u17b4\u17b5\u180b-\u180f\u200b-\u200f\u202a-\u202e\u2060-\u206f\u3164\ufe00-\ufe0f\ufeff\uffa0\ufff0-\ufffb]|\udb40[\udc00-\udcff]|[\ud800-\udbff](?![\udc00-\udfff])|(?<![\ud800-\udbff])[\udc00-\udfff]/g;function bo(e,t=Nt){let r=e.slice(0,1e3).normalize("NFC").replace(Xw," ").replace(Kw,"").replace(/\s+/g," ").trim();return Array.from(r).slice(0,Math.max(0,t)).join("").trim()}function Yw(e){for(let t of e)if((t.codePointAt(0)??0)>255)return false;return true}var xh=e=>Math.abs(e*1e3-Math.round(e*1e3))<1e-6,Re=A.number().min(-we.maxCoordinate).max(we.maxCoordinate).refine(xh,{message:`Numbers may have at most ${we.maxDecimals} decimals`}),Je=Re.refine(e=>e>0,{message:"Must be greater than 0"}),vc=Re.refine(e=>e>=0,{message:"Must not be negative"}),Zi=A.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,"Use a #rgb or #rrggbb color"),I_=A.union([A.enum(O_),Zi]),F_=e=>A.object({mix:A.tuple([e,e]),amount:A.number().min(0).max(1).refine(xh)}).strict(),yo=A.union([I_,F_(I_)]),Jw=A.union([Zi,F_(A.union([A.enum(["frame","accent","background"]),Zi]))]),xr=A.union([yo,A.object({gradient:A.object({from:yo,to:yo,direction:A.enum(["horizontal","vertical"]).optional(),steps:A.int().min(2).max(we.maxGradientSteps).optional()}).strict()}).strict()]),_h={x:Re,y:Re,width:Je,height:Je},e6=A.object({type:A.literal("rect"),..._h,radius:vc.optional(),fill:xr,hole:A.object({..._h,radius:vc.optional()}).strict().optional()}).strict(),t6=A.object({type:A.literal("circle"),cx:Re,cy:Re,r:Je,hole:Je.optional(),fill:xr}).strict(),r6=A.object({type:A.literal("ellipse"),cx:Re,cy:Re,rx:Je,ry:Je,fill:xr}).strict(),n6=A.object({type:A.literal("polygon"),points:A.array(A.tuple([Re,Re])).min(3).max(we.maxPolygonPoints),fill:xr}).strict(),o6=A.object({type:A.literal("path"),d:A.string().min(2).max(we.maxPathLength),fill:xr,fillRule:A.enum(["nonzero","evenodd"]).optional()}).strict(),i6=A.object({type:A.literal("line"),x1:Re,y1:Re,x2:Re,y2:Re,width:Je,cap:A.enum(["butt","round"]).optional(),dash:A.tuple([Je,Je]).optional(),fill:xr}).strict(),s6=A.object({type:A.literal("icon"),icon:A.enum(T_),x:Re,y:Re,size:Je,fill:xr}).strict(),D_=A.discriminatedUnion("type",[e6,t6,r6,n6,o6,i6,s6]),Z_={id:A.string().regex(/^[a-z][a-z0-9-]{0,31}$/),slot:A.enum(["primary","secondary","fixed"]),text:A.string().max(200),maxLength:A.int().min(1).max(Nt).optional(),color:yo,weight:A.enum(["bold","regular"]).optional(),collapse:A.object({y:Re,height:Je}).strict().optional()},a6=A.object({type:A.literal("text"),...Z_,box:A.object(_h).strict(),align:A.enum(["start","middle","end"]).optional(),fontSize:Je.optional()}).strict(),c6=A.object({type:A.literal("curved"),...Z_,curve:A.object({cx:Re,cy:Re,radius:Je,side:A.enum(["top","bottom"]),spread:A.number().min(20).max(300).refine(xh).optional()}).strict(),fontSize:Je}).strict(),B_=A.discriminatedUnion("type",[a6,c6]),L_=Re.refine(e=>e>=we.minArtboard&&e<=we.maxArtboard,{message:`Artboard sides must be ${we.minArtboard} to ${we.maxArtboard} units`}),u6=A.object({kind:A.literal(Cc),version:A.literal(Pc),artboard:A.object({width:L_,height:L_}).strict(),qr:A.object({x:Re,y:Re,size:Je,padding:vc.optional(),radius:vc.optional(),plate:A.enum(["opaque","background"]).optional()}).strict(),colors:A.object({frame:Zi,text:Jw.optional(),accent:Zi.optional()}).strict(),shapes:A.array(D_).max(we.maxShapes),labels:A.array(B_).max(we.maxLabels),bleed:A.union([A.literal("none"),yo]).optional()}).strict();function kc(e){let t=xo(e);return {x0:e.qr.x-t,y0:e.qr.y-t,x1:e.qr.x+e.qr.size+t,y1:e.qr.y+e.qr.size+t}}function l6(e){return {x0:e.qr.x,y0:e.qr.y,x1:e.qr.x+e.qr.size,y1:e.qr.y+e.qr.size}}function xo(e){return e.qr.padding??e.qr.size*we.defaultPadding}var $h=.52,f6=.35;function m6(e){let t=e.fontSize??e.box.height*$h;return Math.min(t*Jr,e.box.height*Bi)}var bh=(e,t)=>Math.min(e.x1,t.x1)-Math.max(e.x0,t.x0)>1e-6&&Math.min(e.y1,t.y1)-Math.max(e.y0,t.y0)>1e-6;function z_(e){let t=kc(e),r=Math.min(e.qr.radius??0,(t.x1-t.x0)/2,(t.y1-t.y0)/2),n=[[t.x0+r,t.y0+r,Math.PI],[t.x1-r,t.y0+r,-Math.PI/2],[t.x1-r,t.y1-r,0],[t.x0+r,t.y1-r,Math.PI/2]],o=[];for(let[i,s,a]of n)for(let c=0;c<=8;c++){let u=a+Math.PI/2*(c/8);o.push([i+r*Math.cos(u),s+r*Math.sin(u)]);}return o}function p6([e,t],r,n){if(e<r.x-.01||t<r.y-.01||e>r.x+r.width+.01||t>r.y+r.height+.01)return false;let i=Math.min(n,r.width/2,r.height/2),s=Math.min(Math.max(e,r.x+i),r.x+r.width-i),a=Math.min(Math.max(t,r.y+i),r.y+r.height-i);return Math.hypot(e-s,t-a)<=i+.01}function d6(e){let t=0;return e.forEach(([r,n],o)=>{let[i,s]=e[(o+1)%e.length];t+=r*s-i*n;}),Math.abs(t)/2}function h6(e,t,r){let n=kc(t);if(e.fill==="background"||!bh(r,n))return false;if(e.type==="rect"&&e.hole){let{hole:o}=e;return !z_(t).every(i=>p6(i,o,o.radius??0))}if(e.type==="circle"&&e.hole){let o=e.hole;return !z_(t).every(([i,s])=>Math.hypot(i-e.cx,s-e.cy)<=o+.01)}if(e.type==="polygon"){let o=mo(e.points,n);return o.length>2&&d6(o)>1e-6}return true}function wh(e){switch(e.type){case "rect":return {bounds:{x0:e.x,y0:e.y,x1:e.x+e.width,y1:e.y+e.height},segments:e.hole?18:9};case "circle":return {bounds:{x0:e.cx-e.r,y0:e.cy-e.r,x1:e.cx+e.r,y1:e.cy+e.r},segments:e.hole?10:5};case "ellipse":return {bounds:{x0:e.cx-e.rx,y0:e.cy-e.ry,x1:e.cx+e.rx,y1:e.cy+e.ry},segments:5};case "polygon":{let t=e.points.map(([n])=>n),r=e.points.map(([,n])=>n);return {bounds:{x0:Math.min(...t),y0:Math.min(...r),x1:Math.max(...t),y1:Math.max(...r)},segments:e.points.length}}case "path":{let t=Di(e.d,we.maxDecimals);return t?{bounds:en(Kt(e.d)),segments:P_(t)}:{bounds:null,segments:0}}case "line":{let t=e.width/2,r=Math.hypot(e.x2-e.x1,e.y2-e.y1),n=e.dash?Math.ceil(r/(e.dash[0]+e.dash[1])):1;return {bounds:{x0:Math.min(e.x1,e.x2)-t,y0:Math.min(e.y1,e.y2)-t,x1:Math.max(e.x1,e.x2)+t,y1:Math.max(e.y1,e.y2)+t},segments:n*(e.cap==="round"?4:5)}}default:return {bounds:{x0:e.x,y0:e.y,x1:e.x+e.size,y1:e.y+e.size},segments:N_}}}function g6(e,t){let r=(y,b=[])=>t.addIssue({code:"custom",message:y,path:b}),n=we,o=new TextEncoder().encode(JSON.stringify(e)).length;if(o>n.maxBytes){r(`The spec is ${o} bytes; the limit is ${n.maxBytes}`);return}let{width:i,height:s}=e.artboard,a=Math.max(i,s)*.005,c={x0:-a,y0:-a,x1:i+a,y1:s+a},u=y=>y.x0>=c.x0&&y.y0>=c.y0&&y.x1<=c.x1&&y.y1<=c.y1,{qr:l}=e,f=xo(e);f<l.size*n.minPadding-1e-9&&r(`qr.padding must be at least ${n.minPadding*100}% of qr.size`,["qr","padding"]),l.size<Math.min(i,s)*n.minQrShare-1e-9&&r(`qr.size must be at least ${n.minQrShare*100}% of the artboard's shorter side`,["qr","size"]);let p=kc(e);(p.x0<-1e-9||p.y0<-1e-9||p.x1>i+1e-9||p.y1>s+1e-9)&&r("The code and its padding must sit inside the artboard",["qr"]),(l.radius??0)>(l.size+2*f)/2&&r("qr.radius is larger than half the plate",["qr","radius"]);let m=0,h=0;e.shapes.forEach((y,b)=>{let S=["shapes",b],{bounds:v,segments:w}=wh(y);if(!v){r("Path data must use only M L H V C S Q T A Z, plain numbers (up to 3 decimals) and start with M",[...S,"d"]);return}if(u(v)||r("The shape extends outside the artboard",S),y.type==="rect"&&y.hole){let{hole:x}=y;(x.x<y.x||x.y<y.y||x.x+x.width>y.x+y.width+1e-9||x.y+x.height>y.y+y.height+1e-9)&&r("The hole must sit inside its rect",[...S,"hole"]);}y.type==="circle"&&y.hole&&y.hole>=y.r&&r("The hole must be smaller than the circle",[...S,"hole"]),l.plate==="background"&&h6(y,e,v)&&r('With qr.plate "background", only background fills (or a ring whose hole holds the plate) may lie under the plate',S),m+=w,typeof y.fill=="object"&&"gradient"in y.fill&&(h+=(y.fill.gradient.steps??32)*w);}),m>n.maxSegments&&r(`The shapes have ${m} segments; the limit is ${n.maxSegments}`,["shapes"]),h>n.maxGradientWork&&r("Gradient fills are too detailed (fewer steps or simpler shapes)",["shapes"]);let d=[],g=new Set,_=new Set;e.labels.forEach((y,b)=>{let S=["labels",b];g.has(y.id)&&r(`Label id "${y.id}" is used twice`,[...S,"id"]),g.add(y.id),y.slot!=="fixed"&&(_.has(y.slot)&&r(`Only one label may use the ${y.slot} slot`,[...S,"slot"]),_.add(y.slot));let v=y.maxLength??n.maxTextLength;y.text!==bo(y.text,v)&&r(`Label text must be at most ${v} characters, trimmed, with no control or invisible characters (see sanitizeFrameText)`,[...S,"text"]);let w;if(y.type==="text"){w={x0:y.box.x,y0:y.box.y,x1:y.box.x+y.box.width,y1:y.box.y+y.box.height},y.fontSize!==void 0&&y.fontSize>y.box.height*Bi+1e-9&&r("fontSize may be at most 95% of the label's row height",[...S,"fontSize"]);let x=y.box.y+y.box.height/2,P=m6(y)*f6,C={x0:w.x0,x1:w.x1,y0:x-P,y1:x+P};(bh(w,l6(e))||bh(C,p))&&r("The label overlaps the code or its padding",[...S,"box"]);}else {let{cx:x,cy:P,radius:C}=y.curve,E=y.fontSize*Jr*.6;w={x0:x-C-E,y0:P-C-E,x1:x+C+E,y1:P+C+E};let I=Math.hypot(Math.max(p.x0-x,0,x-p.x1),Math.max(p.y0-P,0,P-p.y1));Math.hypot(Math.max(Math.abs(p.x0-x),Math.abs(p.x1-x)),Math.max(Math.abs(p.y0-P),Math.abs(p.y1-P)))<=C-E||I>=C+E||r("The curved label crosses the code or its padding",[...S,"curve"]);}if(u(w)||r("The label extends outside the artboard",S),y.collapse){let x=y.collapse,P=x.y+x.height;(x.y<-1e-9||P>s+1e-9)&&r("The collapse band must sit inside the artboard",[...S,"collapse"]),P>p.y0+1e-6&&x.y<p.y1-1e-6&&r("The collapse band crosses the code or its padding",[...S,"collapse"]);for(let C of d)P>C.y+1e-6&&x.y<C.y+C.height-1e-6&&r("Collapse bands may not overlap",[...S,"collapse"]);d.push(x);}});}var tn=u6.superRefine(g6);function y6(e){let t=tn.safeParse(e);return t.success?[]:t.error.issues.map(r=>r.path.length>0?`${r.path.join(".")}: ${r.message}`:r.message)}var U_=$c.extend({style:A.literal(_o),spec:tn}),Sh=A.discriminatedUnion("style",[$c,U_]);var G_=["circle","circle-large","square","diamond","circle-mixed","pacman","rounded","small-square","vertical-line","horizontal-line","liquid","liquid-horizontal","liquid-vertical","classy","classy-rounded","leaf","plus","hexagon","star","heart","random-dots","mosaic","octagon"],vh=A.enum(G_);var Q_=["square","rounded","circle"],Ch=A.enum(Q_),V_=A.object({src:A.string(),height:A.number(),width:A.number(),excavate:A.boolean(),x:A.number().optional(),y:A.number().optional(),padding:A.number().min(0).optional(),shape:Ch.optional(),plate:A.string().optional()}),j_=.1,Rc=.3,Ph=.25,q_=2,_6=A.object({size:A.number().min(j_).max(Rc).optional(),padding:A.number().min(0).max(q_).optional(),x:A.number().min(0).max(1).optional(),y:A.number().min(0).max(1).optional(),shape:Ch.optional(),plate:A.string().optional()}),W_=A.enum(["L","M","Q","H"]),Ui=.5,Ec=1,kh=.07,H_=["square","circle","heart"],X_=A.enum(H_),Ah=3,Ct=64,Zt=8,Rh=.42,K_=A.object({type:A.literal("silhouette"),width:A.number().int().min(Zt).max(Ct),height:A.number().int().min(Zt).max(Ct),cells:A.string().max(Ct*Ct).regex(/^[01]*$/).describe('Row by row, "1" inside the shape and "0" outside: width \xD7 height characters')}).refine(e=>e.cells.length===e.width*e.height,{message:"Silhouette cells do not match its width and height"}),Y_=A.union([X_,K_]),Mc=["topLeft","topRight","bottomLeft"],Ac=A.object({outer:_r.optional(),inner:_r.optional()}),J_=A.object({topLeft:Ac.optional(),topRight:Ac.optional(),bottomLeft:Ac.optional()}),b6=A.object({value:A.string(),size:A.number().optional(),level:W_.optional(),bgColor:_r.optional(),fgColor:_r.optional(),eyeColor:_r.optional(),dotColor:_r.optional(),bodyPattern:vh.optional(),cornerEyePattern:lh.optional(),cornerEyeDotPattern:ch.optional(),margin:A.number().optional(),imageSettings:V_.optional(),isOGContext:A.boolean().optional(),templateId:A.string().optional(),customProps:A.record(A.string(),A.any()).optional(),frame:Sh.optional(),art:ih.optional(),eyeColors:J_.optional(),moduleScale:A.number().min(Ui).max(Ec).optional(),autoLevel:A.boolean().optional(),shape:Y_.optional()});var x6=A.object({fgColor:A.string().optional(),bgColor:A.string().optional()}),$6=A.object({pixelSize:A.number(),url:A.string()}),w6=A.object({id:A.string(),name:A.string(),description:A.string().optional()});var et=e=>e/255,Gi=(e,t)=>(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2,ie=e=>.2126*e[0]+.7152*e[1]+.0722*e[2];function Eh(e){let{width:t,height:r,data:n}=e,o=[0,t-1,(r-1)*t,r*t-1].map(s=>{let a=s*4;return {color:[et(n[a]),et(n[a+1]),et(n[a+2])],alpha:n[a+3]/255}});if(o.some(s=>s.alpha<.9))return null;let i=o[0].color;return o.every(({color:s})=>Gi(s,i)<.006)?i:null}function S6(e){let{width:t,height:r,data:n}=e,o=Eh(e),i=new Float32Array(t*r);for(let s=0;s<i.length;s++){let a=s*4,c=n[a+3]/255;if(o&&c>0){let u=Math.sqrt(Gi([et(n[a]),et(n[a+1]),et(n[a+2])],o));c*=Math.min(1,Math.max(0,(u-.06)/.1));}i[s]=c;}return i}var v6=8,C6=.14,eb=.006;function P6(e,t){let{width:r,height:n,data:o}=e,i=new Float64Array(4096),s=new Float64Array(4096*3),a=0;for(let m=0;m<t.length;m++){if(t[m]<.9)continue;let h=m*4,d=Math.floor(o[h]/16)*256+Math.floor(o[h+1]/16)*16+Math.floor(o[h+2]/16);i[d]+=1,s[d*3]+=et(o[h]),s[d*3+1]+=et(o[h+1]),s[d*3+2]+=et(o[h+2]),a++;}if(a===0)return {palette:[],error:0};let c=[...i.keys()].filter(m=>i[m]>0).sort((m,h)=>i[h]-i[m]),u=[];for(let m of c){if(i[m]/a<eb/2||u.length>=v6)break;let h=[s[m*3]/i[m],s[m*3+1]/i[m],s[m*3+2]/i[m]];u.every(d=>Gi(d,h)>=C6**2)&&u.push(h);}let l=[],f=0;for(let m=0;m<3;m++){l=u.map(()=>({n:0,r:0,g:0,b:0,x:0,y:0})),f=0;for(let h=0;h<t.length;h++){if(t[h]<.9)continue;let d=h*4,g=[et(o[d]),et(o[d+1]),et(o[d+2])],_=0,y=Number.POSITIVE_INFINITY;for(let[S,v]of u.entries()){let w=Gi(g,v);w<y&&(y=w,_=S);}let b=l[_];b.n++,b.r+=g[0],b.g+=g[1],b.b+=g[2],b.x+=h%r,b.y+=Math.floor(h/r),f+=Math.sqrt(y);}for(let[h,d]of l.entries())d.n>0&&(u[h]=[d.r/d.n,d.g/d.n,d.b/d.n]);}return {palette:u.map((m,h)=>({color:m,area:l[h].n/a,cx:l[h].n?l[h].x/l[h].n+.5:r/2,cy:l[h].n?l[h].y/l[h].n+.5:n/2})).filter(m=>m.area>=eb).sort((m,h)=>h.area-m.area),error:f/a}}function k6(e,t,r){let n=t+2,o=r+2,i=(f,p)=>f<=0||p<=0||f>t||p>r?0:e[(p-1)*t+(f-1)],s=new Map,a=new Map,c=f=>{let p=a.get(f);if(p)return p;let m=Math.floor(f/2),h=m%n,d=Math.floor(m/n),g=i(h,d),_=f%2===1,y=_?i(h,d+1):i(h+1,d),b=g===y?.5:Math.min(1,Math.max(0,(.5-g)/(y-g))),S=_?[h-.5,d-.5+b]:[h-.5+b,d-.5];return a.set(f,S),S},u=(f,p)=>{s.set(f,p);};for(let f=0;f<o-1;f++)for(let p=0;p<n-1;p++){let m=i(p,f)>=.5,h=i(p+1,f)>=.5,d=i(p+1,f+1)>=.5,g=i(p,f+1)>=.5,_=2*(f*n+p),y=2*((f+1)*n+p),b=2*(f*n+p)+1,S=2*(f*n+p+1)+1;switch((m?8:0)+(h?4:0)+(d?2:0)+(g?1:0)){case 1:u(y,b);break;case 2:u(S,y);break;case 3:u(S,b);break;case 4:u(_,S);break;case 5:{(i(p,f)+i(p+1,f)+i(p+1,f+1)+i(p,f+1))/4>=.5?(u(_,b),u(y,S)):(u(_,S),u(y,b));break}case 6:u(_,y);break;case 7:u(_,b);break;case 8:u(b,_);break;case 9:u(y,_);break;case 10:{(i(p,f)+i(p+1,f)+i(p+1,f+1)+i(p,f+1))/4>=.5?(u(b,y),u(S,_)):(u(b,_),u(S,y));break}case 11:u(S,_);break;case 12:u(b,S);break;case 13:u(y,S);break;case 14:u(b,y);break;}}let l=[];for(let f of s.keys()){if(!s.has(f))continue;let p=[],m=f;for(;m!==void 0&&s.has(m);){p.push(c(m));let h=s.get(m);s.delete(m),m=h;}p.length>=3&&l.push(p);}return l}function A6(e){let t=0;for(let r=0;r<e.length;r++){let n=e[r],o=e[(r+1)%e.length];t+=n[0]*o[1]-o[0]*n[1];}return t/2}function tb(e,t){if(e.length<=2)return e;let r=new Uint8Array(e.length);r[0]=1,r[e.length-1]=1;let n=[[0,e.length-1]];for(;n.length>0;){let[o,i]=n.pop(),s=e[o],a=e[i],c=a[0]-s[0],u=a[1]-s[1],l=Math.hypot(c,u)||1,f=-1,p=t;for(let m=o+1;m<i;m++){let h=e[m],d=Math.abs(u*(h[0]-s[0])-c*(h[1]-s[1]))/l;d>p&&(p=d,f=m);}f>=0&&(r[f]=1,n.push([o,f],[f,i]));}return e.filter((o,i)=>r[i]===1)}function R6(e,t){let r=0,n=-1;for(let[s,a]of e.entries()){let c=(a[0]-e[0][0])**2+(a[1]-e[0][1])**2;c>n&&(n=c,r=s);}let o=tb(e.slice(0,r+1),t),i=tb([...e.slice(r),e[0]],t);return [...o.slice(0,-1),...i.slice(0,-1)]}var $r=e=>fe(e,2);function E6(e,t){let r=e.length,n=(i,s)=>{let a=Math.hypot(s[0]-i[0],s[1]-i[1])||1,c=Math.min(.5,t/a);return [i[0]+(s[0]-i[0])*c,i[1]+(s[1]-i[1])*c]},o="";for(let i=0;i<r;i++){let s=e[i],a=n(s,e[(i-1+r)%r]),c=n(s,e[(i+1)%r]);o+=i===0?`M${$r(a[0])} ${$r(a[1])}`:`L${$r(a[0])} ${$r(a[1])}`,o+=`Q${$r(s[0])} ${$r(s[1])} ${$r(c[0])} ${$r(c[1])}`;}return `${o}Z`}function M6(e,t,r){let n="";for(let o of k6(e,t,r)){if(Math.abs(A6(o))<.8)continue;let i=R6(o,.18);i.length>=3&&(n+=E6(i,.9));}return n}var I6=.075;function rb(e){let{width:t,height:r,data:n}=e,o=S6(e),i=0;for(let d of o)i+=d;let{palette:s,error:a}=P6(e,o),c={width:t,height:r,palette:s,alpha:o,coverage:i/(t*r)};if(s.length===0||a>I6)return {...c,layers:[],photographic:s.length>0};let u=s.length,l=Array.from({length:u},()=>new Float32Array(t*r)),f=s.map(d=>d.color);for(let d=0;d<o.length;d++){let g=o[d];if(g<=0)continue;let _=d*4,y=[et(n[_]),et(n[_+1]),et(n[_+2])],b=0,S=-1,v=Number.POSITIVE_INFINITY,w=Number.POSITIVE_INFINITY;for(let I=0;I<u;I++){let L=Gi(y,f[I]);L<v?(S=b,w=v,b=I,v=L):L<w&&(S=I,w=L);}if(S<0||v<1e-6){l[b][d]=g;continue}let x=f[b],P=f[S],C=[P[0]-x[0],P[1]-x[1],P[2]-x[2]],E=Math.min(1,Math.max(0,((y[0]-x[0])*C[0]+(y[1]-x[1])*C[1]+(y[2]-x[2])*C[2])/(C[0]**2+C[1]**2+C[2]**2)));l[b][d]=g*(1-E),l[S][d]=g*E;}let p=[],m=new Float32Array(t*r),h=new Array(u);for(let d=u-1;d>=0;d--){let g=l[d];for(let _=0;_<m.length;_++)m[_]+=g[_];h[d]=m.slice();}for(let d=0;d<u;d++){let g=M6(h[d],t,r);g&&p.push({color:f[d],d:g});}return {...c,layers:p,photographic:false}}var{QrCode:Mh}=Le,L6={"1L":3,"1M":2,"1Q":1,"1H":1,"2L":2,"3L":1};function z6(e){let t=e*4+17,r=new Uint8Array(t*t),n=(s,a)=>{s>=0&&a>=0&&s<t&&a<t&&(r[a*t+s]=1);};for(let s=0;s<t;s++)n(6,s),n(s,6);for(let[s,a]of [[3,3],[t-4,3],[3,t-4]])for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++)n(s+u,a+c);let o=[];if(e>1){let s=Math.floor(e/7)+2,a=e===32?26:Math.ceil((e*4+4)/(s*2-2))*2;o.push(6);for(let c=t-7;o.length<s;c-=a)o.splice(1,0,c);}let i=o.length-1;for(let[s,a]of o.entries())for(let[c,u]of o.entries())if(!(s===0&&c===0||s===0&&c===i||s===i&&c===0))for(let l=-2;l<=2;l++)for(let f=-2;f<=2;f++)n(a+f,u+l);for(let s=0;s<=8;s++)n(8,s),n(s,8);for(let s=0;s<8;s++)n(t-1-s,8),n(8,t-1-s);if(e>=7)for(let s=0;s<18;s++){let a=t-11+s%3,c=Math.floor(s/3);n(a,c),n(c,a);}return r}function T6(e,t){let r=e*4+17,n=qe[t].ordinal,o=Mh.NUM_ERROR_CORRECTION_BLOCKS[n]?.[e]??0,i=Mh.ECC_CODEWORDS_PER_BLOCK[n]?.[e]??0,s=Math.floor(Mh.getNumRawDataModules(e)/8),a=o-s%o,c=Math.floor(s/o),u=Array.from({length:o},(S,v)=>c+(v<a?0:1)),l=[],f=[],p=c-i;for(let S=0;S<=c;S++)for(let v=0;v<o;v++)if(v<a){if(S===p)continue;l.push(v),f.push(S<p?S:S-1);}else l.push(v),f.push(S);if(l.length!==s)throw new Error(`Codeword map: interleave mismatch at version ${e}`);let m=z6(e),h=new Int16Array(r*r).fill(-1),d=new Int16Array(r*r).fill(-1),g=new Int8Array(r*r).fill(-1),_=s*8,y=0;for(let S=r-1;S>=1;S-=2){S===6&&(S=5);let v=(S+1&2)===0;for(let w=0;w<r;w++)for(let x=0;x<2;x++){let P=S-x,E=(v?r-1-w:w)*r+P;if(!m[E]&&y<_){let I=y>>>3;h[E]=l[I],d[E]=f[I],g[E]=7-(y&7),y++;}}}if(y!==_)throw new Error(`Codeword map: placement mismatch at version ${e}`);let b=L6[`${e}${t}`]??0;return {version:e,level:t,size:r,blocks:o,eccPerBlock:i,blockLengths:u,correctable:Math.floor((i-b)/2),block:h,codeword:d,bit:g}}var N6=8,rn=new Map;function Qi(e,t){if(!(Number.isInteger(e)&&e>=1&&e<=40))throw new RangeError(`QR version must be 1\u201340, got ${e}`);let r=`${e}${t}`,n=rn.get(r);if(n)return rn.delete(r),rn.set(r,n),n;let o=T6(e,t);if(rn.size>=N6){let i=rn.keys().next().value;i!==void 0&&rn.delete(i);}return rn.set(r,o),o}function Vi(e,t){let r=new Array(e.blocks).fill(0),n=new Set;for(let o of t){let i=e.block[o]??-1;if(i<0)continue;let s=i*4096+e.codeword[o];n.has(s)||(n.add(s),r[i]=r[i]+1);}return r}var O6={black:[0,0,0],white:[255,255,255],red:[255,0,0],green:[0,128,0],lime:[0,255,0],blue:[0,0,255],navy:[0,0,128],yellow:[255,255,0],orange:[255,165,0],purple:[128,0,128],pink:[255,192,203],gray:[128,128,128],grey:[128,128,128],silver:[192,192,192],maroon:[128,0,0],olive:[128,128,0],teal:[0,128,128],aqua:[0,255,255],cyan:[0,255,255],fuchsia:[255,0,255],magenta:[255,0,255]};function nb(e,t){let r=e.trim(),n=Number.parseFloat(r);return Number.isNaN(n)?Number.NaN:r.endsWith("%")?n/100*t:n}function ke(e){if(!e)return null;let t=e.trim().toLowerCase();if(t==="transparent")return {r:0,g:0,b:0,a:0};let r=O6[t];if(r)return {r:r[0],g:r[1],b:r[2],a:1};if(t.startsWith("#")){let o=t.slice(1);return (o.length===3||o.length===4)&&(o=o.split("").map(i=>i+i).join("")),/^[0-9a-f]{6}([0-9a-f]{2})?$/.test(o)?{r:Number.parseInt(o.slice(0,2),16),g:Number.parseInt(o.slice(2,4),16),b:Number.parseInt(o.slice(4,6),16),a:o.length===8?Number.parseInt(o.slice(6,8),16)/255:1}:null}let n=/^rgba?\(([^)]*)\)$/.exec(t);if(n){let[o,i]=n[1].split("/"),s=o.split(/[\s,]+/).filter(Boolean);if(s.length!==(i===void 0&&s.length===4?4:3))return null;let a=i??s[3],[c,u,l]=s.slice(0,3).map(m=>nb(m,255)),f=a===void 0?1:nb(a,1);if([c,u,l,f].some(m=>Number.isNaN(m)))return null;let p=(m,h)=>Math.min(Math.max(m,0),h);return {r:p(c,255),g:p(u,255),b:p(l,255),a:p(f,1)}}return null}function wr(e,t,r){let n=e/255,o=t/255,i=r/255,s=1-Math.max(n,o,i);return s>=1?[0,0,0,1]:[fe((1-n-s)/(1-s)),fe((1-o-s)/(1-s)),fe((1-i-s)/(1-s)),fe(s)]}function Bt(e){return e.children}var F6=e=>e==null?null:`${e}`;function Ih(e,t,r){let n=t??{},o=r;if("key"in n){let{key:i,...s}=n;i!==void 0&&(o=i),n=s;}return {type:e,props:n,key:F6(o)}}function D6(e,t){let r=e;return {type:r.type,props:{...r.props,...t},key:r.key??null}}function Z6(e,t,...r){let n={...t};return r.length>0&&(n.children=r.length===1?r[0]:r),Ih(e,n)}var B6={jsx:Ih,jsxs:Ih,createElement:Z6,cloneElement:D6,Fragment:Bt},ji=B6;var Lh=e=>e===Bt?ji.Fragment:e;function R(e,t,r){return ji.jsx(Lh(e),t,r)}function xe(e,t,r){return ji.jsxs(Lh(e),t,r)}function U6(e,t,...r){return ji.createElement(Lh(e),t??null,...r)}function $o(e,t){return ji.cloneElement(e,t)}var G6=new Set([Symbol.for("react.element"),Symbol.for("react.transitional.element")]),ob=Symbol.for("react.fragment");function nn(e){if(typeof e!="object"||e===null||Array.isArray(e))return false;let t=e;return t.$$typeof!==void 0&&!G6.has(t.$$typeof)?false:(typeof t.type=="string"||typeof t.type=="function"||t.type===ob)&&typeof t.props=="object"&&t.props!==null}var wo=e=>e===Bt||e===ob;var lb=.6,Nh={logo:160,halftone:160};function Q6(e){let t="";for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}var So=class{entries=new Map;limit;constructor(t){this.limit=t;}get(t,r){let n=this.entries.get(t);if(n!==void 0)return this.entries.delete(t),this.entries.set(t,n),n;let o=r();if(this.entries.size>=this.limit){let i=this.entries.keys().next().value;i!==void 0&&this.entries.delete(i);}return this.entries.set(t,o),o}},V6=new So(8);function j6(e){return V6.get(e,()=>{let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r})}function Oh(e){let{width:t,height:r,data:n}=e;if(!(Number.isInteger(t)&&Number.isInteger(r))||t<1||r<1||t>Xt||r>Xt||typeof n!="string")return null;try{let o=j6(n);return o.length===t*r*4?{width:t,height:r,data:o}:null}catch{return null}}function fb(e,t={}){let{width:r,height:n,data:o}=e;if(!(r>0&&n>0)||o.length<r*n*4)throw new Error("Art image pixels must be width \xD7 height \xD7 4 RGBA bytes");let i=Math.min(r,n),s=t.square?Math.floor((r-i)/2):0,a=t.square?Math.floor((n-i)/2):0,c=t.square?i:r,u=t.square?i:n,l=Math.min(Math.max(Math.round(t.maxSize??Nh.halftone),1),Xt),f=Math.min(1,l/Math.max(c,u)),p=Math.max(1,Math.round(c*f)),m=Math.max(1,Math.round(u*f)),h=new Uint8Array(p*m*4);for(let d=0;d<m;d++){let g=Math.floor(d*u/m),_=Math.max(g+1,Math.floor((d+1)*u/m));for(let y=0;y<p;y++){let b=Math.floor(y*c/p),S=Math.max(b+1,Math.floor((y+1)*c/p)),v=0,w=0,x=0,P=0,C=0;for(let I=g;I<_;I++)for(let L=b;L<S;L++){let z=((I+a)*r+L+s)*4,D=o[z+3]/255;v+=o[z]*D,w+=o[z+1]*D,x+=o[z+2]*D,P+=D,C++;}let E=(d*p+y)*4;h[E]=P>0?Math.round(v/P):0,h[E+1]=P>0?Math.round(w/P):0,h[E+2]=P>0?Math.round(x/P):0,h[E+3]=Math.round(P/C*255);}}return {width:p,height:m,data:Q6(h)}}async function q6(e){if(typeof e!="string"&&!(e instanceof Blob))return e.complete||await new Promise(r=>{e.addEventListener("load",r,{once:true}),e.addEventListener("error",r,{once:true});}),e;let t=typeof e=="string"?e:URL.createObjectURL(e);try{return await new Promise((r,n)=>{let o=new Image;o.crossOrigin="anonymous",o.onload=()=>r(o),o.onerror=()=>n(new Error("Could not load the art image")),o.src=t;})}finally{typeof e!="string"&&setTimeout(()=>URL.revokeObjectURL(t),1e3);}}async function W6(e,t={}){if(typeof document>"u")throw new Error("loadQRArtImage needs a browser; pass decoded pixels to createQRArtImage instead");let r=t.mode??"halftone",n=t.maxSize??Nh[r],o=await q6(e),i=o.naturalWidth||o.width||n,s=o.naturalHeight||o.height||n,a=r==="halftone",c=Math.min(1,n*4/(a?Math.min(i,s):Math.max(i,s))),u=Math.max(1,Math.round(i*c)),l=Math.max(1,Math.round(s*c)),f=document.createElement("canvas");f.width=u,f.height=l;let p=f.getContext("2d",{willReadFrequently:true});if(!p)throw new Error("Could not get a canvas context");p.imageSmoothingQuality="high",p.drawImage(o,0,0,u,l);let m;try{m=p.getImageData(0,0,u,l);}catch{throw new Error("Could not read the art image (cross-origin images need CORS); upload it instead")}finally{f.remove();}return fb(m,{maxSize:n,square:a})}function Fh(e){return !!(e&&Fi.includes(e.mode)&&e.image&&Oh(e.image))}function zc(e){let t=Oi[e.mode];return e.variant&&t.includes(e.variant)?e.variant:t[0]}function H6(e,t){if(e===1)return [];let r=Math.floor(e/7)+2,n=e===32?26:Math.ceil((e*4+4)/(r*2-2))*2,o=[6];for(let i=t-7;o.length<r;i-=n)o.splice(1,0,i);return o}function qi(e,t){let r=H6(e,t),n=r.length-1,o=[];for(let[i,s]of r.entries())for(let[a,c]of r.entries())i===0&&a===0||i===0&&a===n||i===n&&a===0||o.push([s,c]);return o}var X6=0,$t=1,Pt=2,Sr=3,ib=4,sb=new Map;function mb(e){let t=sb.get(e);if(t)return t;let r=e*4+17,n=new Uint8Array(r*r),o=(i,s,a,c,u)=>{for(let l=Math.max(0,s);l<Math.min(r,s+c);l++)for(let f=Math.max(0,i);f<Math.min(r,i+a);f++)n[l*r+f]=u;};o(6,0,1,r,ib),o(0,6,r,1,ib),o(0,8,9,1,Sr),o(8,0,1,9,Sr),o(r-8,8,8,1,Sr),o(8,r-8,1,8,Sr),e>=7&&(o(r-11,0,3,6,Sr),o(0,r-11,6,3,Sr));for(let[i,s]of qi(e,r))o(i-2,s-2,5,5,Pt);return o(0,0,8,8,$t),o(r-8,0,8,8,$t),o(0,r-8,8,8,$t),sb.set(e,n),n}function K6(e){let t=e*4+17,r=mb(e);return Array.from({length:t},(n,o)=>Array.from({length:t},(i,s)=>r[o*t+s]!==X6))}function Y6(e){let t=e[8],r=t?.[0]?1:0,n=t?.[1]?1:0,o=(1-r)*2+n;return ["M","L","H","Q"][o]??"M"}function vo(e,t){let r=ke(e);return !r||r.a===0?t:[r.r/255,r.g/255,r.b/255]}var sn=(e,t,r)=>[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r,e[2]+(t[2]-e[2])*r];function vr(e,t,r,n){let o=ie(e);if(n?o<=r:o>=r)return e;let i=ie(t);return Math.abs(o-i)<1e-6?t:sn(e,t,Math.min(1,Math.max(0,(o-r)/(o-i))))}var pb=e=>Math.max(...e)-Math.min(...e),J6=(e,t)=>(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2,zh=e=>e.toString(16).padStart(2,"0");function tt(e,t=1){let r=n=>Math.min(255,Math.round(Math.round(Math.min(Math.max(n,0),1)*255)/t)*t);return `#${zh(r(e[0]))}${zh(r(e[1]))}${zh(r(e[2]))}`}function eS(e){let t=e<0?-1:1,r=Math.abs(e),n=1/(1+.3275911*r),o=1-((((1.061405429*n-1.453152027)*n+1.421413741)*n-.284496736)*n+.254829592)*n*Math.exp(-r*r);return t*o}var Dh=.3,ab=e=>1-Math.exp(-((e/2)**2)/(2*Dh**2)),tS=e=>eS(e/(2*Dh*Math.SQRT2))**2,rS=(e,t,r)=>{let n=Math.min(1,Math.max(0,(r-e)/(t-e)));return n*n*(3-2*n)};function Zh(e,t,r,n){let o=n==="cover"?Math.max(r/e,r/t):Math.min(r/e,r/t);return {scale:o,offsetX:(r-e*o)/2,offsetY:(r-t*o)/2}}function db(e,t){let{width:r,height:n,data:o}=e,i=new Float32Array(r*n*3),s=t??new Float32Array(r*n);for(let a=0;a<r*n;a++)i[a*3]=o[a*4]/255,i[a*3+1]=o[a*4+1]/255,i[a*3+2]=o[a*4+2]/255,t||(s[a]=o[a*4+3]/255);return {width:r,height:n,rgb:i,alpha:s}}function nS(e){let t=db(e),{rgb:r,alpha:n}=t,o=new Float64Array(256),i=0;for(let f=0;f<n.length;f++){if(n[f]<.5)continue;let p=ie([r[f*3],r[f*3+1],r[f*3+2]]);o[Math.min(255,Math.floor(p*256))]+=1,i++;}let s=f=>{let p=0;for(let m=0;m<256;m++)if(p+=o[m],p>=f*i)return m/255;return 1},a=i?s(.01):0,c=i?s(.99):1;c-a<.15&&(a=0,c=1);let u=Math.min(1.6,1/(c-a)),l=(a+c)/2;for(let f=0;f<n.length;f++){let p=[r[f*3],r[f*3+1],r[f*3+2]],m=ie(p),h=.5+(m-l)*u;for(let d=0;d<3;d++)r[f*3+d]=Math.min(1,Math.max(0,h+(p[d]-m)*1.12));}return t}function hb(e,t,r,n,o=1){let{width:i,height:s,rgb:a,alpha:c}=e,u=Math.min(Math.max(t-.5,0),i-1),l=Math.min(Math.max(r-.5,0),s-1),f=Math.floor(u),p=Math.floor(l),m=Math.min(f+1,i-1),h=Math.min(p+1,s-1),d=u-f,g=l-p,_=0,y=0,b=0,S=0,v=(x,P,C)=>{let E=P*i+x,I=c[E]*C;_+=a[E*3]*I,y+=a[E*3+1]*I,b+=a[E*3+2]*I,S+=I;};if(v(f,p,(1-d)*(1-g)),v(m,p,d*(1-g)),v(f,h,(1-d)*g),v(m,h,d*g),S<=0)return n;let w=S*o;return [n[0]+(_/S-n[0])*w,n[1]+(y/S-n[1])*w,n[2]+(b/S-n[2])*w]}var oS=new So(4),iS=new So(6),sS=new So(6);function Bh(e,t){return iS.get(e.image.data,()=>rb(t))}function gb(e,t,r){return sS.get(e.image.data,()=>db(t,r.alpha))}var Fe=e=>fe(e,2),yb=e=>fe(e,4),an=class{groups=new Map;add(t,r){let n=this.groups.get(t);n?n.push(r):this.groups.set(t,[r]);}cellRun(t,r,n,o){this.add(t,`M${r} ${n}h${o}.04v1.04h-${o}.04z`);}circle(t,r,n,o){this.add(t,aS(r,n,o));}toElements(t){return [...this.groups].map(([r,n],o)=>R("path",{d:n.join(""),fill:r},`${t}-${o}`))}};function aS(e,t,r){let n=Fe(r*2),o=Fe(r);return `M${Fe(e-r)} ${Fe(t)}a${o} ${o} 0 1 0 ${n} 0a${o} ${o} 0 1 0 ${-n} 0z`}function on(e,t,r,n,o){let i=Math.min(o,r/2,n/2);if(i<=0)return `M${Fe(e)} ${Fe(t)}h${Fe(r)}v${Fe(n)}h${Fe(-r)}z`;let s=Fe(i);return `M${Fe(e+i)} ${Fe(t)}h${Fe(r-2*i)}a${s} ${s} 0 0 1 ${s} ${s}v${Fe(n-2*i)}a${s} ${s} 0 0 1 ${-s} ${s}h${Fe(-(r-2*i))}a${s} ${s} 0 0 1 ${-s} ${-s}v${Fe(-(n-2*i))}a${s} ${s} 0 0 1 ${s} ${-s}z`}function _b(e,t,r){let n="";for(let[o,i]of e){let s=(o-2+t)*r,a=(i-2+t)*r;n+=on(s,a,5*r,5*r,r*.35),n+=on(s+r,a+r,3*r,3*r,r*.15),n+=on(s+2*r,a+2*r,r,r,r*.12);}return n}var cS={blend:1,badge:1,color:.9,mono:.7},Lc=.35;function uS(e,t){let r=vo(e,[0,0,0]),n=vo(t,[1,1,1]),o=ie(n)-ie(r);return o>=Lc?null:o<=-Lc?"inverted":"low-contrast"}function bb(e,t,r){let n=Math.min(Math.max(e.intensity??lb,0),cS[zc(e)]);return ie(r)-ie(t)>=Lc?n:0}function lS(e){let{art:t,modules:r,version:n}=e,o=t.image&&Oh(t.image);if(!(o&&Fi.includes(t.mode)))return null;let i=r.length;if(i!==n*4+17)return null;let s=vo(e.fgColor,[0,0,0]),a=vo(e.bgColor,[1,1,1]),c=bb(t,s,a);return c<=0?null:{art:t,image:o,modules:r,size:i,version:n,kinds:mb(n),margin:e.margin,pixelSize:e.pixelSize,t:c,fg:s,bg:a,variant:zc(t),body:e.body}}function Uh(e){let t=lS(e);if(!t)return null;let r;return t.art.mode==="halftone"?r=t.variant==="mono"?gS(t):hS(t):r=t.variant==="badge"?CS(t):yS(t),R("g",{"data-qrdx-art":t.art.mode,"data-qrdx-art-variant":t.variant,children:r})}function fS(e,t){return {margin:.42-.17*e+(t===3?.04:0),darkCap:.4+.3*e}}var xb=8.5,cb=new Map;function Gh(e){let t=e*4+17,r=cb.get(e);if(!r){let i=t*2,s=new Uint8Array(i*i),a=xb*2;for(let c=0;c<i;c++)for(let u=0;u<i;u++){let l=u<a||u>=i-a,f=c<a||c>=i-a;l&&f&&!(u>=i-a&&c>=i-a)&&(s[c*i+u]=1);}for(let[c,u]of qi(e,t))for(let l=(u-2)*2-1;l<(u+3)*2+1;l++)for(let f=(c-2)*2-1;f<(c+3)*2+1;f++)f>=0&&l>=0&&f<i&&l<i&&(s[l*i+f]=1);cb.set(e,s),r=s;}let n=r,o=t*2;return (i,s)=>{let a=Math.floor(i*2),c=Math.floor(s*2);return a>=0&&c>=0&&a<o&&c<o&&n[c*o+a]===1}}function $b(e,t,r=false){let{image:n,size:o,kinds:i,fg:s,bg:a}=e,c=oS.get(e.art.image.data,()=>nS(n)),u=Zh(n.width,n.height,o,"cover"),l=o*t,f=new Float32Array(l*l*3).fill(Number.NaN),m=1/(t*u.scale)>1.3?2:1,h=ie(a)-.1*(ie(a)-ie(s)),d=Gh(e.version);for(let g=0;g<o;g++)for(let _=0;_<o;_++){let y=i[g*o+_],b=y===$t||y===Pt;if(!(b&&!r))for(let S=0;S<t;S++)for(let v=0;v<t;v++){let w=0,x=0,P=0;for(let B=0;B<m;B++)for(let N=0;N<m;N++){let j=_+(v+(N+.5)/m)/t,ee=g+(S+(B+.5)/m)/t,G=hb(c,(j-u.offsetX)/u.scale,(ee-u.offsetY)/u.scale,a);w+=G[0],x+=G[1],P+=G[2];}let C=m*m,E=[w/C,x/C,P/C],I=_+(v+.5)/t,L=g+(S+.5)/t,z=Math.min(I,L,o-I,o-L);z<1.5&&(E=sn(E,a,.35*(1-z/1.5))),r&&(b||d(I,L))&&(E=vr(E,a,h,false));let D=((g*t+S)*l+_*t+v)*3;f[D]=E[0],f[D+1]=E[1],f[D+2]=E[2];}}return {n:t,count:l,rgb:f}}function mS(e,t,r){let{size:n,kinds:o,modules:i,fg:s,bg:a,t:c}=e,{n:u,count:l,rgb:f}=t,p=ie(s),m=ie(a),h=m-p,d=fS(c,u),g=P=>.2126*f[P]+.7152*f[P+1]+.0722*f[P+2],_=new Float32Array(n*n),y=new Float32Array(n*n);for(let P=0;P<n;P++)for(let C=0;C<n;C++){let E=o[P*n+C];if(E===$t){_[P*n+C]=m;continue}if(E===Pt){_[P*n+C]=i[P]?.[C]?p:m;continue}let I=0,L=0,z=0;for(let D=0;D<u;D++)for(let B=0;B<u;B++){let N=g(((P*u+D)*l+C*u+B)*3);I+=N,r.under[D*u+B]||(L+=N,z++);}_[P*n+C]=I/(u*u),y[P*n+C]=z?L/z:I/(u*u);}let b=n+1,S=new Float64Array(b*b);for(let P=0;P<n;P++)for(let C=0;C<n;C++)S[(P+1)*b+C+1]=_[P*n+C]+S[P*b+C+1]+S[(P+1)*b+C]-S[P*b+C];let v=2,w=(P,C)=>{let E=Math.max(0,P-v),I=Math.max(0,C-v),L=Math.min(n,P+v+1),z=Math.min(n,C+v+1);return (S[z*b+L]-S[I*b+L]-S[z*b+E]+S[I*b+E])/((L-E)*(z-I))},x=r.weight;for(let P=0;P<n;P++)for(let C=0;C<n;C++){let E=o[P*n+C];if(E===$t||E===Pt)continue;let I=E===Sr,L=(d.margin+(I?.08:0))*h,z=(d.darkCap-(I?.12:0))*h,D=(x*((r.light-r.dark)/2)-L)/(1-x),B=w(C,P),N=y[P*n+C],j=!!i[P]?.[C],ee=0,G=a;if(j){let K=Math.min(B+D,p+z);N>K&&(ee=(N-K)/Math.max(N-p,1e-6),G=s);}else {let K=Math.max(B-D,m-z);N<K&&(ee=(K-N)/Math.max(m-N,1e-6));}if(!(ee<=0)){ee=Math.min(1,ee);for(let K=0;K<u;K++)for(let pe=0;pe<u;pe++){let Ie=((P*u+K)*l+C*u+pe)*3;for(let $e=0;$e<3;$e++)f[Ie+$e]+=(G[$e]-f[Ie+$e])*ee;}}}}function wb(e,t,r,n){let{count:o}=t,i=new an;for(let c=0;c<o;c++){let u=0,l=r(c*o);for(let f=1;f<=o;f++){let p=f<o?r(c*o+f):null;(f===o||p!==l)&&(l&&i.cellRun(l,u,c,f-u),u=f,l=p);}}let s=e.pixelSize/t.n,a=Fe(e.margin*e.pixelSize);return R("g",{transform:`translate(${a} ${a}) scale(${yb(s)})`,children:i.toElements(n)},n)}function Qh(e,t){let r=qi(e.version,e.size);return r.length===0?[]:[R("path",{d:_b(r,e.margin,e.pixelSize),fill:t,fillRule:"evenodd"},"art-alignment")]}function Sb(e){let{image:t,size:r}=e;return Math.floor(Math.min(t.width,t.height)/r)>=4&&r<=45?4:3}var pS=e=>2*Dh*Math.sqrt(-2*Math.log(1-Math.min(e,.95)));function dS(e,t,r){let n=t+1,o=new Float64Array(n*n);for(let s=0;s<t;s++)for(let a=0;a<t;a++)o[(s+1)*n+a+1]=e[s*t+a]+o[s*n+a+1]+o[(s+1)*n+a]-o[s*n+a];let i=new Float32Array(t*t);for(let s=0;s<t;s++)for(let a=0;a<t;a++){let c=Math.max(0,a-r),u=Math.max(0,s-r),l=Math.min(t,a+r+1),f=Math.min(t,s+r+1);i[s*t+a]=(o[f*n+l]-o[u*n+l]-o[f*n+c]+o[u*n+c])/((l-c)*(f-u));}return i}function vb(e,t,r,n){let{size:o,kinds:i,modules:s,fg:a,bg:c}=e,u=ie(a),l=ie(c),f=l-u,p=dS(t,o,2),m=new Float32Array(o*o),h=new Float32Array(o*o).fill(Number.NaN);for(let d=0;d<o;d++)for(let g=0;g<o;g++){let _=d*o+g,y=i[_];if(y===$t||y===Pt)continue;let b=y===Sr,S=n.base+(b?.08:0),v=(n.margin+(b?.03:0))*f,w=(n.cap-(b?.04:0))*f,x=ab(S),P=ab(b?Math.max(n.max,.94):n.max),C=x*((n.dark+n.light)/2)+(1-x)*p[_],E=r[_],I=!!s[d]?.[g],L=I?n.dark:n.light,z=I?Math.min(C-v,u+w):Math.max(C+v,l-w),B=(I?E<=z:E>=z)?0:(E-z)/(E-L);B>P&&(B=P,h[_]=Math.min(l,Math.max(u,(z-P*L)/(1-P))));let N=I?E<=z-.06:E>=z+.06;n.skip&&N&&!b||(B=Math.max(B,x)),m[_]=B>0?pS(B):0;}return {diameter:m,surround:h}}function hS(e){let{size:t,kinds:r,modules:n,fg:o,bg:i,t:s,margin:a,pixelSize:c}=e,u=Sb(e),l=$b(e,u,true),f=ie(o),p=ie(i),m=f+.1*(p-f),h=p-.05*(p-f),{count:d,rgb:g}=l,_=(w,x,P,C)=>((x*u+C)*d+w*u+P)*3,y=new Float32Array(t*t);for(let w=0;w<t;w++)for(let x=0;x<t;x++){let P=r[w*t+x];if(P===$t||P===Pt){y[w*t+x]=P===Pt&&n[w]?.[x]?f:p;continue}let C=0;for(let E=0;E<u;E++)for(let I=0;I<u;I++){let L=_(x,w,I,E);C+=.2126*g[L]+.7152*g[L+1]+.0722*g[L+2];}y[w*t+x]=C/(u*u);}let b=vb(e,y,y,{base:.6-.28*s,max:.86,dark:m,light:h,margin:.2-.1*s,cap:.4+.14*s,skip:false});for(let w=0;w<t;w++)for(let x=0;x<t;x++){let P=b.surround[w*t+x];if(Number.isNaN(P))continue;let C=y[w*t+x],I=P<C?o:i,L=Math.min(1,Math.abs(C-P)/Math.max(Math.abs(C-ie(I)),1e-6));for(let z=0;z<u;z++)for(let D=0;D<u;D++){let B=_(x,w,D,z);for(let N=0;N<3;N++)g[B+N]+=(I[N]-g[B+N])*L;}}let S=[wb(e,l,w=>{let x=w*3;return Number.isNaN(g[x])?null:tt([g[x],g[x+1],g[x+2]],8)},"art-photo")],v=new an;for(let w=0;w<t;w++)for(let x=0;x<t;x++){let P=b.diameter[w*t+x];if(!(P>0))continue;let C=0,E=0,I=0;for(let D=0;D<u;D++)for(let B=0;B<u;B++){let N=_(x,w,B,D);C+=g[N],E+=g[N+1],I+=g[N+2];}let L=[C/(u*u),E/(u*u),I/(u*u)],z=n[w]?.[x]?vr(L,o,m,true):vr(L,i,h,false);v.circle(tt(z,10),(x+a+.5)*c,(w+a+.5)*c,P/2*c);}return S.push(...v.toElements("art-dot"),...Qh(e,tt(o))),S}function gS(e){let{size:t,kinds:r,modules:n,fg:o,bg:i}=e,s=Sb(e),a=$b(e,s),c=ie(o),u=ie(i),l=s%2===1?1:2,f=(s-l)/2,p=C=>C>=f&&C<f+l,m=[];for(let C=0;C<s;C++)for(let E=0;E<s;E++)m.push(p(E)&&p(C));mS(e,a,{weight:tS(l/s),dark:c,light:u,under:m});let{count:h,rgb:d}=a,g=new Float32Array(h*h),_=new Int8Array(h*h).fill(-1);for(let C=0;C<h*h;C++){let E=C*3;if(Number.isNaN(d[E])){g[C]=Number.NaN;continue}let I=(.2126*d[E]+.7152*d[E+1]+.0722*d[E+2]-c)/(u-c);g[C]=.5+(rS(0,1,I)-.5)*1.15;}for(let C=0;C<t;C++)for(let E=0;E<t;E++){let I=r[C*t+E];if(!(I===$t||I===Pt))for(let L=f;L<f+l;L++)for(let z=f;z<f+l;z++)_[(C*s+L)*h+E*s+z]=n[C]?.[E]?0:1;}let y=Gh(e.version);for(let C=0;C<h;C++)for(let E=0;E<h;E++){let I=C*h+E;_[I]<0&&y((E+.5)/s,(C+.5)/s)&&(_[I]=1);}let b=new Uint8Array(h*h),S=.3,v=0,w=0,x=(C,E,I)=>{if(C<0||C>=h||E>=h)return;let L=E*h+C;if(!Number.isNaN(g[L])){let z=Math.floor(C/s)===Math.floor(v/s)&&Math.floor(E/s)===Math.floor(w/s);g[L]+=z?I:I*S;}};for(let C=0;C<h;C++){let E=C%2===0?1:-1;for(let I=0;I<h;I++){let L=E===1?I:h-1-I,z=C*h+L,D=g[z];if(Number.isNaN(D))continue;let B=_[z]>=0?_[z]:D>=.5?1:0;b[z]=B===0?1:0;let N=Math.min(.75,Math.max(-0.75,D-B));v=L,w=C,x(L+E,C,N*7/16),x(L-E,C+1,N*3/16),x(L,C+1,N*5/16),x(L+E,C+1,N/16);}}let P=tt(o);return [wb(e,a,C=>b[C]?P:null,"art-halftone"),...Qh(e,P)]}function ub(e,t){let r=null,n=0;for(let o of e.palette){if(t&&J6(o.color,t)<.02)continue;let i=o.area*(.35+pb(o.color))*(ie(o.color)>.86?.05:1);i>n&&(n=i,r=o.color);}return r}function Cb(e,t,r,n,o){let i;if(e.photographic){let s=new an,{width:a,height:c,rgb:u,alpha:l}=t;for(let f=0;f<c;f++){let p=0,m=null;for(let h=0;h<=a;h++){let d=f*a+h,g=h<a&&l[d]>=.5?tt(n([u[d*3],u[d*3+1],u[d*3+2]]),6):null;(h===a||g!==m)&&(m&&s.cellRun(m,p,f,h-p),p=h,m=g);}}i=s.toElements(`${o}-px`);}else i=e.layers.map((s,a)=>R("path",{d:s.d,fill:tt(n(s.color)),fillRule:"evenodd"},`${o}-${a}`));return R("g",{transform:`translate(${Fe(r.x)} ${Fe(r.y)}) scale(${yb(r.scale)})`,children:i},o)}function yS(e){let{art:t,image:r,size:n,kinds:o,modules:i,fg:s,bg:a,t:c,margin:u,pixelSize:l}=e,f=Bh(t,r),p=gb(t,r,f),m=Zh(f.width,f.height,n,"contain"),h=Math.min(1,.3+1.4*c),d=N=>sn(a,N,h),g=tt(a),_=tt(s),y=[Cb(f,p,{x:(u+m.offsetX)*l,y:(u+m.offsetY)*l,scale:m.scale*l},d,"art-logo")],b=xb,S=(N,j)=>on((N+u)*l,(j+u)*l,(b+.4)*l,(b+.4)*l,1.2*l),v=qi(e.version,n).map(([N,j])=>on((N-2.5+u)*l,(j-2.5+u)*l,6*l,6*l,l*.8)).join("");y.push(R("path",{d:S(-0.4,-0.4)+S(n-b,-0.4)+S(-0.4,n-b)+v,fill:g},"art-plates"));let w=Gh(e.version),x=ie(a),P=ie(s),C=new Float32Array(n*n),E=new Float32Array(n*n),I=new Array(n*n);for(let N=0;N<n;N++)for(let j=0;j<n;j++){let ee=N*n+j,G=o[ee];if(G===$t||G===Pt){C[ee]=G===Pt&&i[N]?.[j]?P:x;continue}let K=1,pe=0,Ie=0,$e=0,Z=0;for(let Y=0;Y<4;Y++)for(let J=0;J<4;J++){let Ue=j+(J+.5)/4,Ir=N+(Y+.5)/4,ft=w(Ue,Ir)?a:hb(p,(Ue-m.offsetX)/m.scale,(Ir-m.offsetY)/m.scale,a,h),Qt=ie(ft);K=Math.min(K,Qt),pe+=Qt,Ie+=ft[0],$e+=ft[1],Z+=ft[2];}C[ee]=pe/16,E[ee]=K,I[ee]=[Ie/16,$e/16,Z/16];}let L=P+.08*(x-P),z=x-.04*(x-P),D=vb(e,C,C,{base:.74-.26*c,max:.9,dark:L,light:z,margin:.23-.1*c,cap:.4+.1*c,skip:c>=.7}),B=new an;for(let N=0;N<n;N++)for(let j=0;j<n;j++){let ee=N*n+j,G=D.diameter[ee],K=!!i[N]?.[j];if(!(G>0)||!K&&E[ee]>=x-.02)continue;let pe=K?vr(I[ee],s,L,true):vr(I[ee],a,z,false);B.circle(tt(pe,8),(j+u+.5)*l,(N+u+.5)*l,G/2*l);}return y.push(...B.toElements("art-dot")),y.push(...Qh(e,_)),y}var _S={L:.5,M:.72,Q:.88,H:1},Pb=.32,kb=.55,bS=.6,xS=2;function Ab(e,t,r){let n=t>=1?e:e*t,o=t>=1?e/t:e,i=Math.max(.7,e*.09),s=n+2*i,a=o+2*i;return {logoW:n,logoH:o,plateW:s,plateH:a,radius:Math.min(s,a)*.26,cx:r/2,cy:r/2}}var Rb=e=>({cx:e.cx,cy:e.cy,w:e.plateW,h:e.plateH,r:e.radius});function Eb(e,t,r){return Ib(t+.5,r+.5,e)<kb}function $S(e,t){let r=Rb(e),n=kb+1,o=Math.max(0,Math.floor(e.cx-e.plateW/2-n)),i=Math.min(t-1,Math.ceil(e.cx+e.plateW/2+n)),s=Math.max(0,Math.floor(e.cy-e.plateH/2-n)),a=Math.min(t-1,Math.ceil(e.cy+e.plateH/2+n)),c=[];for(let u=s;u<=a;u++)for(let l=o;l<=i;l++)Eb(r,l,u)&&c.push(u*t+l);return c}var wS=e=>Math.floor(e.correctable*bS);function Th(e,t,r){let n=Ab(e,t,r.size),o=wS(r);return Vi(r,$S(n,r.size)).every(i=>i<=o)}function Mb(e,t,r){if(Th(r,t,e))return r;let n=0,o=r;if(!Th(n,t,e))return -1;for(;o-n>1/64;){let i=(n+o)/2;Th(i,t,e)?n=i:o=i;}return n}var Ic=new Map;function SS(e,t){let r=`${e.version}${e.level}:${t.toFixed(3)}`,n=Ic.get(r);return n===void 0&&(n=Mb(e,t,Pb*e.size),Ic.size>=64&&Ic.clear(),Ic.set(r,n)),n}function vS(e,t){let{size:r,t:n,modules:o,version:i}=e,s=Y6(o),a=(.18+.15*n)*_S[s],c=t.width/t.height,u=Math.min(Pb,a)*r,l=Qi(i,s),f=Math.max(0,SS(l,c));if(f<xS)return {wantedBox:u,maxBox:f,box:0,plate:null};let p=Mb(l,c,Math.min(u,f));return p<0?{wantedBox:u,maxBox:f,box:0,plate:null}:{wantedBox:u,maxBox:f,box:p,plate:Ab(p,c,r)}}function Ib(e,t,r){let n=Math.abs(e-r.cx)-(r.w/2-r.r),o=Math.abs(t-r.cy)-(r.h/2-r.r);return Math.hypot(Math.max(n,0),Math.max(o,0))+Math.min(Math.max(n,o),0)-r.r}function Lb(e,t){let{fg:r,bg:n,t:o}=e,i=ie(r),s=ie(n),a=ub(t),c=Math.min(1,o/.6),u=a?vr(a,r,i+.3*(s-i),true):r,l=sn(r,u,c),f=a?ub(t,a):null,p=i+.42*(s-i),m=f&&ie(f)<=p+.22?sn(r,vr(f,r,p,true),c):l;return {body:l,inner:m}}function CS(e){let{art:t,image:r,size:n,kinds:o,modules:i,bg:s,margin:a,pixelSize:c,version:u}=e,l=Bh(t,r),f=vS(e,l).plate,{body:p}=Lb(e,l),m=tt(p),h=f&&Rb(f),d=i.map(I=>[...I]);for(let I=0;I<n;I++)for(let L=0;L<n;L++){let z=o[I*n+L];(z===Pt||h&&z!==$t&&Eb(h,L,I))&&(d[I][L]=false);}let g=[],_=e.body?.(d);if(_)g.push(R("g",{fill:m,children:_},"art-body"));else {let I=new an;for(let L=0;L<n;L++)for(let z=0;z<n;z++)d[L]?.[z]&&o[L*n+z]!==$t&&I.circle(m,(z+a+.5)*c,(L+a+.5)*c,.45*c);g.push(...I.toElements("art-body"));}let y=qi(u,n).filter(([I,L])=>!h||Ib(I+.5,L+.5,h)>3.2);if(y.length>0&&g.push(R("path",{d:_b(y,a,c),fill:m,fillRule:"evenodd"},"art-alignment")),!f)return g;let b=gb(t,r,l),S=(f.cx-f.plateW/2+a)*c,v=(f.cy-f.plateH/2+a)*c,w=f.plateW*c,x=f.plateH*c,P=f.radius*c,C=.1*c,E=on(S,v,w,x,P);return g.push(R("path",{d:E,fill:tt(s)},"art-plate"),R("path",{d:E+on(S+C,v+C,w-2*C,x-2*C,P-C),fill:tt(sn(s,p,.16)),fillRule:"evenodd"},"art-plate-ring"),Cb(l,b,{x:(f.cx-f.logoW/2+a)*c,y:(f.cy-f.logoH/2+a)*c,scale:f.logoW/l.width*c},I=>I,"art-logo")),g}function Vh(e){let{art:t}=e;if(t.mode!=="logo"||t.matchEyes===false)return null;let r=t.image&&Oh(t.image);if(!r)return null;let n=vo(e.fgColor,[0,0,0]),o=vo(e.bgColor,[1,1,1]),i=bb(t,n,o);if(i<=0)return null;let s=Bh(t,r);if(s.palette.length===0)return null;if(zc(t)==="badge"){let{body:h,inner:d}=Lb({fg:n,bg:o,t:i},s),g={outer:tt(h),inner:tt(d)};return {topLeft:g,topRight:g,bottomLeft:g}}let a=ie(n),c=ie(o),u=Math.min(1,i/.6),l=e.version*4+17,f=Zh(s.width,s.height,l,"contain"),p=.45*Math.max(s.width,s.height),m=(h,d)=>{let g=(h-f.offsetX)/f.scale,_=(d-f.offsetY)/f.scale,y=null,b=0;for(let v of s.palette){if(ie(v.color)>.86)continue;let w=(v.cx-g)**2+(v.cy-_)**2,x=v.area*(.35+pb(v.color))*Math.exp(-w/(2*p**2));x>b&&(b=x,y=v.color);}if(!y)return {};let S=vr(y,n,a+.42*(c-a),true);return {inner:tt(sn(n,S,u))}};return {topLeft:m(3.5,3.5),topRight:m(l-3.5,3.5),bottomLeft:m(3.5,l-3.5)}}function me(e){if(e.length===0)return "";let[t,...r]=e;return `M${$(t[0])} ${$(t[1])}${r.map(([n,o])=>`L${$(n)} ${$(o)}`).join("")}Z`}function se(e,t,r){return `M${$(e-r)} ${$(t)}A${$(r)} ${$(r)} 0 1 1 ${$(e+r)} ${$(t)}A${$(r)} ${$(r)} 0 1 1 ${$(e-r)} ${$(t)}Z`}function Q(e,t,r,n,o=0){let i=Math.min(r,n)/2,[s,a,c,u]=(typeof o=="number"?[o,o,o,o]:o).map(f=>Math.max(0,Math.min(f,i))),l=(f,p,m)=>f>0?`A${$(f)} ${$(f)} 0 0 1 ${$(p)} ${$(m)}`:"";return `M${$(e+s)} ${$(t)}H${$(e+r-a)}${l(a,e+r,t+a)}V${$(t+n-c)}${l(c,e+r-c,t+n)}H${$(e+u)}${l(u,e,t+n-u)}V${$(t+s)}${l(s,e+s,t)}Z`}function Co(e,t,r,n,o=-90){return Array.from({length:n},(i,s)=>{let a=(o+360/n*s)*Math.PI/180;return [e+r*Math.cos(a),t+r*Math.sin(a)]})}function Po(e,t,r,n,o=5){return Array.from({length:o*2},(i,s)=>{let a=s%2===0?r:n,c=-Math.PI/2+Math.PI/o*s;return [e+a*Math.cos(c),t+a*Math.sin(c)]})}function Wi(e,t,r,n,o=4,i=64){return Array.from({length:i},(s,a)=>{let c=2*Math.PI*a/i,u=Math.cos(c),l=Math.sin(c);return [e+r*Math.sign(u)*Math.abs(u)**(2/o),t+n*Math.sign(l)*Math.abs(l)**(2/o)]})}function ko(e,t,r){let n=r/2,o=(i,s)=>`${$(e+i*n)} ${$(t+s*n)}`;return `M${o(0,-0.52)}C${o(.18,-0.92)} ${o(.98,-0.94)} ${o(1,-0.34)}C${o(1,.12)} ${o(.5,.48)} ${o(0,.92)}C${o(-0.5,.48)} ${o(-1,.12)} ${o(-1,-0.34)}C${o(-0.98,-0.94)} ${o(-0.18,-0.92)} ${o(0,-0.52)}Z`}function zb(e,t,r,n){if(n===0)return e;let o=n*Math.PI/180,i=Math.cos(o),s=Math.sin(o);return e.map(([a,c])=>[t+(a-t)*i-(c-r)*s,r+(a-t)*s+(c-r)*i])}function Tc(e,t,r=0){let n=Math.imul(e+2654435769,2246822507)^Math.imul(t+r,3266489909);return n=Math.imul(n^n>>>15,739982445),n=Math.imul(n^n>>>12,695872825),n^=n>>>15,(n>>>0)/4294967296}function cn(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return (t>>>0).toString(36)}var PS=["horizontal-line","liquid","liquid-horizontal","liquid-vertical","classy","classy-rounded","leaf","plus","hexagon","star","heart","random-dots","mosaic","octagon"];function Tb(e){return PS.includes(e)}var Nb={circle:.95,"circle-large":.85,square:.75,diamond:.95,pacman:.9,rounded:.75,"vertical-line":.8,liquid:.75,"liquid-horizontal":.85,"liquid-vertical":.85,classy:.7,"classy-rounded":.7,leaf:.75,plus:.8,hexagon:.75,star:.85,heart:.85,"random-dots":.85,mosaic:.8,octagon:.8};function Nc(e,t){if(e===void 0||!Number.isFinite(e))return 1;let r=t?Nb[t]??1:Ui;return Math.min(Ec,Math.max(Ui,r,e))}function kS(e,t,r){return e<7&&t<7||e>=r-7&&t<7||e<7&&t>=r-7}function AS(e,t){if(e===1)return [];let r=Math.floor(e/7)+2,n=e===32?26:Math.ceil((e*4+4)/(r*2-2))*2,o=[6];for(let i=t-7;o.length<r;i-=n)o.splice(1,0,i);return o}function jh(e){let t=(e-17)/4,r=Number.isInteger(t)?AS(t,e):[],n=r.length-1,o=[];for(let[i,s]of r.entries())for(let[a,c]of r.entries())i===0&&a===0||i===0&&a===n||i===n&&a===0||o.push([s,c]);return (i,s)=>o.some(([a,c])=>Math.abs(i-a)<=2&&Math.abs(s-c)<=2)}var RS={liquid:{horizontal:true,vertical:true,thickness:1,radius:()=>1,fillets:true},"liquid-horizontal":{horizontal:true,vertical:false,thickness:.86,radius:()=>1,fillets:false},"liquid-vertical":{horizontal:false,vertical:true,thickness:.86,radius:()=>1,fillets:false},classy:{horizontal:true,vertical:true,thickness:1,radius:e=>e===0||e===2?1:0,fillets:false},"classy-rounded":{horizontal:true,vertical:true,thickness:1,radius:e=>e===0||e===2?1:.4,fillets:false}};function ES(e,t,r,n,o,i){switch(e){case "horizontal-line":{let s=n*.43;return Q(t-n/2,r-s,n,2*s)}case "leaf":{let s=n*.5;return Q(t-s,r-s,2*s,2*s,[n*.4,n*.05,n*.4,n*.05])}case "plus":{let s=n*.22,a=n*.5;return me([[t-s,r-a],[t+s,r-a],[t+s,r-s],[t+a,r-s],[t+a,r+s],[t+s,r+s],[t+s,r+a],[t-s,r+a],[t-s,r+s],[t-a,r+s],[t-a,r-s],[t-s,r-s]])}case "hexagon":return me(Co(t,r,n*.54,6));case "star":return me(Po(t,r+n*.04,n*.62,n*.34));case "heart":return ko(t,r+n*.02,n*1.08);case "random-dots":return se(t,r,n*(.38+.15*Tc(o,i)));case "mosaic":{let s=n*(.8+.14*Tc(o,i,1))/2,a=[[t-s,r-s],[t+s,r-s],[t+s,r+s],[t-s,r+s]];return me(zb(a,t,r,(Tc(o,i,2)-.5)*16))}case "octagon":return me(Co(t,r,n*.48/Math.cos(Math.PI/8),8,22.5));default:return se(t,r,n*.45)}}function Ob(e,t){let{margin:r,pixelSize:n,pattern:o}=t,i=Nc(t.scale,o),s=e.length,a=t.plain?()=>false:jh(s),c=(d,g)=>!t.plain&&kS(d,g,s),u=(d,g)=>d>=0&&g>=0&&d<s&&g<s&&!!e[g]?.[d]&&!c(d,g),l=d=>(d+.5+r)*n,f=[],p=[],m=RS[o];for(let d=0;d<s;d++)for(let g=0;g<s;g++){if(!u(g,d))continue;let _=l(g),y=l(d);if(a(g,d)){f.push(M`M${_-n/2} ${y-n/2}h${n}v${n}h${-n}z`);continue}if(!m){p.push(ES(o,_,y,n*i,g,d));continue}let b=n*m.thickness*i/2,S=m.horizontal&&u(g+1,d),v=m.horizontal&&u(g-1,d),w=m.vertical&&u(g,d-1),x=m.vertical&&u(g,d+1),C=[!(w||v),!(w||S),!(x||S),!(x||v)].map((E,I)=>E?b*m.radius(I):0);p.push(Q(_-b,y-b,2*b,2*b,C)),2*b<n&&(S&&p.push(Q(_,y-b,n,2*b)),x&&p.push(Q(_-b,y,2*b,n)));}if(m?.fillets&&i===1){let d=n*.3;for(let g=0;g<s;g++)for(let _=0;_<s;_++){if(u(_,g)||c(_,g))continue;let y=l(_)-n/2,b=l(g)-n/2,S=y+n,v=b+n;u(_-1,g)&&u(_,g-1)&&u(_-1,g-1)&&p.push(M`M${y} ${b}h${d}A${d} ${d} 0 0 0 ${y} ${b+d}Z`),u(_+1,g)&&u(_,g-1)&&u(_+1,g-1)&&p.push(M`M${S} ${b}v${d}A${d} ${d} 0 0 0 ${S-d} ${b}Z`),u(_+1,g)&&u(_,g+1)&&u(_+1,g+1)&&p.push(M`M${S} ${v}h${-d}A${d} ${d} 0 0 0 ${S} ${v-d}Z`),u(_-1,g)&&u(_,g+1)&&u(_-1,g+1)&&p.push(M`M${y} ${v}v${-d}A${d} ${d} 0 0 0 ${y+d} ${v}Z`);}}let h=[];return p.length>0&&h.push(R("path",{d:p.join("")},"modules")),f.length>0&&h.push(R("path",{d:f.join("")},"alignment")),h}var Rk=(e,t,r,n)=>{let o=document.createElement("canvas");o.width=t,o.height=r;let i=o.getContext("2d");if(!i)return;i.putImageData(e,0,0);let s=o.toDataURL("image/png"),a=document.createElement("a");a.href=s,a.download=n,document.body.appendChild(a),a.click(),document.body.removeChild(a);},MS=async(e,t,r,n)=>{let{default:o}=await import('jsqr');return new Promise(i=>{e.complete?s():(e.onload=()=>s(),e.onerror=()=>i(null));function s(){let a=document.createElement("canvas");requestAnimationFrame(()=>{if(!(e.naturalWidth&&e.naturalHeight)){i(null);return}let c=e.naturalWidth/e.naturalHeight<=.33||e.naturalWidth/e.naturalHeight>=3?Math.sqrt(e.naturalWidth*e.naturalHeight/12e5):e.naturalWidth/e.naturalHeight<=.5||e.naturalWidth/e.naturalHeight>=2?Math.sqrt(e.naturalWidth*e.naturalHeight/9e5):Math.sqrt(e.naturalWidth*e.naturalHeight/64e4),u=a.getContext("2d",{willReadFrequently:true});if(!u){i(null);return}let l=[1,.8,.6,.4,.2,.1];for(let f of l){let p=Math.floor(e.naturalWidth*t*f/c),m=Math.floor(e.naturalHeight*t*f/c);a.width=p,a.height=m,u.clearRect(0,0,p,m),u.imageSmoothingEnabled=true,u.imageSmoothingQuality="high";try{u.drawImage(e,Math.floor(r),Math.floor(n),Math.floor(e.naturalWidth*t),Math.floor(e.naturalHeight*t),0,0,p,m);let h=u.getImageData(0,0,p,m);try{let d=o(h.data,p,m);if(d?.data){i(d);return}}catch(d){console.error("QR Detection error:",d);}}catch(h){console.error("Canvas drawing error:",h);}}i(null);});}})},Fb=async(e,t,r=false)=>{if(!e)return "NO_QR";await new Promise(o=>setTimeout(o,100));let n=[{dx:0,dy:0,ratio:1},{dx:0,dy:e.naturalHeight*.35,ratio:.65},{dx:e.naturalWidth*.35,dy:e.naturalHeight*.35,ratio:.65},{dx:e.naturalWidth*.35,dy:0,ratio:.65},{dx:e.naturalWidth*.35/2,dy:e.naturalHeight*.35/2,ratio:.65}];for(let o of n)try{let i=await MS(e,o.ratio,o.dx,o.dy);if(i?.data)return r?i:i.data}catch(i){console.warn("QR decode error:",i);}return "NO_QR"};function Ek(e,t,r){if(!(e&&t)||t.length!==4)return;let n=document.createElement("canvas");n.width=e.naturalWidth,n.height=e.naturalHeight;let o=n.getContext("2d");if(!o)return;o.drawImage(e,0,0),o.save(),o.strokeStyle="#ff0000",o.lineWidth=Math.max(5,Math.min(e.naturalWidth,e.naturalHeight)/200),o.shadowColor="transparent",o.shadowBlur=0,o.beginPath(),o.moveTo(t[0].x,t[0].y),o.lineTo(t[1].x,t[1].y),o.lineTo(t[3].x,t[3].y),o.lineTo(t[2].x,t[2].y),o.closePath(),o.stroke(),o.fillStyle="#ff0000",t.forEach((a,c)=>{o.fillRect(a.x-3,a.y-3,6,6),o.fillStyle="#ffffff",o.font="16px Arial",o.fillText(`${c}`,a.x+5,a.y-5),o.fillStyle="#ff0000";}),o.restore();let i=n.toDataURL("image/png"),s=document.createElement("a");s.href=i,s.download=r,document.body.appendChild(s),s.click(),document.body.removeChild(s);}var qh=24,Cr=(e,t,r,n)=>{let o=n*Math.PI/180;return [e+r*Math.cos(o),t+r*Math.sin(o)]},Oc=([e,t])=>`${$(e)} ${$(t)}`;function Ao(e,t,r,n,o,i){let s=i-o>180?1:0;return `M${Oc(Cr(e,t,n,o))}A${$(n)} ${$(n)} 0 ${s} 1 ${Oc(Cr(e,t,n,i))}L${Oc(Cr(e,t,r,i))}A${$(r)} ${$(r)} 0 ${s} 0 ${Oc(Cr(e,t,r,o))}Z`}function Hi(e,t,r,n){return `M${$(e-r)} ${$(t)}A${$(r)} ${$(n)} 0 1 1 ${$(e+r)} ${$(t)}A${$(r)} ${$(n)} 0 1 1 ${$(e-r)} ${$(t)}Z`}function IS(e){let t=0;return e.forEach(([r,n],o)=>{let[i,s]=e[(o+1)%e.length];t+=r*s-i*n;}),t/2}function Db(e){return me(IS(e)<0?[...e].reverse():e)}function Fc(e,t,r,n,o){let i=Math.hypot(r-e,n-t)||1,s=-(n-t)/i*(o/2),a=(r-e)/i*(o/2);return Db([[e+s,t+a],[r+s,n+a],[r-s,n-a],[e-s,t-a]])}var rt=(...e)=>({d:e.join(""),fillRule:"nonzero"}),Yt=(...e)=>({d:e.join(""),fillRule:"evenodd"});function LS(){let e=[];for(let t of [0,60,120]){let[r,n]=Cr(12,12,10.5,t+180),[o,i]=Cr(12,12,10.5,t);e.push(Fc(r,n,o,i,2));}for(let t=0;t<6;t++){let r=t*60,[n,o]=Cr(12,12,6.2,r);for(let i of [-45,45]){let[s,a]=Cr(n,o,3.6,r+i);e.push(Fc(n,o,s,a,1.7));}}return rt(...e)}var zS={wifi:()=>rt(Ao(12,20,4.6,7.2,-135,-45),Ao(12,20,9.2,11.8,-135,-45),Ao(12,20,13.8,16.4,-135,-45),se(12,20,2.2)),star:()=>rt(me(Po(12,12.8,11.6,4.8))),heart:()=>rt(ko(12,12.4,22)),phone:()=>Yt(Q(6,1.5,12,21,2.6),Q(7.8,4.2,8.4,13.4,.6),se(12,19.8,1.1)),headphones:()=>rt(Ao(12,13,7.6,9.8,-180,0),Q(2,12,5,9.5,2),Q(17,12,5,9.5,2)),calendar:()=>Yt(Q(2.5,4,19,17.5,2.5),Q(4.6,9,14.8,10.6,.8),Q(7,11.4,2.6,2.6,.4),Q(10.7,11.4,2.6,2.6,.4),Q(14.4,11.4,2.6,2.6,.4),Q(7,15.1,2.6,2.6,.4),Q(10.7,15.1,2.6,2.6,.4),Q(6.5,1.4,2.4,2.6,[1.2,1.2,0,0]),Q(15.1,1.4,2.4,2.6,[1.2,1.2,0,0])),user:()=>rt(se(12,7.5,4.6),"M3 21.5C3 16.2 7 13.6 12 13.6C17 13.6 21 16.2 21 21.5Z"),chat:()=>Yt(Q(2,3,20,14,4),me([[6.5,17],[11.5,17],[5.8,21.8]]),se(7.5,10,1.5),se(12,10,1.5),se(16.5,10,1.5)),bag:()=>rt(Q(3.5,7.5,17,14.5,2),Ao(12,7.5,3.1,4.8,-180,0)),bell:()=>rt("M3.5 17.2A8.5 8.5 0 0 1 20.5 17.2Z",Q(1.5,18.2,21,2.6,1.3),Q(11.2,6.6,1.6,2.6,0),Q(9.8,4.6,4.4,2.4,1.2)),cup:()=>rt("M4 6.5H17V13.5A6.5 6.5 0 0 1 4 13.5Z",Ao(17,10.2,1.7,3.6,-90,90),Q(2,20.6,17,2,1),Q(7,1.6,1.6,3.4,.8),Q(11.6,1.6,1.6,3.4,.8)),card:()=>Yt(Q(1.5,4.5,21,15,2.5),Q(1.5,8,21,3,0),Q(4.5,13.6,4.6,3.2,.6)),check:()=>Yt(se(12,12,10.5),me([[6.6,12.4],[8.4,10.6],[10.6,12.8],[15.8,7.6],[17.6,9.4],[10.6,16.4]])),info:()=>Yt(se(12,12,10.5),se(12,7.2,1.6),Q(10.6,10,2.8,8,.8)),home:()=>Yt(me([[12,2.5],[22.5,11.5],[19.5,11.5],[19.5,21.5],[4.5,21.5],[4.5,11.5],[1.5,11.5]]),Q(10,14.5,4,7,[.6,.6,0,0])),pin:()=>Yt("M12 22.5C8.5 17.6 4.5 14 4.5 9.5A7.5 7.5 0 0 1 19.5 9.5C19.5 14 15.5 17.6 12 22.5Z",se(12,9.5,3)),share:()=>rt(Fc(6,12,18,5,1.8),Fc(6,12,18,19,1.8),se(18,5,3.2),se(6,12,3.2),se(18,19,3.2)),download:()=>rt(Q(10.6,2,2.8,9.5,0),me([[6,10],[18,10],[12,16.5]]),me([[2.5,15],[5.3,15],[5.3,19],[18.7,19],[18.7,15],[21.5,15],[21.5,21.8],[2.5,21.8]])),clock:()=>Yt(se(12,12,10.5),se(12,12,8.4),me([[11,5.4],[13,5.4],[13,11.3],[16.9,13.5],[15.9,15.2],[11,12.5]])),snowflake:LS,pumpkin:()=>rt(Hi(7.8,14.6,5.8,6.9),Hi(16.2,14.6,5.8,6.9),Hi(12,14.6,4.8,7.4),Q(10.9,3.4,2.2,4.6,.8),Db([[13,4.2],[17.2,3],[16.2,5.4],[13,6]])),tree:()=>rt(me([[12,1.5],[16.8,8.2],[7.2,8.2]]),me([[12,5.2],[19,13.6],[5,13.6]]),me([[12,9.4],[21.2,19.2],[2.8,19.2]]),Q(10.4,18.6,3.2,3.9,.4)),sparkle:()=>rt(me(Po(9.5,13.5,9,2.4,4)),me(Po(19,5,4,1.1,4))),gift:()=>rt(Q(3,11.2,7.8,10.6,1),Q(13.2,11.2,7.8,10.6,1),Q(2,7.4,8.8,3.2,1),Q(13.2,7.4,8.8,3.2,1),Hi(8.8,4.8,2.9,1.9),Hi(15.2,4.8,2.9,1.9))};function Wh(e){return zS[e]()}function Zb(e){return e===" "?.3:/[MWmw@%]/.test(e)?.92:/[A-Z0-9#&]/.test(e)?.72:/[il.,:;!'|1]/.test(e)?.32:.6}function Xh(e){let t=0;for(let r of e)t+=Zb(r);return Math.max(t,1)}var Hh=e=>Math.round(Math.min(255,Math.max(0,e))).toString(16).padStart(2,"0");function Xi(e,t,r){let n=ke(e)??{r:0,g:0,b:0},o=ke(t)??{r:255,g:255,b:255},i=Math.min(1,Math.max(0,r));return `#${Hh(n.r+(o.r-n.r)*i)}${Hh(n.g+(o.g-n.g)*i)}${Hh(n.b+(o.b-n.b)*i)}`}function Bb(e,t,r,n,o,i,s,a){let c=[...e],u=o*.08,l=c.map(d=>Zb(d)*o),f=l.reduce((d,g)=>d+g,0)+u*Math.max(0,c.length-1),p=i==="top"?n-o*.35:n+o*.35,m=[],h=0;return c.forEach((d,g)=>{let _=l[g],y=(h+_/2)/p;if(h+=_+u,d.trim()==="")return;let b=i==="top"?-Math.PI/2-f/2/p+y:Math.PI/2+f/2/p-y;m.push({text:d,x:t+p*Math.cos(b),y:r+p*Math.sin(b),fontSize:o,maxWidth:o*2,color:s,rotate:b*180/Math.PI+(i==="top"?90:-90),field:a});}),m}var Ki=class extends Error{issues;constructor(t){super(`Invalid frame spec: ${t.slice(0,5).join("; ")}`),this.name="FrameSpecError",this.issues=t;}},Ub=new WeakMap;function Yi(e){if(e&&typeof e=="object"){let r=Ub.get(e);if(r)return r}if(e==null)throw new Ki(['A "custom" frame needs a spec']);let t=tn.safeParse(e);if(!t.success)throw new Ki(t.error.issues.map(r=>r.path.length>0?`${r.path.join(".")}: ${r.message}`:r.message));return typeof e=="object"&&Ub.set(e,t.data),t.data}function Kh(e){let t=Yi(e);return xo(t)/t.qr.size}var TS=e=>{let t=ke(e);return !!(t&&t.a>=1)};function NS(e,t){let r=Ze(t,ze);return TS(r)?{color:r,plate:true}:e.qr.plate==="background"?{color:r,plate:false}:{color:ze,plate:true}}function Dc(e,t,r=ze){let n=t.color||e.colors.frame,o=t.secondaryColor||e.colors.accent||n,i=c=>c==="frame"?n:c==="accent"?o:c==="background"?r:c,s=e.colors.text,a=t.textColor||(s===void 0?n:typeof s=="string"?s:Xi(i(s.mix[0]),i(s.mix[1]),s.amount));return {frame:n,text:a,accent:o}}function OS(e,t,r){let n=Dc(t,e,r),o=i=>{switch(i){case "frame":return n.frame;case "text":return n.text;case "accent":return n.accent;case "background":return r;default:return i}};return i=>typeof i=="string"?o(i):Xi(o(i.mix[0]),o(i.mix[1]),i.amount)}function Gb(e,t,r=0,n=0){let o=Di(e);return o?ph(o,t,r,n):""}function FS(e,t,r,n){return `M${$(e-r)} ${$(t)}A${$(r)} ${$(n)} 0 1 1 ${$(e+r)} ${$(t)}A${$(r)} ${$(n)} 0 1 1 ${$(e-r)} ${$(t)}Z`}function DS(e,t){let[r,n,o,i]=[e.x1*t,e.y1*t,e.x2*t,e.y2*t],s=Math.hypot(o-r,i-n),a=e.width*t/2,c=s>0?(o-r)/s:1,u=s>0?(i-n)/s:0,l=-u*a,f=c*a,p=(g,_)=>{let y=[r+c*g,n+u*g],b=[r+c*_,n+u*_];if(e.cap==="round"&&_-g>2*a){let S=[y[0]+c*a,y[1]+u*a],v=[b[0]-c*a,b[1]-u*a];return `M${$(S[0]-l)} ${$(S[1]-f)}L${$(v[0]-l)} ${$(v[1]-f)}A${$(a)} ${$(a)} 0 0 1 ${$(v[0]+l)} ${$(v[1]+f)}L${$(S[0]+l)} ${$(S[1]+f)}A${$(a)} ${$(a)} 0 0 1 ${$(S[0]-l)} ${$(S[1]-f)}Z`}return `M${$(y[0]-l)} ${$(y[1]-f)}L${$(b[0]-l)} ${$(b[1]-f)}L${$(b[0]+l)} ${$(b[1]+f)}L${$(y[0]+l)} ${$(y[1]+f)}Z`};if(!e.dash)return {type:"path",d:p(0,s),fillRule:"nonzero"};let m=e.dash[0]*t,h=m+e.dash[1]*t,d=[];for(let g=0;g+m<=s+1e-6;g+=h)d.push(p(g,g+m));return {type:"path",d:d.join(""),fillRule:"nonzero"}}function ZS(e,t){switch(e.type){case "rect":return {type:"rect",x:e.x*t,y:e.y*t,width:e.width*t,height:e.height*t,radius:(e.radius??0)*t,...e.hole&&{hole:{x:e.hole.x*t,y:e.hole.y*t,width:e.hole.width*t,height:e.hole.height*t,radius:(e.hole.radius??0)*t}}};case "circle":return {type:"path",d:se(e.cx*t,e.cy*t,e.r*t)+(e.hole?se(e.cx*t,e.cy*t,e.hole*t):""),fillRule:e.hole?"evenodd":"nonzero"};case "ellipse":return {type:"path",d:FS(e.cx*t,e.cy*t,e.rx*t,e.ry*t),fillRule:"nonzero"};case "polygon":return {type:"polygon",points:e.points.map(([r,n])=>[r*t,n*t])};case "path":return {type:"path",d:Gb(e.d,t),fillRule:e.fillRule??"nonzero"};case "line":return DS(e,t);default:{let r=Wh(e.icon);return {type:"path",d:Gb(r.d,e.size*t/qh,e.x*t,e.y*t),fillRule:r.fillRule}}}}function BS(e){if(e.type==="rect"){let{x:t,y:r,width:n,height:o,radius:i,hole:s}=e;return [...Dt(t,r,n,o,i,i),...s?Dt(s.x,s.y,s.width,s.height,s.radius,s.radius):[]]}return e.type==="polygon"?[...e.points.map(([t,r],n)=>n===0?{op:"M",x:t,y:r}:{op:"L",x:t,y:r}),{op:"Z"}]:Kt(e.d)}function US(e,t,r){let n=BS(e),o=wc(n,.2),i=e.type==="rect"?e.hole?"evenodd":"nonzero":e.type==="path"?e.fillRule??"nonzero":"nonzero",s=t.direction==="vertical",a=g=>s?g[1]:g[0],c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let g of o)for(let _ of g)c=Math.min(c,a(_)),u=Math.max(u,a(_));if(!(u>c))return [];let l=t.steps??32,f=r(t.from),p=r(t.to),m=u-c,h=m*.002,d=[];for(let g=0;g<l;g++){let _=c+m*g/l,y=Math.min(u,c+m*(g+1)/l+(g+1<l?h:0)),b=s?{x0:Number.NEGATIVE_INFINITY,x1:Number.POSITIVE_INFINITY,y0:_,y1:y}:{x0:_,x1:y,y0:Number.NEGATIVE_INFINITY,y1:Number.POSITIVE_INFINITY},S=o.map(v=>mo(v,b)).filter(v=>v.length>2);S.length!==0&&d.push({type:"path",d:A_(S),fill:Xi(f,p,(g+.5)/l),fillRule:i});}return d}function GS(e,t,r){let n=ZS(e,t);return typeof e.fill=="object"&&"gradient"in e.fill?US(n,e.fill.gradient,r):[{...n,fill:r(e.fill)}]}function QS(e,t){let r=Math.min(e.maxLength??we.maxTextLength,we.maxTextLength),n=e.slot==="primary"?t.text??e.text:e.slot==="secondary"?t.secondaryText??e.text:e.text;return bo(n,r)}function VS(e){return e===void 0||!Number.isFinite(e)?1:Math.min(Jr,Math.max(xc,e))}function jS(e,t,r,n,o,i){let s=o(e.color),a=e.weight==="regular"?{fontWeight:400}:{};if(e.type==="curved"){let{cx:d,cy:g,radius:_,side:y,spread:b=140}=e.curve,S=_*n*(b*Math.PI/180),v=Math.min(e.fontSize*n*r,S/(Xh(t)+.08*t.length));return Bb(t,d*n,g*n,_*n,v,y,s,i).map(w=>({...w,...a}))}let c=e.box.x*n,u=e.box.y*n,l=e.box.width*n,f=e.box.height*n;if(!(f>0))return [];let p=(e.fontSize??e.box.height*$h)*n,m=Math.min(p*r,f*Bi,l/Xh(t)),h=e.align??"middle";return [{text:t,x:h==="start"?c:h==="end"?c+l:c+l/2,y:u+f/2+m*.35,fontSize:m,maxWidth:l,color:s,...h!=="middle"&&{align:h},...a,field:i}]}function qS(e){let t=0,r=0,n=0,o=0;return e.map(({command:i,values:s})=>{let a=i.toUpperCase(),c=i!==a;switch(a){case "Z":return t=n,r=o,{command:"Z",values:[]};case "H":return t=(c?t:0)+s[0],{command:"H",values:[t]};case "V":return r=(c?r:0)+s[0],{command:"V",values:[r]};case "A":return t=(c?t:0)+s[5],r=(c?r:0)+s[6],{command:"A",values:[...s.slice(0,5),t,r]};default:{let u=s.map((l,f)=>c?l+(f%2===0?t:r):l);return t=u.at(-2),r=u.at(-1),a==="M"&&(n=t,o=r),{command:a,values:u}}}})}function WS(e,t){let r=Di(e);return r?ph(qS(r).map(({command:n,values:o})=>n==="V"?{command:n,values:[t(o[0])]}:n==="H"||n==="Z"?{command:n,values:o}:n==="A"?{command:n,values:[...o.slice(0,6),t(o[6])]}:{command:n,values:o.map((i,s)=>s%2===1?t(i):i)})):e}function HS(e,t){let r=(n,o)=>{let i=t(n);return {y:i,height:t(n+o)-i}};switch(e.type){case "rect":return {...e,...r(e.y,e.height),...e.hole&&{hole:{...e.hole,...r(e.hole.y,e.hole.height)}}};case "circle":case "ellipse":return {...e,cy:t(e.cy)};case "polygon":return {...e,points:e.points.map(([n,o])=>[n,t(o)])};case "path":return {...e,d:WS(e.d,t)};case "line":return {...e,y1:t(e.y1),y2:t(e.y2)};default:return {...e,y:t(e.y)}}}function XS(e,t){if(t.length===0)return e;let r=o=>{let i=o;for(let s of t)i-=Math.min(Math.max(o-s.y,0),s.height);return i},n=(o,i)=>t.some(s=>o>=s.y-1e-6&&i<=s.y+s.height+1e-6);return {...e,artboard:{...e.artboard,height:r(e.artboard.height)},qr:{...e.qr,y:r(e.qr.y)},shapes:e.shapes.filter(o=>{let{bounds:i}=wh(o);return !(i&&n(i.y0,i.y1))}).map(o=>HS(o,r)),labels:e.labels.map(o=>{if(o.type==="curved")return {...o,curve:{...o.curve,cy:r(o.curve.cy)}};let i=r(o.box.y);return {...o,box:{...o.box,y:i,height:r(o.box.y+o.box.height)-i}}})}}function Yh(e,t,r,n,o={}){let i=new Map(t.labels.map(g=>[g.id,QS(g,r)])),s=XS(t,t.labels.flatMap(g=>g.collapse&&!i.get(g.id)?[g.collapse]:[])),a=e/s.qr.size,c=NS(s,n),u=OS(r,s,c.color),l=s.shapes.flatMap(g=>GS(g,a,u));if(c.plate){let g=xo(s)*a;l.push({type:"rect",x:s.qr.x*a-g,y:s.qr.y*a-g,width:e+2*g,height:e+2*g,radius:(s.qr.radius??0)*a,fill:c.color});}let f=VS(r.fontScale),p=s.labels.flatMap(g=>{let _=i.get(g.id);if(!_)return [];let y=(g.slot==="fixed"?void 0:o[g.slot])??g.id;return jS(g,_,f,a,u,y)}),m=p[0],h=m&&m.rotate===void 0?m:null,d=s.bleed??"none";return {width:s.artboard.width*a,height:s.artboard.height*a,qrX:s.qr.x*a,qrY:s.qr.y*a,qrSize:e,shapes:l,label:h,extraLabels:h?p.slice(1):p,squareEdges:d!=="none",color:u(d==="none"?"frame":d)}}function Jh(e,t,r){return Yh(e,Yi(t.spec),t,r)}var Qb={kind:"qrdx.frame",version:1,artboard:{width:1600,height:1470},qr:{x:300,y:120,size:1e3,padding:70,radius:10,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"polygon",points:[[0,1250],[190,1250],[190,1470],[0,1470],[50.4,1360]],fill:{mix:["frame","#000000"],amount:.28}},{type:"polygon",points:[[1600,1250],[1549.6,1360],[1600,1470],[1410,1470],[1410,1250]],fill:{mix:["frame","#000000"],amount:.28}},{type:"polygon",points:[[90,1420],[170,1470],[90,1470]],fill:{mix:["frame","#000000"],amount:.5}},{type:"polygon",points:[[1510,1420],[1510,1470],[1430,1470]],fill:{mix:["frame","#000000"],amount:.5}},{type:"rect",x:220,y:40,width:1160,height:1160,radius:20,fill:"background"},{type:"rect",x:180,y:0,width:1240,height:1240,radius:60,fill:"frame",hole:{x:220,y:40,width:1160,height:1160,radius:20}},{type:"rect",x:90,y:1200,width:1420,height:220,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:170,y:1200,width:1260,height:220}}]};var e0={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1420},qr:{x:120,y:120,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1420,fill:"frame",hole:{x:40,y:40,width:1160,height:1160}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1200,width:1e3,height:220}}],bleed:"frame"};var Vb={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1420},qr:{x:120,y:300,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:220,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1420,fill:"frame",hole:{x:40,y:220,width:1160,height:1160}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}}],bleed:"frame"};var jb={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1600},qr:{x:120,y:300,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:220,width:1160,height:1160,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1600,fill:"frame",hole:{x:40,y:220,width:1160,height:1160}}],labels:[{type:"text",id:"top",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}},{type:"text",id:"bottom",slot:"secondary",text:"",color:"text",box:{x:120,y:1380,width:1e3,height:220}}],bleed:"frame"};var qb={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1340},qr:{x:120,y:120,size:1e3,padding:40,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1260,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1340,fill:"frame",hole:{x:40,y:40,width:1160,height:1260}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1120,width:1e3,height:180},collapse:{y:1200,height:100}}],bleed:"frame"};var Wb={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1530},qr:{x:120,y:120,size:1e3,padding:80,radius:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:0,width:1240,height:1400,radius:120,fill:"frame"},{type:"path",d:"M161.2 1380L62 1530Q198.4 1458.5 396.8 1380Z",fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1200,width:1e3,height:200},collapse:{y:1220,height:160}}]};var Hb={kind:"qrdx.frame",version:1,artboard:{width:1978.214,height:1978.214},qr:{x:489.107,y:489.107,size:1e3,padding:50,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"circle",cx:989.107,cy:989.107,r:779.107,fill:"background"},{type:"circle",cx:989.107,cy:989.107,r:989.107,hole:779.107,fill:"frame"},{type:"circle",cx:105,cy:989.107,r:14.7,fill:"text"},{type:"circle",cx:1873.214,cy:989.107,r:14.7,fill:"text"}],labels:[{type:"curved",id:"top",slot:"primary",text:"Scan me",color:"text",curve:{cx:989.107,cy:989.107,radius:884.107,side:"top",spread:140},fontSize:105},{type:"curved",id:"bottom",slot:"secondary",text:"",color:"text",curve:{cx:989.107,cy:989.107,radius:884.107,side:"bottom",spread:140},fontSize:105}]};var Xb={kind:"qrdx.frame",version:1,artboard:{width:1320,height:1558},qr:{x:160,y:130,size:1e3,padding:60},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:370,width:1320,height:1188,fill:{mix:["frame","#FFFFFF"],amount:.45}},{type:"polygon",points:[[0,370],[660,0],[1320,370]],fill:{mix:["frame","#FFFFFF"],amount:.25}},{type:"rect",x:80,y:50,width:1160,height:1268,fill:"background"},{type:"rect",x:68,y:38,width:1184,height:1280,fill:"frame",hole:{x:80,y:50,width:1160,height:1268}},{type:"polygon",points:[[0,1178],[660,1318],[1320,1178],[1320,1558],[0,1558]],fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:160,y:1318,width:1e3,height:220}}]};var Kb={kind:"qrdx.frame",version:1,artboard:{width:1230,height:1430},qr:{x:115,y:115,size:1e3,padding:70,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1230,height:1430,fill:"background"},{type:"polygon",points:[[0,0],[200,0],[200,35],[35,35],[35,200],[0,200]],fill:"frame"},{type:"polygon",points:[[1230,0],[1030,0],[1030,35],[1195,35],[1195,200],[1230,200]],fill:"frame"},{type:"polygon",points:[[1230,1230],[1030,1230],[1030,1195],[1195,1195],[1195,1030],[1230,1030]],fill:"frame"},{type:"polygon",points:[[0,1230],[200,1230],[200,1195],[35,1195],[35,1030],[0,1030]],fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:80,y:1210,width:1070,height:200},collapse:{y:1230,height:200}}]};var Zc={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1360},qr:{x:130,y:130,size:1e3,padding:40,plate:"background"},colors:{frame:"#7c3aed",text:{mix:["frame","accent"],amount:.5},accent:"#db2777"},shapes:[{type:"rect",x:50,y:50,width:1160,height:1260,radius:50,fill:"background"},{type:"rect",x:0,y:0,width:1260,height:1360,radius:100,fill:{gradient:{from:"frame",to:"accent",direction:"horizontal",steps:48}},hole:{x:50,y:50,width:1160,height:1260,radius:50}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1130,width:1e3,height:180},collapse:{y:1210,height:100}}]};var Yb={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1460},qr:{x:130,y:260,size:1e3,padding:46,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1260,height:1460,radius:30,fill:"background"},{type:"rect",x:0,y:0,width:1260,height:1460,radius:30,fill:"frame",hole:{x:22,y:22,width:1216,height:1416,radius:8}},{type:"rect",x:45,y:45,width:1170,height:1370,fill:"frame",hole:{x:53,y:53,width:1154,height:1354}},{type:"rect",x:378,y:181,width:504,height:8,fill:"frame"},{type:"polygon",points:[[630,163],[652,185],[630,207],[608,185]],fill:"frame"}],labels:[{type:"text",id:"title",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:30,width:1e3,height:170},collapse:{y:84,height:130}},{type:"text",id:"footer",slot:"secondary",text:"",color:"text",box:{x:130,y:1270,width:1e3,height:160},collapse:{y:1306,height:70}}]};var Jb={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1610},qr:{x:130,y:250,size:1e3,padding:75,radius:55},colors:{frame:"#000000"},shapes:[{type:"rect",x:0,y:0,width:1260,height:1610,radius:170,fill:"frame"},{type:"rect",x:50,y:170,width:1160,height:1290,radius:60,fill:"background"},{type:"rect",x:520,y:67,width:220,height:36,radius:18,fill:"background"},{type:"rect",x:480,y:1520,width:300,height:30,radius:15,fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1290,width:1e3,height:170},collapse:{y:1330,height:130}}]};var e2={kind:"qrdx.frame",version:1,artboard:{width:1325,height:1555},qr:{x:150,y:150,size:1e3,padding:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:25,y:25,width:1300,height:1530,radius:15,fill:{mix:["frame","#FFFFFF"],amount:.72}},{type:"rect",x:0,y:0,width:1300,height:1530,radius:15,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:150,y:1260,width:1e3,height:240}}]};var t2={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1340},qr:{x:120,y:120,size:1e3,padding:40,plate:"background"},colors:{frame:"#000000"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1260,radius:60,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1340,radius:100,fill:"frame",hole:{x:40,y:40,width:1160,height:1260,radius:60}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1120,width:1e3,height:180},collapse:{y:1200,height:100}}]};var r2={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1565},qr:{x:120,y:120,size:1e3,padding:70,radius:20,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:40,y:40,width:1160,height:1160,radius:30,fill:"background"},{type:"rect",x:0,y:0,width:1240,height:1240,radius:70,fill:"frame",hole:{x:40,y:40,width:1160,height:1160,radius:30}},{type:"polygon",points:[[540,1385],[620,1265],[700,1385]],fill:"frame"},{type:"rect",x:0,y:1345,width:1240,height:220,radius:110,fill:"frame"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:1345,width:1e3,height:220}}]};var n2={kind:"qrdx.frame",version:1,artboard:{width:1240,height:1565},qr:{x:120,y:445,size:1e3,padding:70,radius:20,plate:"background"},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:0,y:0,width:1240,height:220,radius:110,fill:"frame"},{type:"polygon",points:[[540,180],[700,180],[620,300]],fill:"frame"},{type:"rect",x:40,y:365,width:1160,height:1160,radius:30,fill:"background"},{type:"rect",x:0,y:325,width:1240,height:1240,radius:70,fill:"frame",hole:{x:40,y:365,width:1160,height:1160,radius:30}}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:120,y:0,width:1e3,height:220}}]};var o2={kind:"qrdx.frame",version:1,artboard:{width:1420,height:1590},qr:{x:195,y:195,size:1e3,padding:80},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"rect",x:30,y:30,width:1390,height:1560,radius:155,fill:{mix:["frame","#FFFFFF"],amount:.7}},{type:"rect",x:0,y:0,width:1390,height:1560,radius:155,fill:"#FFFFFF"},{type:"rect",x:25,y:25,width:1340,height:1510,radius:130,fill:"frame"},{type:"rect",x:95,y:95,width:1200,height:1200,radius:40,fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:175,y:1295,width:1040,height:240},collapse:{y:1365,height:170}}]};var i2={kind:"qrdx.frame",version:1,artboard:{width:1280,height:1620},qr:{x:140,y:320,size:1e3,padding:80,radius:20},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"path",d:"M140 0H1140L1280 140V1580A40 40 0 0 1 1240 1620H40A40 40 0 0 1 0 1580V140ZM600 115.2A40 40 0 1 1 680 115.2A40 40 0 1 1 600 115.2Z",fill:"frame",fillRule:"evenodd"},{type:"path",d:"M572 115.2A68 68 0 1 1 708 115.2A68 68 0 1 1 572 115.2ZM600 115.2A40 40 0 1 1 680 115.2A40 40 0 1 1 600 115.2Z",fill:{mix:["frame","#FFFFFF"],amount:.35},fillRule:"evenodd"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:140,y:1400,width:1e3,height:220},collapse:{y:1420,height:160}}]};var s2={kind:"qrdx.frame",version:1,artboard:{width:1260,height:1490},qr:{x:130,y:130,size:1e3,padding:80,radius:20},colors:{frame:"#000000",text:"#FFFFFF"},shapes:[{type:"path",d:"M40 0H1220A40 40 0 0 1 1260 40V1215A55 55 0 0 0 1260 1325V1450A40 40 0 0 1 1220 1490H40A40 40 0 0 1 0 1450V1325A55 55 0 0 0 0 1215V40A40 40 0 0 1 40 0Z",fill:"frame"},{type:"line",x1:77,y1:1270,x2:1147,y2:1270,width:12,dash:[30,22],fill:"background"}],labels:[{type:"text",id:"cta",slot:"primary",text:"Scan me",color:"text",box:{x:130,y:1270,width:1e3,height:220}}]};var De=(e,t,r,n,o)=>({style:e,name:t,tags:o,labelOn:n,spec:r}),t0=[De("banner-bottom","Banner",e0,"frame",["bottom","band"]),De("banner-top","Top banner",Vb,"frame",["top","band"]),De("banner-top-bottom","Two banners",jb,"frame",["top","bottom","band"]),De("border","Border",qb,"background",["square","outline"]),De("rounded-border","Rounded",t2,"background",["border","outline"]),De("gradient-border","Gradient",Zc,"background",["border","colorful"]),De("focus","Focus",Kb,"background",["corners","brackets"]),De("speech-bubble","Bubble",r2,"frame",["speech"]),De("speech-bubble-top","Bubble top",n2,"frame",["speech"]),De("chat-bubble","Chat",Wb,"frame",["message","bubble"]),De("circle","Circle",Hb,"frame",["round","ring","curved"]),De("badge","Ribbon",Qb,"frame",["badge","banner"]),De("sticker","Sticker",o2,"frame",["label"]),De("polaroid","Polaroid",e2,"frame",["photo","picture"]),De("phone","Phone",Jb,"background",["mobile","screen"]),De("ticket","Ticket",s2,"frame",["event","pass"]),De("tag","Tag",i2,"frame",["price","label"]),De("envelope","Envelope",Xb,"frame",["mail","letter"]),De("menu-card","Menu card",Yb,"background",["menu","restaurant"])],g8=new Map(t0.map(e=>[e.style,e]));function r0(e){return g8.get(e)}var y8=Object.fromEntries(t0.map(e=>[e.style,e.spec])),_8={from:Zc.colors.frame,to:Zc.colors.accent};function Bc(e){return !e||e.style==="none"?null:e.style===_o?e.spec??null:r0(e.style)?.spec??null}function b8(e){let t=Bc(e);return e&&typeof t?.colors?.frame=="string"?Dc(t,e):null}var x8={primary:"text",secondary:"secondaryText"};function a2(e,t,r){let n=r0(t.style)?.spec??e0;return Yh(e,Yi(n),t,r,x8)}var Uc="system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif",u2=.08,l2="data-qrdx-frame-label";function dt(e){return !!(e?.style&&e.style!=="none")}function n0(e){let t=Bc(e);return t?Kh(t):u2}function $8(e){return (e.text??fh).trim().slice(0,Nt)}function w8(e){return (e.secondaryText??"").trim().slice(0,Nt)}function un(e,t,r){return t.style===_o?Jh(e,t,r):a2(e,t,r)}function Jt(e,t){if(!dt(t))return {width:e,height:e};let{width:r,height:n}=un(e,t);return {width:r,height:n}}var ye=e=>fe(e,2);function c2({x:e,y:t,width:r,height:n,radius:o}){let i=ye(Math.min(o,r/2,n/2)),[s,a,c,u]=[ye(e),ye(t),ye(r),ye(n)];return i<=0?M`M${s} ${a}h${c}v${u}h${-c}z`:M`M${s+i} ${a}h${ye(c-2*i)}a${i} ${i} 0 0 1 ${i} ${i}`+M`v${ye(u-2*i)}a${i} ${i} 0 0 1 ${-i} ${i}`+M`h${ye(-(c-2*i))}a${i} ${i} 0 0 1 ${-i} ${-i}`+M`v${ye(-(u-2*i))}a${i} ${i} 0 0 1 ${i} ${-i}z`}function S8(e,t){return e.type==="rect"&&e.hole?R("path",{d:c2(e)+c2(e.hole),fill:e.fill,fillRule:"evenodd"},t):e.type==="polygon"?R("polygon",{fill:e.fill,points:e.points.map(([r,n])=>`${ye(r)},${ye(n)}`).join(" ")},t):e.type==="path"?R("path",{d:e.d,fill:e.fill,...e.fillRule==="evenodd"&&{fillRule:"evenodd"}},t):R("rect",{fill:e.fill,height:ye(e.height),width:ye(e.width),x:ye(e.x),y:ye(e.y),...e.radius>0&&{rx:ye(e.radius),ry:ye(e.radius)}},t)}function Gc(e,t){let{size:r,frame:n,bgColor:o,svgProps:i,markLabels:s}=t,a=un(r,n,o),c=f2(a),u=ye(a.width),l=ye(a.height);return xe("svg",{height:l,viewBox:`0 0 ${u} ${l}`,width:u,xmlns:"http://www.w3.org/2000/svg",...i,children:[R("g",{"data-qrdx-frame":n.style,children:a.shapes.map((f,p)=>S8(f,p))}),$o(e,{x:ye(a.qrX),y:ye(a.qrY),width:r,height:r}),c.map((f,p)=>R("text",{"data-max-width":ye(f.maxWidth),fill:f.color,fontFamily:Uc,fontSize:ye(f.fontSize),fontWeight:f.fontWeight??700,textAnchor:f.align??"middle",x:ye(f.x),y:ye(f.y),...f.rotate&&{transform:`rotate(${ye(f.rotate)} ${ye(f.x)} ${ye(f.y)})`},...s&&f.field&&{[l2]:f.field},children:f.text},p))]})}function f2(e){return [...e.label?[e.label]:[],...e.extraLabels??[]]}var v8={2:6,3:12};function m2(e){let t=[e.start],r=e.start;for(let n of e.segments){let o=n.at(-1);if(n.length===1)t.push(o);else {let i=v8[n.length];for(let s=1;s<=i;s++){let a=s/i,c=1-a;if(n.length===2){let[u]=n;t.push([c*c*r[0]+2*c*a*u[0]+a*a*o[0],c*c*r[1]+2*c*a*u[1]+a*a*o[1]]);}else {let[u,l]=n;t.push([c*c*c*r[0]+3*c*c*a*u[0]+3*c*a*a*l[0]+a*a*a*o[0],c*c*c*r[1]+3*c*c*a*u[1]+3*c*a*a*l[1]+a*a*a*o[1]]);}}}r=o;}return t}function d2(e,t){let r=[];for(let n of e)for(let o=0;o<n.length;o++){let[i,s]=n[o],[a,c]=n[(o+1)%n.length];s<=t!=c<=t&&r.push(i+(t-s)/(c-s)*(a-i));}return r.sort((n,o)=>n-o)}function h2(e,t){let r=0;for(let n of e)if(n<t)r++;else break;return r%2===1}function C8(e,t,r){return h2(d2(e,r),t)}function g2(e){let t=new Map;return (r,n)=>{let o=t.get(n);return o||(o=d2(e,n),t.set(n,o)),h2(o,r)}}function P8(e,t,r,n){let o=r[0]-e,i=r[1]-t,s=n[0]-r[0],a=n[1]-r[1],c=l=>Math.max(Math.abs(o+l*s),Math.abs(i+l*a)),u=Math.min(c(0),c(1));for(let[l,f]of [[i-o,s-a],[-(o+i),s+a]])if(f!==0){let p=l/f;p>0&&p<1&&(u=Math.min(u,c(p)));}return u}function k8(e,t,r){if(!C8(e,t,r))return 0;let n=Number.POSITIVE_INFINITY;for(let o of e)for(let i=0;i<o.length;i++)n=Math.min(n,P8(t,r,o[i],o[(i+1)%o.length]));return Number.isFinite(n)?n:0}function A8(e){let t=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let i of e)for(let[s,a]of i)t=Math.min(t,s),r=Math.min(r,a),n=Math.max(n,s),o=Math.max(o,a);return {x0:t,y0:r,x1:n,y1:o}}function y2(e){let t=e.map(m2),r=A8(t),n=r.x1-r.x0,o=r.y1-r.y0;if(!(n>0&&o>0))return null;let i=(h,d)=>{let g=Math.max(h-r.x0,r.x1-h,d-r.y0,r.y1-d);return g>0?k8(t,h,d)/(2*g):0},s={cx:r.x0+n/2,cy:r.y0+o/2,value:0};s.value=i(s.cx,s.cy);let a=32;for(let h=1;h<a;h++)for(let d=1;d<a;d++){let g=r.x0+n*d/a,_=r.y0+o*h/a,y=i(g,_);y>s.value&&(s={cx:g,cy:_,value:y});}let c=n/a,u=o/a;for(let h=0;h<6;h++){let d=s;for(let g=-2;g<=2;g++)for(let _=-2;_<=2;_++){let y=d.cx+c*_/2,b=d.cy+u*g/2,S=i(y,b);S>s.value&&(s={cx:y,cy:b,value:S});}c/=2,u/=2;}if(s.value<=0)return null;let f=.5/Math.max(s.cx-r.x0,r.x1-s.cx,s.cy-r.y0,r.y1-s.cy),p=([h,d])=>[.5+(h-s.cx)*f,.5+(d-s.cy)*f],m=e.map(h=>({start:p(h.start),segments:h.segments.map(d=>d.map(p))}));return {rings:m,polygons:m.map(m2),half:s.value}}function _2(e,t){let r=([o,i])=>`${$(o*t)} ${$(i*t)}`,n="";for(let o of e.rings){n+=`M${r(o.start)}`;for(let i of o.segments){let s=i.length===1?"L":i.length===2?"Q":"C";n+=s+i.map(r).join(" ");}n+="Z";}return n}var R8={start:[0,-0.58],segments:[[[.2,-0.92],[1,-0.97],[1,-0.3]],[[1,.3],[.62,.6],[0,.92]],[[-0.62,.6],[-1,.3],[-1,-0.3]],[[-1,-0.97],[-0.2,-0.92],[0,-0.58]]]},p2;function b2(){return p2??=y2([R8]),p2}function E8(e){let{width:t,height:r,cells:n}=e;return Number.isInteger(t)&&Number.isInteger(r)&&t>=Zt&&r>=Zt&&t<=Ct&&r<=Ct&&typeof n=="string"&&n.length===t*r&&/^[01]*$/.test(n)?(o,i)=>o>=0&&i>=0&&o<t&&i<r&&n[i*t+o]==="1":null}var er=([e,t])=>`${e},${t}`;function M8(e,t,r){let n=(c,u)=>e(c-1,u-1),o=new Map,i=(c,u)=>{for(let[l,f]of [[c,u],[u,c]]){let p=o.get(er(l))??[];p.push(f),o.set(er(l),p);}};for(let c=0;c<=r;c++)for(let u=0;u<=t;u++){let l=n(u,c),f=n(u+1,c),p=n(u+1,c+1),m=n(u,c+1),h=[u,c-.5],d=[u+.5,c],g=[u,c+.5],_=[u-.5,c];switch((l?8:0)+(f?4:0)+(p?2:0)+(m?1:0)){case 1:case 14:i(_,g);break;case 2:case 13:i(g,d);break;case 3:case 12:i(_,d);break;case 4:case 11:i(h,d);break;case 6:case 9:i(h,g);break;case 7:case 8:i(_,h);break;case 5:i(h,d),i(_,g);break;case 10:i(_,h),i(g,d);break;}}let s=[],a=new Set;for(let[c,u]of o){if(a.has(c)||u.length===0)continue;let[l,f]=c.split(",").map(Number),p=[[l,f]];a.add(c);let m=[l,f],h=u[0];for(;!a.has(er(h));){a.add(er(h)),p.push(h);let d=I8(o.get(er(h))??[],m,a);if(!d)break;m=h,h=d;}p.length>=3&&s.push(L8(p));}return s}function I8(e,t,r){let n=er(t);return e.find(o=>er(o)!==n&&!r.has(er(o)))??e.find(o=>er(o)!==n)}function L8(e){let t=[];for(let r=0;r<e.length;r++){let n=e[(r-1+e.length)%e.length],o=e[r],i=e[(r+1)%e.length],s=(o[0]-n[0])*(i[1]-o[1])-(o[1]-n[1])*(i[0]-o[0]);Math.abs(s)>1e-9&&t.push(o);}return t.length>=3?t:e}function z8(e){let t=(i,s)=>[(i[0]+s[0])/2,(i[1]+s[1])/2],r=e.length,n=t(e[r-1],e[0]),o=e.map((i,s)=>[i,t(i,e[(s+1)%r])]);return {start:n,segments:o}}var Ji=new Map;function o0(e){let t=`${e.width}x${e.height}:${e.cells}`,r=Ji.get(t);if(r)return r;let n=E8(e),o;if(!n)o={outline:null,problem:"invalid"};else if(e.cells.includes("1")){let i=M8(n,e.width,e.height),s=i.length>0?y2(i.map(z8)):null;o=s&&2*s.half>=Rh?{outline:s,problem:null}:{outline:null,problem:s?"thin":"empty"};}else o={outline:null,problem:"empty"};return Ji.size>16&&Ji.delete(Ji.keys().next().value),Ji.set(t,o),o}var T8=1,x2=.5,$2=.5,N8=.5;function ln(e){return Math.max(e,Ah)}function Qc(e){return e==="heart"?b2():typeof e=="object"&&e?.type==="silhouette"?o0(e).outline:null}function i0(e){return e==="circle"||Qc(e)!==null}var O8={invalid:"This silhouette isn't a valid shape grid.",empty:"No shape found: use a picture with a dark or opaque shape on a light or clear background.",thin:"This shape is too thin to hold the code with its quiet zone. Try a rounder, fuller shape."};function F8(e){let{outline:t,problem:r}=o0(e);if(t&&!r)return {ok:true,share:2*t.half};let n=r??"invalid";return {ok:false,reason:n,message:O8[n]}}function nt(e,t,r){if(r==="circle"){let s=ln(t),a=(e/2+s)*Math.SQRT2+T8;return Math.ceil(a-e/2)}let n=Qc(r);if(!n)return t;let o=ln(t),i=(e+2*(o+N8))/(2*n.half);return Math.ceil((i-e)/2-1e-9)}function w2(e){let t=e>>>0;return ()=>{t=t+1831565813>>>0;let r=t;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}}function D8(e,t,r){let n=nt(t,r,"circle"),o=ln(r),i=t+2*n,s=i/2,a=s-x2-.5,c=w2(Number.parseInt(cn(e),36)||1),u=n-o,l=n+t+o;return Array.from({length:i},(f,p)=>Array.from({length:i},(m,h)=>{let d=c()<$2;return h>=u&&h<l&&p>=u&&p<l?false:d&&Math.hypot(h+.5-s,p+.5-s)<=a}))}var Z8=Array.from({length:8},(e,t)=>{let r=t*Math.PI/4;return [Math.cos(r),Math.sin(r)]});function S2(e,t,r,n){if(n==="circle")return D8(e,t,r);let o=Qc(n);if(!o)return null;let i=nt(t,r,n),s=ln(r),a=t+2*i,c=g2(o.polygons),u=.5+x2,l=(h,d)=>{let g=h+.5,_=d+.5;return c(g/a,_/a)?Z8.every(([y,b])=>c((g+y*u)/a,(_+b*u)/a)):false},f=w2(Number.parseInt(cn(e),36)||1),p=i-s,m=i+t+s;return Array.from({length:a},(h,d)=>Array.from({length:a},(g,_)=>{let y=f()<$2;return _>=p&&_<m&&d>=p&&d<m?false:y&&l(_,d)}))}function s0(e,t){if(e==="circle")return {circle:t/2};let r=Qc(e);return r?{path:_2(r,t)}:null}function B8(e,t){let r=s0(e,t);return r?"circle"in r?se(t/2,t/2,r.circle):r.path:null}function U8(e){return e==="top-left"?0:e==="top-right"?1:3}function Vc(e,t,r,n="circle",o="top-left"){let i=r*2,s=r,a=i/3;switch(n){case "leaf":case "leaf-reverse":case "drop":case "drop-reverse":{let c=U8(o),u=(c+2)%4,l=1.3*a,f=.7*a,p=h=>{switch(n){case "leaf":return h===c||h===u;case "leaf-reverse":return !(h===c||h===u);case "drop":return h===c;default:return h===u}},m=[0,1,2,3].map(h=>p(h)?f:l);return R("path",{d:Q(e-r,t-r,i,i,m)})}case "extra-rounded":return R("path",{d:Q(e-r,t-r,i,i,1.15*a)});case "plus":{let c=1.15*a,u=r;return R("path",{d:me([[e-c,t-u],[e+c,t-u],[e+c,t-c],[e+u,t-c],[e+u,t+c],[e+c,t+c],[e+c,t+u],[e-c,t+u],[e-c,t+c],[e-u,t+c],[e-u,t-c],[e-c,t-c]])})}case "cross-rounded":{let c=1.15*a,u=.5*a;return R("path",{d:Q(e-r,t-c,i,2*c,u)+Q(e-c,t-r,2*c,i,u)})}case "hexagon":return R("path",{d:me(Co(e,t,1.72*a,6))});case "octagon":return R("path",{d:me(Co(e,t,r/Math.cos(Math.PI/8),8,22.5))});case "flower":{let c=.6*a,u=.9*a;return R("path",{d:se(e-c,t-c,u)+se(e+c,t-c,u)+se(e+c,t+c,u)+se(e-c,t+c,u)+se(e,t,1.2*a)})}case "heart":return R("path",{d:ko(e,t+.12*a,3.5*a)});case "squircle":return R("path",{d:me(Wi(e,t,r,r,4,64))});case "dots":{let c=[];for(let u of [-1,0,1])for(let l of [-1,0,1])c.push(se(e+l*a*.82,t+u*a*.82,.58*a));return R("path",{d:c.join("")})}case "square":return R("rect",{height:$(i),transform:M`rotate(0,${e},${t})`,width:$(i),x:$(e-s),y:$(t-s)});case "rounded":return R("rect",{height:$(i),rx:$(r*.5),ry:$(r*.5),transform:M`rotate(0,${e},${t})`,width:$(i),x:$(e-s),y:$(t-s)});case "diamond":return R("path",{d:M`M ${e-s*.714286} ${t-s*.714286}v ${i*.714286}h ${i*.714286}v -${i*.714286}z`,transform:M`rotate(45,${e},${t})`});case "message":{let c=i/30,u=p=>(p-40)*c+e,l=p=>(p-40)*c+t,f=M`M ${u(25)} ${l(35.714285714285715)}v ${8.571428571428571*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, ${10.714285714285714*c} ${10.714285714285714*c}h ${19.285714285714285*c}v -${19.285714285714285*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, -${10.714285714285714*c} -${10.714285714285714*c}h -${8.571428571428571*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, -${10.714285714285714*c} ${10.714285714285714*c}`;return R("path",{clipRule:"evenodd",d:f,transform:M`rotate(0,${e},${t})`})}case "message-reverse":{let c=i/30,u=p=>(p-40)*c+e,l=p=>(p-40)*c+t,f=M`M ${u(25)} ${l(35.714285714285715)}v ${8.571428571428571*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, ${10.714285714285714*c} ${10.714285714285714*c}h ${19.285714285714285*c}v -${19.285714285714285*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, -${10.714285714285714*c} -${10.714285714285714*c}h -${8.571428571428571*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, -${10.714285714285714*c} ${10.714285714285714*c}`;return R("path",{clipRule:"evenodd",d:f,transform:M`rotate(-180,${e},${t})`})}case "diya":{let c=i/30,u=p=>(p-40)*c+e,l=p=>(p-40)*c+t,f=M`M ${u(25)} ${l(35.714285714285715)}v ${8.571428571428571*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, ${10.714285714285714*c} ${10.714285714285714*c}h ${19.285714285714285*c}v -${19.285714285714285*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, -${10.714285714285714*c} -${10.714285714285714*c}h -${8.571428571428571*c}H ${u(25)}z`;return R("path",{clipRule:"evenodd",d:f,transform:M`rotate(0,${e},${t})`})}case "diya-reverse":{let c=i/30,u=p=>(p-40)*c+e,l=p=>(p-40)*c+t,f=M`M ${u(25)} ${l(35.714285714285715)}v ${19.285714285714285*c}h ${19.285714285714285*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, ${10.714285714285714*c} -${10.714285714285714*c}v -${19.285714285714285*c}h -${19.285714285714285*c}a ${10.714285714285714*c} ${10.714285714285714*c}, 0, 0, 0, -${10.714285714285714*c} ${10.714285714285714*c}z`;return R("path",{clipRule:"evenodd",d:f,transform:M`rotate(0,${e},${t})`})}case "rounded-triangle":{let c=i/21,u=p=>(p-40)*c+e,l=p=>(p-40)*c+t,f=M`M ${u(33.57142857142857)} ${l(29.285714285714285)}h ${12.857142857142856*c}c ${4.285714285714286*c} 0 ${4.285714285714286*c} ${4.285714285714286*c} ${4.285714285714286*c} ${4.285714285714286*c}v ${12.857142857142856*c}c 0 ${4.285714285714286*c} -${4.285714285714286*c} ${4.285714285714286*c} -${4.285714285714286*c} ${4.285714285714286*c}h -${12.857142857142856*c}c -${4.285714285714286*c} 0 -${4.285714285714286*c} -${4.285714285714286*c} -${4.285714285714286*c} -${4.285714285714286*c}v -${12.857142857142856*c}c 0 -${4.285714285714286*c} ${4.285714285714286*c} -${4.285714285714286*c} ${4.285714285714286*c} -${4.285714285714286*c}z`;return R("path",{d:f,transform:M`rotate(45,${e},${t})`})}case "star":{let c=i/27,u=p=>(p-40)*c+e,l=p=>(p-40)*c+t,f=M`M ${u(38.84615384615385)},${l(26.546153846153846)}c${.6692307692307691*c},-${1.0153846153846153*c},${2.215384615384615*c},-${1.0153846153846153*c},${2.884615384615384*c},0l${4.038461538461538*c},${6.069230769230768*c}c${.23076923076923075*c},${.3461538461538461*c},${.6*c},${.6*c},${1.0153846153846153*c},${.7153846153846153*c}l${7.223076923076922*c},${1.823076923076923*c}c${1.2*c},${.3*c},${1.6846153846153844*c},${1.7076923076923076*c},${.8999999999999999*c},${2.6538461538461533*c}l-${4.73076923076923*c},${5.584615384615384*c}c-${.2769230769230769*c},${.3230769230769231*c},-${.41538461538461535*c},${.7384615384615384*c},-${.3923076923076923*c},${1.1307692307692307*c}l${.4384615384615384*c},${7.199999999999999*c}c${.06923076923076922*c},${1.2*c},-${1.1769230769230767*c},${2.0769230769230766*c},-${2.3307692307692305*c},${1.6384615384615382*c}l-${6.9692307692307685*c},-${2.6076923076923073*c}c-${.3923076923076923*c},-${.16153846153846155*c},-${.8538461538461538*c},-${.16153846153846155*c},-${1.2461538461538462*c},0l-${6.9692307692307685*c},${2.6076923076923073*c}c-${1.1538461538461537*c},${.4384615384615384*c},-${2.4*c},-${.4384615384615384*c},-${2.3307692307692305*c},-${1.6384615384615382*c}l${.4384615384615384*c},-${7.199999999999999*c}c${.023076923076923075*c},-${.41538461538461535*c},-${.11538461538461538*c},-${.8307692307692307*c},-${.3923076923076923*c},-${1.1307692307692307*c}l-${4.73076923076923*c},-${5.584615384615384*c}c-${.7846153846153846*c},-${.923076923076923*c},-${.3230769230769231*c},-${2.3307692307692305*c},${.8999999999999999*c},-${2.6538461538461533*c}l${7.223076923076922*c},-${1.823076923076923*c}c${.41538461538461535*c},-${.11538461538461538*c},${.7846153846153846*c},-${.3461538461538461*c},${1.0153846153846153*c},-${.7153846153846153*c}l${4.038461538461538*c},-${6.069230769230768*c}z`;return R("path",{clipRule:"evenodd",d:f,transform:M`rotate(0,${e},${t})`})}case "banner":{let c=i/28;return R("g",{transform:M`translate(${e-40*c},${t-40*c}) scale(${$(c,6)})`,children:R("path",{clipRule:"evenodd",d:"M38.235 26.104C38.759 25.677, 39.51 25.677, 40.034 26.104L41.776 27.52C42.091 27.777, 42.501 27.887, 42.902 27.822L45.118 27.466C45.785 27.359, 46.436 27.735, 46.677 28.366L47.477 30.464C47.621 30.843, 47.921 31.143, 48.301 31.288L50.399 32.088C51.03 32.328, 51.406 32.979, 51.298 33.646L50.942 35.863C50.878 36.264, 50.988 36.674, 51.244 36.989L52.661 38.73C53.087 39.254, 53.087 40.006, 52.661 40.53L51.244 42.271C50.988 42.587, 50.878 42.996, 50.942 43.397L51.298 45.614C51.406 46.281, 51.03 46.932, 50.399 47.173L48.301 47.972C47.921 48.117, 47.621 48.417, 47.477 48.797L46.677 50.894C46.436 51.526, 45.785 51.901, 45.118 51.794L42.902 51.438C42.501 51.374, 42.091 51.483, 41.776 51.74L40.034 53.157C39.51 53.583, 38.759 53.583, 38.235 53.157L36.493 51.74C36.178 51.483, 35.768 51.374, 35.367 51.438L33.15 51.794C32.483 51.901, 31.833 51.526, 31.592 50.894L30.792 48.797C30.647 48.417, 30.347 48.117, 29.968 47.972L27.87 47.173C27.239 46.932, 26.863 46.281, 26.97 45.614L27.326 43.397C27.391 42.996, 27.281 42.587, 27.025 42.271L25.608 40.53C25.182 40.006, 25.182 39.254, 25.608 38.73L27.025 36.989C27.281 36.674, 27.391 36.264, 27.326 35.863L26.97 33.646C26.863 32.979, 27.239 32.328, 27.87 32.088L29.968 31.288C30.347 31.143, 30.647 30.843, 30.792 30.464L31.592 28.366C31.833 27.735, 32.483 27.359, 33.15 27.466L35.367 27.822C35.768 27.887, 36.178 27.777, 36.493 27.52L38.235 26.104Z"})})}default:return R("circle",{cx:$(e),cy:$(t),r:$(r),transform:M`rotate(0,${e},${t})`})}}function Ro(e,t,r,n){let o=e==="top-left"?0:e==="top-right"?1:3,i=(o+2)%4;return [0,1,2,3].map(s=>s===o||n&&s===i?r:t)}function v2(e,t,r,n){return [[e+n,t],[e+r-n,t],[e+r,t+n],[e+r,t+r-n],[e+r-n,t+r],[e+n,t+r],[e,t+r-n],[e,t+n]]}function C2(e,t,r,n){let o=r/7,i=Math.max(0,(n+Math.SQRT2-2)*o);return me(v2(e,t,r,n*o))+me(v2(e+o,t+o,5*o,i))}function P2(e,t,r,n,o=false){let i=r/7,s=a=>o?Ro(n,0,a,true):Ro(n,a,0,true);return Q(e,t,r,r,s(2.5*i))+Q(e+i,t+i,5*i,5*i,s(1.5*i))}function G8(e,t,r,n){let o=r/7;return Q(e,t,r,r,Ro(n,2.6*o,0,false))+Q(e+o,t+o,5*o,5*o,Ro(n,1.6*o,0,false))}function Q8(e,t,r){let n=r/7,o=e+r/2,i=t+r/2;return me(Wi(o,i,3.5*n,3.5*n,4,96))+me(Wi(o,i,2.5*n,2.5*n,4,96))}function k2(e,t,r,n,o){let i=n,s=r/2,a=(s-i)*.55,c=(u,l)=>M`${e+u} ${t+l}`;return M`M${c(i,0)}`+M`C${c(i+a,0)} ${c(s-a,o)} ${c(s,o)}`+M`C${c(s+a,o)} ${c(r-i-a,0)} ${c(r-i,0)}`+M`A${i} ${i} 0 0 1 ${c(r,i)}`+M`C${c(r,i+a)} ${c(r-o,s-a)} ${c(r-o,s)}`+M`C${c(r-o,s+a)} ${c(r,r-i-a)} ${c(r,r-i)}`+M`A${i} ${i} 0 0 1 ${c(r-i,r)}`+M`C${c(r-i-a,r)} ${c(s+a,r-o)} ${c(s,r-o)}`+M`C${c(s-a,r-o)} ${c(i+a,r)} ${c(i,r)}`+M`A${i} ${i} 0 0 1 ${c(0,r-i)}`+M`C${c(0,r-i-a)} ${c(o,s+a)} ${c(o,s)}`+M`C${c(o,s-a)} ${c(0,i+a)} ${c(0,i)}`+M`A${i} ${i} 0 0 1 ${c(i,0)}Z`}function V8(e,t,r){let n=r/7,o=.12*n;return k2(e,t,r,1.4*n,o)+k2(e+n,t+n,5*n,.7*n,o)}function A2(e,t,r,n,o,i){let s=r/2,a=(c,u)=>M`${e+c} ${t+u}`;return M`M${a(n,0)}H${e+r-n}`+M`A${n} ${n} 0 0 1 ${a(r,n)}`+M`V${t+o}`+M`C${a(r,o+1.55*i)} ${a(s+1.6*i,r)} ${a(s,r)}`+M`C${a(s-1.6*i,r)} ${a(0,o+1.55*i)} ${a(0,o)}`+M`V${t+n}A${n} ${n} 0 0 1 ${a(n,0)}Z`}function j8(e,t,r){let n=r/7;return A2(e,t,r,.7*n,3.9*n,n)+A2(e+n,t+n,5*n,.35*n,2.7*n,.8*n)}function q8(e,t,r,n){let o=r/7;return Q(e,t,r,r,Ro(n,.5*o,2.5*o,false))+Q(e+o,t+o,5*o,5*o,Ro(n,.25*o,1.5*o,false))}function W8(e,t,r){let n=r/7;return M`M ${e} ${t}v ${r}h ${r}v -${r}z`+M`M ${e+n} ${t+n}h ${5*n}v ${5*n}h -${5*n}z`}function H8(e,t,r){let n=r/7,o=n*.875,i=n*.4375,s=M`M ${e+o} ${t}`+M`h ${r-2*o}`+M`a ${o} ${o} 0 0 1 ${o} ${o}`+M`v ${r-2*o}`+M`a ${o} ${o} 0 0 1 ${-o} ${o}`+M`h ${-(r-2*o)}`+M`a ${o} ${o} 0 0 1 ${-o} ${-o}`+M`v ${-(r-2*o)}`+M`a ${o} ${o} 0 0 1 ${o} ${-o}z`,a=M`M ${e+n+i} ${t+n}`+M`h ${5*n-2*i}`+M`a ${i} ${i} 0 0 1 ${i} ${i}`+M`v ${5*n-2*i}`+M`a ${i} ${i} 0 0 1 ${-i} ${i}`+M`h ${-(5*n-2*i)}`+M`a ${i} ${i} 0 0 1 ${-i} ${-i}`+M`v ${-(5*n-2*i)}`+M`a ${i} ${i} 0 0 1 ${i} ${-i}z`;return s+a}function X8(e,t,r){let n=e+r/2,o=t+r/2,i=fe(r/2),s=fe(r*(2.5/7));return M`M ${n-i} ${o}`+M`a ${i} ${i} 0 1 0 ${i*2} 0`+M`a ${i} ${i} 0 1 0 ${-i*2} 0z`+M`M ${n-s} ${o}`+M`a ${s} ${s} 0 1 1 ${s*2} 0`+M`a ${s} ${s} 0 1 1 ${-s*2} 0z`}function K8(e,t,r){let n=r/74.7002,o=a=>a*n+e,i=a=>a*n+t;return M`M${o(37.3496)} ${i(0)}C${o(39.2939)} ${i(0)} ${o(40.9948)} ${i(1.03842)} ${o(41.9287)} ${i(2.59082)}C${o(43.2293)} ${i(1.34013)} ${o(45.1347)} ${i(.780267)} ${o(47.0098)} ${i(1.28027)}C${o(48.8871)} ${i(1.78928)} ${o(50.261)} ${i(3.23767)} ${o(50.7578)} ${i(4.98438)}C${o(52.3454)} ${i(4.0996)} ${o(54.3432)} ${i(4.047)} ${o(56.0303)} ${i(5.01953)}C${o(57.7094)} ${i(5.98752)} ${o(58.6586)} ${i(7.73647)} ${o(58.6924)} ${i(9.5459)}C${o(60.4517)} ${i(9.10661)} ${o(62.3883)} ${i(9.57215)} ${o(63.7598)} ${i(10.9502)}C${o(65.1282)} ${i(12.3253)} ${o(65.5963)} ${i(14.2585)} ${o(65.1641)} ${i(16.0127)}C${o(66.974)} ${i(16.044)} ${o(68.7242)} ${i(16.9982)} ${o(69.7002)} ${i(18.6797)}C${o(70.6781)} ${i(20.3647)} ${o(70.6241)} ${i(22.3635)} ${o(69.7402)} ${i(23.9502)}C${o(71.4776)} ${i(24.4496)} ${o(72.9194)} ${i(25.8232)} ${o(73.4199)} ${i(27.7002)}C${o(73.927)} ${i(29.5707)} ${o(73.3661)} ${i(31.4794)} ${o(72.1104)} ${i(32.7822)}C${o(73.6621)} ${i(33.7163)} ${o(74.7002)} ${i(35.4166)} ${o(74.7002)} ${i(37.3604)}C${o(74.7001)} ${i(39.307)} ${o(73.6582)} ${i(41.0084)} ${o(72.1025)} ${i(41.9414)}C${o(73.357)} ${i(43.245)} ${o(73.9207)} ${i(45.1525)} ${o(73.4199)} ${i(47.0303)}C${o(72.9187)} ${i(48.9027)} ${o(71.4782)} ${i(50.2735)} ${o(69.7383)} ${i(50.7734)}C${o(70.6201)} ${i(52.3601)} ${o(70.6716)} ${i(54.3549)} ${o(69.7002)} ${i(56.04)}C${o(68.7237)} ${i(57.7225)} ${o(66.9721)} ${i(58.6729)} ${o(65.1611)} ${i(58.7031)}C${o(65.598)} ${i(60.4623)} ${o(65.131)} ${i(62.3982)} ${o(63.7598)} ${i(63.7695)}C${o(62.3847)} ${i(65.138)} ${o(60.4515)} ${i(65.6061)} ${o(58.6973)} ${i(65.1738)}C${o(58.6635)} ${i(66.9833)} ${o(57.7094)} ${i(68.7322)} ${o(56.0303)} ${i(69.7002)}C${o(54.3461)} ${i(70.6777)} ${o(52.348)} ${i(70.6248)} ${o(50.7617)} ${i(69.7422)}C${o(50.2643)} ${i(71.4831)} ${o(48.8896)} ${i(72.9284)} ${o(47.0098)} ${i(73.4297)}C${o(45.1389)} ${i(73.9368)} ${o(43.2296)} ${i(73.3763)} ${o(41.9268)} ${i(72.1201)}C${o(40.9927)} ${i(73.6717)} ${o(39.2932)} ${i(74.71)} ${o(37.3496)} ${i(74.71)}C${o(35.4051)} ${i(74.7098)} ${o(33.7042)} ${i(73.6711)} ${o(32.7705)} ${i(72.1182)}C${o(31.4697)} ${i(73.3758)} ${o(29.5597)} ${i(73.9418)} ${o(27.6797)} ${i(73.4404)}V${i(73.4502)}C${o(25.8065)} ${i(72.9422)} ${o(24.434)} ${i(71.4985)} ${o(23.9346)} ${i(69.7568)}C${o(22.3504)} ${i(70.6301)} ${o(20.3591)} ${i(70.6781)} ${o(18.6797)} ${i(69.71)}C${o(16.9957)} ${i(68.7391)} ${o(16.045)} ${i(66.9831)} ${o(16.0166)} ${i(65.168)}C${o(14.2547)} ${i(65.6091)} ${o(12.3134)} ${i(65.1435)} ${o(10.9395)} ${i(63.7695)}C${o(9.5687)} ${i(62.3919)} ${o(9.10168)} ${i(60.454)} ${o(9.53809)} ${i(58.6973)}C${o(7.72791)} ${i(58.6641)} ${o(5.97815)} ${i(57.71)} ${o(5.00977)} ${i(56.0303)}C${o(4.03552)} ${i(54.3517)} ${o(4.08377)} ${i(52.3649)} ${o(4.95801)} ${i(50.7812)}C${o(3.21705)} ${i(50.2839)} ${o(1.77087)} ${i(48.9101)} ${o(1.26953)} ${i(47.0303)}V${i(47.0205)}C${o(.762081)} ${i(45.1489)} ${o(1.32758)} ${i(43.2375)} ${o(2.58496)} ${i(41.9346)}C${o(1.03604)} ${i(41)} ${o(108484e-9)} ${i(39.3019)} ${o(0)} ${i(37.3604)}C${o(0)} ${i(35.4159)} ${o(1.03815)} ${i(33.7141)} ${o(2.59082)} ${i(32.7803)}C${o(1.34044)} ${i(31.4797)} ${o(.780389)} ${i(29.575)} ${o(1.28027)} ${i(27.7002)}C${o(1.78258)} ${i(25.8232)} ${o(3.22806)} ${i(24.4482)} ${o(4.97363)} ${i(23.9512)}C${o(4.08938)} ${i(22.3638)} ${o(4.03743)} ${i(20.3664)} ${o(5.00977)} ${i(18.6797)}C${o(5.97815)} ${i(16.9999)} ${o(7.72788)} ${i(16.0496)} ${o(9.53809)} ${i(16.0166)}C${o(9.10139)} ${i(14.2576)} ${o(9.56846)} ${i(12.3214)} ${o(10.9395)} ${i(10.9502)}C${o(12.3171)} ${i(9.57911)} ${o(14.2558)} ${i(9.11137)} ${o(16.0127)} ${i(9.54785)}C${o(16.0426)} ${i(7.73421)} ${o(16.9969)} ${i(5.97989)} ${o(18.6797)} ${i(5.00977)}C${o(20.3596)} ${i(4.03474)} ${o(22.3521)} ${i(4.08468)} ${o(23.9365)} ${i(4.96094)}C${o(24.4378)} ${i(3.22749)} ${o(25.8059)} ${i(1.7898)} ${o(27.6797)} ${i(1.29004)}C${o(29.5511)} ${i(.78264)} ${o(31.4617)} ${i(1.34357)} ${o(32.7646)} ${i(2.60059)}C${o(33.6971)} ${i(1.04268)} ${o(35.4013)} ${i(152405e-9)} ${o(37.3496)} ${i(0)}ZM${o(41.0615)} ${i(9.17578)}C${o(40.1006)} ${i(10.1057)} ${o(38.793)} ${i(10.6797)} ${o(37.3496)} ${i(10.6797)}C${o(35.9064)} ${i(10.6796)} ${o(34.5985)} ${i(10.1066)} ${o(33.6377)} ${i(9.17676)}C${o(32.9511)} ${i(10.3241)} ${o(31.8358)} ${i(11.2176)} ${o(30.4404)} ${i(11.5898)}C${o(29.0527)} ${i(11.9661)} ${o(27.6436)} ${i(11.7542)} ${o(26.4766)} ${i(11.1074)}C${o(26.1072)} ${i(12.3879)} ${o(25.2629)} ${i(13.5333)} ${o(24.0195)} ${i(14.25)}C${o(22.7695)} ${i(14.9754)} ${o(21.347)} ${i(15.1322)} ${o(20.0479)} ${i(14.8047)}C${o(20.0289)} ${i(16.1454)} ${o(19.5108)} ${i(17.4793)} ${o(18.4902)} ${i(18.5)}C${o(17.4696)} ${i(19.5158)} ${o(16.1409)} ${i(20.033)} ${o(14.8066)} ${i(20.0566)}C${o(15.1312)} ${i(21.3534)} ${o(14.9738)} ${i(22.7723)} ${o(14.25)} ${i(24.0195)}C${o(13.5243)} ${i(25.2699)} ${o(12.3701)} ${i(26.1148)} ${o(11.082)} ${i(26.4795)}C${o(11.7347)} ${i(27.6479)} ${o(11.9529)} ${i(29.062)} ${o(11.5801)} ${i(30.46)}C${o(11.2085)} ${i(31.8485)} ${o(10.3194)} ${i(32.9607)} ${o(9.17578)} ${i(33.6475)}C${o(10.106)} ${i(34.6084)} ${o(10.6797)} ${i(35.9167)} ${o(10.6797)} ${i(37.3604)}C${o(10.6796)} ${i(38.805)} ${o(10.1053)} ${i(40.1141)} ${o(9.17383)} ${i(41.0752)}C${o(10.3132)} ${i(41.7614)} ${o(11.1999)} ${i(42.871)} ${o(11.5703)} ${i(44.2598)}C${o(11.946)} ${i(45.6504)} ${o(11.7335)} ${i(47.0592)} ${o(11.0889)} ${i(48.2266)}C${o(12.377)} ${i(48.593)} ${o(13.5297)} ${i(49.441)} ${o(14.25)} ${i(50.6904)}C${o(14.9754)} ${i(51.9405)} ${o(15.1322)} ${i(53.3629)} ${o(14.8047)} ${i(54.6621)}C${o(16.142)} ${i(54.6835)} ${o(17.4721)} ${i(55.2016)} ${o(18.4902)} ${i(56.2197)}C${o(19.5097)} ${i(57.2441)} ${o(20.0278)} ${i(58.5787)} ${o(20.0479)} ${i(59.918)}C${o(21.3469)} ${i(59.5917)} ${o(22.7696)} ${i(59.7493)} ${o(24.0195)} ${i(60.4697)}C${o(25.2676)} ${i(61.1892)} ${o(26.1117)} ${i(62.3406)} ${o(26.4775)} ${i(63.627)}C${o(27.6424)} ${i(62.9822)} ${o(29.0498)} ${i(62.7688)} ${o(30.4404)} ${i(63.1396)}C${o(31.8284)} ${i(63.5112)} ${o(32.9402)} ${i(64.3999)} ${o(33.627)} ${i(65.543)}C${o(34.5887)} ${i(64.6072)} ${o(35.9012)} ${i(64.0304)} ${o(37.3496)} ${i(64.0303)}C${o(38.7912)} ${i(64.0303)} ${o(40.098)} ${i(64.6023)} ${o(41.0586)} ${i(65.5303)}C${o(41.7458)} ${i(64.3887)} ${o(42.8594)} ${i(63.5007)} ${o(44.25)} ${i(63.1299)}C${o(45.643)} ${i(62.7522)} ${o(47.057)} ${i(62.9676)} ${o(48.2266)} ${i(63.6201)}C${o(48.5931)} ${i(62.3323)} ${o(49.4413)} ${i(61.1801)} ${o(50.6904)} ${i(60.46)}C${o(51.9373)} ${i(59.7364)} ${o(53.3558)} ${i(59.5781)} ${o(54.6523)} ${i(59.9023)}C${o(54.6744)} ${i(58.5659)} ${o(55.1925)} ${i(57.2372)} ${o(56.21)} ${i(56.2197)}C${o(57.2339)} ${i(55.2007)} ${o(58.5676)} ${i(54.6816)} ${o(59.9062)} ${i(54.6611)}C${o(59.5835)} ${i(53.3649)} ${o(59.7414)} ${i(51.9468)} ${o(60.46)} ${i(50.7002)}C${o(61.1797)} ${i(49.4517)} ${o(62.3312)} ${i(48.6068)} ${o(63.6182)} ${i(48.2412)}C${o(62.9651)} ${i(47.0726)} ${o(62.7473)} ${i(45.658)} ${o(63.1201)} ${i(44.2598)}C${o(63.4916)} ${i(42.8718)} ${o(64.3794)} ${i(41.7591)} ${o(65.5225)} ${i(41.0723)}C${o(64.5929)} ${i(40.1115)} ${o(64.0206)} ${i(38.8033)} ${o(64.0205)} ${i(37.3604)}C${o(64.0205)} ${i(35.9186)} ${o(64.5915)} ${i(34.611)} ${o(65.5195)} ${i(33.6504)}C${o(64.3785)} ${i(32.9631)} ${o(63.4908)} ${i(31.8501)} ${o(63.1201)} ${i(30.46)}C${o(62.7421)} ${i(29.0656)} ${o(62.9572)} ${i(27.6498)} ${o(63.6113)} ${i(26.4795)}C${o(62.3272)} ${i(26.1115)} ${o(61.1784)} ${i(25.2657)} ${o(60.46)} ${i(24.0195)}C${o(59.7364)} ${i(22.7727)} ${o(59.5781)} ${i(21.3541)} ${o(59.9023)} ${i(20.0576)}C${o(58.5626)} ${i(20.038)} ${o(57.23)} ${i(19.52)} ${o(56.21)} ${i(18.5)}C${o(55.1931)} ${i(17.4783)} ${o(54.675)} ${i(16.1482)} ${o(54.6523)} ${i(14.8125)}C${o(53.3557)} ${i(15.1357)} ${o(51.9374)} ${i(14.9785)} ${o(50.6904)} ${i(14.2598)}C${o(49.4399)} ${i(13.5339)} ${o(48.5931)} ${i(12.3801)} ${o(48.2285)} ${i(11.0918)}C${o(47.0603)} ${i(11.7439)} ${o(45.6474)} ${i(11.9624)} ${o(44.25)} ${i(11.5898)}V${i(11.5801)}C${o(42.8613)} ${i(11.2085)} ${o(41.7483)} ${i(10.3196)} ${o(41.0615)} ${i(9.17578)}Z`}function a0(e){let t=e/70;return {scale:t,transform:(n,o)=>(n-5)*t+o}}function Y8(e,t,r){let{scale:n,transform:o}=a0(r);return M`M ${o(5,e)} ${o(30,t)}v ${20*n}a ${25*n} ${25*n}, 0, 0, 0, ${25*n} ${25*n}h ${45*n}v -${45*n}a ${25*n} ${25*n}, 0, 0, 0, -${25*n} -${25*n}h -${20*n}H ${o(5,e)}zM ${o(30,e)} ${o(15,t)}h ${20*n}a ${15*n} ${15*n}, 0, 0, 1, ${15*n} ${15*n}v ${35*n}h -${35*n}a ${15*n} ${15*n}, 0, 0, 1, -${15*n} -${15*n}v -${35*n}z`}function J8(e,t,r){let n=r/7,o=n*1.5,i=n*.75,s=M`M ${e+o} ${t}`+M`h ${r-2*o}`+M`a ${o} ${o} 0 0 1 ${o} ${o}`+M`v ${r-2*o}`+M`a ${o} ${o} 0 0 1 ${-o} ${o}`+M`h ${-(r-2*o)}`+M`a ${o} ${o} 0 0 1 ${-o} ${-o}`+M`v ${-(r-2*o)}`+M`a ${o} ${o} 0 0 1 ${o} ${-o}z`,a=M`M ${e+n+i} ${t+n}`+M`h ${5*n-2*i}`+M`a ${i} ${i} 0 0 1 ${i} ${i}`+M`v ${5*n-2*i}`+M`a ${i} ${i} 0 0 1 ${-i} ${i}`+M`h ${-(5*n-2*i)}`+M`a ${i} ${i} 0 0 1 ${-i} ${-i}`+M`v ${-(5*n-2*i)}`+M`a ${i} ${i} 0 0 1 ${i} ${-i}z`;return s+a}function e7(e,t,r){let{scale:n,transform:o}=a0(r);return M`M ${o(5,e)} ${o(40,t)}a ${35*n} ${35*n}, 0, 0, 0, ${35*n} ${35*n}h ${30*n}a ${5*n} ${5*n}, 0, 0, 0, ${5*n} -${5*n}v -${30*n}a ${35*n} ${35*n}, 0, 0, 0, -${35*n} -${35*n}a ${35*n} ${35*n}, 0, 0, 0, -${35*n} ${35*n}zM ${o(40,e)} ${o(15,t)}a ${25*n} ${25*n}, 0, 0, 1, ${25*n} ${25*n}v ${25*n}h -${25*n}a ${25*n} ${25*n}, 0, 0, 1, -${25*n} -${25*n}a ${25*n} ${25*n}, 0, 0, 1, ${25*n} -${25*n}z`}function t7(e,t,r){let{scale:n,transform:o}=a0(r);return M`M ${o(5,e)} ${o(30,t)}v ${20*n}a ${25*n} ${25*n}, 0, 0, 0, ${25*n} ${25*n}h ${45*n}v -${45*n}a ${25*n} ${25*n}, 0, 0, 0, -${25*n} -${25*n}h -${20*n}a ${25*n} ${25*n}, 0, 0, 0, -${25*n} ${25*n}M ${o(30,e)} ${o(15,t)}h ${20*n}a ${15*n} ${15*n}, 0, 0, 1, ${15*n} ${15*n}v ${35*n}h -${35*n}a ${15*n} ${15*n}, 0, 0, 1, -${15*n} -${15*n}v -${20*n}a ${15*n} ${15*n}, 0, 0, 1, ${15*n} -${15*n}z`}function r7(e,t,r){let n=r/70,o=e+r/2-40*n,i=t+r/2-40*n,s=(c,u)=>c*n+u;return M`M${s(35.19239999999999,o)} ${s(5.837547376725838,i)}C${s(37.69667692307692,o)} ${s(3.8737070690335305,i)}, ${s(41.218430769230764,o)} ${s(3.8737092228796843,i)}, ${s(43.722707692307694,o)} ${s(5.837547376725838,i)}L${s(46.62781538461539,o)} ${s(8.115648915187375,i)}L${s(50.23356923076923,o)} ${s(7.32361506903353,i)}C${s(53.342,o)} ${s(6.640824299802762,i)}, ${s(56.51483076923077,o)} ${s(8.168784299802759,i)}, ${s(57.91892307692308,o)} ${s(11.024719684418145,i)}L${s(59.54787692307692,o)} ${s(14.337679684418145,i)}L${s(63.14027692307692,o)} ${s(15.188578145956608,i)}C${s(66.23707692307693,o)} ${s(15.922091992110452,i)}, ${s(68.43270769230769,o)} ${s(18.675396607495067,i)}, ${s(68.45876923076924,o)} ${s(21.857768915187375,i)}L${s(68.48892307692307,o)} ${s(25.54931045364891,i)}L${s(71.35633846153846,o)} ${s(27.874602761341222,i)}C${s(73.82830769230769,o)} ${s(29.879187376725838,i)}, ${s(74.61187692307692,o)} ${s(33.312418145956606,i)}, ${s(73.25452307692306,o)} ${s(36.19103353057199,i)}L${s(71.68006153846153,o)} ${s(39.530141222879685,i)}L${s(73.25452307692306,o)} ${s(42.86924891518738,i)}C${s(74.61187692307692,o)} ${s(45.747864299802764,i)}, ${s(73.82830769230769,o)} ${s(49.18109506903353,i)}, ${s(71.35633846153846,o)} ${s(51.18567968441815,i)}L${s(68.48892307692307,o)} ${s(53.510971992110456,i)}L${s(68.45876923076924,o)} ${s(57.202664299802755,i)}C${s(68.43270769230769,o)} ${s(60.38497199211046,i)}, ${s(66.23707692307693,o)} ${s(63.13823353057199,i)}, ${s(63.14027692307692,o)} ${s(63.871833530572,i)}L${s(59.54787692307692,o)} ${s(64.72260276134121,i)}L${s(57.91892307692308,o)} ${s(68.03564891518737,i)}C${s(56.51483076923077,o)} ${s(70.89164891518737,i)}, ${s(53.342,o)} ${s(72.41958737672583,i)}, ${s(50.23356923076923,o)} ${s(71.7368181459566,i)}L${s(46.62781538461539,o)} ${s(70.94463353057199,i)}L${s(43.722707692307694,o)} ${s(73.22275660749506,i)}C${s(41.218430769230764,o)} ${s(75.18663353057198,i)}, ${s(37.69667692307692,o)} ${s(75.18663353057198,i)}, ${s(35.19239999999999,o)} ${s(73.22275660749506,i)}L${s(32.28729230769231,o)} ${s(70.94463353057199,i)}L${s(28.68153846153846,o)} ${s(71.7368181459566,i)}C${s(25.573215384615384,o)} ${s(72.41958737672583,i)}, ${s(22.400384615384613,o)} ${s(70.89164891518737,i)}, ${s(20.996141538461536,o)} ${s(68.03564891518737,i)}L${s(19.36720923076923,o)} ${s(64.72260276134121,i)}L${s(15.774852307692306,o)} ${s(63.871833530572,i)}C${s(12.67803076923077,o)} ${s(63.13823353057199,i)}, ${s(10.48237846153846,o)} ${s(60.38497199211046,i)}, ${s(10.45636,o)} ${s(57.202664299802755,i)}L${s(10.426163076923077,o)} ${s(53.510971992110456,i)}L${s(7.558747692307692,o)} ${s(51.18567968441815,i)}C${s(5.086880338461539,o)} ${s(49.18109506903353,i)}, ${s(4.303258769230769,o)} ${s(45.747864299802764,i)}, ${s(5.660599692307692,o)} ${s(42.86924891518738,i)}L${s(7.235153846153846,o)} ${s(39.530141222879685,i)}L${s(5.660599692307692,o)} ${s(36.19103353057199,i)}C${s(4.3032566153846155,o)} ${s(33.312418145956606,i)}, ${s(5.086885938461538,o)} ${s(29.879187376725838,i)}, ${s(7.558747692307692,o)} ${s(27.874602761341222,i)}L${s(10.426163076923077,o)} ${s(25.54931045364891,i)}L${s(10.45636,o)} ${s(21.857768915187375,i)}C${s(10.48237846153846,o)} ${s(18.67537506903353,i)}, ${s(12.678052307692308,o)} ${s(15.922091992110452,i)}, ${s(15.774852307692306,o)} ${s(15.188578145956608,i)}L${s(19.36720923076923,o)} ${s(14.337679684418145,i)}L${s(20.996141538461536,o)} ${s(11.024719684418145,i)}C${s(22.400384615384613,o)} ${s(8.168784299802759,i)}, ${s(25.573215384615384,o)} ${s(6.640824299802762,i)}, ${s(28.68153846153846,o)} ${s(7.32361506903353,i)}L${s(32.28729230769231,o)} ${s(8.115648915187375,i)}L${s(35.19239999999999,o)} ${s(5.837547376725838,i)}M${s(39.45766153846154,o)} ${s(13.665055069033532,i)}L${s(37.01498461538461,o)} ${s(15.58053506903353,i)}C${s(35.39098461538461,o)} ${s(16.854061222879682,i)}, ${s(33.282799999999995,o)} ${s(17.335251992110454,i)}, ${s(31.26701538461538,o)} ${s(16.892464299802757,i)}L${s(28.235046153846152,o)} ${s(16.22649506903353,i)}L${s(26.865415384615382,o)} ${s(19.012107376725837,i)}C${s(25.954812307692308,o)} ${s(20.864178145956608,i)}, ${s(24.264193846153844,o)} ${s(22.212399684418145,i)}, ${s(22.255926153846154,o)} ${s(22.688076607495066,i)}L${s(19.235393846153844,o)} ${s(23.40354122287968,i)}L${s(19.21,o)} ${s(26.507556607495065,i)}C${s(19.19313538461538,o)} ${s(28.57137199211045,i)}, ${s(18.25492,o)} ${s(30.519525838264297,i)}, ${s(16.651919999999997,o)} ${s(31.81937199211045,i)}L${s(14.240926153846154,o)} ${s(33.774633530572,i)}L${s(15.564830769230769,o)} ${s(36.58238737672584,i)}C${s(16.445064615384617,o)} ${s(38.44891045364892,i)}, ${s(16.445064615384617,o)} ${s(40.611371992110456,i)}, ${s(15.564830769230769,o)} ${s(42.47811045364892,i)}L${s(14.240926153846154,o)} ${s(45.28564891518738,i)}L${s(16.651919999999997,o)} ${s(47.240910453648915,i)}L${s(13.883236923076923,o)} ${s(50.654971992110454,i)}L${s(16.651919999999997,o)} ${s(47.240910453648915,i)}C${s(18.25492,o)} ${s(48.54075660749507,i)}, ${s(19.19313538461538,o)} ${s(50.4891258382643,i)}, ${s(19.21,o)} ${s(52.5527258382643,i)}L${s(19.235393846153844,o)} ${s(55.65684891518738,i)}L${s(22.255926153846154,o)} ${s(56.37235660749507,i)}C${s(24.264193846153844,o)} ${s(56.847925838264295,i)}, ${s(25.954812307692308,o)} ${s(58.196233530571995,i)}, ${s(26.865415384615382,o)} ${s(60.0483258382643,i)}L${s(28.235046153846152,o)} ${s(62.833895069033524,i)}L${s(31.26701538461538,o)} ${s(62.1679258382643,i)}C${s(33.282799999999995,o)} ${s(61.72509506903353,i)}, ${s(35.39098461538461,o)} ${s(62.20626429980276,i)}, ${s(37.01498461538461,o)} ${s(63.47983353057199,i)}L${s(39.45766153846154,o)} ${s(65.39524891518737,i)}L${s(41.90012307692308,o)} ${s(63.47983353057199,i)}C${s(43.524123076923075,o)} ${s(62.20626429980276,i)}, ${s(45.632307692307684,o)} ${s(61.72509506903353,i)}, ${s(47.6480923076923,o)} ${s(62.1679258382643,i)}L${s(50.68006153846154,o)} ${s(62.833895069033524,i)}L${s(52.049692307692304,o)} ${s(60.0483258382643,i)}C${s(52.960338461538456,o)} ${s(58.196233530571995,i)}, ${s(54.6508923076923,o)} ${s(56.847925838264295,i)}, ${s(56.65913846153846,o)} ${s(56.37235660749507,i)}L${s(59.67969230769231,o)} ${s(55.65684891518738,i)}L${s(59.70510769230769,o)} ${s(52.5527258382643,i)}C${s(59.72190769230769,o)} ${s(50.4891258382643,i)}, ${s(60.66012307692307,o)} ${s(48.54075660749507,i)}, ${s(62.263230769230766,o)} ${s(47.240910453648915,i)}L${s(64.67424615384616,o)} ${s(45.28564891518738,i)}L${s(63.35027692307692,o)} ${s(42.47811045364892,i)}C${s(62.47,o)} ${s(40.611371992110456,i)}, ${s(62.47,o)} ${s(38.44891045364892,i)}, ${s(63.35027692307692,o)} ${s(36.58238737672584,i)}L${s(64.67424615384616,o)} ${s(33.774633530572,i)}L${s(62.263230769230766,o)} ${s(31.81958737672584,i)}C${s(60.66012307692307,o)} ${s(30.519525838264297,i)}, ${s(59.72190769230769,o)} ${s(28.57137199211045,i)}, ${s(59.70510769230769,o)} ${s(26.507556607495065,i)}L${s(59.67969230769231,o)} ${s(23.40354122287968,i)}L${s(56.65913846153846,o)} ${s(22.688076607495066,i)}C${s(54.6508923076923,o)} ${s(22.212399684418145,i)}, ${s(52.960338461538456,o)} ${s(20.864178145956608,i)}, ${s(52.049692307692304,o)} ${s(19.012128915187375,i)}L${s(50.68006153846154,o)} ${s(16.22649506903353,i)}L${s(47.6480923076923,o)} ${s(16.892464299802757,i)}C${s(45.632307692307684,o)} ${s(17.335251992110454,i)}, ${s(43.524338461538456,o)} ${s(16.85408276134122,i)}, ${s(41.90012307692308,o)} ${s(15.58053506903353,i)}L${s(39.45766153846154,o)} ${s(13.665055069033532,i)}Z`}function jc(e,t,r,n,o="top-left"){switch(n){case "leaf":return P2(e,t,r,o);case "leaf-reverse":return P2(e,t,r,o,true);case "drop":return G8(e,t,r,o);case "octagon":return C2(e,t,r,1.6);case "bevel":return C2(e,t,r,1.1);case "squircle":return Q8(e,t,r);case "cushion":return V8(e,t,r);case "shield":return j8(e,t,r);case "petal":return q8(e,t,r,o);case "gear":return K8(e,t,r);case "rounded":return H8(e,t,r);case "circle":return X8(e,t,r);case "diya":return Y8(e,t,r);case "extra-rounded":return J8(e,t,r);case "message":return e7(e,t,r);case "pointy":return t7(e,t,r);case "curly":return r7(e,t,r);default:return W8(e,t,r)}}var qc=.22,Wc=.14;function R2(e,t,r={}){if(e==="circle")return R("circle",{cx:$(t.x+t.w/2),cy:$(t.y+t.h/2),r:$(Math.min(t.w,t.h)/2),...r});let n=e==="rounded"?Math.min(t.w,t.h)*qc:0;return R("rect",{height:$(t.h),width:$(t.w),x:$(t.x),y:$(t.y),...n>0&&{rx:$(n),ry:$(n)},...r})}function n7(e,t){let r=e.w*t,n=e.h*t;return {x:e.x+r,y:e.y+n,w:e.w-2*r,h:e.h-2*n}}function Hc(e,t){let r=e.shape??"square",n=e.plate,o=n?n7(t,Wc):t,i=a=>R("image",{height:$(o.h),href:e.src,preserveAspectRatio:"none",width:$(o.w),x:$(o.x),y:$(o.y),...a&&{clipPath:`url(#${a})`}});if(r==="square"&&!n)return i();let s=r==="square"?void 0:`qrdx-logo-${cn(`${r}|${$(o.x)}|${$(o.y)}|${$(o.w)}|${$(o.h)}`)}`;return xe("g",{children:[n&&R2(r,t,{fill:n}),s&&R("clipPath",{id:s,children:R2(r,o)}),i(s)]})}var E2=.6,o7=["L","M","Q","H"];function M2(e){let t=Le.QrCode.encodeText(e.value,qe[e.level]),r=o7[t.errorCorrectionLevel.ordinal]??e.level;return {code:e,cells:t.getModules(),layoutMargin:nt(t.size,e.margin,e.shape),map:Qi(t.version,r),level:r,version:t.version}}function I2(e,t){let{cells:r,map:n}=e,o=r.length,i=Pr(r,e.code.size,e.layoutMargin,t);if(!i)return null;let s=i.excavation??{x:Math.floor(i.x),y:Math.floor(i.y),w:Math.ceil(i.x+i.w)-Math.floor(i.x),h:Math.ceil(i.y+i.h)-Math.floor(i.y)},a=[];for(let u=Math.max(0,s.y);u<Math.min(o,s.y+s.h);u++)for(let l=Math.max(0,s.x);l<Math.min(o,s.x+s.w);l++)a.push(u*o+l);let c=Vi(n,a);return {worst:Math.max(0,...c),correctable:n.correctable,budget:Math.floor(n.correctable*E2),level:e.level,version:e.version}}function Xc(e,t){return I2(M2(e),t)}var L2=e=>!e||e.worst<=e.budget;function i7(e,t){return L2(Xc(e,t))}function c0(e,t,r,n){let o=t.map(a=>M2({...e,level:a})),i=a=>{let c=n(a);return o.every(u=>L2(I2(u,c)))};if(i(r))return r;let s=e.size*.005;for(let a=r-s;a>0;a-=s)if(i(a))return a;return 0}function Kc(e,t){if(!t)return;let r=Math.floor(e.size*ps),n=t.width||r,o=t.height||r,i=p=>{if(p===n)return t;let m=o*p/n;return {...t,width:p,height:m,...t.x!=null&&{x:t.x+(n-p)/2},...t.y!=null&&{y:t.y+(o-m)/2}}},s=e.level??Mt,a={value:e.value,size:e.size,margin:e.margin,shape:e.shape},c=p=>ht({...e,level:s,imageSettings:p}),u=p=>{let m=c0(a,[p],n,i);return m>0?i(m):void 0},l=c(t);if(l===s)return u(s);let f=u(l);return f&&c(f)===l?f:u(s)}var u0="data-qrdx-part",z2="data-qrdx-eye",s7=["eye-outer","eye-centre","body","logo","background"];function l0(e,t,r){if(e)return r?{[u0]:t,[z2]:r}:{[u0]:t}}var T2={id:"Arrow",name:"Arrow",description:"QR code with arrow",wrapper:(e,t)=>R("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:xe("svg",{fill:"#000000",height:"300",viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M73.57,175.23h0c.12-2.06.31-4.19.49-6.25s.48-4.13.85-6.13.79-4,1.27-5.95a30.21,30.21,0,0,1,1.94-5.28h0c.06-.18.13-.43.19-.67a3.55,3.55,0,0,0-2.8-4.19l-.18-.06a1.85,1.85,0,0,0-.54-.06c-.19,0-.31-.06-.49-.06s-.61-.06-.91-.06c-.61,0-1.21.06-1.82.06-1.21.12-2.37.25-3.52.43a62.08,62.08,0,0,0-6.8,1.45,58.45,58.45,0,0,0-6.43,2.31c-1,.42-2.07,1-3.1,1.4s-2,1.09-3,1.57a.76.76,0,0,0,.54,1.4h.07c1.09-.24,2.12-.55,3.15-.79s2.13-.48,3.16-.61A46,46,0,0,1,62,153c1.34-.06,2.73-.06,4.07-.06a62.58,62.58,0,0,0-7.23,10.43,85.58,85.58,0,0,0-6.55,15.36,107.86,107.86,0,0,0-5,32.53,104.06,104.06,0,0,0,5,32.29,90.47,90.47,0,0,0,15.54,28.52.94.94,0,0,0,1.27.19.89.89,0,0,0,.18-1.28h0a87.24,87.24,0,0,1-13.89-28.28A102.85,102.85,0,0,1,58,180.87a82.15,82.15,0,0,1,6.68-14,51.58,51.58,0,0,1,5.71-7.76c0,1.21,0,2.36.06,3.58.12,2.18.24,4.31.48,6.43s.49,4.25.85,6.37a1,1,0,0,0,.91.85A1.37,1.37,0,0,0,73.57,175.23Z",fill:t?.fgColor||"black",id:"CallToActionArrow"}),R("g",{fill:"none",transform:"translate(82, 95)scale(0.5)",children:e})]})})};var N2={id:"default",name:"Default",description:"Simple QR code without decorative elements",wrapper:e=>R("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:R("g",{fill:"none",transform:"translate(9, 9) scale(0.95)",children:e})})};var ts=593,kr=296.5,es=146.5,U2=294.5,G2=231.228,Q2="M296.5 0C460.252 -7.15782e-06 593 132.748 593 296.5C593 460.252 460.253 593 296.5 593C132.748 593 7.15782e-06 460.252 0 296.5C-7.15788e-06 132.748 132.748 7.15788e-06 296.5 0ZM296.5 527.728C424.204 527.728 527.728 424.204 527.728 296.5C527.728 168.796 424.204 65.2713 296.5 65.2713C168.796 65.2713 65.2714 168.796 65.2714 296.5C65.2714 424.204 168.796 527.728 296.5 527.728Z",a7="iaa2 1z3g 1z0y 1z18 1z18 1we8 2mq 1uta 47y 1rx4 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rxe 73u 1rx4 73u 1rzm 71m 1rzm 71m 1rzc 73u okq 13ce 744 1rx4 744 1rwu 744 1rx4 744 1rx4 73u 1rx4 744 1rx4 73u 1rx4 73u 1rx4 744 1rx4 73u 1rxe 73u 1rx4 73u 1rx4 744 1rzm 71c 1rzm 73u 1rxe 73u 1rx4 744 1rx4 73u 1rx4 73u 1rxe 73u 1rx4 618 12m 1rxe 73u 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z18",c7="hqpr 5 1z36 1z0y 1z18 1z18 1z0y 1z0y 1a7w otc 1z0y 1z18 1z0y 1z18 1z0y 1z1i 1z0o 1z18 1z0y 1z3q 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1z18 1z0y 1lk8 dgq 1z18 1z18 1z3g 1z0y 1z0y 1z18 1z18 1z0y 1z0y 1z18 1yx2 3w 1z18 60o 1t0a 1z18 1z0y 1z18 1z0y",O2="3cf27f17c00j3ch21n1ek00l1el3cj1vv1kd00n3cl3cn1q31q500p3cp1vx00r1kb3cs3aw1ej21p00t3ax3ay17b27h00w3b02g20yq01w2d611m01x3b52aa14i01y24i1bq0203bd3be1q21q60253bf39e39f39h14e2ae02d39j11i2da02e39l0ym02f39n2lt0sz03a39p2ix0vv03b39r2d511n39t03d27d17f03f39x39y21l1en03h3a03a11vt1kf03j37w37x1q11q703l37z1k903n1vz3821eh03p21r38714d03t11h03u2db38a0vp2j303w2lz38g03x0st2rk0n804o38l2oo0q404p38n2iw0vw04r36f36h2a814k04u36k36l1vs1kg04z36o36p1n41t405236q36x36y0ss2m005d3720n02rs05f3742uf0kd0633763772on0q506537834y2fz0yt06834z2d311p06935235424f1bt06c35621j1ep06d3581yn1hl06e35a1sv1nd06g35b1pz1q906h35d35e35g1ef21t06l35h1bj24p06m35k35l11f2dd06q35n0vn2j506s35p35q0pv2ox06u35s0mz2rt06v35t33h0k32up06w2x90hi08y2ud0ke08z33r2lp0t20922fx0yu0942a514m09624d1bu0983441yl1hm09a1vp1ki09b1px1qa09d34e1n11t609e1h91yy09g1ed21u09h1a227m0831492ai09l0yh2ga09n0sp2m209p0pt2oy09q0k12uq09s2xo0h52z209t31k0en0bt2780c319z0az0e831z0cq",F2=52,u7=240;function D2(e){let t=0;return e.split(" ").map(r=>(t+=Number.parseInt(r,36),t/1e4))}var f0;function l7(){if(!f0){let e=D2(a7),t=D2(c7),r=[];for(let n=0;n<O2.length;n+=3){let o=Number.parseInt(O2.slice(n,n+3),36);r.push({cx:e[Math.floor(o/F2)],cy:t[o%F2]});}f0=r;}return f0}function f7(e){let t=0;for(let r=0;r<e.length;r++)t=t*32-t+e.charCodeAt(r),t%=2147483647;return Math.abs(t)}function V2(e){let t=l7(),r=f7(e),n=()=>(r=(r*9301+49297)%233280,r/233280),o=t.map((i,s)=>s);for(let i=o.length-1;i>0;i--){let s=Math.floor(n()*(i+1));[o[i],o[s]]=[o[s],o[i]];}return o.slice(0,u7).sort((i,s)=>i-s).map(i=>t[i])}var Z2=300,m7=49,p7=6;function j2(e,t){if(Z2/t<=m7+.5)return e;let r=es,n=es+Z2,o=p7*t+t/2;return e.filter(({cx:i,cy:s})=>Math.max(r-i,i-n,r-s,s-n)>=o)}var q2="Scan the QR code * Scan the QR code * Scan the QR code * Scan the QR code *",Yc=32,W2=3.5,H2=246.5,p0=.36,B2=H2+p0*Yc,m0=400;function d7(e,t){return e===" "||/[il1|!']/.test(e)?t*.3:/[mwMW@%&]/.test(e)?t*.8:t*.6}function h7(e){let t=e.slice(0,m0).split(" ").map(r=>bo(r,m0)).join(" ");return Array.from(t).slice(0,m0)}function X2(e,t){let{fontSize:r,letterSpacing:n,position:o,rotation:i}=t,s=2*Math.PI*H2,a=[],c=0;for(let h of h7(e)){let d=d7(h,r);if(c+d>s)break;a.push({char:h,along:c+d/2}),c+=d+n;}let u=c-(a.length>0?n:0),l=o!=="bottom",f=l?B2-p0*r:B2+p0*r,p=u/s*180,m=[];for(let{char:h,along:d}of a){if(h.trim()==="")continue;let g=d/s*360,_=l?i-p+g:i+180+p-g,y=_*Math.PI/180;m.push({char:h,x:fe(kr+f*Math.sin(y)),y:fe(kr-f*Math.cos(y)),rotate:fe(l?_:_-180)});}return m}var Eo=(e,t)=>typeof e=="number"&&Number.isFinite(e)?e:t,K2={id:"DotRing",name:"Dot Ring",description:"A round code in a ring of dots of its own for every link, with text along the ring",wrapper:(e,t,r)=>{let n=Ze(t?.fgColor,"#000000"),o=Ze(t?.bgColor,"#ffffff"),i=r?.pixelSize??9,s=fe(i/2),a=j2(V2(r?.url??""),i),c=Eo(t?.fontSize,Yc),u=c>0?c:Yc,l=typeof t?.customText=="string"?t.customText:q2,f=X2(l,{fontSize:u,letterSpacing:Eo(t?.fontLetterSpacing,W2),position:t?.textPosition==="bottom"?"bottom":"top",rotation:Eo(t?.textRotation,0)}),p=t?.textColor||"#ffffff",m=t?.fontFamily||Uc,h=t?.fontWeight??900,d=Eo(t?.strokeWidth,0),g=t?.strokeColor||"#000000",_=[{radius:kr,width:Eo(t?.outerStrokeWidth,d),color:t?.outerStrokeColor||g},{radius:G2,width:Eo(t?.innerStrokeWidth,d),color:t?.innerStrokeColor||g}].filter(y=>y.width>0);return xe("svg",{height:ts,id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:`0 0 ${ts} ${ts}`,width:ts,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:[R("circle",{cx:kr,cy:kr,fill:o,r:U2}),R("g",{fill:n,children:a.map((y,b)=>R("circle",{cx:y.cx,cy:y.cy,r:s},b))}),R("path",{d:Q2,fill:t?.outerCircleColor||n}),_.map((y,b)=>R("circle",{cx:kr,cy:kr,fill:"none",r:y.radius,stroke:y.color,strokeWidth:y.width},b)),R("g",{"aria-hidden":"true",children:f.map((y,b)=>R("text",{fill:p,fontFamily:m,fontSize:u,fontWeight:h,textAnchor:"middle",transform:`rotate(${y.rotate} ${y.x} ${y.y})`,x:y.x,y:y.y,children:y.char},b))}),R("g",{transform:`translate(${es} ${es})`,children:e})]})}};var Y2={id:"Halloween",name:"Halloween",description:"QR code with Halloween theme",wrapper:e=>R("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:R("svg",{fill:"none",height:"300",viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",children:xe("g",{transform:"translate(10, 10)",children:[R("circle",{cx:"138",cy:"167.682",fill:"white",r:"99.3177",stroke:"#F89941",strokeWidth:"20"}),R("rect",{fill:"url(#pattern0)",height:"110.806",width:"113",x:"81.0001",y:"124.097"}),R("ellipse",{cx:"167.989",cy:"67.8947",fill:"#F89941",rx:"35.4453",ry:"48.4419"}),R("path",{d:"M187.937 69.0763C187.937 82.6574 184.092 94.8451 178.005 103.57C171.912 112.304 163.736 117.381 154.992 117.381C146.247 117.381 138.072 112.304 131.979 103.57C125.891 94.8451 122.047 82.6574 122.047 69.0763C122.047 55.4952 125.891 43.3075 131.979 34.5823C138.072 25.8486 146.247 20.7714 154.992 20.7714C163.736 20.7714 171.912 25.8486 178.005 34.5823C184.092 43.3075 187.937 55.4952 187.937 69.0763Z",fill:"#F89941",stroke:"#E78249",strokeWidth:"5"}),R("ellipse",{cx:"154.072",cy:"69.4866",fill:"#F89941",rx:"34.0512",ry:"50.6615"}),R("path",{d:"M171.396 69.667C171.396 82.7394 167.562 94.4717 161.488 102.874C155.412 111.279 147.235 116.2 138.451 116.2C129.666 116.2 121.489 111.279 115.413 102.874C109.34 94.4717 105.506 82.7394 105.506 69.667C105.506 56.5946 109.34 44.8624 115.413 36.4603C121.489 28.0551 129.666 23.1344 138.451 23.1344C147.235 23.1344 155.412 28.0551 161.488 36.4603C167.562 44.8624 171.396 56.5946 171.396 69.667Z",fill:"#F89941",stroke:"#E78249",strokeWidth:"5"}),R("ellipse",{cx:"134.316",cy:"70.8486",fill:"#F89941",rx:"33.673",ry:"47.8511"}),R("ellipse",{fill:"#F89941",rx:"35.4453",ry:"48.4419",transform:"matrix(-1 0 0 1 106.743 68.4484)"}),R("path",{d:"M86.7942 69.6299C86.7942 83.2111 90.6388 95.3988 96.7262 104.124C102.819 112.858 110.995 117.935 119.739 117.935C128.484 117.935 136.659 112.858 142.753 104.124C148.84 95.3988 152.685 83.2111 152.685 69.6299C152.685 56.0488 148.84 43.8611 142.753 35.1359C136.659 26.4023 128.484 21.3251 119.739 21.3251C110.995 21.3251 102.819 26.4023 96.7262 35.1359C90.6388 43.8611 86.7942 56.0488 86.7942 69.6299Z",fill:"#F89941",stroke:"#E78249",strokeWidth:"5"}),R("ellipse",{fill:"#F89941",rx:"32.9438",ry:"50.3847",transform:"matrix(-1 0 0 1 119.744 69.7634)"}),R("path",{d:"M103.335 70.2207C103.335 83.293 107.169 95.0253 113.243 103.427C119.319 111.833 127.496 116.753 136.281 116.753C145.065 116.753 153.242 111.833 159.318 103.427C165.392 95.0253 169.226 83.293 169.226 70.2207C169.226 57.1483 165.392 45.416 159.318 37.014C153.242 28.6088 145.065 23.688 136.281 23.688C127.496 23.688 119.319 28.6088 113.243 37.014C107.169 45.416 103.335 57.1483 103.335 70.2207Z",fill:"#F89941",stroke:"#E78249",strokeWidth:"5"}),R("ellipse",{fill:"#F89941",rx:"32.3901",ry:"47.6163",transform:"matrix(-1 0 0 1 139.677 70.8708)"}),R("ellipse",{fill:"#F89941",rx:"33.2207",ry:"47.6163",transform:"matrix(-1 0 0 1 134.971 71.4245)"}),R("path",{d:"M158.85 46.6783C165.21 42.2516 166.538 40.633 167.867 39.0144C167.867 39.0144 169.806 43.8236 169.88 46.3566C169.954 48.8897 169.712 50.1469 167.248 51.6467C164.783 53.1464 155.406 53.0446 150.083 52.9746C149.31 52.5001 150.72 52.3371 158.85 46.6783Z",fill:"black"}),R("path",{d:"M115.765 46.5118C109.392 42.1412 108.058 40.5475 106.724 38.9538C106.724 38.9538 104.783 45.8361 104.758 46.822C104.733 47.808 104.657 50.8051 108.247 51.9995C111.837 53.194 119.234 52.7723 124.551 52.7272C125.322 52.2652 123.912 52.0991 115.765 46.5118Z",fill:"black"}),R("path",{d:"M160 90.4999C167.156 83.1595 169.5 78.2827 171.351 72.9348C172.24 70.3672 162.909 72.0429 158 72.9348C157.276 73.0664 155.751 76.9145 155 77C154.182 77.0932 151.841 73.0759 151 73.086C149.725 73.1013 147.727 73.086 145.875 73.4285C145.345 74.3645 146.367 77.5746 145.875 78.2827C145.321 78.2827 141.796 77.2604 141.242 76.4298C140.689 74.492 140.949 73.3629 140.118 72.5323C137.555 72.9075 138.023 72.6567 135.412 73.086C134.768 73.1919 133.09 77.7212 132.441 77.8195C131.615 77.9448 128.644 74.0088 127.809 74.1138C126.747 74.2475 124.821 74.4683 123.64 74.577C123.126 74.6244 123.554 77.5019 123.177 78.2827C122.898 78.8616 119.426 77.8921 118.5 77.5C118.037 76.5024 117.844 74.5583 117 74.577C111 74.1138 109.4 73.843 103.575 70.8713C103.575 70.8713 102.5 80 111 89C119.5 98 147.127 103.706 160 90.4999Z",fill:"black"}),R("path",{d:"M135.238 7.25181C137.192 1.73111 142.678 0.363204 145.935 0L148.377 1.81602C149.158 2.39714 149.842 2.40909 150.331 3.25657C150.331 4.22511 146.337 5.41975 142.429 6.582C137.545 8.03482 139.482 17.0534 142.429 19.2811C143.401 20.0152 143.524 19.9639 145.966 19.9639C148.029 19.9639 150.387 18.2474 151.566 17.3526C151.566 17.3526 151.861 20.2573 149.798 21.4777C147.735 22.698 143.578 21.8578 143.608 21.9658C144.493 23.9183 146.89 22.4887 148.029 23.3362C147.346 23.3362 146.556 24.2889 144.198 24.5329C142.672 24.5798 142.135 24.5329 140.956 23.9183C139.777 23.3037 139.482 22.8696 138.893 22.1395C136.83 23.3598 138.893 25.4305 138.893 25.4305C138.893 25.4305 134.472 25.8512 133.587 23.9183C133.264 23.2115 133.882 22.1395 133.587 21.9658C131.819 22.4539 130.935 23.4807 127.373 22.8696C124.312 22.3443 125.102 18.3211 124.451 17.3526C127.381 18.079 125.131 20.0392 129.327 19.9639C140.838 19.7576 132.796 14.1527 135.238 7.25181Z",fill:"#5D725F"}),xe("defs",{children:[R("pattern",{height:"1",id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1"}),R("clipPath",{id:"clip0_2087_156668",children:R("rect",{fill:"white",height:"276",width:"276"})})]}),R("g",{fill:"none",transform:"translate(80, 122)scale(0.38)",children:e})]})})})};var J2={id:"SquareBorder",name:"Square Border",description:"QR code with square decorative border",wrapper:(e,t)=>R("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:R("svg",{fill:"black",height:"300",viewBox:"0 0 316 316",width:"300",xmlns:"http://www.w3.org/2000/svg",children:xe("g",{children:[R("path",{clipRule:"evenodd",d:"M308 8H8v300h300V8ZM0 0v316h316V0H0Z",fill:t?.fgColor||"black",fillRule:"evenodd"}),R("g",{fill:"none",transform:"translate(20, 20) scale(0.92)",children:e})]})})})};var ex={id:"StandardBox",name:"Standard Box",description:"QR code with standard box",wrapper:(e,t)=>R("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:xe("svg",{fill:"#000000",height:"300",viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M243,1.7h-186a10.25,10.25,0,0,0-10.2,10.12v186A10.13,10.13,0,0,0,57,208H243a10.13,10.13,0,0,0,10.12-10.12v-186A10.13,10.13,0,0,0,243,1.7Zm2.36,193.05a5.46,5.46,0,0,1-5.47,5.47H60.16a5.46,5.46,0,0,1-5.47-5.47V14.93a5.46,5.46,0,0,1,5.47-5.47H239.91a5.46,5.46,0,0,1,5.47,5.47Z",fill:t?.fgColor||"black"}),R("path",{d:"M243.54,238.81H173.61a2.29,2.29,0,0,1-1.62-.67l-20.55-20.55a2.33,2.33,0,0,0-3.25,0l-20.55,20.55a2.29,2.29,0,0,1-1.62.67H56.09A9.15,9.15,0,0,0,46.93,248v41.17a9.16,9.16,0,0,0,9.16,9.16H243.61a9.09,9.09,0,0,0,9.09-9.16V248A9.16,9.16,0,0,0,243.54,238.81Z",fill:t?.fgColor||"black"}),R("g",{fill:"none",transform:"translate(60, 15)scale(0.6)",children:e})]})})};var tx={id:"StrikedBox",name:"Striked Box",description:"QR code with striked box",wrapper:e=>R("svg",{height:"300",id:"svgQrWrapper",style:{width:"100%",height:"100%"},viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:xe("svg",{fill:"#22071b",height:"300",viewBox:"0 0 300 300",width:"300",xmlns:"http://www.w3.org/2000/svg",children:[R("path",{d:"M195.11,290.77l-7.28,4.88a2.16,2.16,0,0,0-.57,3,2.21,2.21,0,0,0,1.77.92,2.4,2.4,0,0,0,1.2-.35l7.28-4.88a2.14,2.14,0,0,0-2.4-3.54Z"}),R("path",{d:"M266.85,227.52l-7.28,4.87a2.16,2.16,0,0,0-.57,3,2.21,2.21,0,0,0,1.77.92,1.86,1.86,0,0,0,1.2-.35l7.28-4.88a2.13,2.13,0,1,0-2.4-3.53Z"}),R("path",{d:"M41,176.34l-9.11,6.08a2.15,2.15,0,0,0-.57,3,2.19,2.19,0,0,0,1.77.92,2.14,2.14,0,0,0,1.2-.35l9.12-6.08A2.14,2.14,0,0,0,41,176.34Z"}),R("path",{d:"M41,269.08l-9.11,6.07a2.15,2.15,0,0,0-.57,3,2.19,2.19,0,0,0,1.77.92,2.92,2.92,0,0,0,1.2-.35l9.12-6.08A2.14,2.14,0,0,0,41,269.08Z"}),R("path",{d:"M147,10.1a2.4,2.4,0,0,0,1.14-.35l7.7-5.16a2.13,2.13,0,0,0-2.4-3.53l-7.64,5.15a2.15,2.15,0,0,0-.56,3A2.19,2.19,0,0,0,147,10.1Z"}),R("path",{d:"M275.54,54.77a2.14,2.14,0,0,0-3-.56l-17.1,11.45V31.31a10.18,10.18,0,0,0-10.18-10.18H137.22l-10.39,7a2.4,2.4,0,0,1-1.2.35,2.21,2.21,0,0,1-1.77-.92,2.15,2.15,0,0,1,.57-3l1.41-.92,13.64-8.76a2.1,2.1,0,1,0-2.26-3.54L122,21.2h-8.13l-10.39,7a2.37,2.37,0,0,1-1.2.35,2.19,2.19,0,0,1-1.76-.92,2.15,2.15,0,0,1,.56-3L124,9.25a2.13,2.13,0,1,0-2.4-3.53l-23,15.48H58.2A10.18,10.18,0,0,0,48,31.38v28L31.34,70.46a2.09,2.09,0,0,0-.57,3,2,2,0,0,0,1.77.92,2.58,2.58,0,0,0,1.2-.35l14.35-9.54,3.18-2.12a2.14,2.14,0,1,1,2.41,3.53l-5.52,3.67V76.9l-7,4.66a2.15,2.15,0,0,0-.56,3,2,2,0,0,0,1.77.92,2.34,2.34,0,0,0,1.2-.36l7.35-4.94A2.13,2.13,0,0,1,52.69,84l-4.46,3v65.66L25.05,168.07a2.15,2.15,0,0,0-.57,3,2,2,0,0,0,1.77.92,2.37,2.37,0,0,0,1.2-.35l25-16.75a2,2,0,0,1,2.62.77,2.16,2.16,0,0,1-.57,3l-6.36,4.24V275a10.09,10.09,0,0,0,9.83,10.11l-5.87,4a2.15,2.15,0,0,0-.57,3,2.06,2.06,0,0,0,1.77.92,2.38,2.38,0,0,0,1.2-.36l23-15.41a2.14,2.14,0,0,1,2.41,3.54l-6.58,4.45h52l-5.58,3.75a2.14,2.14,0,0,0-.56,3,2,2,0,0,0,1.76.91,2.37,2.37,0,0,0,1.2-.35l30.54-20.28a2.15,2.15,0,0,1,3,.56,2.1,2.1,0,0,1-.57,3l-14.21,9.54H217l-4.6,3a2.16,2.16,0,0,0-.63,3,2.11,2.11,0,0,0,1.76,1,2,2,0,0,0,1.13-.36L237,277.35a2.14,2.14,0,1,1,2.33,3.6l-6.78,4.38h13a10.18,10.18,0,0,0,10.18-10.18v-91.1l-4.38,3a2.43,2.43,0,0,1-1.2.35,2.19,2.19,0,0,1-1.77-.92,2.15,2.15,0,0,1,.57-3l24.38-16.33a2.13,2.13,0,1,0-2.4-3.53l-15.48,10.25V91.53l-4.38,3a2.34,2.34,0,0,1-1.21.36,2.22,2.22,0,0,1-1.76-.92,2.15,2.15,0,0,1,.56-3l6.72-4.52,13.71-9.19a2.14,2.14,0,0,0-2.4-3.54l-11.24,7.57V75.84l-4.38,3a2.34,2.34,0,0,1-1.21.36,2.22,2.22,0,0,1-1.76-.92,2.15,2.15,0,0,1,.56-3l6.72-4.52,19.43-13.08A2.05,2.05,0,0,0,275.54,54.77ZM237,216.07h-172a5.23,5.23,0,0,1-5.23-5.24V38.94a5.22,5.22,0,0,1,5.23-5.23H237a5.22,5.22,0,0,1,5.23,5.23V210.83h.07A5.22,5.22,0,0,1,237,216.07Z"}),R("path",{d:"M270.45,139.8l-7.28,4.88a2.15,2.15,0,0,0-.56,3,2.22,2.22,0,0,0,1.76.92,2.44,2.44,0,0,0,1.21-.36l7.28-4.87a2.14,2.14,0,0,0-2.41-3.54Z"}),R("g",{fill:"none",transform:"translate(64, 38)scale(0.58)",children:e})]})})};var rs={default:N2,Arrow:T2,StandardBox:ex,SquareBorder:J2,StrikedBox:tx,Halloween:Y2,DotRing:K2},rx={FlamQR:"DotRing"},Jc=e=>{if(Object.hasOwn(rs,e))return rs[e];let t=Object.hasOwn(rx,e)?rx[e]:void 0;return t?rs[t]:void 0},FR=()=>Object.values(rs),DR=()=>Object.keys(rs);var d0=e=>Math.round(Math.min(Math.max(e,0),255)).toString(16).padStart(2,"0");function sx(e){return `#${d0(e.r)}${d0(e.g)}${d0(e.b)}`}function eu(e){let t=ke(e);return !t||t.a>=1||t.a<=0?{color:e}:{color:sx(t),opacity:fe(t.a,3)}}function tu(e,t){let r=Math.min(Math.max(e.a,0),1);return {r:e.r*r+t.r*(1-r),g:e.g*r+t.g*(1-r),b:e.b*r+t.b*(1-r),a:1}}var ax={r:0,g:0,b:0,a:1};function g7(e){return [...e].map(t=>({offset:Math.min(Math.max(t.offset/100,0),1),color:ke(t.color)??ax})).sort((t,r)=>t.offset-r.offset)}function h0(e,t){let r=e[0],n=e.at(-1);if(!(r&&n))return ax;if(t<=r.offset)return r.color;if(t>=n.offset)return n.color;for(let o=0;o+1<e.length;o++){let i=e[o],s=e[o+1];if(t>=i.offset&&t<=s.offset){let a=s.offset-i.offset,c=a>0?(t-i.offset)/a:1,u=i.color.a+(s.color.a-i.color.a)*c,l=(f,p)=>{let m=f*i.color.a+(p*s.color.a-f*i.color.a)*c;return u>0?m/u:f+(p-f)*c};return {r:l(i.color.r,s.color.r),g:l(i.color.g,s.color.g),b:l(i.color.b,s.color.b),a:u}}}return n.color}var nx=4,ox=720,y7=2;function cx(e,t,r,n,o){let i=g7(e);if(i.length===0)return {wedges:[]};let s=i[0].color.a,a=i.every(y=>Math.abs(y.color.a-s)<.002),c=[...new Set([0,...i.map(y=>y.offset),1])].sort((y,b)=>y-b),u=[];for(let y=0;y+1<c.length;y++){let b=c[y],S=c[y+1];if(S<=b)continue;let v=h0(i,b+1e-9),w=h0(i,S-1e-9),x=Math.max(Math.abs(v.r*v.a-w.r*w.a),Math.abs(v.g*v.a-w.g*w.a),Math.abs(v.b*v.a-w.b*w.a),Math.abs(v.a-w.a)*255),P=Math.ceil(x/y7),C=Math.ceil((S-b)*360/nx),E=Math.max(1,P,C);for(let I=0;I<E;I++)u.push([b+(S-b)*I/E,b+(S-b)*(I+1)/E]);}let l=u;if(u.length>ox){let y=Math.ceil(u.length/ox);l=[];for(let b=0;b<u.length;b+=y){let S=u.slice(b,b+y);l.push([S[0][0],S.at(-1)[1]]);}}let f=t-90,p=o/Math.cos(2*nx/2*(Math.PI/180)),m=y=>{let b=y*Math.PI/180;return [$(r+p*Math.cos(b)),$(n+p*Math.sin(b))]},h=`${$(r)} ${$(n)}`,d=y=>fe((y%360+360)%360,4),g=l.length-1,_=l.map(([y,b],S)=>{let v=h0(i,(y+b)/2),w=(b-y)*360,x=a&&S===0&&g>0?w:0,P=a&&S<g?w:0,C=f+y*360-x,E=f+b*360+P,[I,L]=m(C),[z,D]=m(E);return {d:`M${h}L${I} ${L}L${z} ${D}Z`,color:sx(v),...a||v.a>=1?{}:{opacity:fe(v.a,3)},from:d(C),sweep:fe(E-C,4)}});return a&&s<1?{wedges:_,opacity:fe(s,3)}:{wedges:_}}function ix(e,t,r,n){return (Math.atan2(n-t,r-e)*180/Math.PI%360+360)%360}function ux(e,t,r){if(e>=r.x-1e-6&&e<=r.x+r.width+1e-6&&t>=r.y-1e-6&&t<=r.y+r.height+1e-6)return null;let o=[[r.x,r.y],[r.x+r.width,r.y],[r.x,r.y+r.height],[r.x+r.width,r.y+r.height]],i=ix(e,t,r.x+r.width/2,r.y+r.height/2),s=0,a=0;for(let[c,u]of o){let l=ix(e,t,c,u)-i;l>180?l-=360:l<=-180&&(l+=360),s=Math.min(s,l),a=Math.max(a,l);}return [i+s,i+a]}function lx(e,t){let r=e[1]-e[0],n=t[1]-t[0];if(r>=360||n>=360)return true;let o=((t[0]-e[0])%360+360)%360;return o<=r||o+n>=360}function _0(e,t){return e.slice().map((r,n)=>n<t.y||n>=t.y+t.h?r:r.map((o,i)=>i<t.x||i>=t.x+t.w?o:false))}function px(e,t=0){let r=[];return e.forEach((n,o)=>{let i=null;n.forEach((s,a)=>{if(!s&&i!==null){r.push(M`M${i+t} ${o+t}h${a-i}v1H${i+t}z`),i=null;return}if(a===n.length-1){if(!s)return;i===null?r.push(M`M${a+t},${o+t} h1v1H${a+t}z`):r.push(M`M${i+t},${o+t} h${a+1-i}v1H${i+t}z`);return}s&&i===null&&(i=a);});}),r.join("")}function _7(e,t,r){return e<7&&t<7||e>=r-7&&t<7||e<7&&t>=r-7}var b7=.9;function g0(e,t){let{margin:r,pixelSize:n,pattern:o="circle",plain:i=false}=t;if(Tb(o))return Ob(e,{margin:r,pixelSize:n,pattern:o,scale:t.scale,plain:i});let s=Nc(t.scale,o),a=[],c=e.length,u=n*.45,l=i?()=>false:jh(c);return e.forEach((f,p)=>{f.forEach((m,h)=>{if(m&&(i||!_7(h,p,c))){let d=(h+.5+r)*n,g=(p+.5+r)*n,_=`${h}-${p}`,y=a.length;if(l(h,p)){a.push(R("rect",{height:$(n),width:$(n),x:$(d-n/2),y:$(g-n/2)},_));return}switch(o){case "circle":a.push(R("circle",{cx:$(d),cy:$(g),r:$(u),transform:M`rotate(0,${d},${g})`},_));break;case "circle-large":{let b=n*.5;a.push(R("circle",{cx:$(d),cy:$(g),r:$(b),transform:M`rotate(0,${d},${g})`},_));}break;case "small-square":{let b=n*.357143;a.push(R("path",{d:M`M ${d-b} ${g-b}v ${n*.714286}h ${n*.714286}v -${n*.714286}z`,transform:M`rotate(0,${d},${g})`},_));}break;case "diamond":{let b=n*.357143;a.push(R("path",{d:M`M ${d-b} ${g-b}v ${n*.714286}h ${n*.714286}v -${n*.714286}z`,transform:M`rotate(45,${d},${g})`},_));}break;case "circle-mixed":{let b=(h+p)%3===0?b7:(h+p)%2===0?1:1.25,S=u*b;a.push(R("circle",{cx:$(d),cy:$(g),r:$(S),transform:M`rotate(0,${d},${g})`},_));}break;case "pacman":{let b=n*.5,S=n*.357143;a.push(R("path",{d:M`M ${d-b} ${g-S}v ${n*.714286}h ${b}a ${b*.5} ${b*.5}, 0, 0, 0, 0 -${n*.714286}h -${b}v -${n*.714286}z`,transform:M`rotate(${(h+p)%2===0?0:90},${d},${g})`},_));}break;case "rounded":{let b=n*.5,S=n*.2;a.push(R("rect",{height:$(n),rx:$(S),ry:$(S),transform:M`rotate(0,${d},${g})`,width:$(n),x:$(d-b),y:$(g-b)},_));}break;case "square":{let b=n*.5;a.push(R("rect",{height:$(n),transform:M`rotate(0,${d},${g})`,width:$(n),x:$(d-b),y:$(g-b)},_));}break;case "vertical-line":{let b=n*.714286,S=n;a.push(R("path",{d:M`M ${d-n*.5} ${g-b*.5}v ${b}h ${S}v -${b}z`,transform:M`rotate(90,${d},${g})`},_));}break;default:a.push(R("circle",{cx:$(d),cy:$(g),r:$(u),transform:M`rotate(0,${d},${g})`},_));}if(s!==1&&a.length>y){let b=a.pop();a.push(R("g",{transform:M`translate(${d},${g}) scale(${$(s,6)}) translate(${-d},${-g})`,children:b},_));}}});}),a}function x7(e,t){let r=e*Math.PI/180,n=t/2,o=t/2,i=Math.sqrt(t*t+t*t)/2,s=n-i*Math.cos(r),a=o-i*Math.sin(r),c=n+i*Math.cos(r),u=o+i*Math.sin(r);return {x1:s,y1:a,x2:c,y2:u}}function b0(e,t){return `${e}-${cn(JSON.stringify(t))}`}function $7(e,t,r,n,o){let i=e;if(e===0)switch(o){case "top-left":i=0;break;case "top-right":i=90;break;case "bottom-left":i=270;break;default:i=0;}let s=i*Math.PI/180,a=t+n/2,c=r+n/2,u=Math.sqrt(n*n+n*n)/2,l=a-u*Math.cos(s),f=c-u*Math.sin(s),p=a+u*Math.cos(s),m=c+u*Math.sin(s);return {x1:l,y1:f,x2:p,y2:m}}function nu(e,t){return t.map((r,n)=>{let{color:o,opacity:i}=eu(r.color);return R("stop",{offset:`${r.offset}%`,stopColor:o,stopOpacity:i},`${e}-stop-${n}`)})}function dx(e,t,r,n,o,i){let s=cx(t.stops,t.angle??0,r,n,o),a=s.wedges.map((c,u)=>R("path",{d:c.d,"data-arc":`${c.from} ${c.sweep}`,fill:c.color,fillOpacity:c.opacity,shapeRendering:c.opacity===void 0?void 0:"crispEdges"},`${e}-w-${u}`));return R("pattern",{"data-qrdx-conic":`${$(r)} ${$(n)}`,height:$(i),id:e,patternUnits:"userSpaceOnUse",width:$(i),x:0,y:0,children:s.opacity===void 0?a:R("g",{opacity:s.opacity,children:a})},e)}function w7(e="center"){let[t,r]=e.split("-"),n=e==="center"?"center":t,o=r??(t==="left"||t==="right"?t:"center");return {x:o==="left"?0:o==="right"?1:.5,y:n==="top"?0:n==="bottom"?1:.5}}var S7=["xMin","xMid","xMax"],v7=["YMin","YMid","YMax"];function hx(e,t,r){let n=t.scale??1,o=t.fit==="tile",i=o?r/4*n:r,s=t.underlay?eu(t.underlay):null,a=o?i:r*n,c=w7(t.position),u=o?0:c.x*(r-a),l=o?0:c.y*(r-a),f=o?"xMidYMid slice":`${S7[c.x*2]??"xMid"}${v7[c.y*2]??"YMid"} ${t.fit==="contain"?"meet":"slice"}`;return xe("pattern",{height:$(i),id:e,patternUnits:"userSpaceOnUse",width:$(i),x:0,y:0,children:[s&&R("rect",{fill:s.color,fillOpacity:s.opacity,height:$(i),width:$(i),x:0,y:0}),R("image",{height:$(a),href:t.src,opacity:(t.opacity??1)<1?t.opacity:void 0,preserveAspectRatio:f,width:$(a),x:$(u),y:$(l)})]},e)}var gx=(e,t)=>b0("img",[e,t]);function C7(e,t,r,n,o,i,s){let a=bt(e);if(a.type==="solid")return null;if(a.type==="image"){let u=gx(a,s);return {id:u,element:hx(u,a,s)}}let c=b0(i,[a,t,r,n,o,...a.type==="angular"?[s]:[]]);if(a.type==="linear"){let u=a,l=u.angle??0,{x1:f,y1:p,x2:m,y2:h}=$7(l,t,r,n,o);return {id:c,element:R("linearGradient",{gradientUnits:"userSpaceOnUse",id:c,x1:$(f),x2:$(m),y1:$(p),y2:$(h),children:nu(c,u.stops)},c)}}if(a.type==="radial"){let u=a,l=t+n/2,f=r+n/2,p=n/2*.97;return {id:c,element:R("radialGradient",{cx:$(l),cy:$(f),fx:$(l),fy:$(f),gradientUnits:"userSpaceOnUse",id:c,r:$(p),children:nu(c,u.stops)},c)}}return a.type==="angular"?{id:c,element:dx(c,a,t+n/2,r+n/2,n*.75,s)}:null}function y0(e,t,r){let n=bt(e);if(n.type==="solid")return null;if(n.type==="image"){let i=gx(n,t);return {id:i,element:hx(i,n,t)}}let o=b0(r,[n,t]);if(n.type==="linear"){let i=n,s=i.angle??0,{x1:a,y1:c,x2:u,y2:l}=x7(s,t);return {id:o,element:R("linearGradient",{gradientUnits:"userSpaceOnUse",id:o,x1:$(a),x2:$(u),y1:$(c),y2:$(l),children:nu(o,i.stops)},o)}}if(n.type==="radial"){let i=n,s=t/2,a=t/2,c=t/2*.97;return {id:o,element:R("radialGradient",{cx:$(s),cy:$(a),fx:$(s),fy:$(a),gradientUnits:"userSpaceOnUse",id:o,r:$(c),children:nu(o,i.stops)},o)}}return n.type==="angular"?{id:o,element:dx(o,n,t/2,t/2,t*.75,t)}:null}var ru=e=>fo(e)||sh(e);function fx(e){let t=new Set,r=[];for(let n of e)n&&!t.has(n.id)&&(t.add(n.id),r.push(n.element));return r}function tr(e,t,r){if(t)return {fill:`url(#${t})`};let n=bt(e,r),o=n.type==="solid"?n.color:n.type==="image"?n.underlay??r:r,{color:i,opacity:s}=eu(o);return s===void 0?{fill:i}:{fill:i,fillOpacity:s}}function Pr(e,t,r,n){if(n==null)return null;let o=e.length,i=Math.floor(t*ps),s=(o+2*r)/t,a=(n.width||i)*s,c=(n.height||i)*s,u=n.x==null?o/2-a/2:n.x*s,l=n.y==null?o/2-c/2:n.y*s,f=null;if(n.excavate){let p=Math.max(0,n.padding??0)*s,m=Math.floor(u-p),h=Math.floor(l-p),d=Math.ceil(a+u+p-m),g=Math.ceil(c+l+p-h);f={x:m,y:h,w:d,h:g};}return {x:u,y:l,h:c,w:a,excavation:f}}function ht(e){let t=e.level??Mt,{imageSettings:r}=e,n=e.isOGContext&&r?.excavate&&(t==="L"||t==="M")?"Q":t;if(e.autoLevel&&r&&n!=="H"){let o=Le.QrCode.encodeText(e.value,qe[n]).getModules(),i=Pr(o,e.size??ve,nt(o.length,e.margin??Te,e.shape),r);i&&(i.excavation?i.excavation.w*i.excavation.h:i.w*i.h)/(o.length*o.length)>kh&&(n="H");}return n}function P7(e,t,r,n){let o=t/r,i=e.w*o,s=e.h*o,a=(e.x+n)*o,c=(e.y+n)*o;return {imgWidth:i,imgHeight:s,imgLeft:a,imgTop:c}}function Io(e){let{value:t,size:r=ve,level:n=Mt,bgColor:o=ze,fgColor:i=Ge,eyeColor:s,dotColor:a,bodyPattern:c="circle",cornerEyePattern:u="gear",cornerEyeDotPattern:l="circle",margin:f=Te,isOGContext:p=false,imageSettings:m,templateId:h,customTemplate:d,customProps:g,frame:_,art:y,eyeColors:b,moduleScale:S,autoLevel:v,shape:w,frameLabelMarkers:x,partMarkers:P,...C}=e,E=Kc({value:t,size:r,margin:f,level:n,shape:w,autoLevel:v,isOGContext:p},m),I=dt(_),L=I?{}:C,z=be=>I?Gc(be,{size:r,frame:_,bgColor:o,svgProps:C,markLabels:x}):be,D=ht({value:t,size:r,level:n,margin:f,imageSettings:E,isOGContext:p,autoLevel:v,shape:w}),B=Le.QrCode.encodeText(t,qe[D]),N=B.getModules(),j=nt(N.length,f,w),ee=S2(t,N.length,f,w),G=(be,ot)=>l0(P,be,ot),K=(be,ot)=>{let Et=s0(w,be);return Et?"circle"in Et?R("circle",{cx:$(be/2),cy:$(be/2),...ot,r:$(be/2),...G("background")}):R("path",{d:Et.path,...ot,...G("background")}):R("rect",{...ot,height:be,width:be,x:0,y:0,...G("background")})},pe=N.length+j*2,Ie=Pr(N,r,j,E),$e=null;if(E!=null&&Ie!=null){Ie.excavation!=null&&(N=_0(N,Ie.excavation));let{imgWidth:be,imgHeight:ot,imgLeft:Et,imgTop:Sn}=P7(Ie,r,pe,j);if(p){let vn=E.shape??"square";$e=R("img",{alt:"Logo",src:E.src,style:{position:"absolute",left:`${$(Et)}px`,top:`${$(Sn)}px`,width:`${$(be)}px`,height:`${$(ot)}px`,...vn!=="square"&&{borderRadius:vn==="circle"?"50%":`${$(Math.min(be,ot)*qc)}px`},...E.plate&&{backgroundColor:E.plate,padding:`${$(be*Wc)}px`,boxSizing:"border-box"}}});}else $e=Hc(E,{x:Et,y:Sn,w:be,h:ot}),P&&($e=$o($e,G("logo")));}let Z=r/pe,Y=N.length,J=7*Z,Ue=1.5*Z,Ir={fgColor:Ze(i,Ge),bgColor:Ze(o,ze)},ft=Fh(y)?Uh({art:y,modules:N,version:B.version,margin:j,pixelSize:Z,...Ir,body:be=>g0(be,{margin:j,pixelSize:Z,pattern:c,scale:S})}):null,Qt=ft&&P?$o(ft,G("body")):ft,Lr=ft&&y?Vh({art:y,version:B.version,...Ir}):null,W=ft?null:g0(N,{margin:j,pixelSize:Z,pattern:c,scale:S}),he=ee?g0(ee,{margin:0,pixelSize:Z,pattern:c,scale:S,plain:true}):null,oe=bt(o,ze),Ee=bt(i,Ge),Do=ru(oe)?y0(oe,r,"bg-color"):null,Su=ru(Ee)?y0(Ee,r,"fg-color"):null,Q$=tr(o,Do?.id??null,ze),ig=tr(i,Su?.id??null,Ge),sg=Qt?xe(Bt,{children:[Qt,he&&R("g",{...ig,...G("body"),children:he})]}):xe("g",{...ig,...G("body"),children:[W,he]}),dn=j*Z,hn=j*Z,gn=(Y-7+j)*Z,yn=j*Z,_n=j*Z,bn=(Y-7+j)*Z,zr=Ze(i,Ge),xn=be=>b?.[be]?.outer??Lr?.[be]?.outer??s,$n=be=>b?.[be]?.inner??Lr?.[be]?.inner??a,wn=(be,ot,Et,Sn,vn)=>{let Eu=bt(be,zr);return ru(Eu)?C7(Eu,ot,Et,J,Sn,vn,r):null},vu=wn(xn("topLeft"),dn,hn,"top-left","corners-square-color-0-0"),Cu=wn(xn("topRight"),gn,yn,"top-right","corners-square-color-1-0"),Pu=wn(xn("bottomLeft"),_n,bn,"bottom-left","corners-square-color-0-1"),ku=wn($n("topLeft"),dn,hn,"top-left","corners-dot-color-0-0"),Au=wn($n("topRight"),gn,yn,"top-right","corners-dot-color-1-0"),Ru=wn($n("bottomLeft"),_n,bn,"bottom-left","corners-dot-color-0-1"),ag=tr(xn("topLeft"),vu?.id??null,zr),cg=tr(xn("topRight"),Cu?.id??null,zr),ug=tr(xn("bottomLeft"),Pu?.id??null,zr),lg=tr($n("topLeft"),ku?.id??null,zr),fg=tr($n("topRight"),Au?.id??null,zr),mg=tr($n("bottomLeft"),Ru?.id??null,zr),pg=jc(dn,hn,J,u,"top-left"),dg=Vc(dn+J/2,hn+J/2,Ue,l,"top-left"),hg=jc(gn,yn,J,u,"top-right"),gg=Vc(gn+J/2,yn+J/2,Ue,l,"top-right"),yg=jc(_n,bn,J,u,"bottom-left"),_g=Vc(_n+J/2,bn+J/2,Ue,l,"bottom-left"),V$=xe(Bt,{children:[R("defs",{children:fx([Do,Su,vu,Cu,Pu,ku,Au,Ru])}),K(r,Q$),sg,R("g",{...ag,...G("eye-outer","top-left"),children:R("path",{d:pg,fillRule:"evenodd",transform:M`rotate(0,${dn+J/2},${hn+J/2})`})}),R("g",{...lg,...G("eye-centre","top-left"),children:dg}),R("g",{...cg,...G("eye-outer","top-right"),children:R("path",{d:hg,fillRule:"evenodd",transform:M`rotate(0,${gn+J/2},${yn+J/2})`})}),R("g",{...fg,...G("eye-centre","top-right"),children:gg}),R("g",{...ug,...G("eye-outer","bottom-left"),children:R("path",{d:yg,fillRule:"evenodd",transform:M`rotate(0,${_n+J/2},${bn+J/2})`})}),R("g",{...mg,...G("eye-centre","bottom-left"),children:_g}),$e]}),bg=d||(h?Jc(h):void 0);if(bg){let ot=ru(oe)?y0(oe,300,"bg-color-template"):null,Et=tr(o,ot?.id??null,ze),Sn=xe("svg",{height:300,viewBox:"0 0 300 300",width:300,xmlns:"http://www.w3.org/2000/svg",children:[R("defs",{children:fx([ot,Su,vu,Cu,Pu,ku,Au,Ru])}),K(300,Et),xe("g",{transform:`scale(${$(300/r,6)})`,children:[sg,R("g",{...ag,...G("eye-outer","top-left"),children:R("path",{d:pg,fillRule:"evenodd",transform:M`rotate(0,${dn+J/2},${hn+J/2})`})}),R("g",{...lg,...G("eye-centre","top-left"),children:dg}),R("g",{...cg,...G("eye-outer","top-right"),children:R("path",{d:hg,fillRule:"evenodd",transform:M`rotate(0,${gn+J/2},${yn+J/2})`})}),R("g",{...fg,...G("eye-centre","top-right"),children:gg}),R("g",{...ug,...G("eye-outer","bottom-left"),children:R("path",{d:yg,fillRule:"evenodd",transform:M`rotate(0,${_n+J/2},${bn+J/2})`})}),R("g",{...mg,...G("eye-centre","bottom-left"),children:_g}),$e]})]}),vn=300/r,j$={pixelSize:Z*vn,url:t},xg=bg.wrapper(Sn,{fgColor:i,bgColor:o,...g||{},...C},j$),q$={...xg?.props?.style||{},width:void 0,height:void 0,...L.style};return z($o(xg,{...L,width:r,height:r,style:q$}))}return z(R("svg",{height:r,viewBox:`0 0 ${r} ${r}`,width:r,xmlns:"http://www.w3.org/2000/svg",...L,children:V$}))}var fE=(()=>{try{new Path2D().addPath(new Path2D);}catch{return false}return true})(),mE=e=>{let t=e.trim().replace(/^#/,"");t.length===3||t.length===4?t=t.slice(0,3).split("").map(n=>n+n).join(""):t.length===8&&(t=t.slice(0,6));let r=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?{r:Number.parseInt(r[1],16),g:Number.parseInt(r[2],16),b:Number.parseInt(r[3],16)}:null},Mo=(e,t,r)=>{let[n,o,i]=[e,t,r].map(s=>(s/=255,s<=.03928?s/12.92:((s+.055)/1.055)**2.4));return .2126*n+.7152*o+.0722*i},mx=e=>{let t=ke(e);if(!t)return null;let r=n=>n*t.a+255*(1-t.a);return {r:r(t.r),g:r(t.g),b:r(t.b)}},pE=(e,t)=>{let r=mx(e),n=mx(t);if(!(r&&n))return 1;let o=Mo(r.r,r.g,r.b),i=Mo(n.r,n.g,n.b),s=Math.max(o,i),a=Math.min(o,i);return (s+.05)/(a+.05)},dE=e=>e>=7?{level:"AAA",warning:false,message:"Excellent contrast"}:e>=4.5?{level:"AA",warning:false,message:"Good contrast"}:e>=3?{level:"AA Large",warning:true,message:"Low contrast - may be difficult to scan"}:{level:"Fail",warning:true,message:"Poor contrast - QR code may not scan properly"};var k7=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),A7=new Map([["className","class"],["tabIndex","tabindex"],["dir","dir"],["role","role"],["viewBox","viewBox"],["width","width"],["height","height"],["xlinkActuate","xlink:actuate"],["xlinkArcrole","xlink:arcrole"],["xlinkRole","xlink:role"],["xlinkShow","xlink:show"],["xlinkTitle","xlink:title"],["xlinkType","xlink:type"],["xmlBase","xml:base"],["xmlLang","xml:lang"],["xmlSpace","xml:space"]]),R7=new Set(["children","dangerouslySetInnerHTML","key","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","ref"]),E7=new Set(["inert","allowFullScreen","async","autoPlay","controls","credentialless","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"]),M7=new Set(["autoFocus","multiple","muted"]),I7=new Set(["contentEditable","spellCheck","draggable","value","autoReverse","externalResourcesRequired","focusable","preserveAlpha"]),L7=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" ")),yx=":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",z7=new RegExp(`^[${yx}][${yx}\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),ou=/^[a-zA-Z][a-zA-Z:_.\-\d]*$/,T7=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i,N7="javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')",O7=e=>T7.test(e)?N7:e,bx=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),F7=/["'&<>]/;function x0(e){if(!F7.test(e))return e;let t="",r=0;for(let n=0;n<e.length;n++){let o;switch(e.charCodeAt(n)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}t+=e.slice(r,n)+o,r=n+1;}return t+e.slice(r)}var rr=e=>typeof e=="function"||typeof e=="symbol",_x=new Map,D7=e=>{let t=_x.get(e);return t===void 0&&(t=e.replace(/([A-Z])/g,"-$1").toLowerCase().replace(/^ms-/,"-ms-"),_x.set(e,t)),t};function Z7(e){if(typeof e=="string")return e;if(typeof e!="object"||e===null)return "";let t="";for(let r of Object.keys(e)){let n=e[r];if(n==null||typeof n=="boolean"||n==="")continue;let o;if(r.startsWith("--"))o=`${r}:${`${n}`.trim()}`;else {let i=typeof n=="number"?n===0||L7.has(r)?`${n}`:`${n}px`:`${n}`.trim();o=`${D7(r)}:${i}`;}t=t?`${t};${o}`:o;}return t}function Lo(e,t){if(t==null||R7.has(e))return null;let r=A7.get(e);if(r!==void 0)return rr(t)||typeof t=="boolean"?null:{name:r,value:`${t}`};switch(e){case "style":{let o=Z7(t);return o?{name:"style",value:o}:null}case "src":case "href":case "action":case "formAction":case "xlinkHref":return (e==="src"||e==="href")&&t===""||rr(t)||typeof t=="boolean"?null:{name:e==="xlinkHref"?"xlink:href":e,value:O7(`${t}`)};case "capture":case "download":return t===true?{name:e,value:""}:t===false||rr(t)?null:{name:e,value:`${t}`};case "cols":case "rows":case "size":case "span":return rr(t)||Number.isNaN(Number(t))||!(t>=1)?null:{name:e,value:`${t}`};case "rowSpan":case "start":return rr(t)||Number.isNaN(Number(t))?null:{name:e,value:`${t}`};}if(M7.has(e))return t&&!rr(t)?{name:e.toLowerCase(),value:""}:null;if(I7.has(e))return rr(t)?null:{name:e,value:`${t}`};if(E7.has(e))return t&&!rr(t)?{name:e,value:""}:null;if(e.length>2&&(e[0]==="o"||e[0]==="O")&&(e[1]==="n"||e[1]==="N"))return null;let n=k7.get(e)??e;if(!z7.test(n)||rr(t))return null;if(typeof t=="boolean"){let o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-")return null}return {name:n,value:`${t}`}}var xx="http://www.w3.org/2000/svg",$x="http://www.w3.org/1999/xhtml",B7="http://www.w3.org/1999/xlink",U7="http://www.w3.org/XML/1998/namespace",G7="http://www.w3.org/2000/xmlns/";function Q7(e,t,r){t==="xmlns"||t.startsWith("xmlns:")?e.setAttributeNS(G7,t,r):t.startsWith("xlink:")?e.setAttributeNS(B7,t,r):t.startsWith("xml:")?e.setAttributeNS(U7,t,r):e.setAttribute(t,r);}function ns(e,t,r,n){if(t==null||typeof t=="boolean")return;if(typeof t=="string"||typeof t=="number"||typeof t=="bigint"){e.appendChild(n.createTextNode(`${t}`));return}if(Array.isArray(t)){for(let c of t)ns(e,c,r,n);return}if(!nn(t))throw new TypeError("qrdx: can't render this value as DOM nodes");let{type:o,props:i}=t;if(wo(o)){ns(e,i.children,r,n);return}if(typeof o=="function"){ns(e,o(i),r,n);return}if(!ou.test(o))throw new TypeError(`qrdx: invalid element name: ${o}`);let s=o==="svg"?xx:r,a=n.createElementNS(s,o);for(let c of Object.keys(i)){let u=Lo(c,i[c]);u&&Q7(a,u.name,u.value);}ns(a,i.children,s===xx&&o==="foreignObject"?$x:s,n),e.appendChild(a);}function os(e,t=document){let r=t.createDocumentFragment();return ns(r,e,$x,t),r}function Ut(e){if(e==null||typeof e=="boolean")return "";if(typeof e=="string")return x0(e);if(typeof e=="number"||typeof e=="bigint")return `${e}`;if(Array.isArray(e)){let t="";for(let r of e)t+=Ut(r);return t}if(!nn(e))throw new TypeError("qrdx: can't render this value as SVG markup");return V7(e)}function V7(e){let{type:t,props:r}=e;if(wo(t))return Ut(r.children);if(typeof t=="function")return Ut(t(r));if(!ou.test(t))throw new TypeError(`qrdx: invalid element name: ${t}`);let n=`<${t}`;for(let s of Object.keys(r)){let a=Lo(s,r[s]);a&&(n+=` ${a.name}="${x0(a.value)}"`);}if(bx.has(t))return `${n}/>`;let o=r.dangerouslySetInnerHTML?.__html,i=o==null?Ut(r.children):`${o}`;return `${n}>${i}</${t}>`}function $0(e){return Ut(Io(e))}function j7(e,t=document){return os(Io(e),t).firstChild}var q7=16384;var w0=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],W7=8,S0=class{buffer;position=0;bits=0;used=0;constructor(t){this.buffer=new Uint8Array(Math.max(t,64));}write(t,r){if(r!==0)for(this.bits|=t<<this.used,this.used+=r;this.used>=8;){if(this.position===this.buffer.length){let n=new Uint8Array(this.buffer.length*2);n.set(this.buffer),this.buffer=n;}this.buffer[this.position++]=this.bits&255,this.bits>>>=8,this.used-=8;}}finish(){return this.used>0&&this.write(0,8-this.used),this.buffer.subarray(0,this.position)}};function kx(e,t){let r=new Uint8Array(e.length),n=[];for(let u=0;u<e.length;u++)(e[u]??0)>0&&n.push(u);if(n.length===0)return r;if(n.length===1)return r[n[0]]=1,r;let o=n.length,i=2*o-1,s=new Float64Array(i),a=new Int32Array(i),c=new Uint8Array(i);for(let u=1;;u*=2){for(let d=0;d<o;d++)s[d]=Math.max(e[n[d]]??0,u);let l=Array.from({length:o},(d,g)=>g).sort((d,g)=>s[d]-s[g]||d-g),f=0,p=o,m=d=>f<o&&(p>=d||s[l[f]]<=s[p])?l[f++]:p++;for(let d=o;d<i;d++){let g=m(d),_=m(d);s[d]=s[g]+s[_],a[g]=d,a[_]=d;}c[i-1]=0;let h=0;for(let d=i-2;d>=0;d--){let g=c[a[d]]+1;c[d]=g,d<o&&g>h&&(h=g);}if(h<=t){for(let d=0;d<o;d++)r[n[d]]=c[d];return r}}}function H7(e,t){let r=0;for(let n=0;n<t;n++)r=r<<1|e>>n&1;return r}function Ax(e){let t=new Uint16Array(16),r=0;for(let a of e)a>0&&(t[a]=t[a]+1,r++);let n=new Uint16Array(16),o=0;for(let a=1;a<=15;a++)o=o+t[a-1]<<1,n[a]=o;let i=new Uint16Array(e.length),s=new Uint8Array(e.length);return e.forEach((a,c)=>{if(a===0)return;let u=n[a];n[a]=u+1,i[c]=H7(u,a),s[c]=r===1?0:a;}),{lengths:e,codes:i,emitted:s}}function mn(e,t,r){e.write(t.codes[r],t.emitted[r]);}function X7(e){let t=[],r=i=>t.push({code:i,extra:0,extraBits:0}),n=W7,o=0;for(;o<e.length;){let i=e[o],s=1;for(;o+s<e.length&&e[o+s]===i;)s++;o+=s;let a=s;if(i===0){for(;a>0;)if(a<3)for(;a>0;a--)r(0);else if(a<=10)t.push({code:17,extra:a-3,extraBits:3}),a=0;else {let c=Math.min(a,138);t.push({code:18,extra:c-11,extraBits:7}),a-=c;}continue}for(i!==n&&(r(i),n=i,a--);a>0;)if(a<3)for(;a>0;a--)r(i);else {let c=Math.min(a,6);t.push({code:16,extra:c-3,extraBits:2}),a-=c;}}return t}function K7(e,t){let r=[];if(t.forEach((a,c)=>{a>0&&r.push(c);}),r.length<=2&&r.every(a=>a<256)){let[a=0,c]=r;e.write(1,1),e.write(r.length===2?1:0,1),a<2?(e.write(0,1),e.write(a,1)):(e.write(1,1),e.write(a,8)),c!==void 0&&e.write(c,8);return}let n=X7(t),o=new Uint32Array(19);for(let a of n)o[a.code]=o[a.code]+1;let i=Ax(kx(o,7)),s=w0.length;for(;s>4&&i.lengths[w0[s-1]]===0;)s--;e.write(0,1),e.write(s-4,4);for(let a=0;a<s;a++)e.write(i.lengths[w0[a]],3);e.write(0,1);for(let a of n)mn(e,i,a.code),e.write(a.extra,a.extraBits);}function iu(e){let t=e-1;if(t<4)return {symbol:t,extra:0,extraBits:0};let r=31-Math.clz32(t),n=t>>r-1&1,o=r-1;return {symbol:2*r+n,extra:t&(1<<o)-1,extraBits:o}}function wx(e,t,r,n){let o=0;for(;o<n&&e[t+o]===e[t+o-r];)o++;return o}function Sx(e,t,r){let n=e.length,o=0;for(;o<n;){let i=Math.min(4096,n-o),s=o>=1?wx(e,o,1,i):0,a=o>=t?wx(e,o,t,i):0;if(Math.max(s,a)>=3){a>=s?(r.copy(a,t===1?2:1),o+=a):(r.copy(s,2),o+=s);continue}r.literal(e[o]),o++;}}var vx=20;function Cx(e,t,r){for(let n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n);}function Px(e,t,r){e[t]=r&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24&255;}function C0(e,t,r){if(!(Number.isInteger(t)&&Number.isInteger(r))||t<1||r<1||t>16384||r>16384)throw new RangeError(`WebP images are 1 to 16384 pixels wide and high (got ${t} \xD7 ${r})`);let n=t*r;if(e.length<n*4)throw new RangeError(`Expected ${n*4} bytes of RGBA for ${t} \xD7 ${r}, got ${e.length}`);let o=new Uint32Array(n),i=false;for(let v=0;v<n;v++){let w=v*4,x=e[w],P=e[w+1],C=e[w+2],E=e[w+3];E!==255&&(i=true),o[v]=(E<<24|(x-P&255)<<16|P<<8|C-P&255)>>>0;}let s=new Uint32Array(280),a=new Uint32Array(256),c=new Uint32Array(256),u=new Uint32Array(256),l=new Uint32Array(40);Sx(o,t,{literal(v){s[v>>>8&255]++,a[v>>>16&255]++,c[v&255]++,u[v>>>24]++;},copy(v,w){s[256+iu(v).symbol]++,l[iu(w).symbol]++;}});let f=[s,a,c,u,l].map(v=>kx(v,15)),[p,m,h,d,g]=f.map(Ax),_=new S0(Math.ceil(n/4)+1024);_.write(47,8),_.write(t-1,14),_.write(r-1,14),_.write(i?1:0,1),_.write(0,3),_.write(1,1),_.write(2,2),_.write(0,1),_.write(0,1),_.write(0,1);for(let v of f)K7(_,v);Sx(o,t,{literal(v){mn(_,p,v>>>8&255),mn(_,m,v>>>16&255),mn(_,h,v&255),mn(_,d,v>>>24);},copy(v,w){let x=iu(v);mn(_,p,256+x.symbol),_.write(x.extra,x.extraBits);let P=iu(w);mn(_,g,P.symbol),_.write(P.extra,P.extraBits);}});let y=_.finish(),b=y.length+(y.length&1),S=new Uint8Array(vx+b);return Cx(S,0,"RIFF"),Px(S,4,S.length-8),Cx(S,8,"WEBPVP8L"),Px(S,16,y.length),S.set(y,vx),S}function v0(e,t,r){return String.fromCharCode(...e.subarray(t,t+r))}function Rx(e){return e.length>=12&&v0(e,0,4)==="RIFF"&&v0(e,8,4)==="WEBP"}function P0(e){if(!Rx(e))return null;let t=12;for(;t+8<=e.length;){let r=v0(e,t,4);if(r==="VP8L")return "lossless";if(r==="VP8 ")return "lossy";let n=(e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24)>>>0;t+=8+n+(n&1);}return null}function Y7(e,t,r){return typeof e.toBlob!="function"?Promise.resolve(null):new Promise(n=>{try{e.toBlob(n,t,r);}catch{n(null);}})}async function su(e,t={}){let r=t.quality!==void 0,n=r?Math.min(1,Math.max(0,Number(t.quality))):1,o=await Y7(e,"image/webp",n);if(o){let c=new Uint8Array(await o.arrayBuffer()),u=P0(c);if(u==="lossless"||r&&u==="lossy")return new Blob([c],{type:"image/webp"})}let i=e.getContext("2d");if(!i)throw new Error("Could not get canvas context");let{data:s}=i.getImageData(0,0,e.width,e.height),a=C0(s,e.width,e.height);return new Blob([a],{type:"image/webp"})}var Ex=32768;async function is(e){let t=new Uint8Array(await e.arrayBuffer()),r="";for(let n=0;n<t.length;n+=Ex)r+=String.fromCharCode(...t.subarray(n,n+Ex));return `data:${e.type||"application/octet-stream"};base64,${btoa(r)}`}async function kt(e){let t={...e};if(e.imageSettings?.src)try{let l=await J7(e.imageSettings.src);t={...e,imageSettings:{...e.imageSettings,src:l}};}catch{let{imageSettings:l,...f}=e;t=f;}let{hideLogo:r,url:n,logo:o,scale:i,frameLabelMarkers:s,partMarkers:a,...c}=t,u=$0({...c,templateId:t.templateId,customTemplate:t.customTemplate});return `data:image/svg+xml,${encodeURIComponent(u)}`}var J7=e=>new Promise((t,r)=>{if(e.startsWith("data:")){t(e);return}let n=new Image;n.crossOrigin="anonymous",n.onload=()=>{try{let o=document.createElement("canvas");o.width=n.naturalWidth||n.width,o.height=n.naturalHeight||n.height;let i=o.getContext("2d");if(!i){r(new Error("Could not get canvas context"));return}i.drawImage(n,0,0);let s=o.toDataURL("image/png");o.remove(),t(s);}catch(o){r(new Error(`Failed to convert image to base64: ${o}`));}},n.onerror=()=>{r(new Error(`Could not load image from ${e.slice(0,100)}... Check CORS settings or use a data URL.`));},n.src=e;});async function zo(e,t,r){let n=await kt(e),o=decodeURIComponent(n.replace("data:image/svg+xml,","")),i;try{let s=new TextEncoder().encode(o),a=Array.from(s,u=>String.fromCharCode(u)).join("");i=`data:image/svg+xml;base64,${btoa(a)}`;}catch(s){throw new Error(`Failed to encode SVG for canvas conversion: ${s}`)}return new Promise((s,a)=>{let c=document.createElement("canvas"),u=c.getContext("2d");if(!u){a(new Error("Could not get canvas context"));return}let l=new Image,{width:f,height:p}=Jt(e.size||ve,e.frame);c.width=Math.round(f),c.height=Math.round(p);let m=setTimeout(()=>{c.remove(),a(new Error("SVG load timeout - image may be too large or contain invalid data"));},3e4);l.onload=()=>{clearTimeout(m);try{if(t==="image/jpeg"&&(u.fillStyle="white",u.fillRect(0,0,c.width,c.height)),u.drawImage(l,0,0,c.width,c.height),r)s(c);else if(t==="image/webp")su(c).then(is).then(s,a).finally(()=>c.remove());else {let h=c.toDataURL(t,1);c.remove(),s(h);}}catch(h){clearTimeout(m),c.remove(),a(new Error(`Failed to draw SVG to canvas: ${h}`));}},l.onerror=()=>{clearTimeout(m),c.remove(),a(new Error("Could not load SVG"));},l.src=i;})}var Mx=["gradientUnits","gradientTransform","spreadMethod"],ev={linear:["x1","y1","x2","y2"],radial:["cx","cy","r","fx","fy","fr"]},tv={r:0,g:0,b:0,a:1};function Ix(e,t){for(let r of (e.attrs.style??"").split(";")){let[n,...o]=r.split(":");if(n?.trim()===t)return o.join(":").trim()}return e.attrs[t]}function k0(e){return e.name==="linearGradient"?"linear":e.name==="radialGradient"?"radial":null}function rv(e){let t=[],r=0;for(let n of e.children){if(n.name!=="stop")continue;let o=(n.attrs.offset??"0").trim(),i=Number.parseFloat(o),s=Number.isFinite(i)?o.endsWith("%")?i/100:i:0;r=Math.max(r,Math.min(Math.max(s,0),1));let a=Ix(n,"stop-color")??"#000000",c=ke(a==="currentColor"?"#000000":a)??tv,u=Number.parseFloat(Ix(n,"stop-opacity")??"1");t.push({offset:r,color:Number.isFinite(u)?{...c,a:c.a*Math.min(Math.max(u,0),1)}:c});}return t}function au(e){let t=new Map,r=o=>{let i=o.attrs.id;k0(o)&&i&&!t.has(i)&&t.set(i,o);for(let s of o.children)r(s);};r(e);let n=new Map;for(let[o,i]of t){let s=k0(i),a={},c=[],u=new Set,l=i;for(;l&&!u.has(l);){u.add(l);let f=k0(l)===s?[...Mx,...ev[s]]:Mx;for(let m of f){let h=l.attrs[m];a[m]===void 0&&h!==void 0&&(a[m]=h);}c.length===0&&(c=rv(l));let p=l.attrs.href??l.attrs["xlink:href"];l=p?.startsWith("#")?t.get(p.slice(1)):void 0;}n.set(o,{kind:s,attrs:a,stops:c});}return n}function A0(e){let t=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=(f,p)=>{t=Math.min(t,f),n=Math.max(n,f),r=Math.min(r,p),o=Math.max(o,p);},s=(f,p,m,h)=>{let d=-f+3*p-3*m+h,g=2*(f-2*p+m),_=p-f;if(Math.abs(d)<1e-12)return Math.abs(g)<1e-12?[]:[-_/g];let y=g*g-4*d*_;if(y<0)return [];let b=Math.sqrt(y);return [(-g+b)/(2*d),(-g-b)/(2*d)]},a=(f,p,m,h,d)=>{let g=1-f;return g*g*g*p+3*g*g*f*m+3*g*f*f*h+f**3*d},c=0,u=0,l=[0,0];for(let f of e)if(f.op==="M"&&(l=[f.x,f.y]),f.op==="M"||f.op==="L")i(f.x,f.y),c=f.x,u=f.y;else if(f.op==="C"){i(f.x,f.y);for(let p of [...s(c,f.x1,f.x2,f.x),...s(u,f.y1,f.y2,f.y)])p>0&&p<1&&i(a(p,c,f.x1,f.x2,f.x),a(p,u,f.y1,f.y2,f.y));c=f.x,u=f.y;}else [c,u]=l;return Number.isFinite(t)?{x:t,y:r,width:n-t,height:o-r}:null}var nv=e=>e[0]*e[3]-e[1]*e[2];function Ar(e){let t=nv(e);if(!Number.isFinite(t)||Math.abs(t)<1e-12)return null;let[r,n,o,i,s,a]=e;return [i/t,-n/t,-o/t,r/t,(o*a-i*s)/t,(n*s-r*a)/t]}function zx(e,t,r){let{kind:n,attrs:o,stops:i}=e,s=i[0],a=i.at(-1);if(!(s&&a)||i.every(w=>w.color.a===0))return null;if(i.length===1)return s.color;let c=o.gradientUnits==="userSpaceOnUse",u=ho;if(!c){let w=A0(t);if(!w||w.width<=0||w.height<=0)return null;u=[w.width,0,0,w.height,w.x,w.y];}let l=Se(u,xt(o.gradientTransform));if(!Ar(l))return a.color;let[f,p]=r,m=Math.sqrt((f*f+p*p)/2),h=(w,x)=>{let P=Number.parseFloat(w);return Number.isFinite(P)?w.trim().endsWith("%")?P/100*(c?x:1):P:null},d=(w,x,P)=>h(o[w]??x,P)??h(x,P)??0;if(n==="linear"){let w=[d("x1","0%",f),d("y1","0%",p),d("x2","100%",f),d("y2","0%",p)],[x,P,C,E]=w;return x===C&&P===E?a.color:{kind:n,coords:w,matrix:l,stops:i}}let g=d("cx","50%",f),_=d("cy","50%",p),y=d("r","50%",m),b=o.fx===void 0?g:d("fx","50%",f),S=o.fy===void 0?_:d("fy","50%",p),v=Math.max(0,d("fr","0%",m));return y<0?null:y===0?a.color:{kind:n,coords:[b,S,v,g,_,y],matrix:l,stops:i}}function cu(e){return e.map(t=>$(t,6)).join(" ")}function ov(e,t){return (t==="cmyk"?wr(e.r,e.g,e.b):[e.r/255,e.g/255,e.b/255]).map(n=>$(n,4)).join(" ")}var Lx=(e,t)=>`<< /FunctionType 2 /Domain [0 1] /C0 [${e}] /C1 [${t}] /N 1 >>`;function iv(e,t){let r=[],n=e.map(a=>fe(a.offset,4)),o=e.map(a=>ov(a.color,t)),i=n[0],s=n.at(-1);if(i>0){let a=o[0];r.push({from:0,to:i,c0:a,c1:a});}for(let a=0;a+1<e.length;a++){let c=n[a],u=n[a+1];u>c&&r.push({from:c,to:u,c0:o[a],c1:o[a+1]});}if(s<1){let a=o.at(-1);r.push({from:s,to:1,c0:a,c1:a});}if(r.length===1){let[a]=r;return Lx(a.c0,a.c1)}return ["<< /FunctionType 3 /Domain [0 1]",`/Functions [${r.map(a=>Lx(a.c0,a.c1)).join(" ")}]`,`/Bounds [${r.slice(1).map(a=>$(a.from,4)).join(" ")}]`,`/Encode [${r.map(()=>"0 1").join(" ")}] >>`].join(" ")}function uu(e,t){return [`<< /ShadingType ${e.kind==="linear"?2:3}`,`/ColorSpace /Device${t==="cmyk"?"CMYK":"RGB"}`,`/Coords [${e.coords.map(r=>$(r,6)).join(" ")}]`,`/Function ${iv(e.stops,t)}`,"/Extend [true true] >>"].join(" ")}function sv(e,t){if(e.op==="Z")return e;if(e.op==="C"){let[o,i]=re(t,e.x1,e.y1),[s,a]=re(t,e.x2,e.y2),[c,u]=re(t,e.x,e.y);return {op:"C",x1:o,y1:i,x2:s,y2:a,x:c,y:u}}let[r,n]=re(t,e.x,e.y);return {op:e.op,x:r,y:n}}var Tx={r:255,g:255,b:255,a:1},av=/^url\(\s*#bg-color-/,lu=/^url\(\s*#([^)\s]+)\s*\)/,cv=new Set(["defs","clipPath","mask","pattern","linearGradient","radialGradient","symbol","title","desc","metadata","style","script","use","foreignObject"]);function ae(e,t){let r=e.attrs.style;if(r)for(let n of r.split(";")){let[o,...i]=n.split(":");if(o?.trim()===t)return i.join(":").trim()}return e.attrs[t]}function ne(e,t,r=0){if(e===void 0||e==="")return r;let n=Number.parseFloat(e);return Number.isNaN(n)?r:e.trim().endsWith("%")?n/100*t:n}function ss(e,t){if((e.name==="linearGradient"||e.name==="radialGradient")&&e.attrs.id){let r=e.children.find(o=>o.name==="stop"),n=r&&(ae(r,"stop-color")??"#000000");n&&t.set(e.attrs.id,n);}for(let r of e.children)ss(r,t);return t}function as(e,t){if(e.name==="image"){let r=e.attrs.href??e.attrs["xlink:href"];r&&t.add(r);}for(let r of e.children)as(r,t);return t}function fu(e){return /^data:image\/png[;,]/i.test(e)?"PNG":/^data:image\/jpe?g[;,]/i.test(e)?"JPEG":null}async function mu(e){return typeof document>"u"||typeof Image>"u"?null:await new Promise(t=>{let r=new Image;r.crossOrigin="anonymous",r.onload=()=>{let n=document.createElement("canvas"),o=Math.max(r.naturalWidth||512,r.naturalHeight||512),i=Math.min(1024/o,4);n.width=Math.round((r.naturalWidth||512)*i),n.height=Math.round((r.naturalHeight||512)*i);let s=n.getContext("2d");if(!s){t(null);return}s.drawImage(r,0,0,n.width,n.height);try{t(n.toDataURL("image/png"));}catch{t(null);}},r.onerror=()=>t(null),r.src=e;})}function Nx(e,t,r){let n={x:ne(e.attrs.x,t[0]),y:ne(e.attrs.y,t[1]),width:ne(e.attrs.width,t[0]),height:ne(e.attrs.height,t[1])};if(n.width<=0||n.height<=0)return null;let o=(e.attrs.preserveAspectRatio??"").trim();if(!o||o.startsWith("none")||!r||!(r.width>0&&r.height>0))return {draw:n,clip:null};let[i="xMidYMid",s="meet"]=o.split(/\s+/),a=s==="slice",c=(a?Math.max:Math.min)(n.width/r.width,n.height/r.height),u=r.width*c,l=r.height*c,f=p=>{let m=p==="x"?i.slice(0,4):i.slice(4);return m.endsWith("Min")?0:m.endsWith("Max")?1:.5};return {draw:{x:n.x+(n.width-u)*f("x"),y:n.y+(n.height-l)*f("y"),width:u,height:l},clip:a?n:null}}function Ox(e,t){e.name==="clipPath"&&e.attrs.id&&t.set(e.attrs.id,e);for(let r of e.children)Ox(r,t);return t}function Fx(e,t){e.name==="pattern"&&e.attrs.id&&t.set(e.attrs.id,e);for(let r of e.children)Fx(r,t);return t}function uv(e,t){let[r,n]=t,o=(i,s)=>ne(e.attrs[i],s);switch(e.name){case "path":return Kt(e.attrs.d??"");case "rect":{let i=e.attrs.rx??e.attrs.ry,s=e.attrs.ry??e.attrs.rx;return Dt(o("x",r),o("y",n),o("width",r),o("height",n),ne(i,r),ne(s,n))}case "circle":{let i=o("r",Math.hypot(r,n)/Math.SQRT2);return Ft(o("cx",r),o("cy",n),i,i)}case "ellipse":return Ft(o("cx",r),o("cy",n),o("rx",r),o("ry",n));default:return []}}var To=class{gradients;shadings;clipPaths=new Map;patterns=new Map;backdrop=Tx;paper=Tx;background=null;onPaper=false;inConic=false;constructor(t,r=null){this.gradients=t,this.shadings=r;}resolveColor(t){if(!t||t==="none")return null;let r=lu.exec(t);if(r)return this.resolveColor(this.gradients.get(r[1]));let n=ke(t==="currentColor"?"#000000":t);return n&&n.a>0?n:null}shadedGradient(t){let r=t?lu.exec(t)?.[1]:void 0;return r?this.shadings?.get(r):void 0}resolveFill(t,r,n,o=1){if(o<=0)return null;let i=this.patternOf(t);if(i)return {pattern:i,alpha:o};let s=this.shadedGradient(t);if(s){let u=zx(s,r,n);if(!u)return null;if("coords"in u)return {gradient:u,alpha:o};let l={...u,a:u.a*o};return l.a>0?{color:l}:null}let a=this.resolveColor(t);if(!a)return null;let c={...a,a:a.a*o};return c.a>0?{color:c}:null}patternOf(t){let r=t?lu.exec(t)?.[1]:void 0,n=r?this.patterns.get(r):void 0;if(!(n?.attrs.patternUnits!=="userSpaceOnUse"||(n.attrs.patternContentUnits??"userSpaceOnUse")!=="userSpaceOnUse"||n.attrs.viewBox))return n}flatten(t){if(t.a>=1)return t;let r=this.background,n=r!==null&&Math.abs(r.r-t.r)<.5&&Math.abs(r.g-t.g)<.5&&Math.abs(r.b-t.b)<.5&&Math.abs(r.a-t.a)<.002;return tu(t,this.onPaper||n?this.paper:this.backdrop)}paintPattern(t,r,n,o){let i=A0(t);if(!i||i.width<=0||i.height<=0)return true;let[s,a]=r.viewport,c=ne(n.attrs.x,s),u=ne(n.attrs.y,a),l=ne(n.attrs.width,s),f=ne(n.attrs.height,a);if(!(l>0&&f>0))return true;let p=xt(n.attrs.patternTransform),m=Ar(p);if(!m)return true;if(!this.beginClip(t,r.matrix,r.fillRule==="evenodd"))return false;let h=this.inConic;this.inConic=n.attrs["data-qrdx-conic"]!==void 0;try{let d=[re(m,i.x,i.y),re(m,i.x+i.width,i.y),re(m,i.x,i.y+i.height),re(m,i.x+i.width,i.y+i.height)],g=d.map(([z])=>z),_=d.map(([,z])=>z),y=Math.min(...g),b=Math.max(...g),S=Math.min(..._),v=Math.max(..._),w=Math.floor((y-c)/l),x=Math.ceil((b-c)/l)-1,P=Math.floor((S-u)/f),C=Math.ceil((v-u)/f)-1,E=(x-w+1)*(C-P+1);if(E>4096)return !0;let I=(n.attrs["data-qrdx-conic"]??"").trim().split(/\s+/).map(Number),L=Se(r.matrix,p);for(let z=P;z<=C;z++)for(let D=w;D<=x;D++){let B=c+D*l,N=u+z*f,j=Se(L,[1,0,0,1,B,N]),ee={x:y-B,y:S-N,width:b-y,height:v-S},G=I.length===2&&I.every(Number.isFinite)?ux(I[0],I[1],ee):null,K=E>1&&this.beginClip([{op:"M",x:0,y:0},{op:"L",x:l,y:0},{op:"L",x:l,y:f},{op:"L",x:0,y:f},{op:"Z"}],j,!1);try{let pe={matrix:j,viewport:r.viewport,fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start",fillOpacity:1,opacity:o},Ie=($e,Z)=>{for(let Y of $e){if(Y.name==="g"&&!Y.attrs.transform){let J=Number.parseFloat(Y.attrs.opacity??"1");Ie(Y.children,{...Z,opacity:(Z.opacity??1)*(Number.isFinite(J)?J:1)});continue}if(G&&Y.attrs["data-arc"]){let[J,Ue]=Y.attrs["data-arc"].split(/\s+/).map(Number);if(!lx([J,J+Ue],G))continue}this.walk(Y,Z);}};Ie(n.children,pe);}finally{K&&this.endClip();}}}finally{this.inConic=h,this.endClip();}return true}paintBleed(t,r,n,o){if(!this.shadedGradient(n))return false;let[i,s]=this.viewportMatrix({...t,attrs:{...t.attrs,x:"0",y:"0"}},{...r,matrix:Se(r.matrix,xt(t.attrs.transform))}),a=Ar(i);if(!a)return false;let[c,u,l,f]=o,m=[[c,u],[l,u],[l,f],[c,f]].map(([h,d])=>re(a,h,d)).map(([h,d],g)=>({op:g===0?"M":"L",x:h,y:d}));return m.push({op:"Z"}),this.paint(m,{name:"rect",attrs:{},children:[],text:""},{...r,matrix:i,viewport:s,fill:n,fillRule:"nonzero",stroke:"none"}),true}beginClip(t,r,n){return false}endClip(){}clipOf(t,r){let n=ae(t,"clip-path"),o=n?lu.exec(n)?.[1]:void 0,i=o?this.clipPaths.get(o):void 0;if(!i)return null;let s=[],a=false;for(let c of i.children){let u=uv(c,r.viewport);if(u.length===0)continue;let l=xt(c.attrs.transform),f=l[0]===1&&l[1]===0&&l[2]===0&&l[3]===1&&l[4]===0&&l[5]===0;s.push(...f?u:u.map(p=>sv(p,l))),a||=ae(c,"clip-rule")==="evenodd";}return s.length>0?{segments:s,matrix:r.matrix,evenOdd:a}:null}viewportMatrix(t,r){let n=ne(t.attrs.x,r.viewport[0]),o=ne(t.attrs.y,r.viewport[1]),i=ne(t.attrs.width,r.viewport[0],r.viewport[0]),s=ne(t.attrs.height,r.viewport[1],r.viewport[1]),a=Ot(t.attrs.viewBox);if(a.length!==4||!(a[2]&&a[3]))return [Se(r.matrix,[1,0,0,1,n,o]),[i,s]];let[c,u,l,f]=a,p=i/l,m=s/f,h=n,d=o;if((t.attrs.preserveAspectRatio??"").trim()!=="none"){let g=t.attrs.preserveAspectRatio?.includes("slice")?Math.max(p,m):Math.min(p,m);h+=(i-l*g)/2,d+=(s-f*g)/2,p=g,m=g;}return [Se(r.matrix,[p,0,0,m,h-c*p,d-u*m]),[l,f]]}walk(t,r,n=false){if(n&&(this.clipPaths=Ox(t,new Map),this.patterns=Fx(t,new Map)),cv.has(t.name)||ae(t,"display")==="none"||ae(t,"visibility")==="hidden")return;let o=Se(r.matrix,xt(t.attrs.transform)),i=r.viewport;if(t.name==="svg"){let[p,m]=this.viewportMatrix(n?{...t,attrs:{...t.attrs,x:"0",y:"0"}}:t,{...r,matrix:o});o=p,i=m;}let s=ae(t,"font-size"),a=Number.parseFloat(ae(t,"opacity")??"1"),c=ae(t,"fill-opacity"),u=c===void 0?r.fillOpacity??1:Number.parseFloat(c),l={fillOpacity:Number.isFinite(u)?Math.min(Math.max(u,0),1):1,opacity:(r.opacity??1)*(Number.isFinite(a)?Math.min(Math.max(a,0),1):1),matrix:o,viewport:i,fill:ae(t,"fill")??r.fill,fillRule:ae(t,"fill-rule")??r.fillRule,stroke:ae(t,"stroke")??r.stroke,strokeWidth:ae(t,"stroke-width")===void 0?r.strokeWidth:ne(ae(t,"stroke-width"),i[0],1),fontSize:s===void 0?r.fontSize:ne(s,16,16),fontWeight:ae(t,"font-weight")??r.fontWeight,textAnchor:ae(t,"text-anchor")??r.textAnchor},f=this.onPaper;(t.name==="rect"||t.name==="circle"||t.name==="path")&&av.test(ae(t,"fill")??"")&&(this.onPaper=true);try{let p=t.attrs["clip-path"]?this.clipOf(t,l):null;if(p&&this.beginClip(p.segments,p.matrix,p.evenOdd)){try{this.paintNode(t,l);}finally{this.endClip();}return}this.paintNode(t,l);}finally{this.onPaper=f;}}paintNode(t,r){let[n,o]=r.viewport,i=(s,a)=>ne(t.attrs[s],a);switch(t.name){case "path":this.paint(Kt(t.attrs.d??""),t,r);return;case "rect":{let s=t.attrs.rx??t.attrs.ry,a=t.attrs.ry??t.attrs.rx;this.paint(Dt(i("x",n),i("y",o),i("width",n),i("height",o),ne(s,n),ne(a,o)),t,r);return}case "circle":{let s=i("r",Math.hypot(n,o)/Math.SQRT2);this.paint(Ft(i("cx",n),i("cy",o),s,s),t,r);return}case "ellipse":this.paint(Ft(i("cx",n),i("cy",o),i("rx",n),i("ry",o)),t,r);return;case "line":this.paint([{op:"M",x:i("x1",n),y:i("y1",o)},{op:"L",x:i("x2",n),y:i("y2",o)}],t,{...r,fill:"none"});return;case "polygon":case "polyline":{let s=Ot(t.attrs.points),a=[];for(let c=0;c+1<s.length;c+=2)a.push({op:c===0?"M":"L",x:s[c],y:s[c+1]});t.name==="polygon"&&a.length>0&&a.push({op:"Z"}),this.paint(a,t,r);return}case "text":this.text(t,r);return;case "image":this.image(t,r);return;default:for(let s of t.children)this.walk(s,r);}}};var pu=1e3;async function cs(e){let t=await kt(pn({...e,size:e.size??ve},pu));return decodeURIComponent(t.replace("data:image/svg+xml,",""))}function R0(e){if(dt(e.frame)){let t=un(pu,e.frame);return t.squareEdges?t.color:null}return Ze(e.bgColor,ze)}function du(e,t){let r=R0(e);if(!(r&&fo(e.bgColor))||dt(e.frame)||e.templateId||e.customTemplate)return r;let n=br(t)?.children.find(i=>i.name==="rect"),o=n&&ae(n,"fill");return o?.startsWith("url(")?o:r}function hu(e,t){let r={r:255,g:255,b:255,a:1},n=ke(Ze(t.bgColor,ze));e.paper=r,e.background=n&&!fo(t.bgColor)?n:null,e.backdrop=n?tu(n,r):r;}var gu=25.4,Dx=5,Zx=2e3,nr=pu,E0=5,Bx=2,fv=.25*(gu/72);function mv(e,t="mm"){return t==="in"?e*gu:e}function pv(e){let t=ht(e),r=Le.QrCode.encodeText(e.value,qe[t]).size;return r+nt(r,e.margin??Te,e.shape)*2}function yu(e,t){let r=mv(t.size,t.unit);if(!Number.isFinite(r)||r<Dx||r>Zx)throw new Error(`Print size must be between ${Dx} mm and ${Zx/1e3} m`);let n=Math.min(Math.max(t.bleed??0,0),20),o=r/nr,i=dt(e.frame)?un(nr,e.frame):null,s=(i?.width??nr)*o,a=(i?.height??nr)*o,c=t.cropMarks?n+Bx+E0+1:n,u=pv(e);return {codeWidth:r,trimWidth:s,trimHeight:a,bleed:n,pageWidth:s+2*c,pageHeight:a+2*c,trimX:c,trimY:c,moduleSize:r/u,moduleCount:u,maxScanDistance:r*10}}var M0=class e{pdf;internals;names=new Map;constructor(t,r){this.pdf=t,this.internals=r;}static attach(t){let r=t.internal;return typeof t.advancedAPI!="function"||typeof t.addShadingPattern!="function"||typeof r.write!="function"||typeof r.events?.subscribe!="function"?null:new e(t,r)}name(t){let r=this.names.get(t);return r||(this.names.size===0&&this.install(),r=`Sh${this.names.size}`,this.names.set(t,r)),r}install(){this.pdf.advancedAPI(t=>{t.addShadingPattern("qrdx-shadings",{});}),this.internals.events.subscribe("putShadingPatternDict",()=>{for(let[t,r]of this.names)this.internals.write(`/${r} ${t}`);});}},I0=class extends To{pdf;cmyk;images;shadingResources;constructor(t,r,n,o,i){super(n,o?.gradients??null),this.pdf=t,this.cmyk=r,this.images=i,this.shadingResources=o?.resources??null;}setColor(t,r){let n=t==="fill"?this.pdf.setFillColor.bind(this.pdf):t==="draw"?this.pdf.setDrawColor.bind(this.pdf):this.pdf.setTextColor.bind(this.pdf);if(this.cmyk){let[o,i,s,a]=wr(r.r,r.g,r.b);n(o,i,s,a);}else n(Math.round(r.r),Math.round(r.g),Math.round(r.b));}setRegistrationColor(){this.cmyk?this.pdf.setDrawColor(1,1,1,1):this.pdf.setDrawColor(0,0,0);}tracePath(t,r){let n=false;for(let o of t)if(o.op==="M"){let[i,s]=re(r,o.x,o.y);this.pdf.moveTo(i,s),n=true;}else if(o.op==="L"){let[i,s]=re(r,o.x,o.y);n?this.pdf.lineTo(i,s):(this.pdf.moveTo(i,s),n=true);}else if(o.op==="C"){let[i,s]=re(r,o.x1,o.y1),[a,c]=re(r,o.x2,o.y2),[u,l]=re(r,o.x,o.y);this.pdf.curveTo(i,s,a,c,u,l);}else n&&this.pdf.close();}shade(t,r,n){let o=this.pdf.internal,i=o.scaleFactor,s=[i,0,0,-i,0,o.pageSize.getHeight()*i],a=Se(s,Se(r.matrix,n.matrix));if(!(this.shadingResources&&Ar(a)))return;let c=this.shadingResources.name(uu(n,this.cmyk?"cmyk":"rgb"));this.pdf.saveGraphicsState(),this.tracePath(t,r.matrix),this.pdf.clip(r.fillRule==="evenodd"?"evenodd":void 0),this.pdf.discardPath(),o.write(`${cu(a)} cm /${c} sh`),this.pdf.restoreGraphicsState();}beginClip(t,r,n){return this.pdf.saveGraphicsState(),this.tracePath(t,r),this.pdf.clip(n?"evenodd":void 0),this.pdf.discardPath(),true}endClip(){this.pdf.restoreGraphicsState();}withAlpha(t,r,n){if(t>=1&&r>=1){n();return}this.pdf.saveGraphicsState();let o=this.pdf.GState;this.pdf.setGState(new o({opacity:t,"stroke-opacity":r}));try{n();}finally{this.pdf.restoreGraphicsState();}}opaqueGradient(t,r){let n=t.stops[0]?.color.a??1;return t.stops.every(i=>Math.abs(i.color.a-n)<.002)?{gradient:{...t,stops:t.stops.map(i=>({...i,color:{...i.color,a:1}}))},alpha:n*r}:{gradient:{...t,stops:t.stops.map(i=>({...i,color:this.flatten({...i.color,a:i.color.a*r})}))},alpha:1}}paint(t,r,n){if(t.length===0)return;let o=n.opacity??1;if(o<=0)return;let i=this.resolveFill(n.fill,t,n.viewport,(n.fillOpacity??1)*o);if(i&&"pattern"in i)this.paintPattern(t,n,i.pattern,i.alpha);else if(i&&"gradient"in i){let{gradient:f,alpha:p}=this.opaqueGradient(i.gradient,i.alpha);this.withAlpha(p,1,()=>this.shade(t,n,f));}let s=i&&"color"in i?i.color:null,a=s&&this.inConic?this.flatten(s):s,c=n.strokeWidth>0?this.resolveColor(n.stroke):null,u=c&&{...c,a:c.a*o};if(!(a||u))return;let l=n.fillRule==="evenodd";this.withAlpha(a?.a??1,u?.a??1,()=>{a&&this.setColor("fill",a),u&&(this.setColor("draw",u),this.pdf.setLineWidth(n.strokeWidth*go(n.matrix))),this.tracePath(t,n.matrix),a&&u?l?this.pdf.fillStrokeEvenOdd():this.pdf.fillStroke():a?l?this.pdf.fillEvenOdd():this.pdf.fill():this.pdf.stroke();});}text(t,r){let n=t.text.replace(/\s+/g," ").trim(),o=this.resolveColor(r.fill);if(!(n&&o))return;let i=go(r.matrix),[s,a]=re(r.matrix,ne(t.attrs.x,r.viewport[0]),ne(t.attrs.y,r.viewport[1])),c=r.fontWeight==="bold"||Number.parseInt(r.fontWeight,10)>=600;this.pdf.setFont("helvetica",c?"bold":"normal");let u=r.fontSize*i*(72/gu);this.pdf.setFontSize(u);let l=Number.parseFloat(t.attrs["data-max-width"]??"");if(l>0){let m=l*i,h=this.pdf.getTextWidth(n);h>m&&(u*=m/h,this.pdf.setFontSize(u));}this.setColor("text",o);let f=Math.atan2(r.matrix[1],r.matrix[0]);if(Math.abs(f)>2e-4){let m=r.textAnchor==="middle"?this.pdf.getTextWidth(n)/2:r.textAnchor==="end"?this.pdf.getTextWidth(n):0;this.pdf.text(n,s-m*Math.cos(f),a-m*Math.sin(f),{angle:-f*180/Math.PI,baseline:"alphabetic"});return}let p=r.textAnchor==="middle"?"center":r.textAnchor==="end"?"right":"left";this.pdf.text(n,s,a,{align:p,baseline:"alphabetic"});}aliases=new Map;image(t,r){let n=t.attrs.href??t.attrs["xlink:href"],o=n&&(fu(n)?n:this.images.get(n)),i=o&&fu(o);if(!(o&&i))return;let s=this.aliases.get(o);s||(s=`qrdx-image-${this.aliases.size}`,this.aliases.set(o,s));let a=null;if(t.attrs.preserveAspectRatio)try{let g=this.pdf.getImageProperties(o);a={width:g.width,height:g.height};}catch{a=null;}let c=Nx(t,r.viewport,a);if(!c)return;let{draw:u,clip:l}=c,[f,p]=re(r.matrix,u.x,u.y),[m,h]=re(r.matrix,u.x+u.width,u.y+u.height),d=l!==null&&this.beginClip([{op:"M",x:l.x,y:l.y},{op:"L",x:l.x+l.width,y:l.y},{op:"L",x:l.x+l.width,y:l.y+l.height},{op:"L",x:l.x,y:l.y+l.height},{op:"Z"}],r.matrix,false);try{this.withAlpha(r.opacity??1,1,()=>{this.pdf.addImage(o,i,Math.min(f,m),Math.min(p,h),Math.abs(m-f),Math.abs(h-p),s);});}finally{d&&this.endClip();}}};function dv(e,t,r){let{trimX:n,trimY:o,trimWidth:i,trimHeight:s,bleed:a}=r,c=a+Bx,u=n,l=n+i,f=o,p=o+s;t.setRegistrationColor(),e.setLineWidth(fv);for(let m of [u,l]){let h=m===u?-1:1;for(let d of [f,p]){let g=d===f?-1:1;e.line(m+h*c,d,m+h*(c+E0),d),e.line(m,d+g*c,m,d+g*(c+E0));}}}async function hv(e,t){return (await Ux(e,t)).output("dataurlstring")}async function hM(e,t){return (await Ux(e,t)).output("arraybuffer")}async function Ux(e,t){let r=yu(e,t),n;try{({jsPDF:n}=await import('jspdf'));}catch(_){throw new Error(`PDF export needs the optional "jspdf" package. Install it with \`npm install jspdf\`. (${_})`)}let o=await cs(e),i=br(o);if(!i)throw new Error("Failed to render the QR code for printing");let s=new Map;for(let _ of as(i,new Set))if(!fu(_)){let y=await mu(_);y&&s.set(_,y);}let a=new n({orientation:r.pageWidth>r.pageHeight?"landscape":"portrait",unit:"mm",format:[r.pageWidth,r.pageHeight],compress:true,floatPrecision:3});a.setProperties({title:"QR code",creator:"qrdx"});let c=au(i),u=c.size>0?M0.attach(a):null,l=new I0(a,t.colorMode==="cmyk",ss(i,new Map),u?{gradients:c,resources:u}:null,s);hu(l,e);let f=r.codeWidth/nr,p=ne(i.attrs.width,nr,nr),m=ne(i.attrs.height,nr,nr),h={matrix:Se([1,0,0,1,r.trimX,r.trimY],[f,0,0,f,0,0]),viewport:[p,m],fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start"},d=r.bleed>0?du(e,o):null,g=[r.trimX-r.bleed,r.trimY-r.bleed,r.trimX+r.trimWidth+r.bleed,r.trimY+r.trimHeight+r.bleed];if(!(d&&l.paintBleed(i,h,d,g))){let _=d?l.resolveColor(d):null;_&&(l.setColor("fill",_),a.rect(r.trimX-r.bleed,r.trimY-r.bleed,r.trimWidth+2*r.bleed,r.trimHeight+2*r.bleed,"F"));}return l.walk(i,h,true),t.cropMarks&&dv(a,l,r),a}async function gv(e,t){let r=yu(e,{size:t.size,unit:t.unit}),n=await cs(e),o=t.unit??"mm",i=c=>`${$(o==="in"?c/gu:c)}${o}`,s=/^<svg\b[^>]*>/.exec(n)?.[0];if(!s)throw new Error("Failed to render the QR code for printing");return `<?xml version="1.0" encoding="UTF-8"?>
|
|
63
|
+
${s.replace(/\swidth="[^"]*"/,` width="${i(r.trimWidth)}"`).replace(/\sheight="[^"]*"/,` height="${i(r.trimHeight)}"`)}${n.slice(s.length)}`}async function gM(e,t){let r=await hv(e,t);Gt(r,t.filename??"qr-code-print.pdf");}async function yM(e,t){let r=await gv(e,t);Gt(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`,t.filename??"qr-code-print.svg");}var yv=[137,80,78,71,13,10,26,10];async function Qx(e,t){let r=new Blob([e]).stream().pipeThrough(t);return new Uint8Array(await new Response(r).arrayBuffer())}async function Vx(e){return typeof CompressionStream>"u"?null:await Qx(e,new CompressionStream("deflate"))}async function _v(e){if(typeof DecompressionStream>"u")return null;try{return await Qx(e,new DecompressionStream("deflate"))}catch{return null}}var L0=(e,t)=>e[t]*2**24+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]>>>0,Gx={0:1,2:3,3:1,4:2,6:4};function bv(e,t,r){let n=e+t-r,o=Math.abs(n-e),i=Math.abs(n-t),s=Math.abs(n-r);return o<=i&&o<=s?e:i<=s?t:r}async function z0(e){if(yv.some((d,g)=>e[g]!==d))return null;let t=8,r=0,n=0,o=-1,i=null,s=null,a=[];for(;t+8<=e.length;){let d=L0(e,t),g=String.fromCharCode(...e.subarray(t+4,t+8)),_=e.subarray(t+8,t+8+d);if(t+=12+d,g==="IHDR"){r=L0(_,0),n=L0(_,4);let y=_[8];o=_[9];let b=_[12];if(y!==8||b!==0||!(o in Gx))return null}else if(g==="PLTE")i=_;else if(g==="tRNS")s=_;else if(g==="IDAT")a.push(_);else if(g==="IEND")break}if(!(r&&n)||r*n>4096*4096)return null;let c=new Uint8Array(a.reduce((d,g)=>d+g.length,0)),u=0;for(let d of a)c.set(d,u),u+=d.length;let l=await _v(c),f=Gx[o],p=r*f;if(!l||l.length<n*(p+1))return null;let m=new Uint8Array(n*p);for(let d=0;d<n;d++){let g=l[d*(p+1)],_=l.subarray(d*(p+1)+1,(d+1)*(p+1)),y=d*p;for(let b=0;b<p;b++){let S=b>=f?m[y+b-f]:0,v=d>0?m[y-p+b]:0,w=d>0&&b>=f?m[y-p+b-f]:0,x=_[b],P=0;g===1?P=S:g===2?P=v:g===3?P=S+v>>1:g===4&&(P=bv(S,v,w)),m[y+b]=x+P&255;}}let h=new Uint8Array(r*n*4);for(let d=0;d<r*n;d++){let g=d*4,_=d*f;if(o===3){let y=m[_];h[g]=i?.[y*3]??0,h[g+1]=i?.[y*3+1]??0,h[g+2]=i?.[y*3+2]??0,h[g+3]=s?.[y]??255;}else if(o===0||o===4){let y=m[_];h[g]=y,h[g+1]=y,h[g+2]=y,h[g+3]=o===4?m[_+1]:255;}else h[g]=m[_],h[g+1]=m[_+1],h[g+2]=m[_+2],h[g+3]=o===6?m[_+3]:255;}return {width:r,height:n,data:h}}var xv=25.4,jx=72/xv,$v=50;function wv(e){let t=/^data:[^,]*?(;base64)?,(.*)$/s.exec(e);if(!t)return null;try{let r=t[1]?atob(t[2]):decodeURIComponent(t[2]),n=new Uint8Array(r.length);for(let o=0;o<r.length;o++)n[o]=r.charCodeAt(o)&255;return n}catch{return null}}function Sv(e){if(e[0]!==255||e[1]!==216)return null;let t=2;for(;t+9<e.length;){if(e[t]!==255)return null;let r=e[t+1];if(r===216||r>=208&&r<=215){t+=2;continue}let n=e[t+2]<<8|e[t+3];if(r===192||r===193||r===194){let o=e[t+5]<<8|e[t+6],i=e[t+7]<<8|e[t+8],s=e[t+9];return {width:i,height:o,components:s,progressive:r===194}}t+=2+n;}return null}async function vv(e,t){let{width:r,height:n,data:o}=e,i=t?4:3,s=new Uint8Array(r*n*i);for(let c=0;c<r*n;c++){let u=o[c*4+3]/255,l=o[c*4]*u+255*(1-u),f=o[c*4+1]*u+255*(1-u),p=o[c*4+2]*u+255*(1-u);if(t){let[m,h,d,g]=wr(l,f,p);s.set([m*255,h*255,d*255,g*255].map(Math.round),c*i);}else s.set([Math.round(l),Math.round(f),Math.round(p)],c*i);}let a=await Vx(s);return {kind:"raw",width:r,height:n,components:i,bytes:a??s,compressed:!!a}}async function Cv(e,t){let r=e;if(!/^data:image\/(png|jpe?g)[;,]/i.test(r)){let s=await mu(r);if(!s)return null;r=s;}let n=wv(r);if(!n)return null;let o=Sv(n);if(o)return o.components===1||o.components===3?{kind:"jpeg",width:o.width,height:o.height,components:o.components,bytes:n,progressive:o.progressive}:null;let i=await z0(n);return i?await vv(i,t):null}function Pv(e){let t="",r=0,n=o=>{t+=o,r+=o.length,r>=76&&(t+=`
|
|
64
|
+
`,r=0);};for(let o=0;o<e.length;o+=4){let i=Math.min(4,e.length-o),s=0;for(let c=0;c<4;c++)s=s*256+(c<i?e[o+c]:0);if(s===0&&i===4){n("z");continue}let a=[];for(let c=0;c<5;c++)a.unshift(String.fromCharCode(s%85+33)),s=Math.floor(s/85);n(a.slice(0,i+1).join(""));}return `${t}~>`}var kv=`/qrdxdict 40 dict def
|
|
65
|
+
qrdxdict begin
|
|
66
|
+
/m {moveto} bind def
|
|
67
|
+
/l {lineto} bind def
|
|
68
|
+
/c {curveto} bind def
|
|
69
|
+
/h {closepath} bind def
|
|
70
|
+
/n {newpath} bind def
|
|
71
|
+
/f {fill} bind def
|
|
72
|
+
/ef {eofill} bind def
|
|
73
|
+
/s {stroke} bind def
|
|
74
|
+
/w {setlinewidth} bind def
|
|
75
|
+
/rg {setrgbcolor} bind def
|
|
76
|
+
/cmyk {setcmykcolor} bind def
|
|
77
|
+
/latin1 {
|
|
78
|
+
findfont dup length dict begin
|
|
79
|
+
{1 index /FID ne {def} {pop pop} ifelse} forall
|
|
80
|
+
/Encoding ISOLatin1Encoding def
|
|
81
|
+
currentdict end definefont pop
|
|
82
|
+
} bind def
|
|
83
|
+
/QRDX-Regular /Helvetica latin1
|
|
84
|
+
/QRDX-Bold /Helvetica-Bold latin1
|
|
85
|
+
end`;function T0(e){let t="(";for(let r of e){let n=r.codePointAt(0)??63;r==="("||r===")"||r==="\\"?t+=`\\${r}`:n>=32&&n<127?t+=r:n>=160&&n<=255?t+=`\\${n.toString(8).padStart(3,"0")}`:t+="?";}return `${t})`}var N0=class extends To{out=[];shadingNames=new Map;cmyk;images;usesLevel3=false;constructor(t,r,n,o){super(r,n),this.cmyk=t,this.images=o;}color(t){if(this.cmyk){let[r,n,o,i]=wr(t.r,t.g,t.b);return `${$(r)} ${$(n)} ${$(o)} ${$(i)} cmyk`}return `${$(t.r/255)} ${$(t.g/255)} ${$(t.b/255)} rg`}tracePath(t,r){let n=["n"],o=false;for(let i of t)if(i.op==="M"||i.op==="L"&&!o){let[s,a]=re(r,i.x,i.y);n.push(`${$(s)} ${$(a)} m`),o=true;}else if(i.op==="L"){let[s,a]=re(r,i.x,i.y);n.push(`${$(s)} ${$(a)} l`);}else if(i.op==="C"){if(!o)continue;let[s,a]=re(r,i.x1,i.y1),[c,u]=re(r,i.x2,i.y2),[l,f]=re(r,i.x,i.y);n.push(`${$(s)} ${$(a)} ${$(c)} ${$(u)} ${$(l)} ${$(f)} c`);}else o&&n.push("h");return n.join(" ")}beginClip(t,r,n){return this.out.push(`gsave ${this.tracePath(t,r)} ${n?"eoclip":"clip"} n`),true}endClip(){this.out.push("grestore");}rect(t,r,n,o,i){this.out.push(`${this.color(t)} n ${$(r)} ${$(n)} m ${$(r+o)} ${$(n)} l ${$(r+o)} ${$(n+i)} l ${$(r)} ${$(n+i)} l h f`);}shade(t,r,n){let o=Se(r.matrix,n.matrix);if(!Ar(o))return;let i=uu(n,this.cmyk?"cmyk":"rgb"),s=this.shadingNames.get(i);s||(s=`Sh${this.shadingNames.size}`,this.shadingNames.set(i,s)),this.usesLevel3=true;let a=r.fillRule==="evenodd"?"eoclip":"clip";this.out.push(`gsave ${this.tracePath(t,r.matrix)} ${a} n [${cu(o)}] concat ${s} shfill grestore`);}paint(t,r,n){if(t.length===0)return;let o=n.opacity??1;if(o<=0)return;let i=this.resolveFill(n.fill,t,n.viewport,(n.fillOpacity??1)*o);i&&"pattern"in i?this.paintPattern(t,n,i.pattern,i.alpha):i&&"gradient"in i&&this.shade(t,n,{...i.gradient,stops:i.gradient.stops.map(f=>({...f,color:this.flatten({...f.color,a:f.color.a*i.alpha})}))});let s=i&&"color"in i?this.flatten(i.color):null,a=n.strokeWidth>0?this.resolveColor(n.stroke):null,c=a&&this.flatten({...a,a:a.a*o});if(!(s||c))return;let u=this.tracePath(t,n.matrix),l=n.fillRule==="evenodd"?"ef":"f";s&&c?this.out.push(`gsave ${this.color(s)} ${u} ${l} grestore`):s&&this.out.push(`${this.color(s)} ${u} ${l}`),c&&this.out.push(`${this.color(c)} ${$(n.strokeWidth*go(n.matrix))} w ${u} s`);}text(t,r){let n=t.text.replace(/\s+/g," ").trim(),o=this.resolveColor(r.fill);if(!(n&&o))return;let i=go(r.matrix),[s,a]=re(r.matrix,ne(t.attrs.x,r.viewport[0]),ne(t.attrs.y,r.viewport[1])),u=r.fontWeight==="bold"||Number.parseInt(r.fontWeight,10)>=600?"/QRDX-Bold":"/QRDX-Regular",l=$(r.fontSize*i),f=Number.parseFloat(t.attrs["data-max-width"]??""),p=f>0?` dup stringwidth pop dup ${$(f*i)} gt {${$(f*i)} exch div ${l} mul ${u} findfont exch scalefont setfont} {pop} ifelse`:"",m=r.textAnchor==="middle"?" dup stringwidth pop 2 div neg 0 rmoveto":r.textAnchor==="end"?" dup stringwidth pop neg 0 rmoveto":"",h=Math.atan2(r.matrix[1],r.matrix[0])*180/Math.PI;if(Math.abs(h)>.01){this.out.push(`gsave ${this.color(o)} ${u} findfont ${l} scalefont setfont ${$(s)} ${$(a)} translate ${$(h)} rotate ${T0(n)}${p} 0 0 moveto${m} show grestore`);return}this.out.push(`gsave ${this.color(o)} ${u} findfont ${l} scalefont setfont ${T0(n)}${p} ${$(s)} ${$(a)} moveto${m} show grestore`);}image(t,r){let n=t.attrs.href??t.attrs["xlink:href"],o=n?this.images.get(n):void 0;if(!o)return;let i=ne(t.attrs.x,r.viewport[0]),s=ne(t.attrs.y,r.viewport[1]),a=ne(t.attrs.width,r.viewport[0]),c=ne(t.attrs.height,r.viewport[1]);if(a<=0||c<=0)return;let[u,l]=re(r.matrix,i,s),[f,p]=re(r.matrix,i+a,s+c),{components:m}=o,h=m===1?"/DeviceGray":m===4?"/DeviceCMYK":"/DeviceRGB",d=Array.from({length:m},()=>"0 1").join(" "),g="/ASCII85Decode filter";o.kind==="jpeg"?(g+=" /DCTDecode filter",o.progressive&&(this.usesLevel3=true)):o.compressed&&(g+=" /FlateDecode filter",this.usesLevel3=true),this.out.push(["gsave",`${$(Math.min(u,f))} ${$(Math.min(l,p))} translate ${$(Math.abs(f-u))} ${$(Math.abs(p-l))} scale`,`${h} setcolorspace`,`<< /ImageType 1 /Width ${o.width} /Height ${o.height} /BitsPerComponent 8 /Decode [${d}] /ImageMatrix [${o.width} 0 0 -${o.height} 0 ${o.height}] /DataSource currentfile ${g} >> image`,Pv(o.bytes),"grestore"].join(`
|
|
86
|
+
`));}};async function qx(e,t={}){let r=br(e);if(!r)throw new Error("Could not read the SVG to convert to EPS");let n=ne(r.attrs.width,0,0)||512,o=ne(r.attrs.height,0,0)||n,i=t.width??n;if(!(Number.isFinite(i)&&i>0))throw new Error("EPS width must be a positive number of points");let s=i/n,a=o*s,c=Math.max(0,t.bleed??0),u=i+2*c,l=a+2*c,f=t.colorMode==="cmyk",p=new Map;for(let y of as(r,new Set)){let b=await Cv(y,f);b&&p.set(y,b);}let m=new N0(f,ss(r,new Map),au(r),p);hu(m,{bgColor:t.background??"#ffffff"});let d={matrix:Se([1,0,0,-1,c,l-c],[s,0,0,s,0,0]),viewport:[n,o],fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,fontSize:16,fontWeight:"normal",textAnchor:"start"},g=c>0?t.bleedColor??void 0:void 0;if(!(g&&m.paintBleed(r,d,g,[0,0,u,l]))){let y=g?m.resolveColor(g):null;y&&m.rect(y,0,0,u,l);}m.walk(r,d,true);let _=(t.title??"QR code").replace(/[^\x20-\x7e]/g,"?");return ["%!PS-Adobe-3.0 EPSF-3.0",`%%BoundingBox: 0 0 ${Math.ceil(u)} ${Math.ceil(l)}`,`%%HiResBoundingBox: 0 0 ${$(u)} ${$(l)}`,`%%Title: ${T0(_)}`,"%%Creator: qrdx",`%%LanguageLevel: ${m.usesLevel3?3:2}`,"%%DocumentData: Clean7Bit","%%EndComments","%%BeginProlog",kv,"%%EndProlog","qrdxdict begin",...Array.from(m.shadingNames,([y,b])=>`/${b} ${y} def`),"gsave",...m.out,"grestore","end","showpage","%%Trailer","%%EOF",""].join(`
|
|
87
|
+
`)}var Wx="EPS can't carry image fills: PostScript has no transparency and would repeat the picture for every dot. Download PDF, SVG or PNG instead.";function Hx(e){return [e.bgColor,e.fgColor,e.eyeColor,e.dotColor,...Object.values(e.eyeColors??{}).flatMap(r=>[r?.outer,r?.inner])].some(r=>typeof r=="object"&&r?.type==="image")}async function _u(e,t={}){if(Hx(e))throw new Error(Wx);let r=yu(e,{size:t.sizeMm??$v,unit:"mm",bleed:t.bleedMm}),n=await cs(e);return await qx(n,{width:r.trimWidth*jx,bleed:r.bleed*jx,bleedColor:r.bleed>0?du(e,n):R0(e),colorMode:t.colorMode,background:Ze(e.bgColor,ze)})}function bu(e){return `data:application/postscript;base64,${btoa(e)}`}async function Av(e,t={}){let r=await _u(e,t);Gt(bu(r),t.filename??"qr-code-print.eps");}var O0={png:{mimeType:"image/png",extension:"png",vector:false},jpg:{mimeType:"image/jpeg",extension:"jpg",vector:false},webp:{mimeType:"image/webp",extension:"webp",vector:false},svg:{mimeType:"image/svg+xml",extension:"svg",vector:true},pdf:{mimeType:"application/pdf",extension:"pdf",vector:false},eps:{mimeType:"application/postscript",extension:"eps",vector:true}},FM={small:{width:200,height:200},medium:{width:400,height:400},large:{width:800,height:800},xlarge:{width:1200,height:1200},"2xl":{width:1600,height:1600},"3xl":{width:2e3,height:2e3}};function F0(e,t){return e<50||t<50?{isValid:false,error:"Size must be at least 50x50 pixels"}:e>5e3||t>5e3?{isValid:false,error:"Size must not exceed 5000x5000 pixels"}:e!==t?{isValid:false,error:"Width and height must be equal for QR codes"}:{isValid:true}}function pn(e,t){let{imageSettings:r,size:n}=e;if(!(r&&n)||n===t)return {...e,size:t};let o=t/n;return {...e,size:t,imageSettings:{...r,width:r.width*o,height:r.height*o,...r.x!=null&&{x:r.x*o},...r.y!=null&&{y:r.y*o},...r.padding!=null&&{padding:r.padding*o}}}}function Gt(e,t){let r=document.createElement("a");r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r);}var Xx=e=>(O0[e]??O0.png).mimeType;function Rv(e,t,r){let{extension:n,vector:o}=O0[e];if(o)return `qr-code.${n}`;let{width:i,height:s}=Jt(t.width,r);return `qr-code-${Math.round(i)}x${Math.round(s)}.${n}`}async function Kx(e,t={}){let r=await zo(e,"image/webp",true);try{return await su(r,t)}finally{r.remove();}}var Ev=25.4/72;async function Yx(e){let t=await _u(e,{sizeMm:(e.size??ve)*Ev});return bu(t)}async function Jx(e){let t;try{({jsPDF:t}=await import('jspdf'));}catch(p){throw new Error(`PDF export needs the optional "jspdf" package. Install it with \`npm install jspdf\`. (${p})`)}let r=await kt(e),n=decodeURIComponent(r.replace("data:image/svg+xml,","")),o;try{let p=new TextEncoder().encode(n),m=Array.from(p,d=>String.fromCharCode(d)).join("");o=`data:image/svg+xml;base64,${btoa(m)}`;}catch(p){throw new Error(`Failed to encode SVG for PDF conversion: ${p}`)}let{width:i,height:s}=Jt(e.size||ve,e.frame),a=await new Promise((p,m)=>{let h=new Image,d=document.createElement("canvas");d.width=Math.round(i),d.height=Math.round(s);let g=d.getContext("2d");if(!g){m(new Error("Could not get canvas context"));return}let _=setTimeout(()=>{d.remove(),m(new Error("SVG load timeout - image may be too large or contain invalid data"));},3e4);h.onload=()=>{clearTimeout(_);try{g.drawImage(h,0,0,d.width,d.height),p(d);}catch(y){clearTimeout(_),d.remove(),m(new Error(`Failed to draw image to canvas: ${y}`));}},h.onerror=()=>{clearTimeout(_),d.remove(),m(new Error("Could not load SVG for PDF conversion"));},h.src=o;}),c=a.toDataURL("image/png",1),u=i*.264583,l=s*.264583,f=new t({orientation:u>l?"landscape":"portrait",unit:"mm",format:[u,l]});return f.addImage(c,"PNG",0,0,u,l),a.remove(),f.output("dataurlstring")}async function e$(e,t){let{format:r,size:n,filename:o,quality:i}=t,s=F0(n.width,n.height);if(!s.isValid)throw new Error(s.error);let a=pn(e,n.width),c=o||Rv(r,n,e.frame);try{if(r==="svg"){let u=await kt(a);Gt(u,c);}else if(r==="pdf"){let u=await Jx(a);Gt(u,c);}else if(r==="eps")Gt(await Yx(a),c);else if(r==="webp"){let u=await Kx(a,{quality:i});Gt(await is(u),c);}else {let u=Xx(r),l=await zo(a,u);if(typeof l=="string")Gt(l,c);else throw new Error("Failed to generate image data URL")}}catch(u){throw console.error(`Error downloading ${r.toUpperCase()}:`,u),u}}async function t$(e,t,r,n={}){let o=F0(r.width,r.height);if(!o.isValid)throw new Error(o.error);let i=pn(e,r.width);if(t==="svg")return await kt(i);if(t==="pdf")return await Jx(i);if(t==="eps")return await Yx(i);if(t==="webp")return await is(await Kx(i,n));let s=Xx(t),a=await zo(i,s);if(typeof a=="string")return a;throw new Error("Failed to generate QR code data URL")}async function DM(e,t={width:ve,height:ve}){try{let r=F0(t.width,t.height);if(!r.isValid)throw new Error(r.error);let n=pn(e,t.width),o=zo(n,"image/png",!0).then(i=>new Promise((s,a)=>{let c=i;c.toBlob(u=>{c.remove(),u?s(u):a(new Error("Failed to create blob from canvas"));},"image/png");}));await navigator.clipboard.write([new ClipboardItem({"image/png":o})]);}catch(r){throw console.error("Error copying to clipboard:",r),r}}async function ZM(e){let t=await kt(e);return decodeURIComponent(t.replace("data:image/svg+xml,",""))}var lt={maxBytes:2e5,maxElements:500,maxDepth:16,maxInputSegments:4e3,maxColors:8,artboardSide:1e3,decimals:1,padding:.06},_e=class extends Error{},Mv={script:e=>`Removed ${Me(e,"script")}`,style:e=>`Removed ${Me(e,"style sheet")}: colors set with CSS classes are lost. Export with presentation attributes (Illustrator: Styling \u2192 Presentation Attributes)`,"foreign-object":e=>`Removed ${Me(e,"foreignObject element")}`,image:e=>`Removed ${Me(e,"image")}: frames are vector shapes only`,use:e=>`Removed ${Me(e,"<use> reference")}: ungroup or detach symbols before exporting`,text:e=>`Removed ${Me(e,"text element")}: add text as labels in the frame editor`,effects:e=>`Removed ${Me(e,"filter, mask, clip path or pattern")}`,animation:e=>`Removed ${Me(e,"animation")}`,unknown:e=>`Removed ${Me(e,"unsupported element")}`,"nested-svg":e=>`Removed ${Me(e,"nested <svg>")}: flatten it first`,handlers:e=>`Removed ${Me(e,"event handler attribute")}`,links:e=>`Removed ${Me(e,"link")} (href)`,"external-paint":e=>`Removed ${Me(e,"fill or stroke")} that referenced something outside the file`,gradient:e=>`Flattened ${Me(e,"gradient")} to its first color: add gradients in the frame editor`,opacity:e=>`Made ${Me(e,"semi-transparent shape")} opaque (print files have no transparency)`,"invalid-paint":e=>`${Me(e,"color")} couldn't be read and fell back to the parent color`,stroke:e=>`Removed ${Me(e,"stroke")} on paths, polygons or polylines: outline strokes before exporting (Figma: Outline stroke)`,dash:e=>`Drew ${Me(e,"dashed stroke")} as solid`,clipped:e=>`Cut ${Me(e,"shape")} at the edge of the artboard`,outside:e=>`Removed ${Me(e,"shape")} outside the artboard`,colors:e=>`Merged ${Me(e,"color")} with similar ones (${lt.maxColors} at most)`,"qr-placed":()=>'No QR placeholder found (a rect with id "qr"): the code was centered; place it in the frame editor'};function Me(e,t){return `${e} ${t}${e===1?"":"s"}`}var U0=class{counts=new Map;add(t,r=1){this.counts.set(t,(this.counts.get(t)??0)+r);}list(){return [...this.counts].map(([t,r])=>({code:t,count:r,message:Mv[t](r)}))}},Iv=/^\s*<\?xml\s[^?>]*\?>/,D0=/[A-Za-z_][\w:.-]*/y,Z0=/<\/([A-Za-z_][\w:.-]*)\s*>/y,xu=/\s*/y,Lv=/[A-Za-z_:][\w:.-]*/y,zv=/[^"<]*/y,Tv=/[^'<]*/y;function No(e,t,r){return e.lastIndex=r,e.test(t)?e.lastIndex:r}function r$(e,t){let r=No(xu,e,t),n=No(Lv,e,r);if(r===t||n===r)return -1;let o=No(xu,e,n);if(e[o]!=="=")return -1;let i=No(xu,e,o+1),s=e[i];if(s!=='"'&&s!=="'")return -1;let c=No(s==='"'?zv:Tv,e,i+1);return e[c]===s?c+1:-1}function Nv(e,t){let r=No(xu,e,t);return e[r]===">"?{end:r+1,selfClosing:false}:e.startsWith("/>",r)?{end:r+2,selfClosing:true}:null}function Ov(e){let t=[],r=0,n="",o=0;for(;o<e.length;){let i=e.indexOf("<",o);if(i<0)break;if(o=i,e.startsWith("<!--",o)){let u=e.indexOf("-->",o+4);if(u<0)throw new _e("The SVG has an unclosed comment");o=u+3;continue}if(e.startsWith("<![CDATA[",o)){let u=e.indexOf("]]>",o+9);if(u<0)throw new _e("The SVG has an unclosed CDATA section");o=u+3;continue}if(e.startsWith("<?",o)){let u=e.indexOf("?>",o+2);if(u<0)throw new _e("The SVG has an unclosed declaration");o=u+2;continue}if(e.startsWith("<!",o))throw new _e("DOCTYPE and other declarations are not allowed");if(e[o+1]==="/"){Z0.lastIndex=o;let u=Z0.exec(e);if(!u)throw new _e("The SVG has a malformed closing tag");if(t.pop()!==u[1])throw new _e(`The SVG closes <${u[1]}> out of order`);o=Z0.lastIndex;continue}D0.lastIndex=o+1;let s=D0.exec(e);if(!s)throw new _e("The SVG has a malformed tag");let a=D0.lastIndex;for(let u=r$(e,a);u>=0;u=r$(e,a))a=u;let c=Nv(e,a);if(!c)throw new _e(`The SVG has a malformed <${s[0]}> tag (attributes must be quoted and may not contain "<")`);if(r++,r>lt.maxElements)throw new _e(`The SVG has more than ${lt.maxElements} elements`);if(n||(n=s[0]),!c.selfClosing&&(t.push(s[0]),t.length>lt.maxDepth))throw new _e(`The SVG nests elements more than ${lt.maxDepth} deep`);o=c.end;}if(t.length>0)throw new _e(`The SVG doesn't close <${t.at(-1)}>`);return n}function Fv(e){if(typeof e!="string")throw new _e("Expected SVG markup as a string");let t=new TextEncoder().encode(e).length;if(t>lt.maxBytes)throw new _e(`The SVG is ${Math.ceil(t/1e3)} KB; the limit is ${lt.maxBytes/1e3} KB`);if(/<!(?:DOCTYPE|ENTITY|ATTLIST|ELEMENT|NOTATION)/i.test(e))throw new _e("DOCTYPE and entity declarations are not allowed");let r=e.replace(Iv,"");if(r.includes("<?"))throw new _e("Processing instructions (such as xml-stylesheet) are not allowed");if(Ov(r)!=="svg")throw new _e("The file must start with an <svg> element");return r}var B0=e=>Math.round(Math.min(255,Math.max(0,e))).toString(16).padStart(2,"0");function At(e){let t=e?.replace(/!important/i,"").trim();return t===""||t==="inherit"?void 0:t}function G0(e,t,r,n){let o=e.trim();if(o==="none"||o==="transparent")return null;if(/^url\(/i.test(o)){let s=/^url\(\s*['"]?#([^)'"\s]+)['"]?\s*\)/i.exec(o)?.[1],a=s?r.get(s):void 0;return a?(n.add("gradient"),G0(a,t,r,n)):(n.add("external-paint"),null)}let i=ke(o==="currentColor"?t.color:o);return i?i.a<=0?null:`#${B0(i.r)}${B0(i.g)}${B0(i.b)}`:(n.add("invalid-paint"),null)}function Dv(e){let t=new Map,r=o=>{(o.name==="linearGradient"||o.name==="radialGradient")&&o.attrs.id&&t.set(o.attrs.id,o);for(let i of o.children)r(i);};r(e);let n=new Map;for(let[o,i]of t){let s=i.children.find(c=>c.name==="stop");if(!s){let c=(i.attrs.href??i.attrs["xlink:href"])?.match(/^#(.+)$/)?.[1];s=c?t.get(c)?.children.find(u=>u.name==="stop"):void 0;}let a=s&&At(ae(s,"stop-color"));a&&n.set(o,a);}return n}function n$(e,t){return e.map(r=>{if(r.op==="Z")return r;if(r.op==="C"){let[i,s]=re(t,r.x1,r.y1),[a,c]=re(t,r.x2,r.y2),[u,l]=re(t,r.x,r.y);return {op:"C",x1:i,y1:s,x2:a,y2:c,x:u,y:l}}let[n,o]=re(t,r.x,r.y);return {op:r.op,x:n,y:o}})}function Zv(e){let t=0;return e.forEach(([r,n],o)=>{let[i,s]=e[(o+1)%e.length];t+=r*s-i*n;}),t/2}function V0(e){return e.length<3?[]:[...e.map(([t,r],n)=>({op:n===0?"M":"L",x:t,y:r})),{op:"Z"}]}var Rr=e=>Number.isFinite(e);function Pe(e,t,r=0){let n=Number.parseFloat(e.attrs[t]??"");return Rr(n)?n:r}function o$(e){switch(e.name){case "path":return Kt(e.attrs.d??"");case "rect":{let t=e.attrs.rx??e.attrs.ry,r=e.attrs.ry??e.attrs.rx;return Dt(Pe(e,"x"),Pe(e,"y"),Pe(e,"width"),Pe(e,"height"),Number.parseFloat(t??"0")||0,Number.parseFloat(r??"0")||0)}case "circle":{let t=Pe(e,"r");return Ft(Pe(e,"cx"),Pe(e,"cy"),t,t)}case "ellipse":return Ft(Pe(e,"cx"),Pe(e,"cy"),Pe(e,"rx"),Pe(e,"ry"));case "polygon":case "polyline":{let t=Ot(e.attrs.points),r=[];for(let n=0;n+1<t.length;n+=2)r.push([t[n],t[n+1]]);return V0(r)}default:return []}}function Bv(e,t){let r=t/2;switch(e.name){case "rect":{let n=Pe(e,"x"),o=Pe(e,"y"),i=Pe(e,"width"),s=Pe(e,"height"),a=Number.parseFloat(e.attrs.rx??e.attrs.ry??"0")||0,c=Dt(n-r,o-r,i+t,s+t,a>0?a+r:0,a>0?a+r:0);if(i<=t||s<=t)return c;let u=Math.max(a-r,0);return [...c,...Dt(n+r,o+r,i-t,s-t,u,u)]}case "circle":case "ellipse":{let n=Pe(e,"cx"),o=Pe(e,"cy"),i=e.name==="circle"?Pe(e,"r"):Pe(e,"rx"),s=e.name==="circle"?Pe(e,"r"):Pe(e,"ry"),a=Ft(n,o,i+r,s+r);return i<=r||s<=r?a:[...a,...Ft(n,o,i-r,s-r)]}case "line":{let[n,o,i,s]=["x1","y1","x2","y2"].map(f=>Pe(e,f)),a=Math.hypot(i-n,s-o);if(a===0)return [];let c=-(s-o)/a*r,u=(i-n)/a*r,l=[[n+c,o+u],[i+c,s+u],[i-c,s-u],[n-c,o-u]];return V0(Zv(l)<0?l.reverse():l)}default:return null}}var Uv=new Set(["path","rect","circle","ellipse","polygon","polyline","line"]),Gv=new Set(["defs","linearGradient","radialGradient","stop","title","desc","metadata"]),Qv={script:"script",style:"style",foreignObject:"foreign-object",image:"image",feImage:"image",use:"use",text:"text",tspan:"text",textPath:"text",filter:"effects",mask:"effects",clipPath:"effects",pattern:"effects",marker:"effects",symbol:"effects",animate:"animation",animateMotion:"animation",animateTransform:"animation",set:"animation"},Vv=/^(?:qrdx[-_ ]?)?qr(?:[-_ ]?code)?$/i;function s$(e,t){for(let r of Object.keys(e.attrs)){let n=r.toLowerCase();n.startsWith("on")?t.add("handlers"):n==="href"||n==="xlink:href"?e.name!=="linearGradient"&&e.name!=="radialGradient"&&t.add("links"):(n==="filter"||n==="mask"||n==="clip-path")&&t.add("effects");}}function a$(e,t,r,n,o){if(s$(e,n),At(ae(e,"display"))==="none"||At(ae(e,"visibility"))==="hidden")return;let i=Number.parseFloat(ae(e,"opacity")??"1"),s=At(ae(e,"fill-rule")),a=Number.parseFloat(At(ae(e,"stroke-width"))??""),c={matrix:Se(t.matrix,xt(e.attrs.transform)),fill:At(ae(e,"fill"))??t.fill,fillRule:s==="evenodd"||s==="nonzero"?s:t.fillRule,stroke:At(ae(e,"stroke"))??t.stroke,strokeWidth:Rr(a)&&a>=0?a:t.strokeWidth,color:At(ae(e,"color"))??t.color,opacity:t.opacity*(Rr(i)?i:1)};for(let u of e.children){if(Gv.has(u.name))continue;let l=Qv[u.name];if(l){n.add(l);continue}if(u.name==="svg"){n.add("nested-svg");continue}if(u.name==="g"||u.name==="a"){a$(u,c,r,n,o);continue}if(!Uv.has(u.name)){n.add("unknown");continue}jv(u,c,r,n,o);}}function jv(e,t,r,n,o){if(s$(e,n),At(ae(e,"display"))==="none"||At(ae(e,"visibility"))==="hidden")return;let i=Se(t.matrix,xt(e.attrs.transform));if(e.name==="rect"&&Vv.test(e.attrs.id??"")&&!o.qrBox){o.qrBox=en(n$(o$(e),i));return}let s=g=>At(ae(e,g)),a=t.opacity*Number.parseFloat(s("opacity")??"1"),c=Number.parseFloat(s("fill-opacity")??"1"),u=Number.parseFloat(s("stroke-opacity")??"1"),l=s("fill-rule"),f={...t,fill:s("fill")??t.fill,fillRule:l==="evenodd"||l==="nonzero"?l:t.fillRule,stroke:s("stroke")??t.stroke,color:s("color")??t.color},p=Number.parseFloat(s("stroke-width")??""),m=Rr(p)&&p>=0?p:t.strokeWidth,h=(g,_,y)=>{if(g.length!==0){if(o.segments+=g.length,o.segments>lt.maxInputSegments)throw new _e(`The SVG has more than ${lt.maxInputSegments} path segments; simplify it`);o.shapes.push({segments:n$(g,i),fill:_,fillRule:y});}},d=g=>{let _=(Rr(a)?a:1)*(Rr(g)?g:1);return _<=0?false:(_<1&&n.add("opacity"),true)};if(e.name!=="line"){let g=G0(f.fill,f,r,n);g&&d(c)&&h(o$(e),g,f.fillRule);}if(m>0&&f.stroke!=="none"){let g=G0(f.stroke,f,r,n);if(g&&d(u)){let _=Bv(e,m);_?((s("stroke-dasharray")??"none")!=="none"&&n.add("dash"),h(_,g,e.name==="line"?"nonzero":"evenodd")):n.add("stroke");}}}function qv(e,t){let r=u=>{let l=10**t;return Math.round(u*l)/l+0},n=u=>$(u,t),o="",i=0,s=0,a=0,c=0;for(let u of e){if(u.op==="Z"){o+="z",i=a,s=c;continue}let l=r(u.x),f=r(u.y);if(u.op==="M")o+=`m${n(l-i)} ${n(f-s)}`,a=l,c=f;else if(u.op==="L"){if(l===i&&f===s)continue;o+=f===s?`h${n(l-i)}`:l===i?`v${n(f-s)}`:`l${n(l-i)} ${n(f-s)}`;}else o+=`c${n(r(u.x1)-i)} ${n(r(u.y1)-s)} ${n(r(u.x2)-i)} ${n(r(u.y2)-s)} ${n(l-i)} ${n(f-s)}`;i=l,s=f;}return o}var Wv=(e,t)=>e.x0<t.x1&&t.x0<e.x1&&e.y0<t.y1&&t.y0<e.y1;function Hv(e){let t=[];for(let r of e){let n=en(r.segments);if(!n)continue;let o=t.at(-1);o&&o.shape.fill===r.fill&&o.shape.fillRule===r.fillRule&&!o.boxes.some(i=>Wv(i,n))?(o.shape={...o.shape,segments:[...o.shape.segments,...r.segments]},o.boxes.push(n)):t.push({shape:r,boxes:[n]});}return t.map(r=>r.shape)}var Q0=e=>[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)];function Xv(e,t,r){let n=new Map;for(let s of e)n.set(s.fill,(n.get(s.fill)??0)+1);let o=new Map([...n.keys()].map(s=>[s,s])),i=0;for(;n.size>t;){let s=[...n.keys()],a=[s[0],s[1]],c=Number.POSITIVE_INFINITY;for(let m=0;m<s.length;m++)for(let h=m+1;h<s.length;h++){let d=Q0(s[m]),g=Q0(s[h]),_=Math.hypot(d[0]-g[0],d[1]-g[1],d[2]-g[2]);_<c&&(c=_,a=[s[m],s[h]]);}let[u,l]=a,[f,p]=(n.get(u)??0)>=(n.get(l)??0)?[u,l]:[l,u];n.set(f,(n.get(f)??0)+(n.get(p)??0)),n.delete(p);for(let[m,h]of o)h===p&&o.set(m,f);i++;}return i>0&&r.add("colors",i),o}var i$=e=>{let[t,r,n]=Q0(e);return .2126*t+.7152*r+.0722*n>235};function Kv(e,t={}){let r=new U0;try{let n=Fv(e),o=br(n);if(!o)throw new _e("No <svg> element found");let i=Ot(o.attrs.viewBox),[s,a,c,u]=[0,0,0,0];if(i.length===4&&i[2]>0&&i[3]>0?[s,a,c,u]=i:(c=Pe(o,"width"),u=Pe(o,"height")),!(Rr(c)&&Rr(u)&&c>0&&u>0))throw new _e("The SVG needs a viewBox (or a width and height)");let f=lt.artboardSide/Math.max(c,u),p=Math.round(c*f*10)/10,m=Math.round(u*f*10)/10;if(Math.min(p,m)<we.minArtboard)throw new _e("The artboard is too narrow: its sides may differ by 20 times at most");let h=[f,0,0,f,-s*f,-a*f],d={shapes:[],qrBox:null,segments:0};a$(o,{matrix:h,fill:"#000000",fillRule:"nonzero",stroke:"none",strokeWidth:1,color:"#000000",opacity:1},Dv(o),r,d);let g={x0:0,y0:0,x1:p,y1:m},_=Math.max(p,m)*.004,y=[],b=0,S=0;for(let Z of d.shapes){let Y=en(Z.segments);if(!Y||Y.x1<=0||Y.y1<=0||Y.x0>=p||Y.y0>=m){b++;continue}if(Y.x0<-_||Y.y0<-_||Y.x1>p+_||Y.y1>m+_){let J=wc(Z.segments,.25).map(Ue=>mo(Ue,g)).filter(Ue=>Ue.length>2);if(J.length===0){b++;continue}S++,y.push({...Z,segments:J.flatMap(Ue=>V0(Ue))});}else y.push(Z);}if(b>0&&r.add("outside",b),S>0&&r.add("clipped",S),y.length===0)throw new _e("The SVG has no filled shapes to use");let v=Xv(y,lt.maxColors,r);for(let Z of y)Z.fill=v.get(Z.fill)??Z.fill;let w=new Map,x=new Map;for(let Z of y){let Y=en(Z.segments);w.set(Z.fill,(w.get(Z.fill)??0)+(Y.x1-Y.x0)*(Y.y1-Y.y0)),x.set(Z.fill,(x.get(Z.fill)??0)+1);}let P=[...w.keys()].sort((Z,Y)=>Number(i$(Z))-Number(i$(Y))||w.get(Y)-w.get(Z)),C=P[0],E=P[1],I=Z=>Z===C?"frame":Z===E?"accent":Z,L=d.qrBox;if(!L&&t.qr){let[Z,Y]=re(h,t.qr.x,t.qr.y);L={x0:Z,y0:Y,x1:Z+t.qr.size*f,y1:Y+t.qr.size*f};}let z,D,B;L?(z=Math.min(L.x1-L.x0,L.y1-L.y0),D=(L.x0+L.x1-z)/2,B=(L.y0+L.y1-z)/2):(r.add("qr-placed"),z=Math.min(p,m)*.6,D=(p-z)/2,B=(m-z)/2);let N=Z=>Math.round(Z*10)/10+0;if(z=Math.floor(z*10)/10,D=N(D),B=N(B),z<Math.min(p,m)*we.minQrShare)throw new _e("The QR area must be at least half the frame's shorter side");let j=Math.min(D,B,p-D-z,m-B-z);if(j<z*we.minPadding-1e-9)throw new _e("Leave room around the QR area: at least 4% of its size on every side, inside the artboard");let ee=Math.min(Math.max(t.padding??lt.padding,we.minPadding),.2),G=Math.floor(Math.min(z*ee,j)*10)/10,K=Hv(y);if(K.length>we.maxShapes)throw new _e(`The artwork has ${K.length} separate shapes; the limit is ${we.maxShapes}. Combine shapes of the same color first`);let pe={kind:Cc,version:Pc,artboard:{width:p,height:m},qr:{x:D,y:B,size:z,padding:G},colors:{frame:C,...E&&{accent:E}},shapes:K.map(Z=>({type:"path",d:qv(Z.segments,lt.decimals),fill:I(Z.fill),...Z.fillRule==="evenodd"&&{fillRule:"evenodd"}})),labels:[]},Ie=tn.safeParse(pe);if(!Ie.success){let Z=Ie.error.issues[0];throw new _e(`The converted frame doesn't fit the frame format: ${Z?.message??"invalid"}`)}let $e=P.map(Z=>({color:Z,ref:Z===C?"frame":Z===E?"accent":"fixed",shapes:x.get(Z)??0}));return {ok:!0,spec:Ie.data,warnings:r.list(),palette:$e}}catch(n){return {ok:false,error:n instanceof _e?n.message:`Could not read the SVG (${n instanceof Error?n.name:"error"})`,warnings:r.list()}}}var Yv=1013,Jv={"call-to-action":105,holidays:283,seasons:60,"food-drink":71,shopping:64,"beauty-wellness":26,events:77,places:71,"real-estate":35,automotive:27,"health-learning":48,"sports-fitness":36,business:82,nonprofit:28};var eC=[{id:"call-to-action",label:"Call to action"},{id:"holidays",label:"Holidays"},{id:"seasons",label:"Seasons"},{id:"food-drink",label:"Food & drink"},{id:"shopping",label:"Shops & packaging"},{id:"beauty-wellness",label:"Beauty & wellness"},{id:"events",label:"Events & weddings"},{id:"places",label:"Places & Wi-Fi"},{id:"real-estate",label:"Real estate"},{id:"automotive",label:"Cars & parking"},{id:"health-learning",label:"Health & learning"},{id:"sports-fitness",label:"Sports & fitness"},{id:"business",label:"Business & social"},{id:"nonprofit",label:"Nonprofits & community"}];function j0(e){return Array.isArray(e)?`[${e.map(j0).join(",")}]`:e&&typeof e=="object"?`{${Object.keys(e).filter(r=>e[r]!==void 0).sort().map(r=>`${JSON.stringify(r)}:${j0(e[r])}`).join(",")}}`:JSON.stringify(e)}function tC(e){let t=j0(e),r=2166136261;for(let n=0;n<t.length;n++)r^=t.charCodeAt(n),r=Math.imul(r,16777619)>>>0;return r.toString(16).padStart(8,"0")}function rC(e,t){return Le.QrCode.encodeText(e,qe[t??Mt]).size}function c$(e,t,r,n=r.size*(t?.size??Ph)){let o={src:e,width:n,height:n,excavate:true,...t?.shape&&t.shape!=="square"&&{shape:t.shape},...t?.plate&&{plate:t.plate}},i=t?.x!==void 0||t?.y!==void 0;if(!(t?.padding||i))return o;let s=rC(r.value,r.level),a=nt(s,r.margin,r.shape),c=r.size/(s+2*a);if(t.padding&&(o.padding=t.padding*c),i){let u=s*c,l=f=>Math.min(Math.max((f??.5)*u-n/2,0),u-n);o.x=l(t.x),o.y=l(t.y);}return o}function u$(e,t,r,n){let o=r.level??Mt,i=o;n&&(i=ht({...r,imageSettings:c$(e,t,r),autoLevel:n}));let s=c=>{let u=f=>c$(e,t,{...r,level:c},f),l=c0(r,[c],u().width,u);return l>0?u(l):void 0};if(i===o)return s(o);let a=s(i);return a&&ht({...r,imageSettings:a,autoLevel:n})===i?a:s(o)}function nC({value:e,level:t,margin:r,shape:n,autoLevel:o,logoOptions:i}){let a=u$("data:,",{...i,size:Rc},{value:`${e}`,size:1024,margin:r??Te,level:t,shape:n},o);return a?a.width/1024:0}function q0({value:e,size:t=1024,fgColor:r,bgColor:n,eyeColor:o,dotColor:i,bodyPattern:s,hideLogo:a,logo:c,logoOptions:u,margin:l,cornerEyePattern:f,cornerEyeDotPattern:p,level:m,templateId:h,frame:d,eyeColors:g,moduleScale:_,autoLevel:y,shape:b}){let S={value:`${e}`,size:t,margin:l??Te,level:m,shape:b},v=!a&&c?u$(c,u,S,y):void 0;return {value:S.value,bgColor:n,fgColor:r,eyeColor:o,dotColor:i,bodyPattern:s,cornerEyePattern:f,cornerEyeDotPattern:p,level:m,templateId:h,size:t,margin:l,...d&&{frame:d},...g&&{eyeColors:g},..._!==void 0&&{moduleScale:_},...y&&{autoLevel:y},...b&&b!=="square"&&{shape:b},...v&&{imageSettings:v}}}var l$=.06,f$=.16,m$=512;function p$(e){let{width:t,height:r}=e;if(!(t>0&&r>0)||e.data.length<t*r*4)return null;let n=Uint8Array.from(e.data),o=Eh({width:t,height:r,data:n});if(!o)return null;let i=m=>{let h=m*4;return Math.hypot(n[h]/255-o[0],n[h+1]/255-o[1],n[h+2]/255-o[2])},s=new Uint8Array(t*r),a=new Int32Array(t*r),c=0,u=0,l=m=>{s[m]||n[m*4+3]===0||i(m)>=f$||(s[m]=1,a[u++]=m);};for(let m=0;m<t;m++)l(m),l((r-1)*t+m);for(let m=0;m<r;m++)l(m*t),l(m*t+t-1);for(;c<u;){let m=a[c++],h=m%t;h>0&&l(m-1),h<t-1&&l(m+1),m>=t&&l(m-t),m<(r-1)*t&&l(m+t);}let f=new Uint8ClampedArray(n),p=o;for(let m=0;m<t*r;m++){if(!s[m])continue;let h=Math.min(1,Math.max(0,(i(m)-l$)/(f$-l$))),d=m*4;if(f[d+3]=Math.round(n[d+3]*h),h>0&&h<1)for(let g=0;g<3;g++){let y=(n[d+g]/255-(1-h)*p[g])/h;f[d+g]=Math.round(Math.min(1,Math.max(0,y))*255);}}return {width:t,height:r,data:f}}async function oC(e){if(typeof document>"u"||typeof Image>"u")throw new Error("removeLogoBackground needs a browser (canvas)");let t=await new Promise(a=>{let c=new Image;c.crossOrigin="anonymous",c.onload=()=>a(c),c.onerror=()=>a(null),c.src=e;});if(!t)return null;let r=t.naturalWidth||512,n=t.naturalHeight||512,o=Math.min(1,m$/Math.max(r,n)),i=document.createElement("canvas");i.width=Math.max(1,Math.round(r*o)),i.height=Math.max(1,Math.round(n*o));let s=i.getContext("2d",{willReadFrequently:true});if(!s)return null;try{s.drawImage(t,0,0,i.width,i.height);let a=s.getImageData(0,0,i.width,i.height),c=p$(a);return c?(a.data.set(c.data),s.putImageData(a,0,0),i.toDataURL("image/png")):null}catch{return null}finally{i.remove();}}async function iC(e){let{value:t,size:r=ve,level:n=Mt,bgColor:o=ze,fgColor:i=Ge,margin:s=Te,imageSettings:a,eyeColor:c,dotColor:u,bodyPattern:l,cornerEyePattern:f,cornerEyeDotPattern:p,isOGContext:m,templateId:h,customTemplate:d,customProps:g,frame:_,art:y,eyeColors:b,moduleScale:S,frameLabelMarkers:v,partMarkers:w,autoLevel:x,...P}=e,C=Kc({value:t,size:r,margin:s,level:n,autoLevel:x},a),E=ht({value:t,size:r,level:n,margin:s,imageSettings:C,autoLevel:x}),I=Le.QrCode.encodeText(t,qe[E]).getModules(),L=I.length+s*2,z=Pr(I,r,s,C),D=null;if(C!=null&&z!=null){z.excavation!=null&&(I=_0(I,z.excavation));let N=C.src.startsWith("data:")?C.src:await fetch(`https://wsrv.nl/?url=${encodeURIComponent(C.src)}&w=100&h=100&encoding=base64`).then(j=>{if(!j.ok)throw new Error(`Failed to load QR logo (${j.status}): ${C.src}`);return j.text()});D={settings:{...C,src:N},box:{x:z.x+s,y:z.y+s,w:z.w,h:z.h}};}let B=px(I,s);return {size:r,numCells:L,fgPath:B,bgColor:o,fgColor:i,frame:_,svgProps:P,logo:D}}function sC(e){let{size:t,numCells:r,fgPath:n,bgColor:o,fgColor:i,frame:s,svgProps:a,logo:c}=e,u=dt(s),l=c?Hc(c.settings,c.box):R(Bt,{}),f=xe("svg",{height:t,viewBox:`0 0 ${r} ${r}`,width:t,xmlns:"http://www.w3.org/2000/svg",...u?{}:a,children:[R("path",{d:`M0,0 h${r}v${r}H0z`,fill:Ze(o,ze),shapeRendering:"crispEdges"}),R("path",{d:n,fill:Ze(i,Ge),shapeRendering:"crispEdges"}),l]});return u&&s?Gc(f,{size:t,frame:s,bgColor:o,svgProps:a}):f}async function aC(e){return sC(await iC(e))}function d$(e){return q0({value:e.value,fgColor:e.fgColor,hideLogo:e.hideLogo,bgColor:e.bgColor,eyeColor:e.eyeColor,dotColor:e.dotColor,bodyPattern:e.bodyPattern,cornerEyePattern:e.cornerEyePattern,cornerEyeDotPattern:e.cornerEyeDotPattern,level:e.level,templateId:e.templateId,logo:e.logo,logoOptions:e.logoOptions,margin:e.margin??Te,autoLevel:e.autoLevel,shape:e.shape})}function h$(e,t){let{size:r=ve,scale:n=1,level:o,style:i,customTemplate:s,customProps:a,frame:c,art:u,eyeColors:l,moduleScale:f,autoLevel:p,shape:m,frameLabelMarkers:h,partMarkers:d}=e,g=r*n,_=g/t.size,y=t.imageSettings&&{...t.imageSettings,height:t.imageSettings.height*_,width:t.imageSettings.width*_,...t.imageSettings.x!=null&&{x:t.imageSettings.x*_},...t.imageSettings.y!=null&&{y:t.imageSettings.y*_},...t.imageSettings.padding!=null&&{padding:t.imageSettings.padding*_}};return {art:u,bgColor:t.bgColor,bodyPattern:t.bodyPattern,cornerEyeDotPattern:t.cornerEyeDotPattern,cornerEyePattern:t.cornerEyePattern,customProps:a,customTemplate:s,dotColor:t.dotColor,eyeColor:t.eyeColor,fgColor:t.fgColor,frame:c,level:o||t.level,margin:t.margin,...l&&{eyeColors:l},...f!==void 0&&{moduleScale:f},...p&&{autoLevel:p},...m&&m!=="square"&&{shape:m},...h&&{frameLabelMarkers:h},...d&&{partMarkers:d},size:g,style:i,templateId:t.templateId,value:t.value,...y&&{imageSettings:y}}}function cC(e){return h$(e,d$(e))}function g$(e,t){let r=[],n=o=>{if(o==null||typeof o=="boolean")return;if(typeof o=="string"||typeof o=="number"||typeof o=="bigint"){r.push(`${o}`);return}if(Array.isArray(o)){for(let u of o)n(u);return}if(!nn(o))throw new TypeError("qrdx: can't render this value");let{type:i,props:s,key:a}=o;if(wo(i)){n(s.children);return}if(typeof i=="function"){n(i(s));return}let c={};for(let u of Object.keys(s)){let l=Lo(u,s[u]);l&&(c[l.name]=l.value);}r.push(t(i,c,g$(s.children,t),a));};return n(e),r}var y$={diamond:["square","rounded","diya","extra-rounded","message","pointy","leaf","leaf-reverse","drop","bevel","squircle","cushion","shield","petal"],banner:["square","rounded","diya","leaf"],square:["curly"],diya:["curly"],message:["curly"]},_$={diamond:["square"],pacman:["rounded"],"small-square":["square","rounded"]},b$=["circle","curly"],x$=["diamond","banner","star"],$$={circle:["square","rounded","diya","extra-rounded","message","pointy","leaf","leaf-reverse","drop","bevel","squircle","cushion","shield","petal"]},Rt=["square","liquid","classy","classy-rounded"],w$={"circle/rounded":Rt,"circle/extra-rounded":Rt,"circle/message":[...Rt,"leaf"],"circle/pointy":Rt,"circle/leaf-reverse":Rt,"circle/drop":Rt,"circle/bevel":[...Rt,"leaf"],"circle/squircle":[...Rt,"circle","diamond","circle-mixed","rounded","horizontal-line","leaf","heart","mosaic","octagon"],"circle/cushion":Rt,"circle/shield":[...Rt,"rounded","horizontal-line","leaf"],"circle/petal":Rt};function S$(e,t,r){return ($$[e]?.includes(t)??false)&&!w$[`${e}/${t}`]?.includes(r)}function W0(e){let t=e.bodyPattern??"circle",r=e.cornerEyePattern??"gear",n=e.cornerEyeDotPattern??"circle";return y$[n]?.includes(r)?{kind:"dot-eye",message:`${n} centres in ${r} eyes are missed by strict decoders`,fix:"Pick a square, rounded or circle centre, or another eye shape"}:_$[t]?.includes(r)?{kind:"body-eye",message:`${t} dots next to ${r} eyes are missed up close`,fix:"Pick a fuller dot shape or another eye shape"}:x$.includes(n)?{kind:"dot",message:`${n} centres are missed in sharp renders and up close`,fix:"Pick a square, rounded or circle centre"}:b$.includes(r)?{kind:"eye",message:`${r} eyes only read in lenient decoders`,fix:"Pick square, rounded or gear eyes"}:S$(n,r,t)?{kind:"sharp-dot-eye",message:`${n} centres in ${r} eyes are missed by some decoders on screens and in sharp prints`,fix:"Pick a rounded centre, or gear or octagon eyes"}:null}var Oo=300,us=e=>{let t=typeof e=="number"?e:Number.parseFloat(String(e));return Number.isFinite(t)?t:void 0};function uC(e){let t=us(e.x)??0,r=us(e.y)??0,n=Ot(typeof e.viewBox=="string"?e.viewBox:void 0),o=us(e.width),i=us(e.height);if(n.length!==4||!(n[2]&&n[3]&&o&&i))return [1,0,0,1,t,r];let[s,a,c,u]=n,l=Math.min(o/c,i/u);return [l,0,0,l,t+(o-c*l)/2-s*l,r+(i-u*l)/2-a*l]}function H0(e,t,r,n){if(e===t)return r;if(Array.isArray(e)){for(let a of e){let c=H0(a,t,r,false);if(c)return c}return null}let o=e;if(!o||typeof o!="object"||!o.props)return null;let{props:i}=o,s=Se(r,xt(typeof i.transform=="string"?i.transform:void 0));return o.type==="svg"&&!n&&(s=Se(s,uC(i))),H0(i.children,t,s,false)}function X0(e){let t=e.customTemplate||(e.templateId?Jc(e.templateId):void 0);if(!t)return 1;let r={type:"svg",props:{height:Oo,viewBox:`0 0 ${Oo} ${Oo}`,width:Oo},key:null},n;try{n=t.wrapper(r,{fgColor:typeof e.fgColor=="string"?e.fgColor:void 0,bgColor:typeof e.bgColor=="string"?e.bgColor:void 0,...e.customProps??{}},{pixelSize:10,url:e.value});}catch{return 1}let o=n?.props;if(!o)return 1;let i=Ot(typeof o.viewBox=="string"?o.viewBox:void 0),s=i.length===4?i[2]:us(o.width),a=H0(n,r,ho,true);if(!(a&&s))return 1;let[c,u]=re(a,0,0),[l,f]=re(a,Oo,Oo),m=Math.min(Math.abs(l-c),Math.abs(f-u))/s;return m>0&&m<=1?m:1}var E$=[96,160,320],Y0=640;function eg(){if(typeof document>"u")throw new Error("Scan scoring needs a browser (canvas + image decoding)")}function Mr(e){if(e?.aborted)throw new DOMException("Scan scoring was aborted","AbortError")}var M$=()=>new Promise(e=>setTimeout(e,0));async function tg(){let{default:e}=await import('jsqr');return e}function J0(e,t){if(!e)return false;if(e.data===t)return true;try{return new TextDecoder().decode(Uint8Array.from(e.binaryData))===t}catch{return false}}function lC(e,t,r=.7){let{data:n,width:o,height:i}=e;for(let u=0;u<n.length;u+=4)for(let l=0;l<3;l++)n[u+l]=128+(n[u+l]-128)*r;let s=Math.max(1,Math.round(t*.25)),a=new Float32Array(o*i*3),c=u=>{let l=u?i:o,f=u?o:i,p=(h,d)=>u?h*o+d:d*o+h,m=[0,0,0];for(let h=0;h<l;h++){m.fill(0);for(let d=-s;d<=s;d++){let g=p(h,Math.min(Math.max(d,0),f-1))*4;for(let _=0;_<3;_++)m[_]=m[_]+n[g+_];}for(let d=0;d<f;d++){let g=p(h,d)*3;for(let b=0;b<3;b++)a[g+b]=m[b]/(2*s+1);let _=p(h,Math.max(d-s,0))*4,y=p(h,Math.min(d+s+1,f-1))*4;for(let b=0;b<3;b++)m[b]=m[b]-n[_+b]+n[y+b];}}for(let h=0;h<o*i;h++)for(let d=0;d<3;d++)n[h*4+d]=a[h*3+d];};for(let u=0;u<2;u++)c(true),c(false);}function Fo(e,t){let r=document.createElement("canvas");r.width=Math.max(1,Math.round(e)),r.height=Math.max(1,Math.round(t));let n=r.getContext("2d",{willReadFrequently:true});if(!n)throw new Error("Could not get canvas context");return n.imageSmoothingEnabled=true,n.imageSmoothingQuality="high",{canvas:r,ctx:n}}var fC=[.9,1,1.1];function rg(e,t,r,n,o){let i=0;for(let s of fC){let a=r*s,c=t(a);lC(c,a/n),o(e(c.data,c.width,c.height))&&i++;}return i>=2?"pass":i===1?"fragile":"fail"}var K0={small:"small print or far away",medium:"typical phone distance",large:"close up"};function mC(e,t){return e===t[0]&&t.length>1?K0.small:e===t.at(-1)?K0.large:K0.medium}function I$(e,t,r){if(r==="pass")return 0;let n=t===1?[45]:t===2?[20,45]:[15,20,45],o=n[Math.round(e*(n.length-1)/Math.max(t-1,1))]??20;return r==="fragile"?Math.round(o/2):o}function L$(e,t,r){let n=`${e} px (${mC(e,t)})`;return r==="pass"?{id:`decode-${e}`,passed:true,message:`Reads at ${n}, with camera blur`}:{id:`decode-${e}`,passed:false,message:r==="fragile"?`Reads at ${n} only some of the time`:`Doesn't read at ${n}`,fix:e===t[0]?"Print it bigger, shorten the content (fewer modules) or use solid square dots":"Raise the contrast, use bigger dots or a simpler eye shape"}}function z$(e,t){return t?"fails":e>=85?"great":e>=65?"ok":"risky"}function pC(e,t,r){let n=bt(e,t);if(n.type==="solid")return [n.color];if(n.type!=="image")return n.stops.map(a=>a.color);let o=n.underlay?wu(n.underlay):null,i=r?.[n.src];if(!i)return n.underlay?[n.underlay]:[];let s=n.opacity??1;return [i.light,i.dark].flatMap(a=>{let c=wu(a);if(!c)return [];let u={...c,a:c.a*s};if(!o)return [v$(u)];let l=u.a+o.a*(1-u.a),f=(p,m)=>l>0?(p*u.a+m*o.a*(1-u.a))/l:0;return [v$({r:f(u.r,o.r),g:f(u.g,o.g),b:f(u.b,o.b),a:l})]})}var v$=({r:e,g:t,b:r,a:n})=>`rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(r)}, ${Math.round(n*1e3)/1e3})`;function dC(e){let t=[],r=e.width*e.height;for(let i=0;i<r;i++){let s=e.data[i*4],a=e.data[i*4+1],c=e.data[i*4+2];e.data[i*4+3]<128||t.push({lum:Mo(s,a,c),r:s,g:a,b:c});}if(t.length===0)return null;t.sort((i,s)=>i.lum-s.lum);let n=Math.max(1,Math.round(t.length/10)),o=i=>{let s=i.reduce((c,u)=>({r:c.r+u.r,g:c.g+u.g,b:c.b+u.b}),{r:0,g:0,b:0}),a=c=>Math.round(c/i.length).toString(16).padStart(2,"0");return `#${a(s.r)}${a(s.g)}${a(s.b)}`};return {dark:o(t.slice(0,n)),light:o(t.slice(-n))}}async function hC(e){eg();let t=await ms(e),{canvas:r,ctx:n}=Fo(64,64);n.drawImage(t,0,0,64,64);let o=dC(n.getImageData(0,0,64,64));return r.remove(),o}function T$(e){let t=[e.bgColor,e.fgColor,e.eyeColor,e.dotColor,...Mc.flatMap(n=>[e.eyeColors?.[n]?.outer,e.eyeColors?.[n]?.inner])],r=new Set;for(let n of t)typeof n=="object"&&n?.type==="image"&&r.add(n.src);return [...r]}var ls=null;function wu(e){let t=ke(e);if(t||typeof document>"u")return t;if(ls??=document.createElement("canvas").getContext("2d"),!ls)return null;ls.fillStyle="#010203",ls.fillStyle=e;let r=String(ls.fillStyle);return r==="#010203"?null:ke(r)}var C$=e=>Mo(e.r,e.g,e.b),N$=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05),fs=4.5,gC=3,P$=1.5,k$={code:7,background:12},A$={r:255,g:255,b:255,a:1},R$=(e,t)=>({r:e.r*e.a+t.r*(1-e.a),g:e.g*e.a+t.g*(1-e.a),b:e.b*e.a+t.b*(1-e.a),a:1});function yC(e,t={}){let r=t.imageTones,n=(m,h)=>{let d=typeof m=="object"&&m?.type==="image";return pC(m,h,r).map(g=>({color:g,picture:d}))},o=e.fgColor??Ge,i=Mc.flatMap(m=>{let h=e.eyeColors?.[m];return [...h?.outer?n(h.outer,Ge):[],...h?.inner?n(h.inner,Ge):[]]}),s=[...n(o,Ge),...n(e.eyeColor??o,Ge),...n(e.dotColor??o,Ge),...i],a=n(e.bgColor,ze),c=(a.length>0?a:[{color:"#ffffff",picture:false}]).map(m=>{let h=wu(m.color);return {color:h?R$(h,A$):A$,picture:m.picture}}),u=s.flatMap(m=>{let h=wu(m.color);return h?[{color:h,picture:m.picture}]:[]}),l=Number.POSITIVE_INFINITY,f=fs,p=false;for(let m of u)for(let h of c){let d=C$(R$(m.color,h.color)),g=C$(h.color),_=N$(d,g),y=h.picture?k$.background:m.picture?k$.code:fs;_/y<l/f&&(l=_,f=y),d>g&&(p=true);}return {ratio:Number.isFinite(l)?l:Number.POSITIVE_INFINITY,required:f,inverted:p}}function _C(e,t){let{ratio:r,inverted:n,required:o}=yC(e,{imageTones:t});if(!Number.isFinite(r))return {checks:[],penalty:0,fails:false};let i=o/fs,s=o!==fs,a=Math.round(r*10)/10,c=[],u=0;return r>=o?c.push({id:"contrast",passed:true,message:`Contrast ${a}:1 between code and background`}):(u=r<P$*i?60:r<gC*i?30:10,c.push({id:"contrast",passed:false,message:s?`Low contrast for a picture (${a}:1); ${o}:1 or more scans reliably`:`Low contrast (${a}:1); 4.5:1 or more scans reliably`,fix:s?"Lower the picture's opacity over a darker underlay (dots) or a lighter one (background)":"Use a darker code color or a lighter background"})),n?(u+=10,c.push({id:"polarity",passed:false,message:"Light code on a dark background; some scanner apps can't read it",fix:"Use dark modules on a light background"})):c.push({id:"polarity",passed:true,message:"Dark code on a light background"}),{checks:c,penalty:u,fails:r<P$*(o/fs)}}function ng(e){return Le.QrCode.encodeText(e.value,qe[ht(e)]).getModules()}function bC(e){let{imageSettings:t}=e;if(!t)return {check:null,penalty:0};let r=ng(e),n=Pr(r,e.size??ve,nt(r.length,e.margin??Te,e.shape),t);if(!n)return {check:null,penalty:0};let o=n.excavation??n,i=r.length,a=[[0,0],[i-8,0],[0,i-8]].some(([h,d])=>o.x<h+9&&o.x+o.w>h&&o.y<d+9&&o.y+o.h>d),c=i>21?i-9:null,u=c!==null&&o.x<c+5&&o.x+o.w>c&&o.y<c+5&&o.y+o.h>c;if(a||u)return {check:{id:"logo",passed:false,message:a?"The logo covers a corner eye":"The logo covers the small square near the bottom-right corner",fix:"Move the logo toward the center or make it smaller"},penalty:40};let l=o.w*o.h/(i*i),f=ht(e),p=Math.round(l*100),m=Xc({value:e.value,size:e.size??ve,margin:e.margin??Te,level:f,shape:e.shape},t);return !m||m.worst<=m.budget?{check:{id:"logo",passed:true,message:`Logo covers ${p}% of the code; error correction repairs it with room to spare`},penalty:0}:{check:{id:"logo",passed:false,message:`Logo covers ${p}% of the code and spoils ${m.worst} codewords in one block, which repairs ${m.correctable}`,fix:m.level==="H"?"Use a smaller logo":"Switch error correction to H or use a smaller logo"},penalty:m.worst>m.correctable?25:10}}function xC(e){let t=i0(e.shape)?ln(e.margin??Te):e.margin??Te,r=ng(e).length+2*t,n=t+(dt(e.frame)?n0(e.frame)*r:0),o=Math.round(n*10)/10;return n>=4?{check:{id:"quiet-zone",passed:true,message:`Quiet zone of ${o} modules`},penalty:0}:n>=1.5?{check:{id:"quiet-zone",passed:true,message:`Quiet zone of ${o} modules (4 is ideal)`},penalty:0}:{check:{id:"quiet-zone",passed:false,message:"No quiet zone around the code",fix:"Leave clear space (about 10% of the code width) around it wherever you place it, or add a frame"},penalty:5}}function $C(e){let t=e.cornerEyePattern??"gear";return t==="curly"?{check:{id:"eye-shape",passed:false,message:"Curly eyes fail strict decoders such as ZXing-based apps",fix:"Pick square, rounded or gear eyes"},penalty:40}:t==="circle"?{check:{id:"eye-shape",passed:false,message:"Circle eyes only read in lenient decoders; many apps miss them",fix:"Pick square, rounded or gear eyes"},penalty:20}:{check:{id:"eye-shape",passed:true,message:`No known decoder issues with ${t} eyes`},penalty:0}}function ms(e){return new Promise((t,r)=>{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>t(n),n.onerror=()=>r(new Error("Could not load image")),n.src=e;})}var wC=`data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><rect width="10" height="10" rx="2" fill="#808080"/></svg>')}`;async function SC(e){let{imageSettings:t}=e;if(!t||t.src.startsWith("data:"))return e;let r=wC;try{let n=await ms(t.src),{canvas:o,ctx:i}=Fo(n.naturalWidth||256,n.naturalHeight||256);i.drawImage(n,0,0,o.width,o.height),r=o.toDataURL("image/png");}catch{}return {...e,imageSettings:{...t,src:r}}}async function vC(e){let t=new Map;for(let o of T$(e))if(!o.startsWith("data:"))try{let i=await ms(o),{canvas:s,ctx:a}=Fo(i.naturalWidth||256,i.naturalHeight||256);a.drawImage(i,0,0,s.width,s.height),t.set(o,s.toDataURL("image/png")),s.remove();}catch{t.set(o,null);}if(t.size===0)return e;let r=o=>{if(typeof o!="object"||o?.type!=="image")return o;let i=t.get(o.src);return i===void 0?o:i?{...o,src:i}:o.underlay??Ge},n=e.eyeColors?Object.fromEntries(Object.entries(e.eyeColors).map(([o,i])=>[o,i&&{outer:r(i.outer),inner:r(i.inner)}])):void 0;return {...e,bgColor:r(e.bgColor),fgColor:r(e.fgColor),eyeColor:r(e.eyeColor),dotColor:r(e.dotColor),...n&&{eyeColors:n}}}async function O$(e,t,r,n,o){let i=[],s=0,a=_C(e,o);s+=a.penalty;let c=bC(e);s+=c.penalty;let u=xC(e);s+=u.penalty;let l=$C(e);s+=l.penalty;let f=W0(e),p=f?.kind==="eye"?null:f;p&&p.kind!=="sharp-dot-eye"&&(s+=10);let m=await tg();Mr(n);let h=ng(e).length,d=h+2*nt(h,e.margin??Te,e.shape),g=[],_=false;for(let[S,v]of r.entries()){await M$(),Mr(n);let w=rg(m,t,v,d,x=>J0(x,e.value));s+=I$(S,r.length,w),g.push(L$(v,r,w)),S===r.length-1&&w==="fail"&&(_=true);}i.push(...g,...a.checks),c.check&&i.push(c.check),i.push(l.check,u.check),p&&i.push({id:"style-pair",passed:false,message:p.message,fix:p.fix});let y=_||a.fails,b=Math.max(0,Math.min(100,100-s));return y&&(b=Math.min(b,30)),{score:b,grade:z$(b,y),checks:i}}function F$(e){return [...e.sizes??E$].filter(t=>t>0).sort((t,r)=>t-r)}async function ZI(e,t={}){eg();let{signal:r}=t,n=F$(t),o=Y0/X0(e),i=await vC(await SC(pn({...e,size:e.size??ve},o)));Mr(r);let s={};for(let f of T$(e))try{let p=await hC(f);p&&(s[f]=p);}catch{}Mr(r);let a=await kt(i),c=await ms(a);Mr(r);let u=Jt(o,e.frame);return await O$(e,f=>{let p=f/Y0,m=u.width*p,h=u.height*p,d=Math.max(8,Math.round(f*.12)),{canvas:g,ctx:_}=Fo(m+2*d,h+2*d);_.fillStyle="#ffffff",_.fillRect(0,0,g.width,g.height),_.drawImage(c,d,d,m,h);let y=_.getImageData(0,0,g.width,g.height);return g.remove(),y},n,r,s)}var BI=Y0;async function UI(e,t,r={}){let{width:n,height:o}=t;if(!(n>0&&o>0)||t.data.length<n*o*4)throw new Error("Pixels must be width \xD7 height \xD7 4 RGBA bytes");let i=F$(r),s=e.size??ve,a=Jt(s,e.frame),c=n*s*X0(e)/a.width,u={data:CC(t),width:n,height:o};return await O$(e,f=>{let p=D$(u,f/c),m=Math.max(8,Math.round(f*.12));return PC(p,m)},i,r.signal)}function CC(e){let{data:t,width:r,height:n}=e,o=new Uint8ClampedArray(r*n*4);for(let i=0;i<r*n*4;i+=4){let s=t[i+3]/255;for(let a=0;a<3;a++)o[i+a]=t[i+a]*s+255*(1-s);o[i+3]=255;}return o}function PC(e,t){let r=e.width+2*t,n=e.height+2*t,o=new Uint8ClampedArray(r*n*4).fill(255);for(let i=0;i<e.height;i++)o.set(e.data.subarray(i*e.width*4,(i+1)*e.width*4),((i+t)*r+t)*4);return {data:o,width:r,height:n,colorSpace:"srgb"}}var Er=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y);function $u(e,t){return .299*e[t]+.587*e[t+1]+.114*e[t+2]}function kC(e,t){let r=0;for(let a=0;a<256;a++)r+=a*e[a];let n=0,o=0,i=0,s=128;for(let a=0;a<256;a++){if(o+=e[a],o===0)continue;let c=t-o;if(c===0)break;n+=a*e[a];let u=n/o,l=(r-n)/c,f=o*c*(u-l)**2;f>i&&(i=f,s=a);}return s}async function AC(e){if(!(e instanceof Blob))return e.complete||await new Promise(r=>{e.addEventListener("load",r,{once:true}),e.addEventListener("error",r,{once:true});}),e;let t=URL.createObjectURL(e);try{let r=await ms(t);return await r.decode?.().catch(()=>{}),r}finally{setTimeout(()=>URL.revokeObjectURL(t),1e3);}}async function GI(e,t={}){eg();let{signal:r}=t,n=[...t.sizes??E$].filter(W=>W>0).sort((W,he)=>W-he),o=await tg(),i=await AC(e);Mr(r);let s=i.naturalWidth||i.width,a=i.naturalHeight||i.height;if(!(s&&a))throw new Error("Could not read this image");let c=Math.min(1,1600/Math.max(s,a)),{canvas:u,ctx:l}=Fo(s*c,a*c);l.fillStyle="#ffffff",l.fillRect(0,0,u.width,u.height),l.drawImage(i,0,0,u.width,u.height);let f=l.getImageData(0,0,u.width,u.height),p=o(f.data,f.width,f.height);if(Mr(r),!p){let W=await Fb(i,0,false);return u.remove(),typeof W!="string"||W==="NO_QR"?{data:null,version:null,score:0,grade:"fails",checks:[{id:"decode",passed:false,message:"No QR code found in this image",fix:"Try a sharper, well-lit, straight-on photo or a screenshot"}]}:{data:W,version:null,score:55,grade:"risky",checks:[{id:"decode",passed:false,message:"Decoded only after cropping; the code is small or hard to find in this image",fix:"Make the code bigger relative to its surroundings"}]}}let{location:m,version:h}=p,d=17+4*h,g=(Er(m.topLeftCorner,m.topRightCorner)+Er(m.bottomLeftCorner,m.bottomRightCorner)+Er(m.topLeftCorner,m.bottomLeftCorner)+Er(m.topRightCorner,m.bottomRightCorner))/4,_=g/d,y=[m.topLeftCorner,m.topRightCorner,m.bottomRightCorner,m.bottomLeftCorner],b=Math.max(0,Math.floor(Math.min(...y.map(W=>W.x)))),S=Math.min(f.width,Math.ceil(Math.max(...y.map(W=>W.x)))),v=Math.max(0,Math.floor(Math.min(...y.map(W=>W.y)))),w=Math.min(f.height,Math.ceil(Math.max(...y.map(W=>W.y)))),x=[],P=0,C=new Array(256).fill(0),E=0;for(let W=v;W<w;W++)for(let he=b;he<S;he++){let oe=Math.round($u(f.data,(W*f.width+he)*4));C[oe]=C[oe]+1,E++;}let I=kC(C,E),L={dark:[0,0,0,0],light:[0,0,0,0]};for(let W=v;W<w;W++)for(let he=b;he<S;he++){let oe=(W*f.width+he)*4,Ee=$u(f.data,oe)<=I?L.dark:L.light;Ee[0]=Ee[0]+f.data[oe],Ee[1]=Ee[1]+f.data[oe+1],Ee[2]=Ee[2]+f.data[oe+2],Ee[3]=Ee[3]+1;}let z=W=>{let he=Math.max(W[3],1);return Mo(W[0]/he,W[1]/he,W[2]/he)},D=z(L.dark),B=z(L.light),N=N$(D,B),j=Math.round(N*10)/10;N>=4.5?x.push({id:"contrast",passed:true,message:`Contrast ${j}:1 in the image`}):(P+=N<2?30:10,x.push({id:"contrast",passed:false,message:`Low contrast in the image (${j}:1)`,fix:"Use a darker code on a lighter background, or better lighting for photos"}));let G=[m.topLeftFinderPattern,m.topRightFinderPattern,m.bottomLeftFinderPattern].map(W=>{let he=Math.min(f.width-1,Math.max(0,Math.round(W.x))),oe=Math.min(f.height-1,Math.max(0,Math.round(W.y)));return $u(f.data,(oe*f.width+he)*4)}).filter(W=>W>I).length>=2;G?(P+=10,x.push({id:"polarity",passed:false,message:"Light code on a dark background; some scanner apps can't read it",fix:"Use dark modules on a light background"})):x.push({id:"polarity",passed:true,message:"Dark code on a light background"});let K=Math.max(2,Math.round(_*2)),pe={minX:b-K,maxX:S+K,minY:v-K,maxY:w+K};if(pe.minX<0||pe.minY<0||pe.maxX>f.width||pe.maxY>f.height)x.push({id:"quiet-zone",passed:true,skipped:true,message:"The image is cropped too tight to check the quiet zone"});else {let W=0,he=0;for(let oe=pe.minY;oe<pe.maxY;oe++)for(let Ee=pe.minX;Ee<pe.maxX;Ee++){if(Ee>=b&&Ee<S&&oe>=v&&oe<w)continue;let Do=$u(f.data,(oe*f.width+Ee)*4);(G?Do>I:Do<=I)&&W++,he++;}W/Math.max(he,1)>.12?(P+=10,x.push({id:"quiet-zone",passed:false,message:"Something dark touches the code; the quiet zone isn't clear",fix:"Leave clear space (about 4 modules) around the code"})):x.push({id:"quiet-zone",passed:true,message:"Clear space around the code"});}_<2?x.push({id:"resolution",passed:false,message:`Low resolution: about ${Math.round(_*10)/10} px per module`,fix:"Use a larger image, or export the code at a bigger size"}):x.push({id:"resolution",passed:true,message:`About ${Math.round(_)} px per module`});let $e=Math.round(_*4),Z=Math.max(0,b-$e),Y=Math.max(0,v-$e),J=Math.min(f.width,S+$e)-Z,Ue=Math.min(f.height,w+$e)-Y,Ir=W=>{let he=W/g,oe=Fo(J*he,Ue*he);oe.ctx.drawImage(u,Z,Y,J,Ue,0,0,oe.canvas.width,oe.canvas.height);let Ee=oe.ctx.getImageData(0,0,oe.canvas.width,oe.canvas.height);return oe.canvas.remove(),Ee},ft=[],Qt=false;for(let[W,he]of n.entries()){await M$(),Mr(r);let oe=rg(o,Ir,he,d,Ee=>Ee?.data===p.data);P+=I$(W,n.length,oe),ft.push(L$(he,n,oe)),W===n.length-1&&oe==="fail"&&(Qt=true);}u.remove();let Lr=Math.max(0,Math.min(100,100-P));return Qt&&(Lr=Math.min(Lr,30)),{data:p.data,version:h,score:Lr,grade:z$(Lr,Qt),checks:[...ft,...x]}}var RC=[320];function D$(e,t){let r=Math.min(1,t),n=Math.max(1,Math.round(e.width*r)),o=Math.max(1,Math.round(e.height*r)),i=new Uint8ClampedArray(n*o*4),s=e.width/n,a=e.height/o;for(let c=0;c<o;c++){let u=Math.floor(c*a),l=Math.max(u+1,Math.min(e.height,Math.floor((c+1)*a)));for(let f=0;f<n;f++){let p=Math.floor(f*s),m=Math.max(p+1,Math.min(e.width,Math.floor((f+1)*s))),h=[0,0,0,0];for(let _=u;_<l;_++)for(let y=p;y<m;y++){let b=(_*e.width+y)*4;for(let S=0;S<4;S++)h[S]=h[S]+e.data[b+S];}let d=(l-u)*(m-p),g=(c*n+f)*4;for(let _=0;_<4;_++)i[g+_]=h[_]/d;}}return {data:i,width:n,height:o,colorSpace:"srgb"}}function EC(e){try{return new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(e.binaryData))}catch{return e.data}}async function QI(e,t,r={}){let{width:n,height:o}=e;if(!(n>0&&o>0)||e.data.length<n*o*4)throw new Error("Pixels must be width \xD7 height \xD7 4 RGBA bytes");let i=await tg(),s={data:e.data instanceof Uint8ClampedArray?e.data:Uint8ClampedArray.from(e.data),width:n,height:o},a=i(s.data,n,o,{inversionAttempts:"dontInvert"});if(!a)return {data:null,version:null,passed:false};let c=EC(a),{version:u,location:l}=a;if(!J0(a,t))return {data:c,version:u,passed:false};let f=17+4*u,p=(Er(l.topLeftCorner,l.topRightCorner)+Er(l.bottomLeftCorner,l.bottomRightCorner)+Er(l.topLeftCorner,l.bottomLeftCorner)+Er(l.topRightCorner,l.bottomRightCorner))/4;for(let m of r.sizes??RC)if(rg(i,d=>D$(s,d/p),m,f,d=>J0(d,t))!=="pass")return {data:c,version:u,passed:false};return {data:c,version:u,passed:true}}var MC=16,Z$=.01;function IC(e){let t=new Float64Array(256);for(let c of e)t[Math.min(255,Math.max(0,Math.round(c*255)))]++;let r=e.length,n=0;for(let c=0;c<256;c++)n+=c*t[c];let o=0,i=0,s=0,a=128;for(let c=0;c<256;c++){if(i+=t[c],i===0)continue;let u=r-i;if(u===0)break;o+=c*t[c];let l=o/i,f=(n-o)/u,p=i*u*(l-f)**2;p>s&&(s=p,a=c);}return (a+.5)/255}function LC(e,t){let{width:r,height:n,data:o}=e,i=r*n,s=new Uint8Array(i),a=0;for(let m=0;m<i;m++)o[m*4+3]<128&&a++;if(t==="alpha"||t==="auto"&&a>i*.02&&a<i*.98){for(let m=0;m<i;m++)s[m]=o[m*4+3]>=128?1:0;return s}let u=new Float32Array(i);for(let m=0;m<i;m++){let h=o[m*4+3]/255,d=.2126*o[m*4]+.7152*o[m*4+1]+.0722*o[m*4+2];u[m]=1-(d*h+255*(1-h))/255;}let l=IC(u);for(let m=0;m<i;m++)s[m]=u[m]>l?1:0;let f=0,p=0;for(let m=0;m<r;m++)for(let h of [0,n-1])f++,p+=s[h*r+m];for(let m=1;m<n-1;m++)for(let h of [0,r-1])f++,p+=s[m*r+h];if(p>f/2)for(let m=0;m<i;m++)s[m]=s[m]?0:1;return s}function B$(e,t,r,n){for(let o of [1,0]){let i=new Uint8Array(e.length);for(let s=0;s<e.length;s++){if(i[s]||e[s]!==o)continue;let a=[s];i[s]=1;let c=false;for(let l of a){let f=l%t,p=(l-f)/t;(f===0||p===0||f===t-1||p===r-1)&&(c=true);for(let[m,h]of [[f-1,p],[f+1,p],[f,p-1],[f,p+1]]){if(m<0||h<0||m>=t||h>=r)continue;let d=h*t+m;!i[d]&&e[d]===o&&(i[d]=1,a.push(d));}}if((o===1||!c)&&a.length<n)for(let l of a)e[l]=o?0:1;}}}function U$(e,t={}){let{width:r,height:n,data:o}=e;if(!(r>0&&n>0)||o.length<r*n*4)throw new Error("Silhouette pixels must be width \xD7 height \xD7 4 RGBA bytes");let i=LC(e,t.mode??"auto"),s=i.reduce((x,P)=>x+P,0);B$(i,r,n,Math.max(16,s*Z$));let a=r,c=n,u=-1,l=-1;for(let x=0;x<n;x++)for(let P=0;P<r;P++)i[x*r+P]&&(a=Math.min(a,P),c=Math.min(c,x),u=Math.max(u,P),l=Math.max(l,x));if(u<0)throw new Error("No shape found: use a picture with a dark or opaque shape on a light or clear background");let f=u-a+1,p=l-c+1;if(Math.max(f,p)<MC)throw new Error("The shape is too small to trace; use a bigger picture");let h=Math.min(Math.max(Math.round(t.cells??Ct),Zt),Ct)/Math.max(f,p),d=Math.max(Zt,Math.round(f*h)),g=Math.max(Zt,Math.round(p*h)),_=Math.max(1,Math.round(f*h)),y=Math.max(1,Math.round(p*h)),b=Math.floor((d-_)/2),S=Math.floor((g-y)/2),v=new Uint8Array(d*g);for(let x=0;x<y;x++){let P=c+Math.floor(x*p/y),C=Math.max(P+1,c+Math.floor((x+1)*p/y));for(let E=0;E<_;E++){let I=a+Math.floor(E*f/_),L=Math.max(I+1,a+Math.floor((E+1)*f/_)),z=0;for(let D=P;D<C;D++)for(let B=I;B<L;B++)z+=i[D*r+B];v[(x+S)*d+E+b]=z*2>=(C-P)*(L-I)?1:0;}}let w=v.reduce((x,P)=>x+P,0);if(B$(v,d,g,Math.max(4,w*Z$)),!v.includes(1))throw new Error("The shape is too small to trace; use a bigger picture");return {type:"silhouette",width:d,height:g,cells:Array.from(v,x=>x?"1":"0").join("")}}var og=512;async function zC(e){if(typeof e!="string"&&!(e instanceof Blob))return e.complete||await new Promise(r=>{e.addEventListener("load",r,{once:true}),e.addEventListener("error",r,{once:true});}),e;let t=typeof e=="string"?e:URL.createObjectURL(e);try{return await new Promise((r,n)=>{let o=new Image;o.crossOrigin="anonymous",o.onload=()=>r(o),o.onerror=()=>n(new Error("Could not load the picture")),o.src=t;})}finally{typeof e!="string"&&setTimeout(()=>URL.revokeObjectURL(t),1e3);}}async function TC(e,t={}){if(typeof document>"u")throw new Error("loadQRSilhouette needs a browser; pass decoded pixels to createQRSilhouette instead");let r=await zC(e),n=r.naturalWidth||r.width||og,o=r.naturalHeight||r.height||og,i=og/Math.max(n,o),s=Math.max(1,Math.round(n*i)),a=Math.max(1,Math.round(o*i)),c=document.createElement("canvas");c.width=s,c.height=a;let u=c.getContext("2d",{willReadFrequently:true});if(!u)throw new Error("Could not get a canvas context");u.drawImage(r,0,0,s,a);let l;try{l=u.getImageData(0,0,s,a);}catch{throw new Error("Could not read the picture (cross-origin images need CORS); upload it instead")}finally{c.remove();}return U$(l,t)}var G$=(e,t)=>{let r=t??e.size??ve;return {width:r,height:r}};function TL(e,t){let r=typeof e=="string"?document.querySelector(e):e;if(!r)throw new Error(`qrdx: no element matches ${String(e)}`);let n={...t},o=null,i="",s=false,a=()=>{let c=Io(n),u=Ut(c);if(o&&u===i)return;let l=os(c,r.ownerDocument).firstChild;o?.parentNode===r?o.replaceWith(l):r.appendChild(l),o=l,i=u;};return a(),{get svg(){return o},get options(){return n},update(c){if(s)throw new Error("qrdx: this QR code was destroyed");n={...n,...c},a();},toSVGString(){return i||Ut(Io(n))},toDataURL(c="png",u={}){return t$(n,c,G$(n,u.size),{quality:u.quality})},download(c={}){return e$(n,{format:c.format??"png",size:G$(n,c.size),filename:c.filename,quality:c.quality})},destroy(){s||(s=true,o?.remove(),o=null);}}}/**
|
|
88
|
+
* @license QR Code generator library (TypeScript)
|
|
89
|
+
* Copyright (c) Project Nayuki.
|
|
90
|
+
* SPDX-License-Identifier: MIT
|
|
91
|
+
*/export{kh as AUTO_LEVEL_LOGO_COVERAGE,T2 as Arrow,G_ as BODY_PATTERN,t0 as BUILT_IN_FRAMES,y8 as BUILT_IN_FRAME_SPECS,ah as CORNER_EYE_DOT_PATTERNS,uh as CORNER_EYE_PATTERNS,_o as CUSTOM_FRAME_STYLE,lb as DEFAULT_ART_INTENSITY,fh as DEFAULT_FRAME_TEXT,Te as DEFAULT_MARGIN,ve as DEFAULT_SIZE,O0 as DOWNLOAD_FORMATS,K2 as DotRing,Wx as EPS_IMAGE_FILL_REASON,Mc as EYE_POSITIONS,O_ as FRAME_COLOR_TOKENS,Uc as FRAME_FONT_FAMILY,Jr as FRAME_FONT_SCALE_MAX,xc as FRAME_FONT_SCALE_MIN,u2 as FRAME_GAP_RATIO,T_ as FRAME_ICONS,qh as FRAME_ICON_BOX,N_ as FRAME_ICON_MAX_SEGMENTS,lt as FRAME_IMPORT_LIMITS,l2 as FRAME_LABEL_ATTRIBUTE,Cc as FRAME_SPEC_KIND,Bi as FRAME_SPEC_LABEL_MAX_FONT,we as FRAME_SPEC_LIMITS,Pc as FRAME_SPEC_VERSION,v_ as FRAME_STYLES,Nt as FRAME_TEXT_MAX_LENGTH,Bt as Fragment,Ki as FrameSpecError,_8 as GRADIENT_FRAME_DEFAULTS,Y2 as Halloween,m$ as LOGO_CLEANUP_MAX_SIDE,E2 as LOGO_EC_SAFETY,q_ as LOGO_PADDING_MAX,Wc as LOGO_PLATE_INSET,qc as LOGO_ROUNDED_RADIUS,Q_ as LOGO_SHAPES,Ph as LOGO_SIZE_DEFAULT,Rc as LOGO_SIZE_MAX,j_ as LOGO_SIZE_MIN,Nb as MODULE_SCALE_FLOOR,Ec as MODULE_SCALE_MAX,Ui as MODULE_SCALE_MIN,eC as OFFICIAL_FRAME_COLLECTIONS,Yv as OFFICIAL_FRAME_COUNT,Jv as OFFICIAL_FRAME_COUNTS,RC as PIXEL_SCAN_SIZES,BI as PIXEL_SCORE_MIN_CODE_WIDTH,FM as PRESET_SIZES,Xt as QR_ART_MAX_SAMPLE_SIZE,Lc as QR_ART_MIN_LUMA_GAP,Fi as QR_ART_MODES,Nh as QR_ART_SAMPLE_SIZES,Oi as QR_ART_VARIANTS,Ah as QR_CIRCLE_QUIET_MIN,z2 as QR_EYE_ATTRIBUTE,s7 as QR_PARTS,u0 as QR_PART_ATTRIBUTE,H_ as QR_SHAPES,Ct as QR_SILHOUETTE_MAX_CELLS,Zt as QR_SILHOUETTE_MIN_CELLS,Rh as QR_SILHOUETTE_MIN_SHARE,w_ as RETIRED_CORNER_EYE_DOT_PATTERNS,S_ as RETIRED_CORNER_EYE_PATTERNS,P$ as SCAN_CONTRAST_FAIL,gC as SCAN_CONTRAST_LOW,fs as SCAN_CONTRAST_MIN,k$ as SCAN_IMAGE_CONTRAST_MIN,E$ as SCAN_TEST_SIZES,w$ as SHARP_DOT_EYE_SAFE_BODIES,fE as SUPPORTS_PATH2D,J2 as SquareBorder,ex as StandardBox,tx as StrikedBox,rs as TEMPLATES,_$ as WEAK_BODY_EYES,x$ as WEAK_DOTS,y$ as WEAK_DOT_EYES,b$ as WEAK_EYES,$$ as WEAK_SHARP_DOT_EYES,q7 as WEBP_MAX_DIMENSION,y_ as angularGradientSchema,Sh as anyFrameSchema,x6 as baseTemplatePropsSchema,is as blobToDataUrl,vh as bodyPatternSchema,su as canvasToWebP,ln as circleQuietZone,Nc as clampModuleScale,_r as colorConfigSchema,Lw as colorTypeSchema,P7 as convertImageSettingsToPixels,DM as copyQRCodeToClipboard,ch as cornerEyeDotPatternSchema,lh as cornerEyePatternSchema,fb as createQRArtImage,TL as createQRCode,Io as createQRCodeTree,U$ as createQRSilhouette,U_ as customFrameSchema,Vi as damagedCodewords,z0 as decodePNGPixels,N2 as defaultTemplate,Gt as downloadFile,Rk as downloadImageData,Ek as downloadImageWithBoundingBox,Av as downloadPrintEPS,gM as downloadPrintPDF,yM as downloadPrintSVG,e$ as downloadQRCode,C0 as encodeWebPLossless,bu as epsToDataUrl,W_ as errorLevelSchema,_0 as excavateModules,Nw as excavationSchema,Ac as eyeColorOverrideSchema,J_ as eyeColorsSchema,f2 as frameLabels,$c as frameSchema,yo as frameSpecColorSchema,tC as frameSpecHash,B_ as frameSpecLabelSchema,Bc as frameSpecOf,xo as frameSpecPadding,xr as frameSpecPaintSchema,kc as frameSpecQrZone,tn as frameSpecSchema,D_ as frameSpecShapeSchema,C_ as frameStyleSchema,px as generatePath,FR as getAllTemplates,r0 as getBuiltInFrame,Qi as getCodewordMap,zw as getColorString,dE as getContrastLevel,pE as getContrastRatio,Jh as getCustomFrameLayout,Rv as getDownloadFilename,b8 as getFrameColors,Jt as getFrameDimensions,n0 as getFrameGapRatio,Wh as getFrameIconPath,un as getFrameLayout,w8 as getFrameSecondaryText,Dc as getFrameSpecColors,Kh as getFrameSpecGapRatio,y6 as getFrameSpecIssues,$8 as getFrameText,GI as getImageScanScore,Pr as getImageSettings,hC as getImageTones,dC as getImageTonesFromPixels,nt as getLayoutMargin,Xc as getLogoBlockDamage,nC as getLogoSizeLimit,Mo as getLuminance,Tw as getNormalizedColor,yu as getPrintLayout,uS as getQRArtColorIssue,Vh as getQRArtEyeColors,zc as getQRArtVariant,zo as getQRAsCanvas,_u as getQRAsEPS,hv as getQRAsPrintPDF,hM as getQRAsPrintPDFBuffer,gv as getQRAsPrintSVG,kt as getQRAsSVGDataUri,aC as getQRAsSVGNode,Kx as getQRAsWebP,d$ as getQRCodeData,t$ as getQRCodeDataUrl,h$ as getQRCodeSVGProps,q0 as getQRData,K6 as getQRFunctionModules,pv as getQRModuleCount,B8 as getQRShapePath,F8 as getQRSilhouetteFit,ZM as getSVGString,yC as getScanContrast,ZI as getScanScore,UI as getScanScoreFromPixels,Ze as getSolidColor,W0 as getStylePairRisk,Jc as getTemplate,DR as getTemplateIds,P0 as getWebPCompression,bc as gradientStopSchema,U6 as h,Fb as handleImageLoad,Hx as hasImageFill,mE as hexToRgb,__ as imageFitSchema,x_ as imagePaintSchema,$_ as imagePositionCss,b_ as imagePositionSchema,V_ as imageSettingsSchema,Kv as importFrameSvg,dt as isFrameActive,fo as isGradient,sh as isImagePaint,Yw as isLatin1Text,Fh as isQRArtActive,nn as isQRNode,i0 as isShapedCode,S$ as isWeakSharpPair,Rx as isWebPFile,h_ as linearGradientSchema,W6 as loadQRArtImage,TC as loadQRSilhouette,i7 as logoFitsBudget,_6 as logoOptionsSchema,Ch as logoShapeSchema,Xi as mixFrameColors,bt as normalizeColorConfig,l0 as partMarker,Ow as pickableCornerEyeDotPatternSchema,Fw as pickableCornerEyePatternSchema,p_ as qrArtImageSchema,f_ as qrArtModeSchema,ih as qrArtSchema,m_ as qrArtVariantSchema,Y_ as qrCodeShapeSchema,b6 as qrPropsSchema,X_ as qrShapeSchema,K_ as qrSilhouetteSchema,g_ as radialGradientSchema,p$ as removeLogoBackdrop,oC as removeLogoBackground,Uh as renderQRArt,os as renderToDOM,Ut as renderToString,ht as resolveErrorLevel,Yi as resolveFrameSpec,cC as resolveQRCodeProps,wr as rgbToCmyk,bo as sanitizeFrameText,QI as scanQRPixels,d_ as solidColorSchema,qx as svgToEPS,$6 as templateConfigSchema,w6 as templateDefinitionBaseSchema,g$ as toHyperscript,j7 as toSVGElement,$0 as toSVGString,F0 as validateSize,pn as withQRSize};//# sourceMappingURL=vanilla.browser.mjs.map
|
|
92
|
+
//# sourceMappingURL=vanilla.browser.mjs.map
|