qrdx 0.0.51 → 0.0.53
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 +102 -6
- 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 +7 -7
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +7 -7
- package/dist/core.mjs.map +1 -1
- 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/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/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 +3 -3
- package/dist/src/engine.d.ts.map +1 -1
- 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 +25 -10
- 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.map +1 -1
- package/dist/src/frames/catalogue/counts.d.ts +6 -6
- 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/holidays.d.ts.map +1 -1
- package/dist/src/frames/catalogue/index.d.ts.map +1 -1
- package/dist/src/frames/catalogue/places.d.ts.map +1 -1
- package/dist/src/frames/catalogue/seasons.d.ts.map +1 -1
- package/dist/src/frames/catalogue/tags.d.ts.map +1 -1
- package/dist/src/preact.d.ts +29 -0
- package/dist/src/preact.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/template/arrow.d.ts +0 -1
- package/dist/src/template/arrow.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/frame-template.d.ts +19 -0
- package/dist/src/template/frame-template.d.ts.map +1 -0
- package/dist/src/template/halloween.d.ts +0 -1
- 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 +0 -1
- package/dist/src/template/square-border.d.ts.map +1 -1
- package/dist/src/template/standard-box.d.ts +0 -1
- package/dist/src/template/standard-box.d.ts.map +1 -1
- package/dist/src/template/striked-box.d.ts +0 -1
- 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/types/frame-spec.d.ts +703 -14
- package/dist/types/frame-spec.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/qr.d.ts +137 -3
- package/dist/types/qr.d.ts.map +1 -1
- package/dist/types/template.d.ts +7 -0
- package/dist/types/template.d.ts.map +1 -1
- package/dist/vanilla.browser.mjs +32 -32
- package/dist/vanilla.browser.mjs.map +1 -1
- package/package.json +81 -5
- package/src/angular.ts +218 -0
- package/src/element-define.ts +9 -0
- package/src/element.ts +608 -0
- package/src/engine.ts +13 -2
- package/src/frame-spec.ts +331 -56
- package/src/frame-text.ts +111 -0
- package/src/frame.tsx +74 -287
- 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 +584 -0
- package/src/frames/catalogue/automotive.ts +2 -0
- package/src/frames/catalogue/counts.ts +6 -6
- package/src/frames/catalogue/events.ts +90 -0
- package/src/frames/catalogue/holidays.ts +336 -0
- package/src/frames/catalogue/index.ts +2733 -0
- package/src/frames/catalogue/places.ts +92 -0
- package/src/frames/catalogue/seasons.ts +64 -0
- package/src/frames/catalogue/tags.ts +384 -0
- package/src/frames/official/africa-day.json +110 -0
- package/src/frames/official/aquarium-feeding.json +113 -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/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/blood-donor-drop.json +87 -0
- package/src/frames/official/blood-donor-sticker.json +94 -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/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/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/childrens-day-carp.json +114 -0
- package/src/frames/official/childrens-day-sticker.json +88 -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/cowork-desk.json +82 -0
- package/src/frames/official/cowork-meeting-room.json +107 -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/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/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/food-day-wheat.json +109 -0
- package/src/frames/official/freedom-day-south-africa.json +109 -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-plant-label.json +98 -0
- package/src/frames/official/german-unity-day.json +100 -0
- package/src/frames/official/green-ribbon.json +123 -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/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/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/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/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/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/juneteenth-seal.json +187 -0
- package/src/frames/official/juneteenth-star.json +81 -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/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/lohri-bonfire.json +81 -0
- package/src/frames/official/lohri-dhol.json +114 -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/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/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/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/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/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/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/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/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/peace-day-dove.json +66 -0
- package/src/frames/official/pink-ribbon-seal.json +180 -0
- package/src/frames/official/pink-ribbon.json +82 -0
- package/src/frames/official/pohela-boishakh-mela.json +116 -0
- package/src/frames/official/pohela-boishakh.json +120 -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/posadas-candle.json +71 -0
- package/src/frames/official/posadas-pinata.json +114 -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/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/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/red-ribbon.json +66 -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/reyes-crown.json +78 -0
- package/src/frames/official/reyes-rosca.json +89 -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/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/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-uniform.json +109 -0
- package/src/frames/official/school-welcome-apple.json +71 -0
- package/src/frames/official/seollal-knot.json +122 -0
- package/src/frames/official/sham-el-nessim.json +81 -0
- package/src/frames/official/shogatsu-kadomatsu.json +81 -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/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/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/tabaski.json +114 -0
- package/src/frames/official/tanabata-stars.json +170 -0
- package/src/frames/official/tanabata-wishes.json +114 -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/tet-apricot.json +114 -0
- package/src/frames/official/tet-banh-chung.json +81 -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/ugadi-leaves.json +66 -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/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/visitor-info.json +78 -0
- package/src/frames/official/visitor-town-map.json +108 -0
- package/src/frames/official/visitor-wildlife.json +70 -0
- package/src/frames/official/water-day-drop.json +81 -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/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/yoga-day-lotus.json +81 -0
- package/src/frames/official/zoo-animal-facts.json +109 -0
- package/src/preact.ts +80 -0
- package/src/scan-score.ts +14 -7
- package/src/solid.ts +75 -0
- package/src/template/arrow.ts +14 -0
- package/src/template/dot-ring-layout.ts +230 -0
- package/src/template/dot-ring.tsx +165 -0
- package/src/template/frame-template.tsx +70 -0
- package/src/template/halloween.ts +14 -0
- package/src/template/index.ts +1 -0
- package/src/template/specs/arrow.json +26 -0
- package/src/template/specs/halloween.json +144 -0
- package/src/template/specs/square-border.json +27 -0
- package/src/template/specs/standard-box.json +31 -0
- package/src/template/specs/striked-box.json +56 -0
- package/src/template/square-border.ts +14 -0
- package/src/template/standard-box.ts +14 -0
- package/src/template/striked-box.ts +14 -0
- package/src/template-placement.ts +149 -0
- package/src/templates.tsx +16 -1
- package/types/frame-spec.ts +278 -11
- package/types/qr.ts +1 -1
- package/types/template.ts +7 -0
- 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
- package/src/template/arrow.tsx +0 -40
- package/src/template/halloween.tsx +0 -147
- package/src/template/square-border.tsx +0 -43
- package/src/template/standard-box.tsx +0 -43
- package/src/template/striked-box.tsx +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-spec.d.ts","sourceRoot":"","sources":["../../types/frame-spec.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAQ9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,sDAAsD;AACtD,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,eAAO,MAAM,iBAAiB;IAC5B,oCAAoC;;;IAGpC,qDAAqD;;IAErD,iCAAiC;;;;;IAKjC,oCAAoC;;IAEpC,qFAAqF;;IAErF,kCAAkC;;IAElC,kEAAkE;;IAElE,+CAA+C;;IAE/C,0EAA0E;;IAE1E,4DAA4D;;;IAG5D,4BAA4B;;CAEpB,CAAC;AAEX,yEAAyE;AACzE,eAAO,MAAM,WAAW,sOAyBd,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAE9C,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,oDAKrB,CAAC;AAYX;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,MAA8B,GACxC,MAAM,CASR;AAED,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOlD;
|
|
1
|
+
{"version":3,"file":"frame-spec.d.ts","sourceRoot":"","sources":["../../types/frame-spec.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAQ9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,sDAAsD;AACtD,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3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 +1,6 @@
|
|
|
1
|
-
'use strict';var zod=require('zod');var Y;(R=>{class e{constructor(n,r,t,o){this.version=n;this.errorCorrectionLevel=r;if(n<e.MIN_VERSION||n>e.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=n*4+17;let a=[];for(let m=0;m<this.size;m++)a.push(false);for(let m=0;m<this.size;m++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();let p=this.addEccAndInterleave(t);if(this.drawCodewords(p),o==-1){let m=1e9;for(let f=0;f<8;f++){this.applyMask(f),this.drawFormatBits(f);let h=this.getPenaltyScore();h<m&&(o=f,m=h),this.applyMask(f);}}l(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[];}version;errorCorrectionLevel;static encodeText(n,r){let t=R.QrSegment.makeSegments(n);return e.encodeSegments(t,r)}static encodeBinary(n,r){let t=R.QrSegment.makeBytes(n);return e.encodeSegments([t],r)}static encodeSegments(n,r,t=1,o=40,a=-1,p=true){if(!(e.MIN_VERSION<=t&&t<=o&&o<=e.MAX_VERSION)||a<-1||a>7)throw new RangeError("Invalid value");let m,f;for(m=t;;m++){let y=e.getNumDataCodewords(m,r)*8,A=u.getTotalBits(n,m);if(A<=y){f=A;break}if(m>=o)throw new RangeError("Data too long")}for(let y of [e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])p&&f<=e.getNumDataCodewords(m,y)*8&&(r=y);let h=[];for(let y of n){i(y.mode.modeBits,4,h),i(y.numChars,y.mode.numCharCountBits(m),h);for(let A of y.getData())h.push(A);}l(h.length==f);let S=e.getNumDataCodewords(m,r)*8;l(h.length<=S),i(0,Math.min(4,S-h.length),h),i(0,(8-h.length%8)%8,h),l(h.length%8==0);for(let y=236;h.length<S;y^=253)i(y,8,h);let c=[];for(;c.length*8<h.length;)c.push(0);return h.forEach((y,A)=>c[A>>>3]|=y<<7-(A&7)),new e(m,r,c,a)}size;mask;modules=[];isFunction=[];getModule(n,r){return 0<=n&&n<this.size&&0<=r&&r<this.size&&this.modules[r][n]}getModules(){return this.modules}drawFunctionPatterns(){for(let t=0;t<this.size;t++)this.setFunctionModule(6,t,t%2==0),this.setFunctionModule(t,6,t%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let n=this.getAlignmentPatternPositions(),r=n.length;for(let t=0;t<r;t++)for(let o=0;o<r;o++)t==0&&o==0||t==0&&o==r-1||t==r-1&&o==0||this.drawAlignmentPattern(n[t],n[o]);this.drawFormatBits(0),this.drawVersion();}drawFormatBits(n){let r=this.errorCorrectionLevel.formatBits<<3|n,t=r;for(let a=0;a<10;a++)t=t<<1^(t>>>9)*1335;let o=(r<<10|t)^21522;l(o>>>15==0);for(let a=0;a<=5;a++)this.setFunctionModule(8,a,s(o,a));this.setFunctionModule(8,7,s(o,6)),this.setFunctionModule(8,8,s(o,7)),this.setFunctionModule(7,8,s(o,8));for(let a=9;a<15;a++)this.setFunctionModule(14-a,8,s(o,a));for(let a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,s(o,a));for(let a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,s(o,a));this.setFunctionModule(8,this.size-8,true);}drawVersion(){if(this.version<7)return;let n=this.version;for(let t=0;t<12;t++)n=n<<1^(n>>>11)*7973;let r=this.version<<12|n;l(r>>>18==0);for(let t=0;t<18;t++){let o=s(r,t),a=this.size-11+t%3,p=Math.floor(t/3);this.setFunctionModule(a,p,o),this.setFunctionModule(p,a,o);}}drawFinderPattern(n,r){for(let t=-4;t<=4;t++)for(let o=-4;o<=4;o++){let a=Math.max(Math.abs(o),Math.abs(t)),p=n+o,m=r+t;0<=p&&p<this.size&&0<=m&&m<this.size&&this.setFunctionModule(p,m,a!=2&&a!=4);}}drawAlignmentPattern(n,r){for(let t=-2;t<=2;t++)for(let o=-2;o<=2;o++)this.setFunctionModule(n+o,r+t,Math.max(Math.abs(o),Math.abs(t))!=1);}setFunctionModule(n,r,t){this.modules[r][n]=t,this.isFunction[r][n]=true;}addEccAndInterleave(n){let r=this.version,t=this.errorCorrectionLevel;if(n.length!=e.getNumDataCodewords(r,t))throw new RangeError("Invalid argument");let o=e.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][r],a=e.ECC_CODEWORDS_PER_BLOCK[t.ordinal][r],p=Math.floor(e.getNumRawDataModules(r)/8),m=o-p%o,f=Math.floor(p/o),h=[],S=e.reedSolomonComputeDivisor(a);for(let y=0,A=0;y<o;y++){let T=n.slice(A,A+f-a+(y<m?0:1));A+=T.length;let M=e.reedSolomonComputeRemainder(T,S);y<m&&T.push(0),h.push(T.concat(M));}let c=[];for(let y=0;y<h[0].length;y++)h.forEach((A,T)=>{(y!=f-a||T>=m)&&c.push(A[y]);});return l(c.length==p),c}drawCodewords(n){if(n.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){t==6&&(t=5);for(let o=0;o<this.size;o++)for(let a=0;a<2;a++){let p=t-a,f=(t+1&2)==0?this.size-1-o:o;!this.isFunction[f][p]&&r<n.length*8&&(this.modules[f][p]=s(n[r>>>3],7-(r&7)),r++);}}l(r==n.length*8);}applyMask(n){if(n<0||n>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let t=0;t<this.size;t++){let o;switch(n){case 0:o=(t+r)%2==0;break;case 1:o=r%2==0;break;case 2:o=t%3==0;break;case 3:o=(t+r)%3==0;break;case 4:o=(Math.floor(t/3)+Math.floor(r/2))%2==0;break;case 5:o=t*r%2+t*r%3==0;break;case 6:o=(t*r%2+t*r%3)%2==0;break;case 7:o=((t+r)%2+t*r%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[r][t]&&o&&(this.modules[r][t]=!this.modules[r][t]);}}getPenaltyScore(){let n=0;for(let a=0;a<this.size;a++){let p=false,m=0,f=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[a][h]==p?(m++,m==5?n+=e.PENALTY_N1:m>5&&n++):(this.finderPenaltyAddHistory(m,f),p||(n+=this.finderPenaltyCountPatterns(f)*e.PENALTY_N3),p=this.modules[a][h],m=1);n+=this.finderPenaltyTerminateAndCount(p,m,f)*e.PENALTY_N3;}for(let a=0;a<this.size;a++){let p=false,m=0,f=[0,0,0,0,0,0,0];for(let h=0;h<this.size;h++)this.modules[h][a]==p?(m++,m==5?n+=e.PENALTY_N1:m>5&&n++):(this.finderPenaltyAddHistory(m,f),p||(n+=this.finderPenaltyCountPatterns(f)*e.PENALTY_N3),p=this.modules[h][a],m=1);n+=this.finderPenaltyTerminateAndCount(p,m,f)*e.PENALTY_N3;}for(let a=0;a<this.size-1;a++)for(let p=0;p<this.size-1;p++){let m=this.modules[a][p];m==this.modules[a][p+1]&&m==this.modules[a+1][p]&&m==this.modules[a+1][p+1]&&(n+=e.PENALTY_N2);}let r=0;for(let a of this.modules)r=a.reduce((p,m)=>p+(m?1:0),r);let t=this.size*this.size,o=Math.ceil(Math.abs(r*20-t*10)/t)-1;return l(0<=o&&o<=9),n+=o*e.PENALTY_N4,l(0<=n&&n<=2568888),n}getAlignmentPatternPositions(){if(this.version==1)return [];{let n=Math.floor(this.version/7)+2,r=this.version==32?26:Math.ceil((this.version*4+4)/(n*2-2))*2,t=[6];for(let o=this.size-7;t.length<n;o-=r)t.splice(1,0,o);return t}}static getNumRawDataModules(n){if(n<e.MIN_VERSION||n>e.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*n+128)*n+64;if(n>=2){let t=Math.floor(n/7)+2;r-=(25*t-10)*t-55,n>=7&&(r-=36);}return l(208<=r&&r<=29648),r}static getNumDataCodewords(n,r){return Math.floor(e.getNumRawDataModules(n)/8)-e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n]*e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n]}static reedSolomonComputeDivisor(n){if(n<1||n>255)throw new RangeError("Degree out of range");let r=[];for(let o=0;o<n-1;o++)r.push(0);r.push(1);let t=1;for(let o=0;o<n;o++){for(let a=0;a<r.length;a++)r[a]=e.reedSolomonMultiply(r[a],t),a+1<r.length&&(r[a]^=r[a+1]);t=e.reedSolomonMultiply(t,2);}return r}static reedSolomonComputeRemainder(n,r){let t=r.map(o=>0);for(let o of n){let a=o^t.shift();t.push(0),r.forEach((p,m)=>t[m]^=e.reedSolomonMultiply(p,a));}return t}static reedSolomonMultiply(n,r){if(n>>>8||r>>>8)throw new RangeError("Byte out of range");let t=0;for(let o=7;o>=0;o--)t=t<<1^(t>>>7)*285,t^=(r>>>o&1)*n;return l(t>>>8==0),t}finderPenaltyCountPatterns(n){let r=n[1];l(r<=this.size*3);let t=r>0&&n[2]==r&&n[3]==r*3&&n[4]==r&&n[5]==r;return (t&&n[0]>=r*4&&n[6]>=r?1:0)+(t&&n[6]>=r*4&&n[0]>=r?1:0)}finderPenaltyTerminateAndCount(n,r,t){return n&&(this.finderPenaltyAddHistory(r,t),r=0),r+=this.size,this.finderPenaltyAddHistory(r,t),this.finderPenaltyCountPatterns(t)}finderPenaltyAddHistory(n,r){r[0]==0&&(n+=this.size),r.pop(),r.unshift(n);}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]]}R.QrCode=e;function i(b,n,r){if(n<0||n>31||b>>>n)throw new RangeError("Value out of range");for(let t=n-1;t>=0;t--)r.push(b>>>t&1);}function s(b,n){return (b>>>n&1)!=0}function l(b){if(!b)throw new Error("Assertion error")}class u{constructor(n,r,t){this.mode=n;this.numChars=r;this.bitData=t;if(r<0)throw new RangeError("Invalid argument");this.bitData=t.slice();}mode;numChars;bitData;static makeBytes(n){let r=[];for(let t of n)i(t,8,r);return new u(u.Mode.BYTE,n.length,r)}static makeNumeric(n){if(!u.isNumeric(n))throw new RangeError("String contains non-numeric characters");let r=[];for(let t=0;t<n.length;){let o=Math.min(n.length-t,3);i(parseInt(n.substr(t,o),10),o*3+1,r),t+=o;}return new u(u.Mode.NUMERIC,n.length,r)}static makeAlphanumeric(n){if(!u.isAlphanumeric(n))throw new RangeError("String contains unencodable characters in alphanumeric mode");let r=[],t;for(t=0;t+2<=n.length;t+=2){let o=u.ALPHANUMERIC_CHARSET.indexOf(n.charAt(t))*45;o+=u.ALPHANUMERIC_CHARSET.indexOf(n.charAt(t+1)),i(o,11,r);}return t<n.length&&i(u.ALPHANUMERIC_CHARSET.indexOf(n.charAt(t)),6,r),new u(u.Mode.ALPHANUMERIC,n.length,r)}static makeSegments(n){return n==""?[]:u.isNumeric(n)?[u.makeNumeric(n)]:u.isAlphanumeric(n)?[u.makeAlphanumeric(n)]:[u.makeBytes(u.toUtf8ByteArray(n))]}static makeEci(n){let r=[];if(n<0)throw new RangeError("ECI assignment value out of range");if(n<128)i(n,8,r);else if(n<16384)i(2,2,r),i(n,14,r);else if(n<1e6)i(6,3,r),i(n,21,r);else throw new RangeError("ECI assignment value out of range");return new u(u.Mode.ECI,0,r)}static isNumeric(n){return u.NUMERIC_REGEX.test(n)}static isAlphanumeric(n){return u.ALPHANUMERIC_REGEX.test(n)}getData(){return this.bitData.slice()}static getTotalBits(n,r){let t=0;for(let o of n){let a=o.mode.numCharCountBits(r);if(o.numChars>=1<<a)return 1/0;t+=4+a+o.bitData.length;}return t}static toUtf8ByteArray(n){n=encodeURI(n);let r=[];for(let t=0;t<n.length;t++)n.charAt(t)!="%"?r.push(n.charCodeAt(t)):(r.push(parseInt(n.substr(t+1,2),16)),t+=2);return r}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}R.QrSegment=u;})(Y||={});(i=>{(l=>{class s{constructor(R,b){this.ordinal=R;this.formatBits=b;}ordinal;formatBits;static LOW=new s(0,1);static MEDIUM=new s(1,0);static QUARTILE=new s(2,3);static HIGH=new s(3,2)}l.Ecc=s;})(i.QrCode||={});})(Y||={});(i=>{(l=>{class s{constructor(R,b){this.modeBits=R;this.numBitsCharCount=b;}modeBits;numBitsCharCount;static NUMERIC=new s(1,[10,12,14]);static ALPHANUMERIC=new s(2,[9,11,13]);static BYTE=new s(4,[8,16,16]);static KANJI=new s(8,[8,10,12]);static ECI=new s(7,[0,0,0]);numCharCountBits(R){return this.numBitsCharCount[Math.floor((R+7)/17)]}}l.Mode=s;})(i.QrSegment||={});})(Y||={});var $=Y;({L:$.QrCode.Ecc.LOW,M:$.QrCode.Ecc.MEDIUM,Q:$.QrCode.Ecc.QUARTILE,H:$.QrCode.Ecc.HIGH});var Lt=0;function _t(e,i="#000000"){return e?typeof e=="string"?e:e.type==="solid"?e.color:e.type==="image"?e.underlay||i:(e.type==="linear"||e.type==="radial"||e.type==="angular")&&e.stops[0]?.color||i:i}var Te=["logo","halftone"],Ne=zod.z.enum(Te),se={logo:["blend","badge"],halftone:["color","mono"]},Le=zod.z.enum([...se.logo,...se.halftone]),V=192,Pe=e=>Math.ceil(e/3)*4,_e=zod.z.object({width:zod.z.number().int().min(1).max(V),height:zod.z.number().int().min(1).max(V),data:zod.z.string().max(Pe(V*V*4))}).refine(e=>e.data.length===Pe(e.width*e.height*4),{message:"Art image data does not match its width and height"}),ce=zod.z.object({mode:Ne,image:_e,intensity:zod.z.number().min(0).max(1).optional(),variant:Le.optional(),matchEyes:zod.z.boolean().optional()});var It=zod.z.enum(["solid","linear","radial","angular","image"]),Ie=zod.z.object({type:zod.z.literal("solid"),color:zod.z.string()}),ee=zod.z.object({color:zod.z.string(),offset:zod.z.number().min(0).max(100)}),Oe=zod.z.object({type:zod.z.literal("linear"),stops:zod.z.array(ee).min(2),angle:zod.z.number().optional().default(0)}),Fe=zod.z.object({type:zod.z.literal("radial"),stops:zod.z.array(ee).min(2)}),ve=zod.z.object({type:zod.z.literal("angular"),stops:zod.z.array(ee).min(2),angle:zod.z.number().optional().default(0)}),we=zod.z.enum(["cover","contain","tile"]),ze=zod.z.enum(["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"]),De=zod.z.object({type:zod.z.literal("image"),src:zod.z.string().min(1),fit:we.optional().default("cover"),scale:zod.z.number().min(.1).max(4).optional().default(1),position:ze.optional().default("center"),opacity:zod.z.number().min(0).max(1).optional().default(1),underlay:zod.z.string().optional()}),B=zod.z.union([zod.z.string(),Ie,Oe,Fe,ve,De]);function le(e,i="#000000"){return e?typeof e=="string"?{type:"solid",color:e}:e:{type:"solid",color:i}}function Ot(e){return !e||typeof e=="string"?false:e.type==="linear"||e.type==="radial"||e.type==="angular"}function Ft(e){return typeof e=="object"&&e!==null&&e.type==="image"}function vt(e,i="#000000"){let s=le(e,i);return s.type==="solid"?s.color:s.type==="image"?s.underlay||i:s.stops[0]?.color||i}function Be(e="center"){let[i,s]=e.split("-");return e==="center"?"center":s?`${s} ${i}`:i==="top"||i==="bottom"?`center ${i}`:`${i} center`}function wt(e){if(!e)return "#000000";if(typeof e=="string")return e;let i=le(e);if(i.type==="solid")return i.color;if(i.type==="image"){let u=i.fit==="tile"?`${25*(i.scale??1)}% auto`:(i.scale??1)===1?i.fit==="contain"?"contain":"cover":`${100*(i.scale??1)}% auto`,R=i.fit==="tile"?"repeat":"no-repeat";return `${`url("${i.src.replace(/"/g,"%22")}")`} ${Be(i.position)} / ${u} ${R}, ${i.underlay??"transparent"}`}let l=[...i.stops].sort((u,R)=>u.offset-R.offset).map(u=>`${u.color} ${u.offset}%`).join(", ");return i.type==="linear"?`linear-gradient(${(i.angle??0)+90}deg, ${l})`:i.type==="angular"?`conic-gradient(from ${i.angle??0}deg, ${l})`:`radial-gradient(circle, ${l})`}var zt=zod.z.object({x:zod.z.number(),y:zod.z.number(),w:zod.z.number(),h:zod.z.number()});var me=["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"],Ue=["diamond","star","banner"],ue=zod.z.enum([...me,...Ue]),Dt=zod.z.enum(me);var pe=["square","rounded","gear","circle","diya","extra-rounded","message","pointy","leaf","drop","octagon","bevel","squircle","cushion","shield","petal","leaf-reverse"],ke=["curly"],de=zod.z.enum([...pe,...ke]),Bt=zod.z.enum(pe);var Qe=["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"],q=24,Gt="Scan me",je=.5,te=1.5,Ye=zod.z.enum(Qe),ne=zod.z.object({style:Ye,text:zod.z.string().max(q).optional(),color:zod.z.string().optional(),textColor:zod.z.string().optional(),secondaryText:zod.z.string().max(q).optional(),secondaryColor:zod.z.string().optional(),fontScale:zod.z.number().min(je).max(te).optional()});var Ut={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},qt=/^[MmLlHhVvCcSsQqTtAaZz0-9.,+\-\s]*$/,fe=/[+-]?(?:\d+\.?\d*|\.\d+)/y;function He(e,i=Number.POSITIVE_INFINITY){if(!qt.test(e))return null;let s=[],l=0,u=()=>{for(;l<e.length&&/[\s,]/.test(e[l]);)l++;},R=()=>{u(),fe.lastIndex=l;let r=fe.exec(e);if(!r)return null;let t=r[0],o=t.indexOf(".");if(o>=0&&t.length-o-1>i)return null;l=fe.lastIndex;let a=Number(t);return Number.isFinite(a)?a:null},b=()=>{u();let r=e[l];return r==="0"||r==="1"?(l++,r==="1"?1:0):null},n=()=>(u(),l<e.length&&/[0-9.+-]/.test(e[l]));for(u();l<e.length;){let r=e[l],t=r.toUpperCase(),o=Ut[t];if(o===void 0||s.length===0&&t!=="M")return null;if(l++,o===0){s.push({command:r,values:[]}),u();continue}let a=r,p=true;for(;p||n();){let m=[];for(let f=0;f<o;f++){let h=t==="A"&&(f===3||f===4)?b():R();if(h===null)return null;m.push(h);}s.push({command:a,values:m}),t==="M"&&(a=r==="M"?"L":"l"),p=false;}u();}return s}function $e(e){let i=0;for(let{command:s}of e)i+=s.toUpperCase()==="A"?4:1;return i}function Ve(e){let i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,u=Number.NEGATIVE_INFINITY,R=(b,n)=>{i=Math.min(i,b),s=Math.min(s,n),l=Math.max(l,b),u=Math.max(u,n);};for(let b of e)b.op==="C"?(R(b.x1,b.y1),R(b.x2,b.y2),R(b.x,b.y)):b.op!=="Z"&&R(b.x,b.y);return Number.isFinite(i)?{x0:i,y0:s,x1:l,y1:u}:null}var he=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/y;function kt(e,i,s,l,u,R,b,n,r){if(e===n&&i===r)return [];let t=Math.abs(s),o=Math.abs(l);if(t===0||o===0)return [{op:"L",x:n,y:r}];let a=u*Math.PI/180,p=Math.cos(a),m=Math.sin(a),f=(e-n)/2,h=(i-r)/2,S=p*f+m*h,c=-m*f+p*h,y=S*S/(t*t)+c*c/(o*o);y>1&&(t*=Math.sqrt(y),o*=Math.sqrt(y));let A=t*t*o*o-t*t*c*c-o*o*S*S,T=t*t*c*c+o*o*S*S,M=(R===b?-1:1)*Math.sqrt(Math.max(0,A/T)),g=M*t*c/o,E=-M*o*S/t,_=p*g-m*E+(e+n)/2,N=m*g+p*E+(i+r)/2,k=(F,O,w,J)=>Math.atan2(F*J-O*w,F*w+O*J),K=k(1,0,(S-g)/t,(c-E)/o),D=k((S-g)/t,(c-E)/o,(-S-g)/t,(-c-E)/o);!b&&D>0?D-=2*Math.PI:b&&D<0&&(D+=2*Math.PI);let Q=Math.max(1,Math.ceil(Math.abs(D)/(Math.PI/2)-1e-9)),j=D/Q,W=4/3*Math.tan(j/4),ae=(F,O)=>[_+t*p*F-o*m*O,N+t*m*F+o*p*O],Re=[];for(let F=0;F<Q;F++){let O=K+F*j,w=O+j,[J,Ct]=ae(Math.cos(O)-W*Math.sin(O),Math.sin(O)+W*Math.cos(O)),[Rt,Pt]=ae(Math.cos(w)+W*Math.sin(w),Math.sin(w)-W*Math.cos(w)),[Tt,Nt]=F===Q-1?[n,r]:ae(Math.cos(w),Math.sin(w));Re.push({op:"C",x1:J,y1:Ct,x2:Rt,y2:Pt,x:Tt,y:Nt});}return Re}function Xe(e){let i=[],s=0,l=0,u=0,R=0,b=0,n="",r=null,t=null,o=()=>{for(;s<e.length&&/[\s,]/.test(e[s]);)s++;},a=()=>{o(),he.lastIndex=s;let f=he.exec(e);return f?(s=he.lastIndex,Number(f[0])):null},p=()=>{o();let f=e[s];return f==="0"||f==="1"?(s++,f==="1"):null},m=f=>{let h=[];for(let S=0;S<f;S++){let c=a();if(c===null)return null;h.push(c);}return h};for(;o(),!(s>=e.length);){let f=e[s];if(/[MmLlHhVvCcSsQqTtAaZz]/.test(f))n=f,s++;else if(!n||n==="Z"||n==="z")break;let h=n===n.toLowerCase(),S=h?l:0,c=h?u:0,y=n.toUpperCase();if(y==="Z"){i.push({op:"Z"}),l=R,u=b,r=null,t=null;continue}if(y==="A"){let g=m(3),E=p(),_=p(),N=m(2);if(!(g&&N)||E===null||_===null)break;let[k,K,D]=g,Q=N[0]+S,j=N[1]+c;i.push(...kt(l,u,k,K,D,E,_,Q,j)),l=Q,u=j,r=null,t=null;continue}let A={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2}[y]??0,T=m(A);if(!T)break;let M=T;switch(y){case "M":l=M[0]+S,u=M[1]+c,R=l,b=u,i.push({op:"M",x:l,y:u}),n=h?"l":"L",r=null,t=null;break;case "L":case "H":case "V":y!=="V"&&(l=M[0]+S),y==="V"?u=M[0]+c:y==="L"&&(u=M[1]+c),i.push({op:"L",x:l,y:u}),r=null,t=null;break;case "C":case "S":{let g,E;y==="C"?(g=[M[0]+S,M[1]+c],E=M.slice(2)):(g=r?[2*l-r[0],2*u-r[1]]:[l,u],E=M);let _=[E[0]+S,E[1]+c],N=[E[2]+S,E[3]+c];i.push({op:"C",x1:g[0],y1:g[1],x2:_[0],y2:_[1],x:N[0],y:N[1]}),[l,u]=N,r=_,t=null;break}case "Q":case "T":{let g,E;y==="Q"?(g=[M[0]+S,M[1]+c],E=[M[2]+S,M[3]+c]):(g=t?[2*l-t[0],2*u-t[1]]:[l,u],E=[M[0]+S,M[1]+c]),i.push({op:"C",x1:l+2/3*(g[0]-l),y1:u+2/3*(g[1]-u),x2:E[0]+2/3*(g[0]-E[0]),y2:E[1]+2/3*(g[1]-E[1]),x:E[0],y:E[1]}),[l,u]=E,t=g,r=null;break}}}return i}var Ke="qrdx.frame",We=1,Je="custom",L={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:q},et=["wifi","star","heart","phone","headphones","calendar","user","chat","bag","bell","cup","card","check","info","home","pin","share","download","clock","snowflake","pumpkin","tree","sparkle","gift"],tt=.95,nt=200,rt=["frame","text","accent","background"],Qt=/[\t\n\v\f\r\u0085\u2028\u2029]/g,jt=/[\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 ot(e,i=q){let s=e.slice(0,1e3).normalize("NFC").replace(Qt," ").replace(jt,"").replace(/\s+/g," ").trim();return Array.from(s).slice(0,Math.max(0,i)).join("").trim()}function Yt(e){for(let i of e)if((i.codePointAt(0)??0)>255)return false;return true}var xe=e=>Math.abs(e*1e3-Math.round(e*1e3))<1e-6,P=zod.z.number().min(-L.maxCoordinate).max(L.maxCoordinate).refine(xe,{message:`Numbers may have at most ${L.maxDecimals} decimals`}),I=P.refine(e=>e>0,{message:"Must be greater than 0"}),oe=P.refine(e=>e>=0,{message:"Must not be negative"}),re=zod.z.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,"Use a #rgb or #rrggbb color"),ye=zod.z.union([zod.z.enum(rt),re]),H=zod.z.union([ye,zod.z.object({mix:zod.z.tuple([ye,ye]),amount:zod.z.number().min(0).max(1).refine(xe)}).strict()]),U=zod.z.union([H,zod.z.object({gradient:zod.z.object({from:H,to:H,direction:zod.z.enum(["horizontal","vertical"]).optional(),steps:zod.z.int().min(2).max(L.maxGradientSteps).optional()}).strict()}).strict()]),be={x:P,y:P,width:I,height:I},Ht=zod.z.object({type:zod.z.literal("rect"),...be,radius:oe.optional(),fill:U,hole:zod.z.object({...be,radius:oe.optional()}).strict().optional()}).strict(),$t=zod.z.object({type:zod.z.literal("circle"),cx:P,cy:P,r:I,hole:I.optional(),fill:U}).strict(),Vt=zod.z.object({type:zod.z.literal("ellipse"),cx:P,cy:P,rx:I,ry:I,fill:U}).strict(),Xt=zod.z.object({type:zod.z.literal("polygon"),points:zod.z.array(zod.z.tuple([P,P])).min(3).max(L.maxPolygonPoints),fill:U}).strict(),Zt=zod.z.object({type:zod.z.literal("path"),d:zod.z.string().min(2).max(L.maxPathLength),fill:U,fillRule:zod.z.enum(["nonzero","evenodd"]).optional()}).strict(),Kt=zod.z.object({type:zod.z.literal("line"),x1:P,y1:P,x2:P,y2:P,width:I,cap:zod.z.enum(["butt","round"]).optional(),dash:zod.z.tuple([I,I]).optional(),fill:U}).strict(),Wt=zod.z.object({type:zod.z.literal("icon"),icon:zod.z.enum(et),x:P,y:P,size:I,fill:U}).strict(),it=zod.z.discriminatedUnion("type",[Ht,$t,Vt,Xt,Zt,Kt,Wt]),at={id:zod.z.string().regex(/^[a-z][a-z0-9-]{0,31}$/),slot:zod.z.enum(["primary","secondary","fixed"]),text:zod.z.string().max(200),maxLength:zod.z.int().min(1).max(q).optional(),color:H,weight:zod.z.enum(["bold","regular"]).optional()},Jt=zod.z.object({type:zod.z.literal("text"),...at,box:zod.z.object(be).strict(),align:zod.z.enum(["start","middle","end"]).optional(),fontSize:I.optional()}).strict(),en=zod.z.object({type:zod.z.literal("curved"),...at,curve:zod.z.object({cx:P,cy:P,radius:I,side:zod.z.enum(["top","bottom"]),spread:zod.z.number().min(20).max(300).refine(xe).optional()}).strict(),fontSize:I}).strict(),st=zod.z.discriminatedUnion("type",[Jt,en]),Ze=P.refine(e=>e>=L.minArtboard&&e<=L.maxArtboard,{message:`Artboard sides must be ${L.minArtboard} to ${L.maxArtboard} units`}),tn=zod.z.object({kind:zod.z.literal(Ke),version:zod.z.literal(We),artboard:zod.z.object({width:Ze,height:Ze}).strict(),qr:zod.z.object({x:P,y:P,size:I,padding:oe.optional(),radius:oe.optional()}).strict(),colors:zod.z.object({frame:re,text:re.optional(),accent:re.optional()}).strict(),shapes:zod.z.array(it).max(L.maxShapes),labels:zod.z.array(st).max(L.maxLabels),bleed:zod.z.union([zod.z.literal("none"),H]).optional()}).strict();function ct(e){let i=ge(e);return {x0:e.qr.x-i,y0:e.qr.y-i,x1:e.qr.x+e.qr.size+i,y1:e.qr.y+e.qr.size+i}}function ge(e){return e.qr.padding??e.qr.size*L.defaultPadding}var nn=(e,i)=>Math.min(e.x1,i.x1)-Math.max(e.x0,i.x0)>1e-6&&Math.min(e.y1,i.y1)-Math.max(e.y0,i.y0)>1e-6;function rn(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 i=e.points.map(([l])=>l),s=e.points.map(([,l])=>l);return {bounds:{x0:Math.min(...i),y0:Math.min(...s),x1:Math.max(...i),y1:Math.max(...s)},segments:e.points.length}}case "path":{let i=He(e.d,L.maxDecimals);return i?{bounds:Ve(Xe(e.d)),segments:$e(i)}:{bounds:null,segments:0}}case "line":{let i=e.width/2,s=Math.hypot(e.x2-e.x1,e.y2-e.y1),l=e.dash?Math.ceil(s/(e.dash[0]+e.dash[1])):1;return {bounds:{x0:Math.min(e.x1,e.x2)-i,y0:Math.min(e.y1,e.y2)-i,x1:Math.max(e.x1,e.x2)+i,y1:Math.max(e.y1,e.y2)+i},segments:l*(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:nt}}}function on(e,i){let s=(c,y=[])=>i.addIssue({code:"custom",message:c,path:y}),l=L,u=new TextEncoder().encode(JSON.stringify(e)).length;if(u>l.maxBytes){s(`The spec is ${u} bytes; the limit is ${l.maxBytes}`);return}let{width:R,height:b}=e.artboard,n=Math.max(R,b)*.005,r={x0:-n,y0:-n,x1:R+n,y1:b+n},t=c=>c.x0>=r.x0&&c.y0>=r.y0&&c.x1<=r.x1&&c.y1<=r.y1,{qr:o}=e,a=ge(e);a<o.size*l.minPadding-1e-9&&s(`qr.padding must be at least ${l.minPadding*100}% of qr.size`,["qr","padding"]),o.size<Math.min(R,b)*l.minQrShare-1e-9&&s(`qr.size must be at least ${l.minQrShare*100}% of the artboard's shorter side`,["qr","size"]);let p=ct(e);(p.x0<-1e-9||p.y0<-1e-9||p.x1>R+1e-9||p.y1>b+1e-9)&&s("The code and its padding must sit inside the artboard",["qr"]),(o.radius??0)>(o.size+2*a)/2&&s("qr.radius is larger than half the plate",["qr","radius"]);let m=0,f=0;e.shapes.forEach((c,y)=>{let A=["shapes",y],{bounds:T,segments:M}=rn(c);if(!T){s("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",[...A,"d"]);return}if(t(T)||s("The shape extends outside the artboard",A),c.type==="rect"&&c.hole){let{hole:g}=c;(g.x<c.x||g.y<c.y||g.x+g.width>c.x+c.width+1e-9||g.y+g.height>c.y+c.height+1e-9)&&s("The hole must sit inside its rect",[...A,"hole"]);}c.type==="circle"&&c.hole&&c.hole>=c.r&&s("The hole must be smaller than the circle",[...A,"hole"]),m+=M,typeof c.fill=="object"&&"gradient"in c.fill&&(f+=(c.fill.gradient.steps??32)*M);}),m>l.maxSegments&&s(`The shapes have ${m} segments; the limit is ${l.maxSegments}`,["shapes"]),f>l.maxGradientWork&&s("Gradient fills are too detailed (fewer steps or simpler shapes)",["shapes"]);let h=new Set,S=new Set;e.labels.forEach((c,y)=>{let A=["labels",y];h.has(c.id)&&s(`Label id "${c.id}" is used twice`,[...A,"id"]),h.add(c.id),c.slot!=="fixed"&&(S.has(c.slot)&&s(`Only one label may use the ${c.slot} slot`,[...A,"slot"]),S.add(c.slot));let T=c.maxLength??l.maxTextLength;c.text!==ot(c.text,T)&&s(`Label text must be at most ${T} characters, trimmed, with no control or invisible characters (see sanitizeFrameText)`,[...A,"text"]);let M;if(c.type==="text")M={x0:c.box.x,y0:c.box.y,x1:c.box.x+c.box.width,y1:c.box.y+c.box.height},c.fontSize!==void 0&&c.fontSize>c.box.height*tt+1e-9&&s("fontSize may be at most 95% of the label's row height",[...A,"fontSize"]),nn(M,p)&&s("The label overlaps the code or its padding",[...A,"box"]);else {let{cx:g,cy:E,radius:_}=c.curve,N=c.fontSize*te*.6;M={x0:g-_-N,y0:E-_-N,x1:g+_+N,y1:E+_+N};let k=Math.hypot(Math.max(p.x0-g,0,g-p.x1),Math.max(p.y0-E,0,E-p.y1));Math.hypot(Math.max(Math.abs(p.x0-g),Math.abs(p.x1-g)),Math.max(Math.abs(p.y0-E),Math.abs(p.y1-E)))<=_-N||k>=_+N||s("The curved label crosses the code or its padding",[...A,"curve"]);}t(M)||s("The label extends outside the artboard",A);});}var Se=tn.superRefine(on);function an(e){let i=Se.safeParse(e);return i.success?[]:i.error.issues.map(s=>s.path.length>0?`${s.path.join(".")}: ${s.message}`:s.message)}var lt=ne.extend({style:zod.z.literal(Je),spec:Se}),Ee=zod.z.discriminatedUnion("style",[ne,lt]);var mt=["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"],Ae=zod.z.enum(mt);var ut=["square","rounded","circle"],Ce=zod.z.enum(ut),pt=zod.z.object({src:zod.z.string(),height:zod.z.number(),width:zod.z.number(),excavate:zod.z.boolean(),x:zod.z.number().optional(),y:zod.z.number().optional(),padding:zod.z.number().min(0).optional(),shape:Ce.optional(),plate:zod.z.string().optional()}),dt=.1,ft=.3,cn=.25,ht=2,ln=zod.z.object({size:zod.z.number().min(dt).max(ft).optional(),padding:zod.z.number().min(0).max(ht).optional(),x:zod.z.number().min(0).max(1).optional(),y:zod.z.number().min(0).max(1).optional(),shape:Ce.optional(),plate:zod.z.string().optional()}),yt=zod.z.enum(["L","M","Q","H"]),bt=.5,xt=1,mn=.07,gt=["square","circle","heart"],St=zod.z.enum(gt),un=3,Z=64,Me=8,pn=.42,Et=zod.z.object({type:zod.z.literal("silhouette"),width:zod.z.number().int().min(Me).max(Z),height:zod.z.number().int().min(Me).max(Z),cells:zod.z.string().max(Z*Z).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"}),At=zod.z.union([St,Et]),dn=["topLeft","topRight","bottomLeft"],ie=zod.z.object({outer:B.optional(),inner:B.optional()}),Mt=zod.z.object({topLeft:ie.optional(),topRight:ie.optional(),bottomLeft:ie.optional()}),fn=zod.z.object({value:zod.z.string(),size:zod.z.number().optional(),level:yt.optional(),bgColor:B.optional(),fgColor:B.optional(),eyeColor:B.optional(),dotColor:B.optional(),bodyPattern:Ae.optional(),cornerEyePattern:de.optional(),cornerEyeDotPattern:ue.optional(),margin:zod.z.number().optional(),imageSettings:pt.optional(),isOGContext:zod.z.boolean().optional(),templateId:zod.z.string().optional(),customProps:zod.z.record(zod.z.string(),zod.z.any()).optional(),frame:Ee.optional(),art:ce.optional(),eyeColors:Mt.optional(),moduleScale:zod.z.number().min(bt).max(xt).optional(),autoLevel:zod.z.boolean().optional(),shape:At.optional()});var hn=zod.z.object({fgColor:zod.z.string().optional(),bgColor:zod.z.string().optional()}),yn=zod.z.object({pixelSize:zod.z.number(),url:zod.z.string()}),bn=zod.z.object({id:zod.z.string(),name:zod.z.string(),description:zod.z.string().optional()});/**
|
|
1
|
+
'use strict';var zod=require('zod');var H;(h=>{class e{constructor(t,r,n,i){this.version=t;this.errorCorrectionLevel=r;if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=t*4+17;let m=[];for(let d=0;d<this.size;d++)m.push(false);for(let d=0;d<this.size;d++)this.modules.push(m.slice()),this.isFunction.push(m.slice());this.drawFunctionPatterns();let p=this.addEccAndInterleave(n);if(this.drawCodewords(p),i==-1){let d=1e9;for(let b=0;b<8;b++){this.applyMask(b),this.drawFormatBits(b);let x=this.getPenaltyScore();x<d&&(i=b,d=x),this.applyMask(b);}}s(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[];}version;errorCorrectionLevel;static encodeText(t,r){let n=h.QrSegment.makeSegments(t);return e.encodeSegments(n,r)}static encodeBinary(t,r){let n=h.QrSegment.makeBytes(t);return e.encodeSegments([n],r)}static encodeSegments(t,r,n=1,i=40,m=-1,p=true){if(!(e.MIN_VERSION<=n&&n<=i&&i<=e.MAX_VERSION)||m<-1||m>7)throw new RangeError("Invalid value");let d,b;for(d=n;;d++){let l=e.getNumDataCodewords(d,r)*8,P=c.getTotalBits(t,d);if(P<=l){b=P;break}if(d>=i)throw new RangeError("Data too long")}for(let l of [e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])p&&b<=e.getNumDataCodewords(d,l)*8&&(r=l);let x=[];for(let l of t){o(l.mode.modeBits,4,x),o(l.numChars,l.mode.numCharCountBits(d),x);for(let P of l.getData())x.push(P);}s(x.length==b);let E=e.getNumDataCodewords(d,r)*8;s(x.length<=E),o(0,Math.min(4,E-x.length),x),o(0,(8-x.length%8)%8,x),s(x.length%8==0);for(let l=236;x.length<E;l^=253)o(l,8,x);let S=[];for(;S.length*8<x.length;)S.push(0);return x.forEach((l,P)=>S[P>>>3]|=l<<7-(P&7)),new e(d,r,S,m)}size;mask;modules=[];isFunction=[];getModule(t,r){return 0<=t&&t<this.size&&0<=r&&r<this.size&&this.modules[r][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2==0),this.setFunctionModule(n,6,n%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),r=t.length;for(let n=0;n<r;n++)for(let i=0;i<r;i++)n==0&&i==0||n==0&&i==r-1||n==r-1&&i==0||this.drawAlignmentPattern(t[n],t[i]);this.drawFormatBits(0),this.drawVersion();}drawFormatBits(t){let r=this.errorCorrectionLevel.formatBits<<3|t,n=r;for(let m=0;m<10;m++)n=n<<1^(n>>>9)*1335;let i=(r<<10|n)^21522;s(i>>>15==0);for(let m=0;m<=5;m++)this.setFunctionModule(8,m,a(i,m));this.setFunctionModule(8,7,a(i,6)),this.setFunctionModule(8,8,a(i,7)),this.setFunctionModule(7,8,a(i,8));for(let m=9;m<15;m++)this.setFunctionModule(14-m,8,a(i,m));for(let m=0;m<8;m++)this.setFunctionModule(this.size-1-m,8,a(i,m));for(let m=8;m<15;m++)this.setFunctionModule(8,this.size-15+m,a(i,m));this.setFunctionModule(8,this.size-8,true);}drawVersion(){if(this.version<7)return;let t=this.version;for(let n=0;n<12;n++)t=t<<1^(t>>>11)*7973;let r=this.version<<12|t;s(r>>>18==0);for(let n=0;n<18;n++){let i=a(r,n),m=this.size-11+n%3,p=Math.floor(n/3);this.setFunctionModule(m,p,i),this.setFunctionModule(p,m,i);}}drawFinderPattern(t,r){for(let n=-4;n<=4;n++)for(let i=-4;i<=4;i++){let m=Math.max(Math.abs(i),Math.abs(n)),p=t+i,d=r+n;0<=p&&p<this.size&&0<=d&&d<this.size&&this.setFunctionModule(p,d,m!=2&&m!=4);}}drawAlignmentPattern(t,r){for(let n=-2;n<=2;n++)for(let i=-2;i<=2;i++)this.setFunctionModule(t+i,r+n,Math.max(Math.abs(i),Math.abs(n))!=1);}setFunctionModule(t,r,n){this.modules[r][t]=n,this.isFunction[r][t]=true;}addEccAndInterleave(t){let r=this.version,n=this.errorCorrectionLevel;if(t.length!=e.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");let i=e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],m=e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],p=Math.floor(e.getNumRawDataModules(r)/8),d=i-p%i,b=Math.floor(p/i),x=[],E=e.reedSolomonComputeDivisor(m);for(let l=0,P=0;l<i;l++){let M=t.slice(P,P+b-m+(l<d?0:1));P+=M.length;let R=e.reedSolomonComputeRemainder(M,E);l<d&&M.push(0),x.push(M.concat(R));}let S=[];for(let l=0;l<x[0].length;l++)x.forEach((P,M)=>{(l!=b-m||M>=d)&&S.push(P[l]);});return s(S.length==p),S}drawCodewords(t){if(t.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let n=this.size-1;n>=1;n-=2){n==6&&(n=5);for(let i=0;i<this.size;i++)for(let m=0;m<2;m++){let p=n-m,b=(n+1&2)==0?this.size-1-i:i;!this.isFunction[b][p]&&r<t.length*8&&(this.modules[b][p]=a(t[r>>>3],7-(r&7)),r++);}}s(r==t.length*8);}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let r=0;r<this.size;r++)for(let n=0;n<this.size;n++){let i;switch(t){case 0:i=(n+r)%2==0;break;case 1:i=r%2==0;break;case 2:i=n%3==0;break;case 3:i=(n+r)%3==0;break;case 4:i=(Math.floor(n/3)+Math.floor(r/2))%2==0;break;case 5:i=n*r%2+n*r%3==0;break;case 6:i=(n*r%2+n*r%3)%2==0;break;case 7:i=((n+r)%2+n*r%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[r][n]&&i&&(this.modules[r][n]=!this.modules[r][n]);}}getPenaltyScore(){let t=0;for(let m=0;m<this.size;m++){let p=false,d=0,b=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[m][x]==p?(d++,d==5?t+=e.PENALTY_N1:d>5&&t++):(this.finderPenaltyAddHistory(d,b),p||(t+=this.finderPenaltyCountPatterns(b)*e.PENALTY_N3),p=this.modules[m][x],d=1);t+=this.finderPenaltyTerminateAndCount(p,d,b)*e.PENALTY_N3;}for(let m=0;m<this.size;m++){let p=false,d=0,b=[0,0,0,0,0,0,0];for(let x=0;x<this.size;x++)this.modules[x][m]==p?(d++,d==5?t+=e.PENALTY_N1:d>5&&t++):(this.finderPenaltyAddHistory(d,b),p||(t+=this.finderPenaltyCountPatterns(b)*e.PENALTY_N3),p=this.modules[x][m],d=1);t+=this.finderPenaltyTerminateAndCount(p,d,b)*e.PENALTY_N3;}for(let m=0;m<this.size-1;m++)for(let p=0;p<this.size-1;p++){let d=this.modules[m][p];d==this.modules[m][p+1]&&d==this.modules[m+1][p]&&d==this.modules[m+1][p+1]&&(t+=e.PENALTY_N2);}let r=0;for(let m of this.modules)r=m.reduce((p,d)=>p+(d?1:0),r);let n=this.size*this.size,i=Math.ceil(Math.abs(r*20-n*10)/n)-1;return s(0<=i&&i<=9),t+=i*e.PENALTY_N4,s(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return [];{let t=Math.floor(this.version/7)+2,r=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,n=[6];for(let i=this.size-7;n.length<t;i-=r)n.splice(1,0,i);return n}}static getNumRawDataModules(t){if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*t+128)*t+64;if(t>=2){let n=Math.floor(t/7)+2;r-=(25*n-10)*n-55,t>=7&&(r-=36);}return s(208<=r&&r<=29648),r}static getNumDataCodewords(t,r){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");let r=[];for(let i=0;i<t-1;i++)r.push(0);r.push(1);let n=1;for(let i=0;i<t;i++){for(let m=0;m<r.length;m++)r[m]=e.reedSolomonMultiply(r[m],n),m+1<r.length&&(r[m]^=r[m+1]);n=e.reedSolomonMultiply(n,2);}return r}static reedSolomonComputeRemainder(t,r){let n=r.map(i=>0);for(let i of t){let m=i^n.shift();n.push(0),r.forEach((p,d)=>n[d]^=e.reedSolomonMultiply(p,m));}return n}static reedSolomonMultiply(t,r){if(t>>>8||r>>>8)throw new RangeError("Byte out of range");let n=0;for(let i=7;i>=0;i--)n=n<<1^(n>>>7)*285,n^=(r>>>i&1)*t;return s(n>>>8==0),n}finderPenaltyCountPatterns(t){let r=t[1];s(r<=this.size*3);let n=r>0&&t[2]==r&&t[3]==r*3&&t[4]==r&&t[5]==r;return (n&&t[0]>=r*4&&t[6]>=r?1:0)+(n&&t[6]>=r*4&&t[0]>=r?1:0)}finderPenaltyTerminateAndCount(t,r,n){return t&&(this.finderPenaltyAddHistory(r,n),r=0),r+=this.size,this.finderPenaltyAddHistory(r,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(t,r){r[0]==0&&(t+=this.size),r.pop(),r.unshift(t);}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]]}h.QrCode=e;function o(f,t,r){if(t<0||t>31||f>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(f>>>n&1);}function a(f,t){return (f>>>t&1)!=0}function s(f){if(!f)throw new Error("Assertion error")}class c{constructor(t,r,n){this.mode=t;this.numChars=r;this.bitData=n;if(r<0)throw new RangeError("Invalid argument");this.bitData=n.slice();}mode;numChars;bitData;static makeBytes(t){let r=[];for(let n of t)o(n,8,r);return new c(c.Mode.BYTE,t.length,r)}static makeNumeric(t){if(!c.isNumeric(t))throw new RangeError("String contains non-numeric characters");let r=[];for(let n=0;n<t.length;){let i=Math.min(t.length-n,3);o(parseInt(t.substr(n,i),10),i*3+1,r),n+=i;}return new c(c.Mode.NUMERIC,t.length,r)}static makeAlphanumeric(t){if(!c.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let r=[],n;for(n=0;n+2<=t.length;n+=2){let i=c.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n))*45;i+=c.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),o(i,11,r);}return n<t.length&&o(c.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,r),new c(c.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return t==""?[]:c.isNumeric(t)?[c.makeNumeric(t)]:c.isAlphanumeric(t)?[c.makeAlphanumeric(t)]:[c.makeBytes(c.toUtf8ByteArray(t))]}static makeEci(t){let r=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)o(t,8,r);else if(t<16384)o(2,2,r),o(t,14,r);else if(t<1e6)o(6,3,r),o(t,21,r);else throw new RangeError("ECI assignment value out of range");return new c(c.Mode.ECI,0,r)}static isNumeric(t){return c.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return c.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(t,r){let n=0;for(let i of t){let m=i.mode.numCharCountBits(r);if(i.numChars>=1<<m)return 1/0;n+=4+m+i.bitData.length;}return n}static toUtf8ByteArray(t){t=encodeURI(t);let r=[];for(let n=0;n<t.length;n++)t.charAt(n)!="%"?r.push(t.charCodeAt(n)):(r.push(parseInt(t.substr(n+1,2),16)),n+=2);return r}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}h.QrSegment=c;})(H||={});(o=>{(s=>{class a{constructor(h,f){this.ordinal=h;this.formatBits=f;}ordinal;formatBits;static LOW=new a(0,1);static MEDIUM=new a(1,0);static QUARTILE=new a(2,3);static HIGH=new a(3,2)}s.Ecc=a;})(o.QrCode||={});})(H||={});(o=>{(s=>{class a{constructor(h,f){this.modeBits=h;this.numBitsCharCount=f;}modeBits;numBitsCharCount;static NUMERIC=new a(1,[10,12,14]);static ALPHANUMERIC=new a(2,[9,11,13]);static BYTE=new a(4,[8,16,16]);static KANJI=new a(8,[8,10,12]);static ECI=new a(7,[0,0,0]);numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}s.Mode=a;})(o.QrSegment||={});})(H||={});var V=H;({L:V.QrCode.Ecc.LOW,M:V.QrCode.Ecc.MEDIUM,Q:V.QrCode.Ecc.QUARTILE,H:V.QrCode.Ecc.HIGH});var wt=0;function zt(e,o="#000000"){return e?typeof e=="string"?e:e.type==="solid"?e.color:e.type==="image"?e.underlay||o:(e.type==="linear"||e.type==="radial"||e.type==="angular")&&e.stops[0]?.color||o:o}var Ne=["logo","halftone"],Ie=zod.z.enum(Ne),le={logo:["blend","badge"],halftone:["color","mono"]},Fe=zod.z.enum([...le.logo,...le.halftone]),X=192,Le=e=>Math.ceil(e/3)*4,Oe=zod.z.object({width:zod.z.number().int().min(1).max(X),height:zod.z.number().int().min(1).max(X),data:zod.z.string().max(Le(X*X*4))}).refine(e=>e.data.length===Le(e.width*e.height*4),{message:"Art image data does not match its width and height"}),me=zod.z.object({mode:Ie,image:Oe,intensity:zod.z.number().min(0).max(1).optional(),variant:Fe.optional(),matchEyes:zod.z.boolean().optional()});var Dt=zod.z.enum(["solid","linear","radial","angular","image"]),ve=zod.z.object({type:zod.z.literal("solid"),color:zod.z.string()}),re=zod.z.object({color:zod.z.string(),offset:zod.z.number().min(0).max(100)}),we=zod.z.object({type:zod.z.literal("linear"),stops:zod.z.array(re).min(2),angle:zod.z.number().optional().default(0)}),ze=zod.z.object({type:zod.z.literal("radial"),stops:zod.z.array(re).min(2)}),De=zod.z.object({type:zod.z.literal("angular"),stops:zod.z.array(re).min(2),angle:zod.z.number().optional().default(0)}),Be=zod.z.enum(["cover","contain","tile"]),ke=zod.z.enum(["top-left","top","top-right","left","center","right","bottom-left","bottom","bottom-right"]),Ue=zod.z.object({type:zod.z.literal("image"),src:zod.z.string().min(1),fit:Be.optional().default("cover"),scale:zod.z.number().min(.1).max(4).optional().default(1),position:ke.optional().default("center"),opacity:zod.z.number().min(0).max(1).optional().default(1),underlay:zod.z.string().optional()}),k=zod.z.union([zod.z.string(),ve,we,ze,De,Ue]);function ue(e,o="#000000"){return e?typeof e=="string"?{type:"solid",color:e}:e:{type:"solid",color:o}}function Bt(e){return !e||typeof e=="string"?false:e.type==="linear"||e.type==="radial"||e.type==="angular"}function kt(e){return typeof e=="object"&&e!==null&&e.type==="image"}function Ut(e,o="#000000"){let a=ue(e,o);return a.type==="solid"?a.color:a.type==="image"?a.underlay||o:a.stops[0]?.color||o}function Ge(e="center"){let[o,a]=e.split("-");return e==="center"?"center":a?`${a} ${o}`:o==="top"||o==="bottom"?`center ${o}`:`${o} center`}function Gt(e){if(!e)return "#000000";if(typeof e=="string")return e;let o=ue(e);if(o.type==="solid")return o.color;if(o.type==="image"){let c=o.fit==="tile"?`${25*(o.scale??1)}% auto`:(o.scale??1)===1?o.fit==="contain"?"contain":"cover":`${100*(o.scale??1)}% auto`,h=o.fit==="tile"?"repeat":"no-repeat";return `${`url("${o.src.replace(/"/g,"%22")}")`} ${Ge(o.position)} / ${c} ${h}, ${o.underlay??"transparent"}`}let s=[...o.stops].sort((c,h)=>c.offset-h.offset).map(c=>`${c.color} ${c.offset}%`).join(", ");return o.type==="linear"?`linear-gradient(${(o.angle??0)+90}deg, ${s})`:o.type==="angular"?`conic-gradient(from ${o.angle??0}deg, ${s})`:`radial-gradient(circle, ${s})`}var qt=zod.z.object({x:zod.z.number(),y:zod.z.number(),w:zod.z.number(),h:zod.z.number()});var pe=["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"],Qe=["diamond","star","banner"],de=zod.z.enum([...pe,...Qe]),Qt=zod.z.enum(pe);var fe=["square","rounded","gear","circle","diya","extra-rounded","message","pointy","leaf","drop","octagon","bevel","squircle","cushion","shield","petal","leaf-reverse"],Ye=["curly"],he=zod.z.enum([...fe,...Ye]),jt=zod.z.enum(fe);var He=["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"],q=24,Yt="Scan me",$e=.5,K=1.5,Ve=zod.z.enum(He),oe=zod.z.object({style:Ve,text:zod.z.string().max(q).optional(),color:zod.z.string().optional(),textColor:zod.z.string().optional(),secondaryText:zod.z.string().max(q).optional(),secondaryColor:zod.z.string().optional(),fontScale:zod.z.number().min($e).max(K).optional()});var Ht={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},$t=/^[MmLlHhVvCcSsQqTtAaZz0-9.,+\-\s]*$/,ye=/[+-]?(?:\d+\.?\d*|\.\d+)/y;function Xe(e,o=Number.POSITIVE_INFINITY){if(!$t.test(e))return null;let a=[],s=0,c=()=>{for(;s<e.length&&/[\s,]/.test(e[s]);)s++;},h=()=>{c(),ye.lastIndex=s;let r=ye.exec(e);if(!r)return null;let n=r[0],i=n.indexOf(".");if(i>=0&&n.length-i-1>o)return null;s=ye.lastIndex;let m=Number(n);return Number.isFinite(m)?m:null},f=()=>{c();let r=e[s];return r==="0"||r==="1"?(s++,r==="1"?1:0):null},t=()=>(c(),s<e.length&&/[0-9.+-]/.test(e[s]));for(c();s<e.length;){let r=e[s],n=r.toUpperCase(),i=Ht[n];if(i===void 0||a.length===0&&n!=="M")return null;if(s++,i===0){a.push({command:r,values:[]}),c();continue}let m=r,p=true;for(;p||t();){let d=[];for(let b=0;b<i;b++){let x=n==="A"&&(b===3||b===4)?f():h();if(x===null)return null;d.push(x);}a.push({command:m,values:d}),n==="M"&&(m=r==="M"?"L":"l"),p=false;}c();}return a}function Ze(e){let o=0;for(let{command:a}of e)o+=a.toUpperCase()==="A"?4:1;return o}function We(e,o){let a=[c=>c[0]-o.x0,c=>o.x1-c[0],c=>c[1]-o.y0,c=>o.y1-c[1]],s=e;for(let c of a){if(s.length===0)break;let h=s;s=[];for(let f=0;f<h.length;f++){let t=h[f],r=h[(f+h.length-1)%h.length],n=c(t),i=c(r);n>=0?(i<0&&s.push(Ke(r,t,i,n)),s.push(t)):i>=0&&s.push(Ke(r,t,i,n));}}return s.length>2?s:[]}function Ke(e,o,a,s){let c=a/(a-s);return [e[0]+(o[0]-e[0])*c,e[1]+(o[1]-e[1])*c]}function Je(e){let o=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY,h=(f,t)=>{o=Math.min(o,f),a=Math.min(a,t),s=Math.max(s,f),c=Math.max(c,t);};for(let f of e)f.op==="C"?(h(f.x1,f.y1),h(f.x2,f.y2),h(f.x,f.y)):f.op!=="Z"&&h(f.x,f.y);return Number.isFinite(o)?{x0:o,y0:a,x1:s,y1:c}:null}var be=/[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/y;function Vt(e,o,a,s,c,h,f,t,r){if(e===t&&o===r)return [];let n=Math.abs(a),i=Math.abs(s);if(n===0||i===0)return [{op:"L",x:t,y:r}];let m=c*Math.PI/180,p=Math.cos(m),d=Math.sin(m),b=(e-t)/2,x=(o-r)/2,E=p*b+d*x,S=-d*b+p*x,l=E*E/(n*n)+S*S/(i*i);l>1&&(n*=Math.sqrt(l),i*=Math.sqrt(l));let P=n*n*i*i-n*n*S*S-i*i*E*E,M=n*n*S*S+i*i*E*E,R=(h===f?-1:1)*Math.sqrt(Math.max(0,P/M)),A=R*n*S/i,y=-R*i*E/n,T=p*A-d*y+(e+t)/2,_=d*A+p*y+(o+r)/2,F=(v,O,D,ne)=>Math.atan2(v*ne-O*D,v*D+O*ne),$=F(1,0,(E-A)/n,(S-y)/i),z=F((E-A)/n,(S-y)/i,(-E-A)/n,(-S-y)/i);!f&&z>0?z-=2*Math.PI:f&&z<0&&(z+=2*Math.PI);let j=Math.max(1,Math.ceil(Math.abs(z)/(Math.PI/2)-1e-9)),Y=z/j,te=4/3*Math.tan(Y/4),ce=(v,O)=>[T+n*p*v-i*d*O,_+n*d*v+i*p*O],_e=[];for(let v=0;v<j;v++){let O=$+v*Y,D=O+Y,[ne,Nt]=ce(Math.cos(O)-te*Math.sin(O),Math.sin(O)+te*Math.cos(O)),[It,Ft]=ce(Math.cos(D)+te*Math.sin(D),Math.sin(D)-te*Math.cos(D)),[Ot,vt]=v===j-1?[t,r]:ce(Math.cos(D),Math.sin(D));_e.push({op:"C",x1:ne,y1:Nt,x2:It,y2:Ft,x:Ot,y:vt});}return _e}function et(e){let o=[],a=0,s=0,c=0,h=0,f=0,t="",r=null,n=null,i=()=>{for(;a<e.length&&/[\s,]/.test(e[a]);)a++;},m=()=>{i(),be.lastIndex=a;let b=be.exec(e);return b?(a=be.lastIndex,Number(b[0])):null},p=()=>{i();let b=e[a];return b==="0"||b==="1"?(a++,b==="1"):null},d=b=>{let x=[];for(let E=0;E<b;E++){let S=m();if(S===null)return null;x.push(S);}return x};for(;i(),!(a>=e.length);){let b=e[a];if(/[MmLlHhVvCcSsQqTtAaZz]/.test(b))t=b,a++;else if(!t||t==="Z"||t==="z")break;let x=t===t.toLowerCase(),E=x?s:0,S=x?c:0,l=t.toUpperCase();if(l==="Z"){o.push({op:"Z"}),s=h,c=f,r=null,n=null;continue}if(l==="A"){let A=d(3),y=p(),T=p(),_=d(2);if(!(A&&_)||y===null||T===null)break;let[F,$,z]=A,j=_[0]+E,Y=_[1]+S;o.push(...Vt(s,c,F,$,z,y,T,j,Y)),s=j,c=Y,r=null,n=null;continue}let P={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2}[l]??0,M=d(P);if(!M)break;let R=M;switch(l){case "M":s=R[0]+E,c=R[1]+S,h=s,f=c,o.push({op:"M",x:s,y:c}),t=x?"l":"L",r=null,n=null;break;case "L":case "H":case "V":l!=="V"&&(s=R[0]+E),l==="V"?c=R[0]+S:l==="L"&&(c=R[1]+S),o.push({op:"L",x:s,y:c}),r=null,n=null;break;case "C":case "S":{let A,y;l==="C"?(A=[R[0]+E,R[1]+S],y=R.slice(2)):(A=r?[2*s-r[0],2*c-r[1]]:[s,c],y=R);let T=[y[0]+E,y[1]+S],_=[y[2]+E,y[3]+S];o.push({op:"C",x1:A[0],y1:A[1],x2:T[0],y2:T[1],x:_[0],y:_[1]}),[s,c]=_,r=T,n=null;break}case "Q":case "T":{let A,y;l==="Q"?(A=[R[0]+E,R[1]+S],y=[R[2]+E,R[3]+S]):(A=n?[2*s-n[0],2*c-n[1]]:[s,c],y=[R[0]+E,R[1]+S]),o.push({op:"C",x1:s+2/3*(A[0]-s),y1:c+2/3*(A[1]-c),x2:y[0]+2/3*(A[0]-y[0]),y2:y[1]+2/3*(A[1]-y[1]),x:y[0],y:y[1]}),[s,c]=y,n=A,r=null;break}}}return o}var ot="qrdx.frame",it=1,at="custom",N={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:q},st=["wifi","star","heart","phone","headphones","calendar","user","chat","bag","bell","cup","card","check","info","home","pin","share","download","clock","snowflake","pumpkin","tree","sparkle","gift"],Se=.95,ct=200,lt=["frame","text","accent","background"],Xt=/[\t\n\v\f\r\u0085\u2028\u2029]/g,Zt=/[\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 mt(e,o=q){let a=e.slice(0,1e3).normalize("NFC").replace(Xt," ").replace(Zt,"").replace(/\s+/g," ").trim();return Array.from(a).slice(0,Math.max(0,o)).join("").trim()}function Kt(e){for(let o of e)if((o.codePointAt(0)??0)>255)return false;return true}var Ee=e=>Math.abs(e*1e3-Math.round(e*1e3))<1e-6,L=zod.z.number().min(-N.maxCoordinate).max(N.maxCoordinate).refine(Ee,{message:`Numbers may have at most ${N.maxDecimals} decimals`}),I=L.refine(e=>e>0,{message:"Must be greater than 0"}),ie=L.refine(e=>e>=0,{message:"Must not be negative"}),W=zod.z.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,"Use a #rgb or #rrggbb color"),tt=zod.z.union([zod.z.enum(lt),W]),ut=e=>zod.z.object({mix:zod.z.tuple([e,e]),amount:zod.z.number().min(0).max(1).refine(Ee)}).strict(),Q=zod.z.union([tt,ut(tt)]),Wt=zod.z.union([W,ut(zod.z.union([zod.z.enum(["frame","accent","background"]),W]))]),G=zod.z.union([Q,zod.z.object({gradient:zod.z.object({from:Q,to:Q,direction:zod.z.enum(["horizontal","vertical"]).optional(),steps:zod.z.int().min(2).max(N.maxGradientSteps).optional()}).strict()}).strict()]),xe={x:L,y:L,width:I,height:I},J=zod.z.object({color:Q,width:I}).strict(),Jt=zod.z.object({type:zod.z.literal("rect"),...xe,radius:ie.optional(),fill:G,hole:zod.z.object({...xe,radius:ie.optional()}).strict().optional(),stroke:J.optional()}).strict(),en=zod.z.object({type:zod.z.literal("circle"),cx:L,cy:L,r:I,hole:I.optional(),fill:G,stroke:J.optional()}).strict(),tn=zod.z.object({type:zod.z.literal("ellipse"),cx:L,cy:L,rx:I,ry:I,fill:G,stroke:J.optional()}).strict(),nn=zod.z.object({type:zod.z.literal("polygon"),points:zod.z.array(zod.z.tuple([L,L])).min(3).max(N.maxPolygonPoints),fill:G,stroke:J.optional()}).strict(),rn=zod.z.object({type:zod.z.literal("path"),d:zod.z.string().min(2).max(N.maxPathLength),fill:G,fillRule:zod.z.enum(["nonzero","evenodd"]).optional(),stroke:J.optional()}).strict(),on=zod.z.object({type:zod.z.literal("line"),x1:L,y1:L,x2:L,y2:L,width:I,cap:zod.z.enum(["butt","round"]).optional(),dash:zod.z.tuple([I,I]).optional(),fill:G}).strict(),an=zod.z.object({type:zod.z.literal("icon"),icon:zod.z.enum(st),x:L,y:L,size:I,fill:G}).strict(),pt=zod.z.discriminatedUnion("type",[Jt,en,tn,nn,rn,on,an]),dt={id:zod.z.string().regex(/^[a-z][a-z0-9-]{0,31}$/),slot:zod.z.enum(["primary","secondary","fixed"]),text:zod.z.string().max(200),maxLength:zod.z.int().min(1).max(q).optional(),color:Q,weight:zod.z.enum(["bold","regular"]).optional(),collapse:zod.z.object({y:L,height:I}).strict().optional()},sn=zod.z.object({type:zod.z.literal("text"),...dt,box:zod.z.object(xe).strict(),align:zod.z.enum(["start","middle","end"]).optional(),fontSize:I.optional()}).strict(),cn=zod.z.object({type:zod.z.literal("curved"),...dt,curve:zod.z.object({cx:L,cy:L,radius:I,side:zod.z.enum(["top","bottom"]),spread:zod.z.number().min(20).max(300).refine(Ee).optional()}).strict(),fontSize:I}).strict(),ft=zod.z.discriminatedUnion("type",[sn,cn]),nt=L.refine(e=>e>=N.minArtboard&&e<=N.maxArtboard,{message:`Artboard sides must be ${N.minArtboard} to ${N.maxArtboard} units`}),ln=zod.z.object({kind:zod.z.literal(ot),version:zod.z.literal(it),artboard:zod.z.object({width:nt,height:nt}).strict(),qr:zod.z.object({x:L,y:L,size:I,padding:ie.optional(),radius:ie.optional(),plate:zod.z.enum(["opaque","background","none"]).optional()}).strict(),colors:zod.z.object({frame:W,text:Wt.optional(),accent:W.optional()}).strict(),shapes:zod.z.array(pt).max(N.maxShapes),labels:zod.z.array(ft).max(N.maxLabels),bleed:zod.z.union([zod.z.literal("none"),Q]).optional()}).strict();function ae(e){let o=Ae(e);return {x0:e.qr.x-o,y0:e.qr.y-o,x1:e.qr.x+e.qr.size+o,y1:e.qr.y+e.qr.size+o}}function mn(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 Ae(e){return e.qr.padding??e.qr.size*N.defaultPadding}var un=.52,pn=.35;function dn(e){let o=e.fontSize??e.box.height*un;return Math.min(o*K,e.box.height*Se)}var ge=(e,o)=>Math.min(e.x1,o.x1)-Math.max(e.x0,o.x0)>1e-6&&Math.min(e.y1,o.y1)-Math.max(e.y0,o.y0)>1e-6;function rt(e){let o=ae(e),a=Math.min(e.qr.radius??0,(o.x1-o.x0)/2,(o.y1-o.y0)/2),s=[[o.x0+a,o.y0+a,Math.PI],[o.x1-a,o.y0+a,-Math.PI/2],[o.x1-a,o.y1-a,0],[o.x0+a,o.y1-a,Math.PI/2]],c=[];for(let[h,f,t]of s)for(let r=0;r<=8;r++){let n=t+Math.PI/2*(r/8);c.push([h+a*Math.cos(n),f+a*Math.sin(n)]);}return c}function fn([e,o],a,s){if(e<a.x-.01||o<a.y-.01||e>a.x+a.width+.01||o>a.y+a.height+.01)return false;let h=Math.min(s,a.width/2,a.height/2),f=Math.min(Math.max(e,a.x+h),a.x+a.width-h),t=Math.min(Math.max(o,a.y+h),a.y+a.height-h);return Math.hypot(e-f,o-t)<=h+.01}function hn(e){let o=0;return e.forEach(([a,s],c)=>{let[h,f]=e[(c+1)%e.length];o+=a*f-h*s;}),Math.abs(o)/2}function yn(e,o,a){let s=ae(o);if(!ge(a,s))return false;if("stroke"in e&&e.stroke)return true;if(e.fill==="background")return false;if(e.type==="rect"&&e.hole){let{hole:c}=e;return !rt(o).every(h=>fn(h,c,c.radius??0))}if(e.type==="circle"&&e.hole){let c=e.hole;return !rt(o).every(([h,f])=>Math.hypot(h-e.cx,f-e.cy)<=c+.01)}if(e.type==="polygon"){let c=We(e.points,s);return c.length>2&&hn(c)>1e-6}return true}function bn(e){let o=xn(e),a="stroke"in e?e.stroke:void 0;if(!(a&&o.bounds))return o;let s=e.type==="circle"||e.type==="ellipse"?a.width/2:e.type==="rect"?a.width*Math.SQRT2/2:a.width*2,{x0:c,y0:h,x1:f,y1:t}=o.bounds;return {bounds:{x0:c-s,y0:h-s,x1:f+s,y1:t+s},segments:o.segments*2}}function xn(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 o=e.points.map(([s])=>s),a=e.points.map(([,s])=>s);return {bounds:{x0:Math.min(...o),y0:Math.min(...a),x1:Math.max(...o),y1:Math.max(...a)},segments:e.points.length}}case "path":{let o=Xe(e.d,N.maxDecimals);return o?{bounds:Je(et(e.d)),segments:Ze(o)}:{bounds:null,segments:0}}case "line":{let o=e.width/2,a=Math.hypot(e.x2-e.x1,e.y2-e.y1),s=e.dash?Math.ceil(a/(e.dash[0]+e.dash[1])):1;return {bounds:{x0:Math.min(e.x1,e.x2)-o,y0:Math.min(e.y1,e.y2)-o,x1:Math.max(e.x1,e.x2)+o,y1:Math.max(e.y1,e.y2)+o},segments:s*(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:ct}}}function gn(e,o){let a=(l,P=[])=>o.addIssue({code:"custom",message:l,path:P}),s=N,c=new TextEncoder().encode(JSON.stringify(e)).length;if(c>s.maxBytes){a(`The spec is ${c} bytes; the limit is ${s.maxBytes}`);return}let{width:h,height:f}=e.artboard,t=Math.max(h,f)*.005,r={x0:-t,y0:-t,x1:h+t,y1:f+t},n=l=>l.x0>=r.x0&&l.y0>=r.y0&&l.x1<=r.x1&&l.y1<=r.y1,{qr:i}=e,m=Ae(e);i.plate!=="none"&&m<i.size*s.minPadding-1e-9&&a(`qr.padding must be at least ${s.minPadding*100}% of qr.size`,["qr","padding"]),i.size<Math.min(h,f)*s.minQrShare-1e-9&&a(`qr.size must be at least ${s.minQrShare*100}% of the artboard's shorter side`,["qr","size"]);let p=ae(e);(p.x0<-1e-9||p.y0<-1e-9||p.x1>h+1e-9||p.y1>f+1e-9)&&a("The code and its padding must sit inside the artboard",["qr"]),(i.radius??0)>(i.size+2*m)/2&&a("qr.radius is larger than half the plate",["qr","radius"]);let d=0,b=0;e.shapes.forEach((l,P)=>{let M=["shapes",P],{bounds:R,segments:A}=bn(l);if(!R){a("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",[...M,"d"]);return}if(n(R)||a("The shape extends outside the artboard",M),l.type==="rect"&&l.hole){let{hole:y}=l;(y.x<l.x||y.y<l.y||y.x+y.width>l.x+l.width+1e-9||y.y+y.height>l.y+l.height+1e-9)&&a("The hole must sit inside its rect",[...M,"hole"]);}l.type==="circle"&&l.hole&&l.hole>=l.r&&a("The hole must be smaller than the circle",[...M,"hole"]),"stroke"in l&&l.stroke&&l.stroke.width>Math.min(h,f)*.1+1e-9&&a("A stroke may be at most 10% of the artboard's shorter side",[...M,"stroke","width"]),i.plate==="background"&&yn(l,e,R)&&a('With qr.plate "background", only background fills (or a ring whose hole holds the plate) may lie under the plate',M),d+=A,typeof l.fill=="object"&&"gradient"in l.fill&&(b+=(l.fill.gradient.steps??32)*A);}),d>s.maxSegments&&a(`The shapes have ${d} segments; the limit is ${s.maxSegments}`,["shapes"]),b>s.maxGradientWork&&a("Gradient fills are too detailed (fewer steps or simpler shapes)",["shapes"]);let x=[],E=new Set,S=new Set;e.labels.forEach((l,P)=>{let M=["labels",P];E.has(l.id)&&a(`Label id "${l.id}" is used twice`,[...M,"id"]),E.add(l.id),l.slot!=="fixed"&&(S.has(l.slot)&&a(`Only one label may use the ${l.slot} slot`,[...M,"slot"]),S.add(l.slot));let R=l.maxLength??s.maxTextLength;l.text!==mt(l.text,R)&&a(`Label text must be at most ${R} characters, trimmed, with no control or invisible characters (see sanitizeFrameText)`,[...M,"text"]);let A;if(l.type==="text"){A={x0:l.box.x,y0:l.box.y,x1:l.box.x+l.box.width,y1:l.box.y+l.box.height},l.fontSize!==void 0&&l.fontSize>l.box.height*Se+1e-9&&a("fontSize may be at most 95% of the label's row height",[...M,"fontSize"]);let y=l.box.y+l.box.height/2,T=dn(l)*pn,_={x0:A.x0,x1:A.x1,y0:y-T,y1:y+T};(ge(A,mn(e))||ge(_,p))&&a("The label overlaps the code or its padding",[...M,"box"]);}else {let{cx:y,cy:T,radius:_}=l.curve,F=l.fontSize*K*.6;A={x0:y-_-F,y0:T-_-F,x1:y+_+F,y1:T+_+F};let $=Math.hypot(Math.max(p.x0-y,0,y-p.x1),Math.max(p.y0-T,0,T-p.y1));Math.hypot(Math.max(Math.abs(p.x0-y),Math.abs(p.x1-y)),Math.max(Math.abs(p.y0-T),Math.abs(p.y1-T)))<=_-F||$>=_+F||a("The curved label crosses the code or its padding",[...M,"curve"]);}if(n(A)||a("The label extends outside the artboard",M),l.collapse){let y=l.collapse,T=y.y+y.height;(y.y<-1e-9||T>f+1e-9)&&a("The collapse band must sit inside the artboard",[...M,"collapse"]),T>p.y0+1e-6&&y.y<p.y1-1e-6&&a("The collapse band crosses the code or its padding",[...M,"collapse"]);for(let _ of x)T>_.y+1e-6&&y.y<_.y+_.height-1e-6&&a("Collapse bands may not overlap",[...M,"collapse"]);x.push(y);}});}var Me=ln.superRefine(gn);function Sn(e){let o=Me.safeParse(e);return o.success?[]:o.error.issues.map(a=>a.path.length>0?`${a.path.join(".")}: ${a.message}`:a.message)}var ht=oe.extend({style:zod.z.literal(at),spec:Me}),Ce=zod.z.discriminatedUnion("style",[oe,ht]);var yt=["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"],Re=zod.z.enum(yt);var bt=["square","rounded","circle"],Te=zod.z.enum(bt),xt=zod.z.object({src:zod.z.string(),height:zod.z.number(),width:zod.z.number(),excavate:zod.z.boolean(),x:zod.z.number().optional(),y:zod.z.number().optional(),padding:zod.z.number().min(0).optional(),shape:Te.optional(),plate:zod.z.string().optional()}),gt=.1,St=.3,An=.25,Et=2,Mn=zod.z.object({size:zod.z.number().min(gt).max(St).optional(),padding:zod.z.number().min(0).max(Et).optional(),x:zod.z.number().min(0).max(1).optional(),y:zod.z.number().min(0).max(1).optional(),shape:Te.optional(),plate:zod.z.string().optional()}),At=zod.z.enum(["L","M","Q","H"]),Mt=.5,Ct=1,Cn=.07,Rt=["square","circle","heart"],Pt=zod.z.enum(Rt),Rn=3,ee=64,Pe=8,Pn=.42,Tt=zod.z.object({type:zod.z.literal("silhouette"),width:zod.z.number().int().min(Pe).max(ee),height:zod.z.number().int().min(Pe).max(ee),cells:zod.z.string().max(ee*ee).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"}),_t=zod.z.union([Pt,Tt]),Tn=["topLeft","topRight","bottomLeft"],se=zod.z.object({outer:k.optional(),inner:k.optional()}),Lt=zod.z.object({topLeft:se.optional(),topRight:se.optional(),bottomLeft:se.optional()}),_n=zod.z.object({value:zod.z.string(),size:zod.z.number().optional(),level:At.optional(),bgColor:k.optional(),fgColor:k.optional(),eyeColor:k.optional(),dotColor:k.optional(),bodyPattern:Re.optional(),cornerEyePattern:he.optional(),cornerEyeDotPattern:de.optional(),margin:zod.z.number().optional(),imageSettings:xt.optional(),isOGContext:zod.z.boolean().optional(),templateId:zod.z.string().optional(),customProps:zod.z.record(zod.z.string(),zod.z.any()).optional(),frame:Ce.optional(),art:me.optional(),eyeColors:Lt.optional(),moduleScale:zod.z.number().min(Mt).max(Ct).optional(),autoLevel:zod.z.boolean().optional(),shape:_t.optional()});var Ln=zod.z.object({fgColor:zod.z.string().optional(),bgColor:zod.z.string().optional()}),Nn=zod.z.object({pixelSize:zod.z.number(),url:zod.z.string()}),In=zod.z.object({id:zod.z.string(),name:zod.z.string(),description:zod.z.string().optional()});/**
|
|
2
2
|
* @license QR Code generator library (TypeScript)
|
|
3
3
|
* Copyright (c) Project Nayuki.
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/exports.AUTO_LEVEL_LOGO_COVERAGE=
|
|
5
|
+
*/exports.AUTO_LEVEL_LOGO_COVERAGE=Cn;exports.BODY_PATTERN=yt;exports.CORNER_EYE_DOT_PATTERNS=pe;exports.CORNER_EYE_PATTERNS=fe;exports.CUSTOM_FRAME_STYLE=at;exports.DEFAULT_FRAME_TEXT=Yt;exports.DEFAULT_MARGIN=wt;exports.EYE_POSITIONS=Tn;exports.FRAME_COLOR_TOKENS=lt;exports.FRAME_FONT_SCALE_MAX=K;exports.FRAME_FONT_SCALE_MIN=$e;exports.FRAME_ICONS=st;exports.FRAME_ICON_MAX_SEGMENTS=ct;exports.FRAME_SPEC_KIND=ot;exports.FRAME_SPEC_LABEL_MAX_FONT=Se;exports.FRAME_SPEC_LIMITS=N;exports.FRAME_SPEC_VERSION=it;exports.FRAME_STYLES=He;exports.FRAME_TEXT_MAX_LENGTH=q;exports.LOGO_PADDING_MAX=Et;exports.LOGO_SHAPES=bt;exports.LOGO_SIZE_DEFAULT=An;exports.LOGO_SIZE_MAX=St;exports.LOGO_SIZE_MIN=gt;exports.MODULE_SCALE_MAX=Ct;exports.MODULE_SCALE_MIN=Mt;exports.QR_ART_MAX_SAMPLE_SIZE=X;exports.QR_ART_MODES=Ne;exports.QR_ART_VARIANTS=le;exports.QR_CIRCLE_QUIET_MIN=Rn;exports.QR_SHAPES=Rt;exports.QR_SILHOUETTE_MAX_CELLS=ee;exports.QR_SILHOUETTE_MIN_CELLS=Pe;exports.QR_SILHOUETTE_MIN_SHARE=Pn;exports.RETIRED_CORNER_EYE_DOT_PATTERNS=Qe;exports.RETIRED_CORNER_EYE_PATTERNS=Ye;exports.angularGradientSchema=De;exports.anyFrameSchema=Ce;exports.baseTemplatePropsSchema=Ln;exports.bodyPatternSchema=Re;exports.colorConfigSchema=k;exports.colorTypeSchema=Dt;exports.cornerEyeDotPatternSchema=de;exports.cornerEyePatternSchema=he;exports.customFrameSchema=ht;exports.errorLevelSchema=At;exports.excavationSchema=qt;exports.eyeColorOverrideSchema=se;exports.eyeColorsSchema=Lt;exports.frameSchema=oe;exports.frameSpecColorSchema=Q;exports.frameSpecLabelSchema=ft;exports.frameSpecPadding=Ae;exports.frameSpecPaintSchema=G;exports.frameSpecQrZone=ae;exports.frameSpecSchema=Me;exports.frameSpecShapeSchema=pt;exports.frameStyleSchema=Ve;exports.getColorString=Ut;exports.getFrameSpecIssues=Sn;exports.getNormalizedColor=Gt;exports.getSolidColor=zt;exports.gradientStopSchema=re;exports.imageFitSchema=Be;exports.imagePaintSchema=Ue;exports.imagePositionCss=Ge;exports.imagePositionSchema=ke;exports.imageSettingsSchema=xt;exports.isGradient=Bt;exports.isImagePaint=kt;exports.isLatin1Text=Kt;exports.linearGradientSchema=we;exports.logoOptionsSchema=Mn;exports.logoShapeSchema=Te;exports.normalizeColorConfig=ue;exports.pickableCornerEyeDotPatternSchema=Qt;exports.pickableCornerEyePatternSchema=jt;exports.qrArtImageSchema=Oe;exports.qrArtModeSchema=Ie;exports.qrArtSchema=me;exports.qrArtVariantSchema=Fe;exports.qrCodeShapeSchema=_t;exports.qrPropsSchema=_n;exports.qrShapeSchema=Pt;exports.qrSilhouetteSchema=Tt;exports.radialGradientSchema=ze;exports.sanitizeFrameText=mt;exports.solidColorSchema=ve;exports.templateConfigSchema=Nn;exports.templateDefinitionBaseSchema=In;//# sourceMappingURL=index.js.map
|
|
6
6
|
//# sourceMappingURL=index.js.map
|