From 96ce805e557d13f335c4eb39cbbae29a6372345e Mon Sep 17 00:00:00 2001 From: R V Date: Mon, 17 Jun 2024 18:40:23 +0900 Subject: [PATCH] Updates --- asset-manifest.json | 8 ++++---- index.html | 2 +- static/css/main.5b36f729.css | 5 +++++ static/css/main.dca69e4b.css | 5 ----- static/js/{main.59450c43.js => main.a9a4c61b.js} | 4 ++-- ...450c43.js.LICENSE.txt => main.a9a4c61b.js.LICENSE.txt} | 0 6 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 static/css/main.5b36f729.css delete mode 100644 static/css/main.dca69e4b.css rename static/js/{main.59450c43.js => main.a9a4c61b.js} (91%) rename static/js/{main.59450c43.js.LICENSE.txt => main.a9a4c61b.js.LICENSE.txt} (100%) diff --git a/asset-manifest.json b/asset-manifest.json index 54b47bf..9eebda0 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { - "main.css": "/static/css/main.dca69e4b.css", - "main.js": "/static/js/main.59450c43.js", + "main.css": "/static/css/main.5b36f729.css", + "main.js": "/static/js/main.a9a4c61b.js", "static/media/default_profile.jpg": "/static/media/default_profile.d8a94809b7a8f5c3211c.jpg", "static/media/profile.jpeg": "/static/media/profile.11a801837c2346393a2b.jpeg", "static/media/MemestrLogo.svg": "/static/media/MemestrLogo.b396ade4b8313ef0618a24d56ba81d2e.svg", @@ -45,7 +45,7 @@ "static/media/RoundTick.svg": "/static/media/RoundTick.c8efcd84bee3b13c13ea07283ccd919d.svg" }, "entrypoints": [ - "static/css/main.dca69e4b.css", - "static/js/main.59450c43.js" + "static/css/main.5b36f729.css", + "static/js/main.a9a4c61b.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 8377660..2125de3 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Memestr
\ No newline at end of file +Memestr
\ No newline at end of file diff --git a/static/css/main.5b36f729.css b/static/css/main.5b36f729.css new file mode 100644 index 0000000..630b897 --- /dev/null +++ b/static/css/main.5b36f729.css @@ -0,0 +1,5 @@ +/* +! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com +*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-0{bottom:0}.bottom-12{bottom:3rem}.bottom-4{bottom:1rem}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.right-8{right:2rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.m-2{margin:.5rem}.m-4{margin:1rem}.m-auto{margin:auto}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-mb-px{margin-bottom:-1px}.-mt-20{margin-top:-5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.me-2{margin-inline-end:.5rem}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-0{height:0}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-auto{height:auto}.h-full{height:100%}.h-max{height:-webkit-max-content;height:max-content}.h-screen{height:100vh}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.max-w-\[95\%\]{max-width:95%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-screen-md{max-width:768px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1}.flex-auto{flex:1 1 auto}.flex-grow{flex-grow:1}.basis-1\/3{flex-basis:33.333333%}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-full{--tw-translate-y:-100%}.-translate-y-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem}.translate-y-full{--tw-translate-y:100%}.scale-100,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-4{column-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-normal{white-space:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-left-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-b-sm{border-bottom-left-radius:.125rem;border-bottom-right-radius:.125rem}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.border-transparent{border-color:#0000}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}.bg-opacity-40{--tw-bg-opacity:0.4}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-75{--tw-bg-opacity:0.75}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from:#3b82f6 var(--tw-gradient-from-position);--tw-gradient-to:#3b82f600 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-bottom:0;padding-top:0}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.pb-16{padding-bottom:4rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-5{padding-top:1.25rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-bungee{font-family:Bungee Spice,cursive}.font-nunito{font-family:Nunito,sans-serif}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.leading-normal{line-height:1.5}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.text-customBlue{--tw-text-opacity:1;color:rgb(9 55 107/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid #0000;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.drop-shadow-lg{--tw-drop-shadow:drop-shadow(0 10px 8px #0000000a) drop-shadow(0 4px 3px #0000001a)}.drop-shadow-lg,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0;max-width:100%}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.last\:mr-0:last-child{margin-right:0}.focus-within\:outline-none:focus-within{outline:2px solid #0000;outline-offset:2px}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.hover\:animate-bounce:hover{animation:bounce 1s infinite}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.hover\:bg-slate-900:hover{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.hover\:from-pink-500:hover{--tw-gradient-from:#ec4899 var(--tw-gradient-from-position);--tw-gradient-to:#ec489900 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:to-yellow-500:hover{--tw-gradient-to:#eab308 var(--tw-gradient-to-position)}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:drop-shadow-2xl:hover{--tw-drop-shadow:drop-shadow(0 25px 25px #00000026);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.focus\:text-gray-500:focus{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus,.focus\:ring-4:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-inset:focus{--tw-ring-inset:inset}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(168 85 247/var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}@media (prefers-color-scheme:dark){.dark\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:my-8{margin-bottom:2rem;margin-top:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-100,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1}.sm\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:p-0{padding:0}.sm\:p-4{padding:1rem}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:right-0{right:0}.md\:right-8{right:2rem}.md\:top-0{top:0}.md\:z-10{z-index:10}.md\:mb-0{margin-bottom:0}.md\:mb-4{margin-bottom:1rem}.md\:mr-40{margin-right:10rem}.md\:mt-12{margin-top:3rem}.md\:mt-4{margin-top:1rem}.md\:block{display:block}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:w-7\/12{width:58.333333%}.md\:w-72{width:18rem}.md\:flex-1{flex:1 1}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.md\:pl-64{padding-left:16rem}.md\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}}@media (min-width:1024px){.lg\:mr-60{margin-right:15rem}.lg\:block{display:block}.lg\:w-2\/3{width:66.666667%}.lg\:pr-96{padding-right:24rem}}:root{--primary-color:#000814;--secondary-color:#001d3d;--third-color:#003566;--fourth-color:#ffc300;--fifth-color:#ffd60a}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#000814;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}@keyframes App-logo-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes slideInSlideOut{0%,to{transform:translateY(-100%)}10%,90%{transform:translateY(0)}}.animate-slideInSlideOut{animation:slideInSlideOut 3s ease-in-out forwards}.notification{z-index:9999}.feed-container{max-width:100%}.lds-ellipsis{display:inline-block;height:80px;position:relative;width:80px}.lds-ellipsis div{animation-timing-function:cubic-bezier(0,1,1,0);background:#000;border-radius:50%;height:13px;position:absolute;top:33px;width:13px}.lds-ellipsis div:first-child{animation:lds-ellipsis1 .6s infinite;left:8px}.lds-ellipsis div:nth-child(2){animation:lds-ellipsis2 .6s infinite;left:8px}.lds-ellipsis div:nth-child(3){animation:lds-ellipsis2 .6s infinite;left:32px}.lds-ellipsis div:nth-child(4){animation:lds-ellipsis3 .6s infinite;left:56px}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}.trending-container{position:-webkit-sticky;position:sticky;z-index:9999}.editor-container{z-index:9999}.title-post{color:#fff}.commentBox{display:flex;flex-direction:row;flex-wrap:wrap;padding-bottom:10px;padding-top:10px;width:auto}input.comment-form{border:2px solid dimgray;border-radius:1rex;color:#000;flex-grow:1}.comment-container{border-radius:5px;border-top:1px solid #c3c3c3;display:flex;gap:10px;max-width:100%;min-width:400px;padding:10px}.comment-container>img{border-radius:50%;flex-shrink:0;height:50px;object-fit:cover;width:50px}.username-comment{align-items:flex-start}.name-comment{align-items:start}.profile1{border-radius:50%;height:50px;object-fit:cover;width:50px}.comment-content{flex-grow:1}.username-comment{color:#000;padding-right:5px}.name-comment,.username-comment{font-size:medium;font-weight:700}.comment{color:#000;font-size:small;padding-left:3px;padding-top:3px;word-break:break-word}.nested-comments{display:flex;flex-direction:column;margin-left:20px;margin-top:10px}.view-replies-button{background:none;border:none;color:blue;cursor:pointer;font-size:small;margin-top:5px;padding-left:6px;text-align:left}.lds-ring{display:inline-block;height:80px;position:relative;width:80px}.lds-ring div{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border:8px solid #0000;border-radius:50%;border-top-color:#fff;box-sizing:border-box;display:block;height:64px;margin:8px;position:absolute;width:64px}.lds-ring div:first-child{animation-delay:-.45s}.lds-ring div:nth-child(2){animation-delay:-.3s}.lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}} + +/*!*.profile1 {*!*/.headerClasses{z-index:100}.upload-btn-wrapper{display:flex;position:relative}.upload-btn-wrapper:before{background-color:#fff;border-radius:50%;box-shadow:0 4px 8px #f3f4f5;content:"";height:60px;left:50%;position:absolute;top:-30px;transform:translateX(-50%);width:60px;z-index:-1}.upload-button{background-color:initial;padding:15px;z-index:1}.footer-bar{z-index:999}@media (max-width:320px){.footer-bar button{padding:0 4px}.footer-bar svg{height:24px;width:24px}} \ No newline at end of file diff --git a/static/css/main.dca69e4b.css b/static/css/main.dca69e4b.css deleted file mode 100644 index 94cb7e7..0000000 --- a/static/css/main.dca69e4b.css +++ /dev/null @@ -1,5 +0,0 @@ -/* -! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com -*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-feature-settings:normal;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;tab-size:4}body{line-height:inherit}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-0{bottom:0}.bottom-12{bottom:3rem}.bottom-4{bottom:1rem}.left-0{left:0}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.right-8{right:2rem}.top-0{top:0}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.m-2{margin:.5rem}.m-4{margin:1rem}.m-auto{margin:auto}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-bottom:.25rem;margin-top:.25rem}.my-2{margin-bottom:.5rem;margin-top:.5rem}.my-4{margin-bottom:1rem;margin-top:1rem}.-mb-px{margin-bottom:-1px}.-mt-20{margin-top:-5rem}.mb-0{margin-bottom:0}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.me-2{margin-inline-end:.5rem}.ml-1{margin-left:.25rem}.ml-16{margin-left:4rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.mr-2{margin-right:.5rem}.mr-6{margin-right:1.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-0{height:0}.h-0\.5{height:.125rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-3{height:.75rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-auto{height:auto}.h-full{height:100%}.h-max{height:-webkit-max-content;height:max-content}.h-screen{height:100vh}.max-h-\[300px\]{max-height:300px}.max-h-full{max-height:100%}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-24{width:6rem}.w-3{width:.75rem}.w-32{width:8rem}.w-4{width:1rem}.w-48{width:12rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.max-w-\[95\%\]{max-width:95%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-screen-md{max-width:768px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1}.flex-auto{flex:1 1 auto}.flex-grow{flex-grow:1}.basis-1\/3{flex-basis:33.333333%}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.-translate-y-1\/2{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-y-full{--tw-translate-y:-100%}.-translate-y-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x:0px}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem}.translate-y-full{--tw-translate-y:100%}.scale-100,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-4{column-gap:1rem}.gap-y-6{row-gap:1.5rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-normal{white-space:normal}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-left-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-b-sm{border-bottom-left-radius:.125rem;border-bottom-right-radius:.125rem}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-x{border-left-width:1px;border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-dashed{border-style:dashed}.border-black{--tw-border-opacity:1;border-color:rgb(0 0 0/var(--tw-border-opacity))}.border-blue-500{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.border-transparent{border-color:#0000}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-green-500{--tw-bg-opacity:1;background-color:rgb(34 197 94/var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-yellow-500{--tw-bg-opacity:1;background-color:rgb(234 179 8/var(--tw-bg-opacity))}.bg-opacity-40{--tw-bg-opacity:0.4}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-opacity-75{--tw-bg-opacity:0.75}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from:#3b82f6 var(--tw-gradient-from-position);--tw-gradient-to:#3b82f600 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-teal-500{--tw-gradient-to:#14b8a6 var(--tw-gradient-to-position)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-bottom:0;padding-top:0}.py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-2\.5{padding-bottom:.625rem;padding-top:.625rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-5{padding-bottom:1.25rem;padding-top:1.25rem}.pb-16{padding-bottom:4rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-5{padding-top:1.25rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-bungee{font-family:Bungee Spice,cursive}.font-nunito{font-family:Nunito,sans-serif}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.leading-normal{line-height:1.5}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity:1;color:rgb(30 58 138/var(--tw-text-opacity))}.text-customBlue{--tw-text-opacity:1;color:rgb(9 55 107/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.text-purple-500{--tw-text-opacity:1;color:rgb(168 85 247/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px -1px #0000001a;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a;--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-sm{box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 #0000,0 0 #0000,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid #0000;outline-offset:2px}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.drop-shadow-lg{--tw-drop-shadow:drop-shadow(0 10px 8px #0000000a) drop-shadow(0 4px 3px #0000001a)}.drop-shadow-lg,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-shadow{transition-duration:.15s;transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0;max-width:100%}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.last\:mr-0:last-child{margin-right:0}.focus-within\:outline-none:focus-within{outline:2px solid #0000;outline-offset:2px}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}.hover\:animate-bounce:hover{animation:bounce 1s infinite}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.hover\:bg-gray-900:hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.hover\:bg-slate-900:hover{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.hover\:from-pink-500:hover{--tw-gradient-from:#ec4899 var(--tw-gradient-from-position);--tw-gradient-to:#ec489900 var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:to-yellow-500:hover{--tw-gradient-to:#eab308 var(--tw-gradient-to-position)}.hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:drop-shadow-2xl:hover{--tw-drop-shadow:drop-shadow(0 25px 25px #00000026);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.focus\:text-gray-500:focus{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-2:focus,.focus\:ring-4:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-4:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-inset:focus{--tw-ring-inset:inset}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus\:ring-purple-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(168 85 247/var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 #0000;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}@media (prefers-color-scheme:dark){.dark\:border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:placeholder-gray-400::placeholder{--tw-placeholder-opacity:1;color:rgb(156 163 175/var(--tw-placeholder-opacity))}.dark\:focus\:border-blue-500:focus{--tw-border-opacity:1;border-color:rgb(59 130 246/var(--tw-border-opacity))}.dark\:focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity))}}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:my-8{margin-bottom:2rem;margin-top:2rem}.sm\:ml-3{margin-left:.75rem}.sm\:ml-4{margin-left:1rem}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:w-auto{width:auto}.sm\:w-full{width:100%}.sm\:max-w-lg{max-width:32rem}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-100,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1}.sm\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:p-0{padding:0}.sm\:p-4{padding:1rem}.sm\:p-6{padding:1.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:pb-4{padding-bottom:1rem}.sm\:text-left{text-align:left}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:right-0{right:0}.md\:right-8{right:2rem}.md\:top-0{top:0}.md\:z-10{z-index:10}.md\:mb-0{margin-bottom:0}.md\:mb-4{margin-bottom:1rem}.md\:mr-40{margin-right:10rem}.md\:mt-12{margin-top:3rem}.md\:mt-4{margin-top:1rem}.md\:block{display:block}.md\:flex{display:flex}.md\:inline-flex{display:inline-flex}.md\:hidden{display:none}.md\:w-7\/12{width:58.333333%}.md\:w-72{width:18rem}.md\:flex-1{flex:1 1}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.md\:pl-64{padding-left:16rem}.md\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}}@media (min-width:1024px){.lg\:mr-60{margin-right:15rem}.lg\:block{display:block}.lg\:w-2\/3{width:66.666667%}.lg\:pr-96{padding-right:24rem}}:root{--primary-color:#000814;--secondary-color:#001d3d;--third-color:#003566;--fourth-color:#ffc300;--fifth-color:#ffd60a}.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion:no-preference){.App-logo{animation:App-logo-spin 20s linear infinite}}.App-header{align-items:center;background-color:#000814;color:#fff;display:flex;flex-direction:column;font-size:calc(10px + 2vmin);justify-content:center;min-height:100vh}.App-link{color:#61dafb}@keyframes App-logo-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes slideInSlideOut{0%,to{transform:translateY(-100%)}10%,90%{transform:translateY(0)}}.animate-slideInSlideOut{animation:slideInSlideOut 3s ease-in-out forwards}.notification{z-index:9999}.feed-container{max-width:100%}.lds-ellipsis{display:inline-block;height:80px;position:relative;width:80px}.lds-ellipsis div{animation-timing-function:cubic-bezier(0,1,1,0);background:#000;border-radius:50%;height:13px;position:absolute;top:33px;width:13px}.lds-ellipsis div:first-child{animation:lds-ellipsis1 .6s infinite;left:8px}.lds-ellipsis div:nth-child(2){animation:lds-ellipsis2 .6s infinite;left:8px}.lds-ellipsis div:nth-child(3){animation:lds-ellipsis2 .6s infinite;left:32px}.lds-ellipsis div:nth-child(4){animation:lds-ellipsis3 .6s infinite;left:56px}@keyframes lds-ellipsis1{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}to{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0)}to{transform:translate(24px)}}.trending-container{position:-webkit-sticky;position:sticky;z-index:9999}.editor-container{z-index:9999}.title-post{color:#fff}.commentBox{display:flex;flex-direction:row;flex-wrap:wrap;padding-bottom:10px;padding-top:10px;width:auto}input.comment-form{border:2px solid dimgray;border-radius:1rex;color:#000;flex-grow:1}.comment-container{border-radius:5px;border-top:1px solid #c3c3c3;display:flex;gap:10px;max-width:100%;min-width:400px;padding:10px}.comment-container>img{border-radius:50%;flex-shrink:0;height:50px;object-fit:cover;width:50px}.username-comment{align-items:flex-start}.name-comment{align-items:start}.profile1{border-radius:50%;height:50px;object-fit:cover;width:50px}.comment-content{flex-grow:1}.username-comment{color:#000;padding-right:5px}.name-comment,.username-comment{font-size:medium;font-weight:700}.comment{color:#000;font-size:small;padding-left:3px;padding-top:3px;word-break:break-word}.nested-comments{display:flex;flex-direction:column;margin-left:20px;margin-top:10px}.view-replies-button{background:none;border:none;color:blue;cursor:pointer;font-size:small;margin-top:5px;padding-left:6px;text-align:left}.lds-ring{display:inline-block;height:80px;position:relative;width:80px}.lds-ring div{animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border:8px solid #0000;border-radius:50%;border-top-color:#fff;box-sizing:border-box;display:block;height:64px;margin:8px;position:absolute;width:64px}.lds-ring div:first-child{animation-delay:-.45s}.lds-ring div:nth-child(2){animation-delay:-.3s}.lds-ring div:nth-child(3){animation-delay:-.15s}@keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}} - -/*!*.profile1 {*!*/.headerClasses{z-index:100}.upload-btn-wrapper{display:flex;position:relative}.upload-btn-wrapper:before{background-color:#fff;border-radius:50%;box-shadow:0 4px 8px #f3f4f5;content:"";height:60px;left:50%;position:absolute;top:-30px;transform:translateX(-50%);width:60px;z-index:-1}.upload-button{background-color:initial;padding:15px;z-index:1}.footer-bar{z-index:999}@media (max-width:320px){.footer-bar button{padding:0 4px}.footer-bar svg{height:24px;width:24px}} \ No newline at end of file diff --git a/static/js/main.59450c43.js b/static/js/main.a9a4c61b.js similarity index 91% rename from static/js/main.59450c43.js rename to static/js/main.a9a4c61b.js index fef42fb..c7e1432 100644 --- a/static/js/main.59450c43.js +++ b/static/js/main.a9a4c61b.js @@ -1,2 +1,2 @@ -/*! For license information please see main.59450c43.js.LICENSE.txt */ -(()=>{var e={9932:(e,t,n)=>{"use strict";var r,a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",a({viewBox:"0 0 24 24",style:a({fill:n,width:i,height:l},u)},d),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3050:(e,t,n)=>{"use strict";var r,a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",a({viewBox:"0 0 24 24",style:a({fill:n,width:i,height:l},u)},d),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},8925:function(e,t,n){var r,a,i;a=[],void 0===(i="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function a(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):a(l.href)?r(e,t,n):i(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,o),n);else if(a(e))r(e,n,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var i="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);a?a.location=h:location.href=h,a=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,a):r)||(e.exports=i)},5252:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Animation=void 0;const r=n(2609),a=n(5532),i=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return(new Date).getTime()};class o{constructor(e,t){this.id=o.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:i(),frameRate:0},this.func=e,this.setLayers(t)}setLayers(e){let t=[];return e&&(t=Array.isArray(e)?e:[e]),this.layers=t,this}getLayers(){return this.layers}addLayer(e){const t=this.layers,n=t.length;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],t.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];t.getCubicArcLength=(e,r,a)=>{let i,o,s;i=a/2,o=0;for(let l=0;l<20;l++)s=i*t.tValues[20][l]+i,o+=t.cValues[20][l]*n(e,r,s);return i*o};function n(e,t,n){const a=r(1,n,e),i=r(1,n,t),o=a*a+i*i;return Math.sqrt(o)}t.getQuadraticArcLength=(e,t,n)=>{void 0===n&&(n=1);const r=e[0]-2*e[1]+e[2],a=t[0]-2*t[1]+t[2],i=2*e[1]-2*e[0],o=2*t[1]-2*t[0],s=4*(r*r+a*a),l=4*(r*i+a*o),c=i*i+o*o;if(0===s)return n*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));const u=l/(2*s),d=n+u,h=c/s-u*u,f=d*d+h>0?Math.sqrt(d*d+h):0,p=u*u+h>0?Math.sqrt(u*u+h):0,g=u+Math.sqrt(u*u+h)!==0?h*Math.log(Math.abs((d+f)/(u+p))):0;return Math.sqrt(s)/2*(d*f-u*p+g)};const r=(e,n,a)=>{const i=a.length-1;let o,s;if(0===i)return 0;if(0===e){s=0;for(let e=0;e<=i;e++)s+=t.binomialCoefficients[i][e]*Math.pow(1-n,i-e)*Math.pow(n,e)*a[e];return s}o=new Array(i);for(let t=0;t{let r=1,a=e/t,i=(e-n(a))/t,o=0;for(;r>.001;){const s=n(a+i),l=Math.abs(e-s)/t;if(l500)break}return a}},8771:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitCanvas=t.SceneCanvas=t.Canvas=void 0;const r=n(5532),a=n(1344),i=n(2609),o=n(9842),s=n(6518);var l;class c{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||i.Konva.pixelRatio||function(){if(l)return l;var e=r.Util.createCanvasElement(),t=e.getContext("2d");return l=(i.Konva._global.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),r.Util.releaseCanvas(e),l}();this.pixelRatio=t,this._canvas=r.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch(n){try{return this._canvas.toDataURL()}catch(a){return r.Util.error("Unable to get data URL. "+a.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}t.Canvas=c,o.Factory.addGetterSetter(c,"pixelRatio",void 0,(0,s.getNumberValidator)());t.SceneCanvas=class extends c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0,willReadFrequently:!1};super(e),this.context=new a.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}};t.HitCanvas=class extends c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0};super(e),this.hitCanvas=!0,this.context=new a.HitContext(this),this.setSize(e.width,e.height)}}},1418:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;const r=n(9842),a=n(2302),i=n(6518);class o extends a.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var n=[];return t.forEach((function(t){e(t)&&n.push(t)})),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.remove()})),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.destroy()})),this.children=[],this._requestDraw(),this}add(){if(0===arguments.length)return this;if(arguments.length>1){for(var e=0;e0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants((r=>{const a=r._isMatch(e);return a&&n.push(r),!(!a||!t)})),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n){if(t=e(r),t)return!0;if(r.hasChildren()&&(t=r._descendants(e),t))return!0}return!1}toObject(){var e=a.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach((t=>{e.children.push(t.toObject())})),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=a.Node.prototype.clone.call(this,e);return this.getChildren().forEach((function(e){t.add(e.clone())})),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach((n=>{n.isVisible()&&n.intersects(e)&&t.push(n)})),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach((function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;null===(e=this.children)||void 0===e||e.forEach((function(e,t){e.index=t})),this._requestDraw()}drawScene(e,t,n){var r=this.getLayer(),a=e||r&&r.getCanvas(),i=a&&a.getContext(),o=this._getCanvasCache(),s=o&&o.scene,l=a&&a.isCache;if(!this.isVisible()&&!l)return this;if(s){i.save();var c=this.getAbsoluteTransform(t).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",a,t,n);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,a=r&&r.getContext(),i=this._getCanvasCache();if(i&&i.hit){a.save();var o=this.getAbsoluteTransform(t).getMatrix();a.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n,r){var a,i=t&&t.getContext(),o=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),c="number"===typeof o&&"number"===typeof s||l;const u=n===this;if(c){i.save();var d=this.getAbsoluteTransform(n),h=d.getMatrix();let e;if(i.transform(h[0],h[1],h[2],h[3],h[4],h[5]),i.beginPath(),l)e=l.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f||0,p||0,o,s)}i.clip.apply(i,e),h=d.copy().invert().getMatrix(),i.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var g=!u&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;g&&(i.save(),i._applyGlobalCompositeOperation(this)),null===(a=this.children)||void 0===a||a.forEach((function(a){a[e](t,n,r)})),g&&i.restore(),c&&i.restore()}getClientRect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,r,a,i,o=e.skipTransform,s=e.relativeTo,l={x:1/0,y:1/0,width:0,height:0},c=this;null===(t=this.children)||void 0===t||t.forEach((function(t){if(t.visible()){var o=t.getClientRect({relativeTo:c,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===o.width&&0===o.height||(void 0===n?(n=o.x,r=o.y,a=o.x+o.width,i=o.y+o.height):(n=Math.min(n,o.x),r=Math.min(r,o.y),a=Math.max(a,o.x+o.width),i=Math.max(i,o.y+o.height)))}}));for(var u=this.find("Shape"),d=!1,h=0;h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitContext=t.SceneContext=t.Context=void 0;const r=n(5532),a=n(2609);var i=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class o{constructor(e){this.canvas=e,a.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n,a,i,o,s=this.traceArr,l=s.length,c="";for(n=0;n"number"===typeof e?Math.floor(e):e))),c+="("+o.join(",")+")")):(c+=a.property,e||(c+="="+a.val)),c+=";";return c}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr;t.push(e),t.length>=100&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){const t=e.attrs.lineCap;t&&this.setAttr("lineCap",t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)}_applyLineJoin(e){const t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,a,i){this._context.arc(e,t,n,r,a,i)}arcTo(e,t,n,r,a){this._context.arcTo(e,t,n,r,a)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,a,i){this._context.bezierCurveTo(e,t,n,r,a,i)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:t})}_fillColor(e){var t=e.fill();this.setAttr("fillStyle",t),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fillRadialGradient(e){const t=e._getRadialGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fill(e){const t=e.fill(),n=e.getFillPriority();if(t&&"color"===n)return void this._fillColor(e);const r=e.getFillPatternImage();if(r&&"pattern"===n)return void this._fillPattern(e);const a=e.getFillLinearGradientColorStops();if(a&&"linear-gradient"===n)return void this._fillLinearGradient(e);const i=e.getFillRadialGradientColorStops();i&&"radial-gradient"===n?this._fillRadialGradient(e):t?this._fillColor(e):r?this._fillPattern(e):a?this._fillLinearGradient(e):i&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var r=n(1933);Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return r.Konva}});const a=n(1933);e.exports=a.Konva},995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const r=n(2609),a=n(5532);t.DD={get isDragging(){var e=!1;return t.DD._dragElements.forEach((t=>{"dragging"===t.dragStatus&&(e=!0)})),e},justDragged:!1,get node(){var e;return t.DD._dragElements.forEach((t=>{e=t.node})),e},_dragElements:new Map,_drag(e){const n=[];t.DD._dragElements.forEach(((t,r)=>{const{node:i}=t,o=i.getStage();o.setPointersPositions(e),void 0===t.pointerId&&(t.pointerId=a.Util._getFirstPointerId(e));const s=o._changedPointerPositions.find((e=>e.id===t.pointerId));if(s){if("dragging"!==t.dragStatus){var l=i.dragDistance();if(Math.max(Math.abs(s.x-t.startPointerPos.x),Math.abs(s.y-t.startPointerPos.y)){t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)}))},_endDragBefore(e){const n=[];t.DD._dragElements.forEach((a=>{const{node:i}=a,o=i.getStage();e&&o.setPointersPositions(e);if(!o._changedPointerPositions.find((e=>e.id===a.pointerId)))return;"dragging"!==a.dragStatus&&"stopped"!==a.dragStatus||(t.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,a.dragStatus="stopped");const s=a.node.getLayer()||a.node instanceof r.Konva.Stage&&a.node;s&&-1===n.indexOf(s)&&n.push(s)})),n.forEach((e=>{e.draw()}))},_endDragAfter(e){t.DD._dragElements.forEach(((n,r)=>{"stopped"===n.dragStatus&&n.node.fire("dragend",{type:"dragend",target:n.node,evt:e},!0),"dragging"!==n.dragStatus&&t.DD._dragElements.delete(r)}))}},r.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1))},9842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const r=n(5532),a=n(6518);var i="get",o="set";t.Factory={addGetterSetter(e,n,r,a,i){t.Factory.addGetter(e,n,r),t.Factory.addSetter(e,n,a,i),t.Factory.addOverloadedGetterSetter(e,n)},addGetter(e,t,n){var a=i+r.Util._capitalize(t);e.prototype[a]=e.prototype[a]||function(){var e=this.attrs[t];return void 0===e?n:e}},addSetter(e,n,a,i){var s=o+r.Util._capitalize(n);e.prototype[s]||t.Factory.overWriteSetter(e,n,a,i)},overWriteSetter(e,t,n,a){var i=o+r.Util._capitalize(t);e.prototype[i]=function(e){return n&&void 0!==e&&null!==e&&(e=n.call(this,e,t)),this._setAttr(t,e),a&&a.call(this),this}},addComponentsGetterSetter(e,n,s,l,c){var u,d,h=s.length,f=r.Util._capitalize,p=i+f(n),g=o+f(n);e.prototype[p]=function(){var e={};for(u=0;u{this._setAttr(n+f(e),void 0)})),this._fireChangeEvent(n,r,e),c&&c.call(this),this},t.Factory.addOverloadedGetterSetter(e,n)},addOverloadedGetterSetter(e,t){var n=r.Util._capitalize(t),a=o+n,s=i+n;e.prototype[t]=function(){return arguments.length?(this[a](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(e,n,a,o){r.Util.error("Adding deprecated "+n);var s=i+r.Util._capitalize(n),l=n+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[s]=function(){r.Util.error(l);var e=this.attrs[n];return void 0===e?a:e},t.Factory.addSetter(e,n,o,(function(){r.Util.error(l)})),t.Factory.addOverloadedGetterSetter(e,n)},backCompat(e,t){r.Util.each(t,(function(t,n){var a=e.prototype[n],s=i+r.Util._capitalize(t),l=o+r.Util._capitalize(t);function c(){a.apply(this,arguments),r.Util.error('"'+t+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[t]=c,e.prototype[s]=c,e.prototype[l]=c}))},afterSetFilter(){this._filterUpToDate=!1}}},231:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastLayer=void 0;const r=n(5532),a=n(4097),i=n(2609);class o extends a.Layer{constructor(e){super(e),this.listening(!1),r.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}t.FastLayer=o,o.prototype.nodeType="FastLayer",(0,i._registerNode)(o)},2609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const r=Math.PI/180;t.glob="undefined"!==typeof n.g?n.g:"undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:{},t.Konva={_global:t.glob,version:"9.3.11",isBrowser:"undefined"!==typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle:e=>t.Konva.angleDeg?e*r:e,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:"undefined"!==typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>t.Konva.DD.isDragging,isTransforming(){var e;return null===(e=t.Konva.Transformer)||void 0===e?void 0:e.isTransforming()},isDragReady:()=>!!t.Konva.DD.node,releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(e){t.glob.Konva=e}};t._registerNode=e=>{t.Konva[e.prototype.getClassName()]=e},t.Konva._injectGlobal(t.Konva)},7365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;const r=n(5532),a=n(1418),i=n(2609);class o extends a.Container{_validateAdd(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&r.Util.throw("You may only add groups and shapes to groups.")}}t.Group=o,o.prototype.nodeType="Group",(0,i._registerNode)(o)},4097:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layer=void 0;const r=n(5532),a=n(1418),i=n(2302),o=n(9842),s=n(8771),l=n(6518),c=n(7177),u=n(2609);var d=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],h=d.length;class f extends a.Container{constructor(e){super(e),this.canvas=new s.SceneCanvas,this.hitCanvas=new s.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r0?{antialiased:!0}:{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),a.Container.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),a.Container.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return r.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}t.Layer=f,f.prototype.nodeType="Layer",(0,u._registerNode)(f),o.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(f,"clearBeforeDraw",!0),o.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,l.getBooleanValidator)())},2302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Node=void 0;const r=n(5532),a=n(9842),i=n(8771),o=n(2609),s=n(995),l=n(6518);var c="absoluteOpacity",u="allEventListeners",d="absoluteTransform",h="absoluteScale",f="canvas",p="listening",g="mouseenter",m="mouseleave",v="Shape",y=" ",b="stage",x="transform",w="visible",S=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(y);let k=1;class _{constructor(e){this._id=k++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){e!==x&&e!==d||!this._cache.get(e)?e?this._cache.delete(e):this._cache.clear():this._cache.get(e).dirty=!0}_getCache(e,t){var n=this._cache.get(e);return(void 0===n||(e===x||e===d)&&!0===n.dirty)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){const n=t.map((e=>e+"Change.konva")).join(y);this.on(n,(()=>{this._clearCache(e)})),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(f)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===d&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){const{scene:e,filter:t,hit:n}=this._cache.get(f);r.Util.releaseCanvas(e,t,n),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var a=Math.ceil(t.width||n.width),o=Math.ceil(t.height||n.height),s=t.pixelRatio,l=void 0===t.x?Math.floor(n.x):t.x,u=void 0===t.y?Math.floor(n.y):t.y,d=t.offset||0,p=t.drawBorder||!1,g=t.hitCanvasPixelRatio||1;if(!a||!o)return void r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");a+=2*d+(Math.abs(Math.round(n.x)-l)>.5?1:0),o+=2*d+(Math.abs(Math.round(n.y)-u)>.5?1:0),l-=d,u-=d;var m=new i.SceneCanvas({pixelRatio:s,width:a,height:o}),v=new i.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),y=new i.HitCanvas({pixelRatio:g,width:a,height:o}),b=m.getContext(),x=y.getContext();return y.isCache=!0,m.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===t.imageSmoothingEnabled&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),b.save(),x.save(),b.translate(-l,-u),x.translate(-l,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(h),this.drawScene(m,this),this.drawHit(y,this),this._isUnderCache=!1,b.restore(),x.restore(),p&&(b.save(),b.beginPath(),b.rect(0,0,a,o),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(f,{scene:m,filter:v,hit:y,x:l,y:u}),this._requestDraw(),this}isCached(){return this._cache.has(f)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r=1/0,a=1/0,i=-1/0,o=-1/0,s=this.getAbsoluteTransform(t);return n.forEach((function(e){var t=s.point(e);void 0===r&&(r=i=t.x,a=o=t.y),r=Math.min(r,t.x),a=Math.min(a,t.y),i=Math.max(i,t.x),o=Math.max(o,t.y)})),{x:r,y:a,width:i-r,height:o-a}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e,t,n,a,i=this.filters(),o=this._getCanvasCache(),s=o.scene,l=o.filter,c=l.getContext();if(i){if(!this._filterUpToDate){var u=s.pixelRatio;l.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio);try{for(e=i.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/u,s.getHeight()/u),t=c.getImageData(0,0,l.getWidth(),l.getHeight()),n=0;n{var t,n;if(!e)return this;for(t in e)"children"!==t&&(n="set"+r.Util._capitalize(t),r.Util._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))})),this}isListening(){return this._getCache(p,this._isListening)}_isListening(e){if(!this.listening())return!1;const t=this.getParent();return!t||t===e||this===e||t._isListening(e)}isVisible(){return this._getCache(w,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const t=this.getParent();return!t||t===e||this===e||t._isVisible(e)}shouldDrawHit(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;s.DD._dragElements.forEach((e=>{"dragging"===e.dragStatus&&("Stage"===e.node.nodeType||e.node.getLayer()===n)&&(r=!0)}));var a=!t&&!o.Konva.hitOnDragEnabled&&(r||o.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e,t,n,r,a=this.getDepth(),i=this,o=0;const s=this.getStage();return"Stage"!==i.nodeType&&s&&function s(l){for(e=[],t=l.length,n=0;n0&&e[0].getDepth()<=a&&s(e)}(s.getChildren()),o}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(x),this._clearSelfAndDescendantCache(d)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges((()=>{this.x(e.x),this.y(e.y)})),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;var t=e.getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var a=this.getAbsoluteTransform(e).getMatrix(),i=new r.Transform,o=this.offset();return i.m=a.slice(),i.translate(o.x,o.y),i.getTranslation()}setAbsolutePosition(e){const{x:t,y:n,...r}=this._clearTransform();this.attrs.x=t,this.attrs.y=n,this._clearCache(x);var a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(e.x,e.y),e={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(r),this.setPosition({x:e.x,y:e.y}),this._clearCache(x),this._clearSelfAndDescendantCache(d),this}_setTransform(e){var t;for(t in e)this.attrs[t]=e[t]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var t=e.x,n=e.y,r=this.x(),a=this.y();return void 0!==t&&(r+=t),void 0!==n&&(a+=n),this.setPosition({x:r,y:a}),this}_eachAncestorReverse(e,t){var n,r,a=[],i=this.getParent();if(!t||t._id!==this._id){for(a.unshift(this);i&&(!t||i._id!==t._id);)a.unshift(i),i=i.parent;for(n=a.length,r=0;r0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&r.Util.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(c,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e,t,n,a,i=this.getAttrs();const o={attrs:{},className:this.getClassName()};for(e in i)t=i[e],r.Util.isObject(t)&&!r.Util._isPlainObject(t)&&!r.Util._isArray(t)||(n="function"===typeof this[e]&&this[e],delete i[e],a=n?n.call(this):null,i[e]=t,a!==t&&(o.attrs[e]=t));return r.Util._prepareToStringify(o)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var a=this.parent;a;){if(a===n)return r;a._isMatch(e)&&r.push(a),a=a.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if("function"===typeof e)return e(this);var t,n,a=e.replace(/ /g,"").split(","),i=a.length;for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(d,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new r.Transform,this._eachAncestorReverse((function(e){var n=e.transformsEnabled();"all"===n?t.multiply(e.getTransform()):"position"===n&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())}),e),t;t=this._cache.get(d)||new r.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if("all"===n)t.multiply(this.getTransform());else if("position"===n){const e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,a=this.attrs.offsetY||0;t.translate(e-r,n-a)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();const n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(x,this._getTransform)}_getTransform(){var e,t,n=this._cache.get(x)||new r.Transform;n.reset();var a=this.x(),i=this.y(),s=o.Konva.getAngle(this.rotation()),l=null!==(e=this.attrs.scaleX)&&void 0!==e?e:1,c=null!==(t=this.attrs.scaleY)&&void 0!==t?t:1,u=this.attrs.skewX||0,d=this.attrs.skewY||0,h=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===a&&0===i||n.translate(a,i),0!==s&&n.rotate(s),0===u&&0===d||n.skew(u,d),1===l&&1===c||n.scale(l,c),0===h&&0===f||n.translate(-1*h,-1*f),n.dirty=!1,n}clone(e){var t,n,a,i,o,s=r.Util.cloneObject(this.attrs);for(t in e)s[t]=e[t];var l=new this.constructor(s);for(t in this.eventListeners)for(a=(n=this.eventListeners[t]).length,i=0;i{try{const n=null===e||void 0===e?void 0:e.callback;n&&delete e.callback,r.Util._urlToImage(this.toDataURL(e),(function(e){t(e),null===n||void 0===n||n(e)}))}catch(a){n(a)}}))}toBlob(e){return new Promise(((t,n)=>{try{const n=null===e||void 0===e?void 0:e.callback;n&&delete e.callback,this.toCanvas(e).toBlob((e=>{t(e),null===n||void 0===n||n(e)}),null===e||void 0===e?void 0:e.mimeType,null===e||void 0===e?void 0:e.quality)}catch(r){n(r)}}))}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.Konva.dragDistance}_off(e,t,n){var r,a,i,o=this.eventListeners[e];for(r=0;r1&&void 0!==arguments[1])||arguments[1];s.DD._dragElements.has(this._id)||this._createDragElement(e);s.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){const n=this.getStage()._getPointerById(t.pointerId);if(n){var a={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(void 0!==i){const t=i.call(this,a,e);t?a=t:r.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===a.x&&this._lastPos.y===a.y||(this.setAbsolutePosition(a),this._requestDraw()),this._lastPos=a}}stopDrag(e){const t=s.DD._dragElements.get(this._id);t&&(t.dragStatus="stopped"),s.DD._endDragBefore(e),s.DD._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=s.DD._dragElements.get(this._id);return!!e&&"dragging"===e.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(e){if((!(void 0!==e.evt.button)||o.Konva.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;s.DD._dragElements.forEach((e=>{this.isAncestorOf(e.node)&&(t=!0)})),t||this._createDragElement(e)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const e=s.DD._dragElements.get(this._id),t=e&&"dragging"===e.dragStatus,n=e&&"ready"===e.dragStatus;t?this.stopDrag():n&&s.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0};const t=this.getStage();if(!t)return!1;const n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return r.Util.haveIntersection(n,this.getClientRect())}static create(e,t){return r.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(e,t){var n,a,i,s=_.prototype.getClassName.call(e),l=e.children;t&&(e.attrs.container=t),o.Konva[s]||(r.Util.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");if(n=new(0,o.Konva[s])(e.attrs),l)for(a=l.length,i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.releaseCapture=t.setPointerCapture=t.hasPointerCapture=t.createEvent=t.getCapturedShape=void 0;const r=n(2609),a=new Map,i=void 0!==r.Konva._global.PointerEvent;function o(e){return{evt:e,pointerId:e.pointerId}}function s(e,t){const n=a.get(e);if(!n)return;const r=n.getStage();r&&r.content,a.delete(e),i&&n._fire("lostpointercapture",o(new PointerEvent("lostpointercapture")))}t.getCapturedShape=function(e){return a.get(e)},t.createEvent=o,t.hasPointerCapture=function(e,t){return a.get(e)===t},t.setPointerCapture=function(e,t){s(e),t.getStage()&&(a.set(e,t),i&&t._fire("gotpointercapture",o(new PointerEvent("gotpointercapture"))))},t.releaseCapture=s},7177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const r=n(2609),a=n(5532),i=n(9842),o=n(2302),s=n(6518),l=n(2609),c=n(1673);var u="hasShadow",d="shadowRGBA",h="patternImage",f="linearGradient",p="radialGradient";let g;function m(){return g||(g=a.Util.createCanvasElement().getContext("2d"),g)}t.shapes={};class v extends o.Node{constructor(e){let n;for(super(e);n=a.Util.getRandomColor(),!n||n in t.shapes;);this.colorKey=n,t.shapes[n]=this}getContext(){return a.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return a.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(u,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const e=m().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new a.Transform;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(r.Konva.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const n=t.getMatrix(),i="undefined"===typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(i)}return e}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=m(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),a=t.createLinearGradient(n.x,n.y,r.x,r.y),i=0;ithis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops())))}hasHitStroke(){const e=this.hitStrokeWidth();return"auto"===e?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage();if(!t)return!1;const n=t.bufferHitCanvas;n.getContext().clear(),this.drawHit(n,void 0,!0);return n.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var t;if(!(null===(t=this.attrs.perfectDrawEnabled)||void 0===t||t))return!1;const n=e||this.hasFill(),r=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(n&&r&&a)return!0;const i=this.hasShadow(),o=this.shadowForStrokeEnabled();return!!(n&&r&&i&&o)}setStrokeHitEnabled(e){a.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),a=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,i=r.width+a,o=r.height+a,s=!e.skipShadow&&this.hasShadow(),l=s?this.shadowOffsetX():0,c=s?this.shadowOffsetY():0,u=i+Math.abs(l),d=o+Math.abs(c),h=s&&this.shadowBlur()||0,f={width:u+2*h,height:d+2*h,x:-(a/2+h)+Math.min(l,0)+r.x,y:-(a/2+h)+Math.min(c,0)+r.y};return t?f:this._transformedRect(f,n)}drawScene(e,t,n){var r,a,i=this.getLayer(),o=e||i.getCanvas(),s=o.getContext(),l=this._getCanvasCache(),c=this.getSceneFunc(),u=this.hasShadow(),d=o.isCache,h=t===this;if(!this.isVisible()&&!h)return this;if(l){s.save();var f=this.getAbsoluteTransform(t).getMatrix();return s.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(s),s.restore(),this}if(!c)return this;if(s.save(),this._useBufferCanvas()&&!d){r=this.getStage();const e=n||r.bufferCanvas;(a=e.getContext()).clear(),a.save(),a._applyLineJoin(this);var p=this.getAbsoluteTransform(t).getMatrix();a.transform(p[0],p[1],p[2],p[3],p[4],p[5]),c.call(this,a,this),a.restore();var g=e.pixelRatio;u&&s._applyShadow(this),s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(e._canvas,0,0,e.width/g,e.height/g)}else{if(s._applyLineJoin(this),!h){p=this.getAbsoluteTransform(t).getMatrix();s.transform(p[0],p[1],p[2],p[3],p[4],p[5]),s._applyOpacity(this),s._applyGlobalCompositeOperation(this)}u&&s._applyShadow(this),c.call(this,s,this)}return s.restore(),this}drawHit(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,o=i&&i.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),c=l&&l.hit;if(this.colorKey||a.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),c){o.save();var u=this.getAbsoluteTransform(t).getMatrix();return o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!s)return this;o.save(),o._applyLineJoin(this);if(!(this===t)){var d=this.getAbsoluteTransform(t).getMatrix();o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}return s.call(this,o,this),o.restore(),this}drawHitFromCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;var t,n,r,i,o,s=this._getCanvasCache(),l=this._getCachedSceneCanvas(),c=s.hit,u=c.getContext(),d=c.getWidth(),h=c.getHeight();u.clear(),u.drawImage(l._canvas,0,0,d,h);try{for(r=(n=(t=u.getImageData(0,0,d,h)).data).length,i=a.Util._hexToRgb(this.colorKey),o=0;oe?(n[o]=i.r,n[o+1]=i.g,n[o+2]=i.b,n[o+3]=255):n[o+3]=0;u.putImageData(t,0,0)}catch(f){a.Util.error("Unable to draw hit graph from cached scene canvas. "+f.message)}return this}hasPointerCapture(e){return c.hasPointerCapture(e,this)}setPointerCapture(e){c.setPointerCapture(e,this)}releaseCapture(e){c.releaseCapture(e,this)}}t.Shape=v,v.prototype._fillFunc=function(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()},v.prototype._strokeFunc=function(e){e.stroke()},v.prototype._fillFuncHit=function(e){e.fill()},v.prototype._strokeFuncHit=function(e){e.stroke()},v.prototype._centroid=!1,v.prototype.nodeType="Shape",(0,l._registerNode)(v),v.prototype.eventListeners={},v.prototype.on.call(v.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(u)})),v.prototype.on.call(v.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(d)})),v.prototype.on.call(v.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(h)})),v.prototype.on.call(v.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(f)})),v.prototype.on.call(v.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(p)})),i.Factory.addGetterSetter(v,"stroke",void 0,(0,s.getStringOrGradientValidator)()),i.Factory.addGetterSetter(v,"strokeWidth",2,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillAfterStrokeEnabled",!1),i.Factory.addGetterSetter(v,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(v,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),i.Factory.addGetterSetter(v,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),i.Factory.addGetterSetter(v,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),i.Factory.addGetterSetter(v,"lineJoin"),i.Factory.addGetterSetter(v,"lineCap"),i.Factory.addGetterSetter(v,"sceneFunc"),i.Factory.addGetterSetter(v,"hitFunc"),i.Factory.addGetterSetter(v,"dash"),i.Factory.addGetterSetter(v,"dashOffset",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"shadowColor",void 0,(0,s.getStringValidator)()),i.Factory.addGetterSetter(v,"shadowBlur",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"shadowOpacity",1,(0,s.getNumberValidator)()),i.Factory.addComponentsGetterSetter(v,"shadowOffset",["x","y"]),i.Factory.addGetterSetter(v,"shadowOffsetX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"shadowOffsetY",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternImage"),i.Factory.addGetterSetter(v,"fill",void 0,(0,s.getStringOrGradientValidator)()),i.Factory.addGetterSetter(v,"fillPatternX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternY",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillLinearGradientColorStops"),i.Factory.addGetterSetter(v,"strokeLinearGradientColorStops"),i.Factory.addGetterSetter(v,"fillRadialGradientStartRadius",0),i.Factory.addGetterSetter(v,"fillRadialGradientEndRadius",0),i.Factory.addGetterSetter(v,"fillRadialGradientColorStops"),i.Factory.addGetterSetter(v,"fillPatternRepeat","repeat"),i.Factory.addGetterSetter(v,"fillEnabled",!0),i.Factory.addGetterSetter(v,"strokeEnabled",!0),i.Factory.addGetterSetter(v,"shadowEnabled",!0),i.Factory.addGetterSetter(v,"dashEnabled",!0),i.Factory.addGetterSetter(v,"strokeScaleEnabled",!0),i.Factory.addGetterSetter(v,"fillPriority","color"),i.Factory.addComponentsGetterSetter(v,"fillPatternOffset",["x","y"]),i.Factory.addGetterSetter(v,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),i.Factory.addComponentsGetterSetter(v,"fillPatternScale",["x","y"]),i.Factory.addGetterSetter(v,"fillPatternScaleX",1,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternScaleY",1,(0,s.getNumberValidator)()),i.Factory.addComponentsGetterSetter(v,"fillLinearGradientStartPoint",["x","y"]),i.Factory.addComponentsGetterSetter(v,"strokeLinearGradientStartPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillLinearGradientStartPointX",0),i.Factory.addGetterSetter(v,"strokeLinearGradientStartPointX",0),i.Factory.addGetterSetter(v,"fillLinearGradientStartPointY",0),i.Factory.addGetterSetter(v,"strokeLinearGradientStartPointY",0),i.Factory.addComponentsGetterSetter(v,"fillLinearGradientEndPoint",["x","y"]),i.Factory.addComponentsGetterSetter(v,"strokeLinearGradientEndPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillLinearGradientEndPointX",0),i.Factory.addGetterSetter(v,"strokeLinearGradientEndPointX",0),i.Factory.addGetterSetter(v,"fillLinearGradientEndPointY",0),i.Factory.addGetterSetter(v,"strokeLinearGradientEndPointY",0),i.Factory.addComponentsGetterSetter(v,"fillRadialGradientStartPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillRadialGradientStartPointX",0),i.Factory.addGetterSetter(v,"fillRadialGradientStartPointY",0),i.Factory.addComponentsGetterSetter(v,"fillRadialGradientEndPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillRadialGradientEndPointX",0),i.Factory.addGetterSetter(v,"fillRadialGradientEndPointY",0),i.Factory.addGetterSetter(v,"fillPatternRotation",0),i.Factory.addGetterSetter(v,"fillRule",void 0,(0,s.getStringValidator)()),i.Factory.backCompat(v,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},593:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const r=n(5532),a=n(9842),i=n(1418),o=n(2609),s=n(8771),l=n(995),c=n(2609),u=n(1673);var d="mouseleave",h="mouseover",f="mouseenter",p="mousemove",g="mousedown",m="mouseup",v="pointermove",y="pointerdown",b="pointerup",x="pointercancel",w="pointerout",S="pointerleave",k="pointerover",_="pointerenter",E="contextmenu",C="touchstart",j="touchend",N="touchmove",P="touchcancel",O="wheel",T=[[f,"_pointerenter"],[g,"_pointerdown"],[p,"_pointermove"],[m,"_pointerup"],[d,"_pointerleave"],[C,"_pointerdown"],[N,"_pointermove"],[j,"_pointerup"],[P,"_pointercancel"],[h,"_pointerover"],[O,"_wheel"],[E,"_contextmenu"],[y,"_pointerdown"],[v,"_pointermove"],[b,"_pointerup"],[x,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];const L={mouse:{[w]:"mouseout",[S]:d,[k]:h,[_]:f,[v]:p,[y]:g,[b]:m,[x]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[w]:"touchout",[S]:"touchleave",[k]:"touchover",[_]:"touchenter",[v]:N,[y]:C,[b]:j,[x]:P,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[w]:w,[S]:S,[k]:k,[_]:_,[v]:v,[y]:y,[b]:b,[x]:x,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},A=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",R=e=>{const t=A(e);return"pointer"===t?o.Konva.pointerEventsEnabled&&L.pointer:"touch"===t?L.touch:"mouse"===t?L.mouse:void 0};function M(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.clipFunc||e.clipWidth||e.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}t.stages=[];class F extends i.Container{constructor(e){super(M(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{M(this.attrs)})),this._checkVisibility()}_validateAdd(e){const t="Layer"===e.getType(),n="FastLayer"===e.getType();t||n||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if("string"===typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e,t=this.children,n=t.length;for(e=0;e-1&&t.stages.splice(n,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(r.Util.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(e){return this._pointerPositions.find((t=>t.id===e))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){(e=e||{}).x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new s.SceneCanvas({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach((function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),t}getIntersection(e){if(!e)return null;var t,n=this.children;for(t=n.length-1;t>=0;t--){const r=n[t].getIntersection(e);if(r)return r}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+"px",this.content.style.height=t+"px"),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach((n=>{n.setSize({width:e,height:t}),n.draw()}))}add(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1){for(var i=0;i5&&r.Util.warn("The stage has "+s+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),o.Konva.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return u.hasPointerCapture(e,this)}setPointerCapture(e){u.setPointerCapture(e,this)}releaseCapture(e){u.releaseCapture(e,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&T.forEach((e=>{let[t,n]=e;this.content.addEventListener(t,(e=>{this[n](e)}),{passive:!1})}))}_pointerenter(e){this.setPointersPositions(e);const t=R(e.type);t&&this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const t=R(e.type);t&&this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+"targetShape"];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){const t=R(e.type),n=A(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),a=!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled;r&&a?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+"targetShape"]=null):a&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(e){const t=R(e.type),n=A(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach((a=>{var i=this.getIntersection(a);if(l.DD.justDragged=!1,o.Konva["_"+n+"ListenClick"]=!0,!i||!i.isListening())return void(this[n+"ClickStartShape"]=void 0);o.Konva.capturePointerEventsEnabled&&i.setPointerCapture(a.id),this[n+"ClickStartShape"]=i,i._fireAndBubble(t.pointerdown,{evt:e,pointerId:a.id}),r=!0;const s=e.type.indexOf("touch")>=0;i.preventDefault()&&e.cancelable&&s&&e.preventDefault()})),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const t=R(e.type),n=A(e.type);if(!t)return;if(o.Konva.isDragging()&&l.DD.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled))return;var r={};let a=!1;var i=this._getTargetShape(n);this._changedPointerPositions.forEach((o=>{const s=u.getCapturedShape(o.id)||this.getIntersection(o),l=o.id,c={evt:e,pointerId:l};var d=i!==s;if(d&&i&&(i._fireAndBubble(t.pointerout,{...c},s),i._fireAndBubble(t.pointerleave,{...c},s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(a=!0,d&&(s._fireAndBubble(t.pointerover,{...c},i),s._fireAndBubble(t.pointerenter,{...c},i),this[n+"targetShape"]=s),s._fireAndBubble(t.pointermove,{...c})):i&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:l}),this[n+"targetShape"]=null)})),a||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const t=R(e.type),n=A(e.type);if(!t)return;this.setPointersPositions(e);const r=this[n+"ClickStartShape"],a=this[n+"ClickEndShape"];var i={};let s=!1;this._changedPointerPositions.forEach((c=>{const d=u.getCapturedShape(c.id)||this.getIntersection(c);if(d){if(d.releaseCapture(c.id),i[d._id])return;i[d._id]=!0}const h=c.id,f={evt:e,pointerId:h};let p=!1;o.Konva["_"+n+"InDblClickWindow"]?(p=!0,clearTimeout(this[n+"DblTimeout"])):l.DD.justDragged||(o.Konva["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){o.Konva["_"+n+"InDblClickWindow"]=!1}),o.Konva.dblClickWindow),d&&d.isListening()?(s=!0,this[n+"ClickEndShape"]=d,d._fireAndBubble(t.pointerup,{...f}),o.Konva["_"+n+"ListenClick"]&&r&&r===d&&(d._fireAndBubble(t.pointerclick,{...f}),p&&a&&a===d&&d._fireAndBubble(t.pointerdblclick,{...f}))):(this[n+"ClickEndShape"]=null,o.Konva["_"+n+"ListenClick"]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:h}),p&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:h}))})),s||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+n+"ListenClick"]=!1,e.cancelable&&"touch"!==n&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(E,{evt:e}):this._fire(E,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(O,{evt:e}):this._fire(O,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const t=u.getCapturedShape(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(b,u.createEvent(e)),u.releaseCapture(e.pointerId)}_lostpointercapture(e){u.releaseCapture(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,a=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,(e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})})),Array.prototype.forEach.call(e.changedTouches||e.touches,(e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))):(n=(e.clientX-t.left)/t.scaleX,a=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:a},this._pointerPositions=[{x:n,y:a,id:r.Util._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:a,id:r.Util._getFirstPointerId(e)}])}_setPointerPosition(e){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),o.Konva.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach((function(e){e.batchDraw()})),this}}t.Stage=F,F.prototype.nodeType="Stage",(0,c._registerNode)(F),a.Factory.addGetterSetter(F,"container"),o.Konva.isBrowser&&document.addEventListener("visibilitychange",(()=>{t.stages.forEach((e=>{e.batchDraw()}))}))},3914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const r=n(5532),a=n(5252),i=n(2302),o=n(2609);var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=0,c=["fill","stroke","shadowColor"];class u{constructor(e,t,n,r,a,i,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=i,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=a-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class d{constructor(e){var n,i,c=this,h=e.node,f=h._id,p=e.easing||t.Easings.Linear,g=!!e.yoyo;n="undefined"===typeof e.duration?.3:0===e.duration?.001:e.duration,this.node=h,this._id=l++;var m=h.getLayer()||(h instanceof o.Konva.Stage?h.getLayers():null);for(i in m||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new a.Animation((function(){c.tween.onEnterFrame()}),m),this.tween=new u(i,(function(e){c._tweenFunc(e)}),p,0,1,1e3*n,g),this._addListeners(),d.attrs[f]||(d.attrs[f]={}),d.attrs[f][this._id]||(d.attrs[f][this._id]={}),d.tweens[f]||(d.tweens[f]={}),e)void 0===s[i]&&this._addAttr(i,e[i]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,t){var n,a,i,o,s,l,u,h,f=this.node,p=f._id;if((i=d.tweens[p][e])&&delete d.attrs[p][i][e],n=f.getAttr(e),r.Util._isArray(t))if(a=[],s=Math.max(t.length,n.length),"points"===e&&t.length!==n.length&&(t.length>n.length?(u=n,n=r.Util._prepareArrayForTween(n,t,f.closed())):(l=t,t=r.Util._prepareArrayForTween(t,n,f.closed()))),0===e.indexOf("fill"))for(o=0;o{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,t=d.attrs[e._id][this._id];t.points&&t.points.trueEnd&&e.setAttr("points",t.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,t=d.attrs[e._id][this._id];t.points&&t.points.trueStart&&e.points(t.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(1e3*e),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e,t=this.node._id,n=this._id,r=d.tweens[t];for(e in this.pause(),r)delete d.tweens[t][e];delete d.attrs[t][n]}}t.Tween=d,d.attrs={},d.tweens={},i.Node.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new d(e).play()},t.Easings={BackEaseIn(e,t,n,r){var a=1.70158;return n*(e/=r)*e*((a+1)*e-a)+t},BackEaseOut(e,t,n,r){var a=1.70158;return n*((e=e/r-1)*e*((a+1)*e+a)+1)+t},BackEaseInOut(e,t,n,r){var a=1.70158;return(e/=r/2)<1?n/2*(e*e*((1+(a*=1.525))*e-a))+t:n/2*((e-=2)*e*((1+(a*=1.525))*e+a)+2)+t},ElasticEaseIn(e,t,n,r,a,i){var o=0;return 0===e?t:1===(e/=r)?t+n:(i||(i=.3*r),!a||a(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t,BounceEaseIn:(e,n,r,a)=>r-t.Easings.BounceEaseOut(a-e,0,r,a)+n,BounceEaseInOut:(e,n,r,a)=>en*(e/=r)*e+t,EaseOut:(e,t,n,r)=>-n*(e/=r)*(e-2)+t,EaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,StrongEaseIn:(e,t,n,r)=>n*(e/=r)*e*e*e*e+t,StrongEaseOut:(e,t,n,r)=>n*((e=e/r-1)*e*e*e*e+1)+t,StrongEaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t,Linear:(e,t,n,r)=>n*e/r+t}},5532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const r=n(2609);class a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[1,0,0,1,0,0];this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new a(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,a=this.m[1]*t+this.m[3]*n,i=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=a,this.m[2]=i,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,a=this.m[2]+this.m[0]*e,i=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=a,this.m[3]=i,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],a=this.m[1]*e.m[2]+this.m[3]*e.m[3],i=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=a,this.m[4]=i,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,a=this.m[0]*e,i=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=a,this.m[4]=i,this.m[5]=o,this}getMatrix(){return this.m}decompose(){var e=this.m[0],n=this.m[1],r=this.m[2],a=this.m[3],i=e*a-n*r;let o={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=n){var s=Math.sqrt(e*e+n*n);o.rotation=n>0?Math.acos(e/s):-Math.acos(e/s),o.scaleX=s,o.scaleY=i/s,o.skewX=(e*r+n*a)/i,o.skewY=0}else if(0!=r||0!=a){var l=Math.sqrt(r*r+a*a);o.rotation=Math.PI/2-(a>0?Math.acos(-r/l):-Math.acos(r/l)),o.scaleX=i/l,o.scaleY=l,o.skewX=0,o.skewY=(e*r+n*a)/i}return o.rotation=t.Util._getRotation(o.rotation),o}}t.Transform=a;var i=Math.PI/180,o=180/Math.PI,s="Konva error: ",l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},c=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,u=[];const d="undefined"!==typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)};t.Util={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>"[object Array]"===Object.prototype.toString.call(e),_isNumber:e=>"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)&&isFinite(e),_isString:e=>"[object String]"===Object.prototype.toString.call(e),_isBoolean:e=>"[object Boolean]"===Object.prototype.toString.call(e),isObject:e=>e instanceof Object,isValidSelector(e){if("string"!==typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e||e>0?1:-1,requestAnimFrame(e){u.push(e),1===u.length&&d((function(){const e=u;u=[],e.forEach((function(e){e()}))}))},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(t){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,n){var r=t.Util.createImageElement();r.onload=function(){n(r)},r.src=e},_rgbToHex:(e,t,n)=>((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1),_hexToRgb(e){e=e.replace("#","");var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e="0"+e;return"#"+e},getRGB(e){var t;return e in l?{r:(t=l[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=c.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:e=>(e=e||"black",t.Util._namedColorToRBA(e)||t.Util._hex3ColorToRGBA(e)||t.Util._hex4ColorToRGBA(e)||t.Util._hex6ColorToRGBA(e)||t.Util._hex8ColorToRGBA(e)||t.Util._rgbColorToRGBA(e)||t.Util._rgbaColorToRGBA(e)||t.Util._hslColorToRGBA(e)),_namedColorToRBA(e){var t=l[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(((e,t)=>"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e)));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if("#"===e[0]&&9===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if("#"===e[0]&&5===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,a=Number(n[1])/100,i=Number(n[2])/100;let o,s,l;if(0===a)return l=255*i,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o=i<.5?i*(1+a):i+a-i*a;const c=2*i-o,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,l=6*s<1?c+6*(o-c)*s:2*s<1?o:3*s<2?c+(o-c)*(2/3-s)*6:c,u[e]=255*l;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.heighte.slice(0),degToRad:e=>e*i,radToDeg:e=>e*o,_degToRad:e=>(t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(e)),_radToDeg:e=>(t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(e)),_getRotation:e=>r.Konva.angleDeg?t.Util.radToDeg(e):e,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(s+e)},error(e){console.error(s+e)},warn(e){r.Konva.showWarnings&&console.warn("Konva warning: "+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange:(e,t,n)=>t<=e&&e1?(o=n,s=r,l=(n-a)*(n-a)+(r-i)*(r-i)):l=((o=e+u*(n-e))-a)*(o-a)+((s=t+u*(r-t))-i)*(s-i)}return[o,s,l]},_getProjectionToLine(e,n,r){var a=t.Util.cloneObject(e),i=Number.MAX_VALUE;return n.forEach((function(o,s){if(r||s!==n.length-1){var l=n[(s+1)%n.length],c=t.Util._getProjectionToSegment(o.x,o.y,l.x,l.y,e.x,e.y),u=c[0],d=c[1],h=c[2];hn.length){var s=n;n=e,e=s}for(a=0;ae.touches?e.changedTouches[0].identifier:e.pointerId||999,releaseCanvas(){if(r.Konva.releaseCanvasOnDestroy){for(var e=arguments.length,t=new Array(e),n=0;n{e.width=0,e.height=0}))}},drawRoundedRectPath(e,t,n,r){let a=0,i=0,o=0,s=0;"number"===typeof r?a=i=o=s=Math.min(r,t/2,n/2):(a=Math.min(r[0]||0,t/2,n/2),i=Math.min(r[1]||0,t/2,n/2),s=Math.min(r[2]||0,t/2,n/2),o=Math.min(r[3]||0,t/2,n/2)),e.moveTo(a,0),e.lineTo(t-i,0),e.arc(t-i,i,i,3*Math.PI/2,0,!1),e.lineTo(t,n-s),e.arc(t-s,n-s,s,0,Math.PI/2,!1),e.lineTo(o,n),e.arc(o,n-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,a),e.arc(a,a,a,Math.PI,3*Math.PI/2,!1)}}},6518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComponentValidator=t.getBooleanValidator=t.getNumberArrayValidator=t.getFunctionValidator=t.getStringOrGradientValidator=t.getStringValidator=t.getNumberOrAutoValidator=t.getNumberOrArrayOfNumbersValidator=t.getNumberValidator=t.alphaComponent=t.RGBComponent=void 0;const r=n(2609),a=n(5532);function i(e){return a.Util._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)||a.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}t.RGBComponent=function(e){return e>255?255:e<0?0:Math.round(e)},t.alphaComponent=function(e){return e>1?1:e<1e-4?1e-4:e},t.getNumberValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isNumber(e)||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}},t.getNumberOrArrayOfNumbersValidator=function(e){if(r.Konva.isUnminified)return function(t,n){let r=a.Util._isNumber(t),o=a.Util._isArray(t)&&t.length==e;return r||o||a.Util.warn(i(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}},t.getNumberOrAutoValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isNumber(e)||"auto"===e||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}},t.getStringValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isString(e)||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}},t.getStringOrGradientValidator=function(){if(r.Konva.isUnminified)return function(e,t){const n=a.Util._isString(e),r="[object CanvasGradient]"===Object.prototype.toString.call(e)||e&&e.addColorStop;return n||r||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}},t.getFunctionValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isFunction(e)||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}},t.getNumberArrayValidator=function(){if(r.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(a.Util._isArray(e)?e.forEach((function(e){a.Util._isNumber(e)||a.Util.warn('"'+t+'" attribute has non numeric element '+e+". Make sure that all elements are numbers.")})):a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}},t.getBooleanValidator=function(){if(r.Konva.isUnminified)return function(e,t){return!0===e||!1===e||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}},t.getComponentValidator=function(e){if(r.Konva.isUnminified)return function(t,n){return void 0===t||null===t||a.Util.isObject(t)||a.Util.warn(i(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}},1933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const r=n(2609),a=n(5532),i=n(2302),o=n(1418),s=n(593),l=n(4097),c=n(231),u=n(7365),d=n(995),h=n(7177),f=n(5252),p=n(3914),g=n(1344),m=n(8771);t.Konva=a.Util._assign(r.Konva,{Util:a.Util,Transform:a.Transform,Node:i.Node,Container:o.Container,Stage:s.Stage,stages:s.stages,Layer:l.Layer,FastLayer:c.FastLayer,Group:u.Group,DD:d.DD,Shape:h.Shape,shapes:h.shapes,Animation:f.Animation,Tween:p.Tween,Easings:p.Easings,Context:g.Context,Canvas:m.Canvas}),t.default=t.Konva},4493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const r=n(1933),a=n(8387),i=n(1632),o=n(5927),s=n(8266),l=n(8288),c=n(6517),u=n(2328),d=n(4510),h=n(8048),f=n(5233),p=n(6981),g=n(6947),m=n(9012),v=n(2805),y=n(82),b=n(9868),x=n(8201),w=n(5876),S=n(1141),k=n(8650),_=n(172),E=n(7044),C=n(8720),j=n(6991),N=n(9966),P=n(6828),O=n(2878),T=n(4823),L=n(370),A=n(3740),R=n(4543),M=n(7580),F=n(8698),I=n(8804),D=n(2231),z=n(1702);t.Konva=r.Konva.Util._assign(r.Konva,{Arc:a.Arc,Arrow:i.Arrow,Circle:o.Circle,Ellipse:s.Ellipse,Image:l.Image,Label:c.Label,Tag:c.Tag,Line:u.Line,Path:d.Path,Rect:h.Rect,RegularPolygon:f.RegularPolygon,Ring:p.Ring,Sprite:g.Sprite,Star:m.Star,Text:v.Text,TextPath:y.TextPath,Transformer:b.Transformer,Wedge:x.Wedge,Filters:{Blur:w.Blur,Brighten:S.Brighten,Contrast:k.Contrast,Emboss:_.Emboss,Enhance:E.Enhance,Grayscale:C.Grayscale,HSL:j.HSL,HSV:N.HSV,Invert:P.Invert,Kaleidoscope:O.Kaleidoscope,Mask:T.Mask,Noise:L.Noise,Pixelate:A.Pixelate,Posterize:R.Posterize,RGB:M.RGB,RGBA:F.RGBA,Sepia:I.Sepia,Solarize:D.Solarize,Threshold:z.Threshold}})},5876:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Blur=void 0;const r=n(9842),a=n(2302),i=n(6518);function o(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var s=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];t.Blur=function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,a,i,c,u,d,h,f,p,g,m,v,y,b,x,w,S,k,_,E,C,j,N,P=e.data,O=e.width,T=e.height,L=t+t+1,A=O-1,R=T-1,M=t+1,F=M*(M+1)/2,I=new o,D=null,z=I,B=null,U=null,H=s[t],G=l[t];for(a=1;a>G,0!==j?(j=255/j,P[u]=(h*H>>G)*j,P[u+1]=(f*H>>G)*j,P[u+2]=(p*H>>G)*j):P[u]=P[u+1]=P[u+2]=0,h-=m,f-=v,p-=y,g-=b,m-=B.r,v-=B.g,y-=B.b,b-=B.a,i=d+((i=n+t+1)>G,j>0?(j=255/j,P[i]=(h*H>>G)*j,P[i+1]=(f*H>>G)*j,P[i+2]=(p*H>>G)*j):P[i]=P[i+1]=P[i+2]=0,h-=m,f-=v,p-=y,g-=b,m-=B.r,v-=B.g,y-=B.b,b-=B.a,i=n+((i=r+M){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Brighten=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Brighten=function(e){var t,n=255*this.brightness(),r=e.data,a=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contrast=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Contrast=function(e){var t,n=Math.pow((this.contrast()+100)/100,2),r=e.data,a=r.length,i=150,o=150,s=150;for(t=0;t255?255:i,o=(o*=255)<0?0:o>255?255:o,s=(s*=255)<0?0:s>255?255:s,r[t]=i,r[t+1]=o,r[t+2]=s},r.Factory.addGetterSetter(a.Node,"contrast",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter)},172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emboss=void 0;const r=n(9842),a=n(2302),i=n(5532),o=n(6518);t.Emboss=function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),a=this.embossBlend(),o=0,s=0,l=e.data,c=e.width,u=e.height,d=4*c,h=u;switch(r){case"top-left":o=-1,s=-1;break;case"top":o=-1,s=0;break;case"top-right":o=-1,s=1;break;case"right":o=0,s=1;break;case"bottom-right":o=1,s=1;break;case"bottom":o=1,s=0;break;case"bottom-left":o=1,s=-1;break;case"left":o=0,s=-1;break;default:i.Util.error("Unknown emboss direction: "+r)}do{var f=(h-1)*d,p=o;h+p<1&&(p=0),h+p>u&&(p=0);var g=(h-1+p)*c*4,m=c;do{var v=f+4*(m-1),y=s;m+y<1&&(y=0),m+y>c&&(y=0);var b=g+4*(m-1+y),x=l[v]-l[b],w=l[v+1]-l[b+1],S=l[v+2]-l[b+2],k=x,_=k>0?k:-k;if((w>0?w:-w)>_&&(k=w),(S>0?S:-S)>_&&(k=S),k*=t,a){var E=l[v]+k,C=l[v+1]+k,j=l[v+2]+k;l[v]=E>255?255:E<0?0:E,l[v+1]=C>255?255:C<0?0:C,l[v+2]=j>255?255:j<0?0:j}else{var N=n-k;N<0?N=0:N>255&&(N=255),l[v]=l[v+1]=l[v+2]=N}}while(--m)}while(--h)},r.Factory.addGetterSetter(a.Node,"embossStrength",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossWhiteLevel",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)},7044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Enhance=void 0;const r=n(9842),a=n(2302),i=n(6518);function o(e,t,n,r,a){var i=n-t,o=a-r;return 0===i?r+o/2:0===o?r:o*((e-t)/i)+r}t.Enhance=function(e){var t,n,r,a,i=e.data,s=i.length,l=i[0],c=l,u=i[1],d=u,h=i[2],f=h,p=this.enhance();if(0!==p){for(a=0;ac&&(c=t),(n=i[a+1])d&&(d=n),(r=i[a+2])f&&(f=r);var g,m,v,y,b,x,w,S,k;for(c===l&&(c=255,l=0),d===u&&(d=255,u=0),f===h&&(f=255,h=0),p>0?(m=c+p*(255-c),v=l-p*(l-0),b=d+p*(255-d),x=u-p*(u-0),S=f+p*(255-f),k=h-p*(h-0)):(m=c+p*(c-(g=.5*(c+l))),v=l+p*(l-g),b=d+p*(d-(y=.5*(d+u))),x=u+p*(u-y),S=f+p*(f-(w=.5*(f+h))),k=h+p*(h-w)),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Grayscale=void 0;t.Grayscale=function(e){var t,n,r=e.data,a=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HSL=void 0;const r=n(9842),a=n(2302),i=n(6518);r.Factory.addGetterSetter(a.Node,"hue",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"saturation",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"luminance",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter);t.HSL=function(e){var t,n,r,a,i,o=e.data,s=o.length,l=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,u=127*this.luminance(),d=1*l*Math.cos(c*Math.PI/180),h=1*l*Math.sin(c*Math.PI/180),f=.299+.701*d+.167*h,p=.587-.587*d+.33*h,g=.114-.114*d-.497*h,m=.299-.299*d-.328*h,v=.587+.413*d+.035*h,y=.114-.114*d+.293*h,b=.299-.3*d+1.25*h,x=.587-.586*d-1.05*h,w=.114+.886*d-.2*h;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HSV=void 0;const r=n(9842),a=n(2302),i=n(6518);t.HSV=function(e){var t,n,r,a,i,o=e.data,s=o.length,l=Math.pow(2,this.value()),c=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,d=l*c*Math.cos(u*Math.PI/180),h=l*c*Math.sin(u*Math.PI/180),f=.299*l+.701*d+.167*h,p=.587*l-.587*d+.33*h,g=.114*l-.114*d-.497*h,m=.299*l-.299*d-.328*h,v=.587*l+.413*d+.035*h,y=.114*l-.114*d+.293*h,b=.299*l-.3*d+1.25*h,x=.587*l-.586*d-1.05*h,w=.114*l+.886*d-.2*h;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Invert=void 0;t.Invert=function(e){var t,n=e.data,r=n.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kaleidoscope=void 0;const r=n(9842),a=n(2302),i=n(5532),o=n(6518);t.Kaleidoscope=function(e){var t,n,r,a,o,s,l,c,u,d=e.width,h=e.height,f=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),g=Math.floor(d*(p%360)/360);if(!(f<1)){var m=i.Util.createCanvasElement();m.width=d,m.height=h;var v=m.getContext("2d").getImageData(0,0,d,h);i.Util.releaseCanvas(m),function(e,t,n){var r,a,i,o,s=e.data,l=t.data,c=e.width,u=e.height,d=n.polarCenterX||c/2,h=n.polarCenterY||u/2,f=0,p=0,g=0,m=0,v=Math.sqrt(d*d+h*h);a=c-d,i=u-h,v=(o=Math.sqrt(a*a+i*i))>v?o:v;var y,b,x,w,S=u,k=c,_=360/k*Math.PI/180;for(b=0;bd&&(x=b,w=0,S=-1),n=0;nb?l:b;var x,w,S,k=h,_=d,E=n.polarRotation||0;for(a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mask=void 0;const r=n(9842),a=n(2302),i=n(6518);function o(e,t,n){var r=4*(n*e.width+t),a=[];return a.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),a}function s(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}t.Mask=function(e){var t=function(e,t){var n=o(e,0,0),r=o(e,e.width-1,0),a=o(e,0,e.height-1),i=o(e,e.width-1,e.height-1),l=t||10;if(s(n,r)=0&&f=0&&p=0&&f=0&&p=1020?255:0}return o}(t=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s=0&&f=0&&p{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Noise=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Noise=function(e){var t,n=255*this.noise(),r=e.data,a=r.length,i=n/2;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Pixelate=void 0;const r=n(9842),a=n(5532),i=n(2302),o=n(6518);t.Pixelate=function(e){var t,n,r,i,o,s,l,c,u,d,h,f,p,g,m=Math.ceil(this.pixelSize()),v=e.width,y=e.height,b=Math.ceil(v/m),x=Math.ceil(y/m),w=e.data;if(m<=0)a.Util.error("pixelSize value can not be <= 0");else for(f=0;f=v))for(n=d;n=y||(i+=w[(r=4*(v*n+t))+0],o+=w[r+1],s+=w[r+2],l+=w[r+3],g+=1);for(i/=g,o/=g,s/=g,l/=g,t=c;t=v))for(n=d;n=y||(w[(r=4*(v*n+t))+0]=i,w[r+1]=o,w[r+2]=s,w[r+3]=l)}},r.Factory.addGetterSetter(i.Node,"pixelSize",8,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},4543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Posterize=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Posterize=function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,a=r.length,i=255/n;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RGB=void 0;const r=n(9842),a=n(2302),i=n(6518);t.RGB=function(e){var t,n,r=e.data,a=r.length,i=this.red(),o=this.green(),s=this.blue();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"blue",0,i.RGBComponent,r.Factory.afterSetFilter)},8698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RGBA=void 0;const r=n(9842),a=n(2302),i=n(6518);t.RGBA=function(e){var t,n,r=e.data,a=r.length,i=this.red(),o=this.green(),s=this.blue(),l=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"blue",0,i.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}))},8804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sepia=void 0;t.Sepia=function(e){var t,n,r,a,i=e.data,o=i.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Solarize=void 0;t.Solarize=function(e){var t=e.data,n=e.width,r=4*n,a=e.height;do{var i=(a-1)*r,o=n;do{var s=i+4*(o-1),l=t[s],c=t[s+1],u=t[s+2];l>127&&(l=255-l),c>127&&(c=255-c),u>127&&(u=255-u),t[s]=l,t[s+1]=c,t[s+2]=u}while(--o)}while(--a)}},1702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Threshold=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,a=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4493);e.exports=r.Konva},8387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arc=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(6518),s=n(2609);class l extends a.Shape{_sceneFunc(e){var t=i.Konva.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=i.Konva.getAngle(n?360-this.angle():this.angle()),a=Math.cos(Math.min(r,Math.PI)),o=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),s=Math.sin(Math.min(r,Math.PI/2)),l=a*(a>0?e:t),c=o*(o>0?e:t),u=s*(s>0?t:e);return{x:l,y:n?-1*u:c,width:1*t-l,height:u-c}}}t.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1,(0,o.getBooleanValidator)())},1632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=void 0;const r=n(9842),a=n(2328),i=n(6518),o=n(2609),s=n(4510);class l extends a.Line{_sceneFunc(e){super._sceneFunc(e);var t=2*Math.PI,n=this.points(),r=n,a=0!==this.tension()&&n.length>4;a&&(r=this.getTensionPoints());var i,o,l=this.pointerLength(),c=n.length;if(a){const e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[c-2],n[c-1]],t=s.Path.calcLength(r[r.length-4],r[r.length-3],"C",e),a=s.Path.getPointOnQuadraticBezier(Math.min(1,1-l/t),e[0],e[1],e[2],e[3],e[4],e[5]);i=n[c-2]-a.x,o=n[c-1]-a.y}else i=n[c-2]-n[c-4],o=n[c-1]-n[c-3];var u=(Math.atan2(o,i)+t)%t,d=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[c-2],n[c-1]),e.rotate(u),e.moveTo(0,0),e.lineTo(-l,d/2),e.lineTo(-l,-d/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),a?(i=(r[0]+r[2])/2-n[0],o=(r[1]+r[3])/2-n[1]):(i=n[2]-n[0],o=n[3]-n[1]),e.rotate((Math.atan2(-o,-i)+t)%t),e.moveTo(0,0),e.lineTo(-l,d/2),e.lineTo(-l,-d/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}}t.Arrow=l,l.prototype.className="Arrow",(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"pointerLength",10,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerWidth",10,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerAtBeginning",!1),r.Factory.addGetterSetter(l,"pointerAtEnding",!0)},5927:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Circle=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}t.Circle=s,s.prototype._centroid=!0,s.prototype.className="Circle",s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,i.getNumberValidator)())},8266:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipse=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}t.Ellipse=s,s.prototype.className="Ellipse",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o._registerNode)(s),r.Factory.addComponentsGetterSetter(s,"radius",["x","y"]),r.Factory.addGetterSetter(s,"radiusX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"radiusY",0,(0,i.getNumberValidator)())},8288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;const r=n(5532),a=n(9842),i=n(7177),o=n(2609),s=n(6518);class l extends i.Shape{constructor(e){super(e),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&4===e.readyState||e&&e.addEventListener&&e.addEventListener("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const t=this.getWidth(),n=this.getHeight(),a=this.cornerRadius(),i=this.attrs.image;let o;if(i){const e=this.attrs.cropWidth,r=this.attrs.cropHeight;o=e&&r?[i,this.cropX(),this.cropY(),e,r,0,0,t,n]:[i,0,0,t,n]}(this.hasFill()||this.hasStroke()||a)&&(e.beginPath(),a?r.Util.drawRoundedRectPath(e,t,n,a):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),i&&(a&&e.clip(),e.drawImage.apply(e,o))}_hitFunc(e){var t=this.width(),n=this.height(),a=this.cornerRadius();e.beginPath(),a?r.Util.drawRoundedRectPath(e,t,n,a):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,t;return null!==(e=this.attrs.width)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.width}getHeight(){var e,t;return null!==(e=this.attrs.height)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.height}static fromURL(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var a=r.Util.createImageElement();a.onload=function(){var e=new l({image:a});t(e)},a.onerror=n,a.crossOrigin="Anonymous",a.src=e}}t.Image=l,l.prototype.className="Image",(0,o._registerNode)(l),a.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4)),a.Factory.addGetterSetter(l,"image"),a.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),a.Factory.addGetterSetter(l,"cropX",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(l,"cropY",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(l,"cropWidth",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(l,"cropHeight",0,(0,s.getNumberValidator)())},6517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=t.Label=void 0;const r=n(9842),a=n(7177),i=n(7365),o=n(6518),s=n(2609);var l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],c="up",u="right",d="down",h="left",f=l.length;class p extends i.Group{constructor(e){super(e),this.on("add.konva",(function(e){this._addListeners(e.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t,n=this,r=function(){n._sync()};for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Line=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);function s(e,t,n,r,a,i,o){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(a-n,2)+Math.pow(i-r,2)),c=o*s/(s+l),u=o*l/(s+l);return[n-c*(a-e),r-c*(i-t),n+u*(a-e),r+u*(i-t)]}function l(e,t){var n,r,a=e.length,i=[];for(n=2;n4){for(n=(t=this.getTensionPoints()).length,r=s?0:4,s||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Path=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(7588);class s extends a.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute()}))}_readDataAttribute(){this.dataArray=s.parsePathData(this.data()),this.pathLength=s.getPathLength(this.dataArray)}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;rc?l:c,g=l>c?1:l/c,m=l>c?c/l:1;e.translate(o,s),e.rotate(h),e.scale(g,m),e.arc(0,0,p,u,u+d,1-f),e.scale(1/g,1/m),e.rotate(-h),e.translate(-o,-s);break;case"z":n=!0,e.closePath()}}n||this.hasFill()?e.fillStrokeShape(this):e.strokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach((function(t){if("A"===t.command){var n=t.points[4],r=t.points[5],a=t.points[4]+r,i=Math.PI/180;if(Math.abs(n-a)a;r-=i){const n=s.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);e.push(n.x,n.y)}else for(let r=n+i;rt[r].pathLength;)e-=t[r].pathLength,++r;if(r===a)return{x:(n=t[r-1].points.slice(-2))[0],y:n[1]};if(e<.01)return{x:(n=t[r].points.slice(0,2))[0],y:n[1]};var i=t[r],l=i.points;switch(i.command){case"L":return s.getPointOnLine(e,i.start.x,i.start.y,l[0],l[1]);case"C":return s.getPointOnCubicBezier((0,o.t2length)(e,s.getPathLength(t),(e=>(0,o.getCubicArcLength)([i.start.x,l[0],l[2],l[4]],[i.start.y,l[1],l[3],l[5]],e))),i.start.x,i.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case"Q":return s.getPointOnQuadraticBezier((0,o.t2length)(e,s.getPathLength(t),(e=>(0,o.getQuadraticArcLength)([i.start.x,l[0],l[2]],[i.start.y,l[1],l[3]],e))),i.start.x,i.start.y,l[0],l[1],l[2],l[3]);case"A":var c=l[0],u=l[1],d=l[2],h=l[3],f=l[4],p=l[5],g=l[6];return f+=p*e/i.pathLength,s.getPointOnEllipticalArc(c,u,d,h,f,g)}return null}static getPointOnLine(e,t,n,r,a,i,o){void 0===i&&(i=t),void 0===o&&(o=n);var s=(a-n)/(r-t+1e-8),l=Math.sqrt(e*e/(1+s*s));r0&&!isNaN(f[0]);){var v,y,b,x,w,S,k,_,E,C,j="",N=[],P=l,O=c;switch(h){case"l":l+=f.shift(),c+=f.shift(),j="L",N.push(l,c);break;case"L":l=f.shift(),c=f.shift(),N.push(l,c);break;case"m":var T=f.shift(),L=f.shift();if(l+=T,c+=L,j="M",o.length>2&&"z"===o[o.length-1].command)for(var A=o.length-2;A>=0;A--)if("M"===o[A].command){l=o[A].points[0]+T,c=o[A].points[1]+L;break}N.push(l,c),h="l";break;case"M":l=f.shift(),c=f.shift(),j="M",N.push(l,c),h="L";break;case"h":l+=f.shift(),j="L",N.push(l,c);break;case"H":l=f.shift(),j="L",N.push(l,c);break;case"v":c+=f.shift(),j="L",N.push(l,c);break;case"V":c=f.shift(),j="L",N.push(l,c);break;case"C":N.push(f.shift(),f.shift(),f.shift(),f.shift()),l=f.shift(),c=f.shift(),N.push(l,c);break;case"c":N.push(l+f.shift(),c+f.shift(),l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),j="C",N.push(l,c);break;case"S":y=l,b=c,"C"===(v=o[o.length-1]).command&&(y=l+(l-v.points[2]),b=c+(c-v.points[3])),N.push(y,b,f.shift(),f.shift()),l=f.shift(),c=f.shift(),j="C",N.push(l,c);break;case"s":y=l,b=c,"C"===(v=o[o.length-1]).command&&(y=l+(l-v.points[2]),b=c+(c-v.points[3])),N.push(y,b,l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),j="C",N.push(l,c);break;case"Q":N.push(f.shift(),f.shift()),l=f.shift(),c=f.shift(),N.push(l,c);break;case"q":N.push(l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),j="Q",N.push(l,c);break;case"T":y=l,b=c,"Q"===(v=o[o.length-1]).command&&(y=l+(l-v.points[0]),b=c+(c-v.points[1])),l=f.shift(),c=f.shift(),j="Q",N.push(y,b,l,c);break;case"t":y=l,b=c,"Q"===(v=o[o.length-1]).command&&(y=l+(l-v.points[0]),b=c+(c-v.points[1])),l+=f.shift(),c+=f.shift(),j="Q",N.push(y,b,l,c);break;case"A":x=f.shift(),w=f.shift(),S=f.shift(),k=f.shift(),_=f.shift(),E=l,C=c,l=f.shift(),c=f.shift(),j="A",N=this.convertEndpointToCenterParameterization(E,C,l,c,k,_,x,w,S);break;case"a":x=f.shift(),w=f.shift(),S=f.shift(),k=f.shift(),_=f.shift(),E=l,C=c,l+=f.shift(),c+=f.shift(),j="A",N=this.convertEndpointToCenterParameterization(E,C,l,c,k,_,x,w,S)}o.push({command:j||h,points:N,start:{x:P,y:O},pathLength:this.calcLength(P,O,j||h,N)})}"z"!==h&&"Z"!==h||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(e,t,n,r){var a,i,l,c,u=s;switch(n){case"L":return u.getLineLength(e,t,r[0],r[1]);case"C":return(0,o.getCubicArcLength)([e,r[0],r[2],r[4]],[t,r[1],r[3],r[5]],1);case"Q":return(0,o.getQuadraticArcLength)([e,r[0],r[2]],[t,r[1],r[3]],1);case"A":a=0;var d=r[4],h=r[5],f=r[4]+h,p=Math.PI/180;if(Math.abs(d-f)f;c-=p)l=u.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),a+=u.getLineLength(i.x,i.y,l.x,l.y),i=l;else for(c=d+p;c1&&(o*=Math.sqrt(h),s*=Math.sqrt(h));var f=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));a===i&&(f*=-1),isNaN(f)&&(f=0);var p=f*o*d/s,g=f*-s*u/o,m=(e+n)/2+Math.cos(c)*p-Math.sin(c)*g,v=(t+r)/2+Math.sin(c)*p+Math.cos(c)*g,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},x=function(e,t){return(e[0]*t[1]=1&&(_=0),0===i&&_>0&&(_-=2*Math.PI),1===i&&_<0&&(_+=2*Math.PI),[m,v,o,s,w,_,c,i]}}t.Path=s,s.prototype.className="Path",s.prototype._attrsAffectingSize=["data"],(0,i._registerNode)(s),r.Factory.addGetterSetter(s,"data")},8048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rect=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(5532),s=n(6518);class l extends a.Shape{_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();e.beginPath(),t?o.Util.drawRoundedRectPath(e,n,r,t):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}}t.Rect=l,l.prototype.className="Rect",(0,i._registerNode)(l),r.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4))},5233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegularPolygon=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){const t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),a=Math.max(a,e.y)})),{x:t,y:r,width:n-t,height:a-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}t.RegularPolygon=s,s.prototype.className="RegularPolygon",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"sides",0,(0,i.getNumberValidator)())},6981:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ring=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);var s=2*Math.PI;class l extends a.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,s,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),s,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,i.getNumberValidator)())},6947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sprite=void 0;const r=n(9842),a=n(7177),i=n(5252),o=n(6518),s=n(2609);class l extends a.Shape{constructor(e){super(e),this._updated=!0,this.anim=new i.Animation((()=>{var e=this._updated;return this._updated=!1,e})),this.on("animationChange.konva",(function(){this.frameIndex(0)})),this.on("frameIndexChange.konva",(function(){this._updated=!0})),this.on("frameRateChange.konva",(function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())}))}_sceneFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,a=this.animations()[t],i=this.frameOffsets(),o=a[r+0],s=a[r+1],l=a[r+2],c=a[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,l,c),e.closePath(),e.fillStrokeShape(this)),u)if(i){var d=i[t],h=2*n;e.drawImage(u,o,s,l,c,d[h+0],d[h+1],l,c)}else e.drawImage(u,o,s,l,c,0,0,l,c)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,a=this.animations()[t],i=this.frameOffsets(),o=a[r+2],s=a[r+3];if(e.beginPath(),i){var l=i[t],c=2*n;e.rect(l[c+0],l[c+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval((function(){e._updateIndex()}),1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Star=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var a=1;a<2*r;a++){var i=a%2===0?n:t,o=i*Math.sin(a*Math.PI/r),s=-1*i*Math.cos(a*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t.Star=s,s.prototype.className="Star",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"numPoints",5,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"innerRadius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"outerRadius",0,(0,i.getNumberValidator)())},2805:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Text=t.stringToArray=void 0;const r=n(5532),a=n(9842),i=n(7177),o=n(2609),s=n(6518),l=n(2609);function c(e){return Array.from(e)}t.stringToArray=c;var u,d="auto",h="inherit",f="justify",p="left",g="middle",m="normal",v=" ",y="none",b=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],x=b.length;function w(){return u||(u=r.Util.createCanvasElement().getContext("2d"))}class S extends i.Shape{constructor(e){super(function(e){return(e=e||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e}(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t1&&(k+=s)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=r.Util._isString(e)?e:null===e||void 0===e?"":e+"";return this._setAttr("text",t),this}getWidth(){return this.attrs.width===d||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===d||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t,n=w(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{actualBoundingBoxAscent:t.actualBoundingBoxAscent,actualBoundingBoxDescent:t.actualBoundingBoxDescent,actualBoundingBoxLeft:t.actualBoundingBoxLeft,actualBoundingBoxRight:t.actualBoundingBoxRight,alphabeticBaseline:t.alphabeticBaseline,emHeightAscent:t.emHeightAscent,emHeightDescent:t.emHeightDescent,fontBoundingBoxAscent:t.fontBoundingBoxAscent,fontBoundingBoxDescent:t.fontBoundingBoxDescent,hangingBaseline:t.hangingBaseline,ideographicBaseline:t.ideographicBaseline,width:t.width,height:r}}_getContextFont(){return this.fontStyle()+v+this.fontVariant()+v+(this.fontSize()+"px ")+this.fontFamily().split(",").map((e=>{const t=(e=e.trim()).indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return t&&!n&&(e='"'.concat(e,'"')),e})).join(", ")}_addTextLine(e){this.align()===f&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return w().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split("\n"),t=+this.fontSize(),n=0,r=this.lineHeight()*t,a=this.attrs.width,i=this.attrs.height,o=a!==d&&void 0!==a,s=i!==d&&void 0!==i,l=this.padding(),c=a-2*l,u=i-2*l,h=0,f=this.wrap(),p="char"!==f&&f!==y,g=this.ellipsis();this.textArr=[],w().font=this._getContextFont();for(var m=g?this._getTextWidth("\u2026"):0,b=0,x=e.length;bc)for(;S.length>0;){for(var _=0,E=S.length,C="",j=0;_>>1,P=S.slice(0,N+1),O=this._getTextWidth(P)+m;O<=c?(_=N+1,C=P,j=O):E=N}if(!C)break;if(p){var T,L=S[C.length];(T=(L===v||"-"===L)&&j<=c?C.length:Math.max(C.lastIndexOf(v),C.lastIndexOf("-"))+1)>0&&(_=T,C=C.slice(0,_),j=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,j),h+=r,this._shouldHandleEllipsis(h)){this._tryToAddEllipsisToLastLine();break}if((S=(S=S.slice(_)).trimLeft()).length>0&&(k=this._getTextWidth(S))<=c){this._addTextLine(S),h+=r,n=Math.max(n,k);break}}else this._addTextLine(S),h+=r,n=Math.max(n,k),this._shouldHandleEllipsis(h)&&bu)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,a=r!==d&&void 0!==r,i=r-2*this.padding();return!(this.wrap()!==y)||a&&e+n>i}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==d&&void 0!==e,n=e-2*this.padding(),r=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(a&&r){if(t)this._getTextWidth(a.text+"\u2026"){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextPath=void 0;const r=n(5532),a=n(9842),i=n(7177),o=n(4510),s=n(2805),l=n(6518),c=n(2609);var u="normal";function d(e){e.fillText(this.partialText,0,0)}function h(e){e.strokeText(this.partialText,0,0)}class f extends i.Shape{constructor(e){super(e),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute(),this._setTextData()})),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return o.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;return e-1>this.pathLength?null:o.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=o.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),a=this.glyphInfo;"underline"===t&&e.beginPath();for(var i=0;i=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transformer=void 0;const r=n(5532),a=n(9842),i=n(2302),o=n(7177),s=n(8048),l=n(7365),c=n(2609),u=n(6518),d=n(2609);var h="tr-konva",f=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map((e=>e+".".concat(h))).join(" "),p="nodesRect",g=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],m={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const v="ontouchstart"in c.Konva._global;var y=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function b(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),a=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:a}}function x(e,t){const n=function(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}(e);return b(e,t,n)}let w=0;class S extends l.Group{constructor(e){super(e),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(f,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return h+this._id}setNodes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._nodes&&this._nodes.length&&this.detach();const t=e.filter((e=>!e.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1)));return this._nodes=e=t,1===e.length&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((e=>{const t=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=e._attrsAffectingSize.map((e=>e+"Change."+this._getEventNamespace())).join(" ");e.on(n,t),e.on(g.map((e=>e+".".concat(this._getEventNamespace()))).join(" "),t),e.on("absoluteTransformChange.".concat(this._getEventNamespace()),t),this._proxyDrag(e)})),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let t;e.on("dragstart.".concat(this._getEventNamespace()),(n=>{t=e.getAbsolutePosition(),this.isDragging()||e===this.findOne(".back")||this.startDrag(n,!1)})),e.on("dragmove.".concat(this._getEventNamespace()),(n=>{if(!t)return;const r=e.getAbsolutePosition(),a=r.x-t.x,i=r.y-t.y;this.nodes().forEach((t=>{if(t===e)return;if(t.isDragging())return;const r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+a,y:r.y+i}),t.startDrag(n)})),t=null}))}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach((e=>{e.off("."+this._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(p),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(p,this.__getNodeRect)}__getNodeShape(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rotation(),n=arguments.length>2?arguments[2]:void 0;var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),o=r.x*a.x-e.offsetX()*a.x,s=r.y*a.y-e.offsetY()*a.y;const l=(c.Konva.getAngle(e.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return b({x:i.x+o*Math.cos(l)+s*Math.sin(-l),y:i.y+s*Math.cos(l)+o*Math.sin(l),width:r.width*a.x,height:r.height*a.y,rotation:l},-c.Konva.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],a=t.getAbsoluteTransform();r.forEach((function(t){var n=a.point(t);e.push(n)}))}));const t=new r.Transform;t.rotate(-c.Konva.getAngle(this.rotation()));var n=1/0,a=1/0,i=-1/0,o=-1/0;e.forEach((function(e){var r=t.point(e);void 0===n&&(n=i=r.x,a=o=r.y),n=Math.min(n,r.x),a=Math.min(a,r.y),i=Math.max(i,r.x),o=Math.max(o,r.y)})),t.invert();const s=t.point({x:n,y:a});return{x:s.x,y:s.y,width:i-n,height:o-a,rotation:c.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),y.forEach((e=>{this._createAnchor(e)})),this._createAnchor("rotater")}_createAnchor(e){var t=new s.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:v?10:"auto"}),n=this;t.on("mousedown touchstart",(function(e){n._handleMouseDown(e)})),t.on("dragstart",(e=>{t.stopDrag(),e.cancelBubble=!0})),t.on("dragend",(e=>{e.cancelBubble=!0})),t.on("mouseenter",(()=>{var n=c.Konva.getAngle(this.rotation()),a=this.rotateAnchorCursor(),i=function(e,t,n){if("rotater"===e)return n;t+=r.Util.degToRad(m[e]||0);var a=(r.Util.radToDeg(t)%360+360)%360;return r.Util._inRange(a,337.5,360)||r.Util._inRange(a,0,22.5)?"ns-resize":r.Util._inRange(a,22.5,67.5)?"nesw-resize":r.Util._inRange(a,67.5,112.5)?"ew-resize":r.Util._inRange(a,112.5,157.5)?"nwse-resize":r.Util._inRange(a,157.5,202.5)?"ns-resize":r.Util._inRange(a,202.5,247.5)?"nesw-resize":r.Util._inRange(a,247.5,292.5)?"ew-resize":r.Util._inRange(a,292.5,337.5)?"nwse-resize":(r.Util.error("Transformer has unknown angle for cursor detection: "+a),"pointer")}(e,n,a);t.getStage().content&&(t.getStage().content.style.cursor=i),this._cursorChange=!0})),t.on("mouseout",(()=>{t.getStage().content&&(t.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(t)}_createBack(){var e=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e,t){var n=t.getParent(),a=n.padding();e.beginPath(),e.rect(-a,-a,t.width()+2*a,t.height()+2*a),e.moveTo(t.width()/2,-a),n.rotateEnabled()&&n.rotateLineVisible()&&e.lineTo(t.width()/2,-n.rotateAnchorOffset()*r.Util._sign(t.height())-a),e.fillStrokeShape(t)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+2*n,t.height()+2*n),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",(e=>{e.cancelBubble=!0})),e.on("dragmove",(e=>{e.cancelBubble=!0})),e.on("dragend",(e=>{e.cancelBubble=!0})),this.on("dragmove",(e=>{this.update()}))}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,a=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/a),this.cos=Math.abs(n/a),"undefined"!==typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var i=e.target.getAbsolutePosition(),o=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-i.x,y:o.y-i.y},w++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e.evt,target:t})}))}_handleMouseMove(e){var t,n,r,a=this.findOne("."+this._movingAnchorName),i=a.getStage();i.setPointersPositions(e);const o=i.getPointerPosition();let s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const l=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(l,s,e)),a.setAbsolutePosition(s);const u=a.getAbsolutePosition();if(l.x!==u.x||l.y!==u.y)if("rotater"!==this._movingAnchorName){var d,h=this.shiftBehavior();d="inverted"===h?this.keepRatio()&&!e.shiftKey:"none"===h?this.keepRatio():this.keepRatio()||e.shiftKey;var f=this.centeredScaling()||e.altKey;if("top-left"===this._movingAnchorName){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(p.x-a.x(),2)+Math.pow(p.y-a.y(),2));var g=this.findOne(".top-left").x()>p.x?-1:1,m=this.findOne(".top-left").y()>p.y?-1:1;t=r*this.cos*g,n=r*this.sin*m,this.findOne(".top-left").x(p.x-t),this.findOne(".top-left").y(p.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(a.y());else if("top-right"===this._movingAnchorName){if(d){p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(a.x()-p.x,2)+Math.pow(p.y-a.y(),2));g=this.findOne(".top-right").x()p.y?-1:1;t=r*this.cos*g,n=r*this.sin*m,this.findOne(".top-right").x(p.x+t),this.findOne(".top-right").y(p.y-n)}var v=a.position();this.findOne(".top-left").y(v.y),this.findOne(".bottom-right").x(v.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(a.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(a.x());else if("bottom-left"===this._movingAnchorName){if(d){p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(p.x-a.x(),2)+Math.pow(a.y()-p.y,2));g=p.x{var n;t._fire("transformend",{evt:e,target:t}),null===(n=t.getLayer())||void 0===n||n.batchDraw()})),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(r.Util._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(r.Util._inRange(e.height,2*-this.padding()-1,1))return void this.update();var a=new r.Transform;if(a.rotate(c.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=a.point({x:2*-this.padding(),y:0});e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=a.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=a.point({x:0,y:2*-this.padding()});e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=a.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding()}if(this.boundBoxFunc()){const t=this.boundBoxFunc()(n,e);t?e=t:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const i=1e7,o=new r.Transform;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/i,n.height/i);const s=new r.Transform,l=e.width/i,u=e.height/i;!1===this.flipEnabled()?(s.translate(e.x,e.y),s.rotate(e.rotation),s.translate(e.width<0?e.width:0,e.height<0?e.height:0),s.scale(Math.abs(l),Math.abs(u))):(s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(l,u));const d=s.multiply(o.invert());this._nodes.forEach((e=>{var t;const n=e.getParent().getAbsoluteTransform(),a=e.getTransform().copy();a.translate(e.offsetX(),e.offsetY());const i=new r.Transform;i.multiply(n.copy().invert()).multiply(d).multiply(n).multiply(a);const o=i.decompose();e.setAttrs(o),null===(t=e.getLayer())||void 0===t||t.batchDraw()})),this.rotation(r.Util._getRotation(e.rotation)),this._nodes.forEach((e=>{this._fire("transform",{evt:t,target:e}),e._fire("transform",{evt:t,target:e})})),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(r.Util._getRotation(t.rotation));var n=t.width,a=t.height,i=this.enabledAnchors(),o=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();const c=this.find("._anchor");c.forEach((e=>{e.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:o&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+s,visible:o&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:o&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:a/2,offsetX:l/2+s,visible:o&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:a/2,offsetX:l/2-s,visible:o&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:a,offsetX:l/2+s,offsetY:l/2-s,visible:o&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:a,offsetY:l/2-s,visible:o&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:a,offsetX:l/2-s,offsetY:l/2-s,visible:o&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*r.Util._sign(a)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:a,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const u=this.anchorStyleFunc();u&&c.forEach((e=>{u(e)})),null===(e=this.getLayer())||void 0===e||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return i.Node.prototype.toObject.call(this)}clone(e){return i.Node.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}t.Transformer=S,S.isTransforming=()=>w>0,S.prototype.className="Transformer",(0,d._registerNode)(S),a.Factory.addGetterSetter(S,"enabledAnchors",y,(function(e){return e instanceof Array||r.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===y.indexOf(e)&&r.Util.warn("Unknown anchor name: "+e+". Available names are: "+y.join(", "))})),e||[]})),a.Factory.addGetterSetter(S,"flipEnabled",!0,(0,u.getBooleanValidator)()),a.Factory.addGetterSetter(S,"resizeEnabled",!0),a.Factory.addGetterSetter(S,"anchorSize",10,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"rotateEnabled",!0),a.Factory.addGetterSetter(S,"rotateLineVisible",!0),a.Factory.addGetterSetter(S,"rotationSnaps",[]),a.Factory.addGetterSetter(S,"rotateAnchorOffset",50,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"rotateAnchorCursor","crosshair"),a.Factory.addGetterSetter(S,"rotationSnapTolerance",5,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderEnabled",!0),a.Factory.addGetterSetter(S,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(S,"anchorStrokeWidth",1,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"anchorFill","white"),a.Factory.addGetterSetter(S,"anchorCornerRadius",0,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(S,"borderStrokeWidth",1,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderDash"),a.Factory.addGetterSetter(S,"keepRatio",!0),a.Factory.addGetterSetter(S,"shiftBehavior","default"),a.Factory.addGetterSetter(S,"centeredScaling",!1),a.Factory.addGetterSetter(S,"ignoreStroke",!1),a.Factory.addGetterSetter(S,"padding",0,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"node"),a.Factory.addGetterSetter(S,"nodes"),a.Factory.addGetterSetter(S,"boundBoxFunc"),a.Factory.addGetterSetter(S,"anchorDragBoundFunc"),a.Factory.addGetterSetter(S,"anchorStyleFunc"),a.Factory.addGetterSetter(S,"shouldOverdrawWholeArea",!1),a.Factory.addGetterSetter(S,"useSingleNodeRotation",!0),a.Factory.backCompat(S,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})},8201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wedge=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(6518),s=n(2609);class l extends a.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,i.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}t.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"radius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1),r.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},1725:(e,t,n)=>{var r=n(781)(n(7289),"DataView");e.exports=r},9748:(e,t,n)=>{var r=n(6545),a=n(9843),i=n(6266),o=n(7364),s=n(4156);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(329),a=n(9666),i=n(2523),o=n(4397),s=n(3316);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(781)(n(7289),"Map");e.exports=r},3109:(e,t,n)=>{var r=n(9e3),a=n(7240),i=n(3414),o=n(7140),s=n(5429);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(781)(n(7289),"Promise");e.exports=r},4199:(e,t,n)=>{var r=n(781)(n(7289),"Set");e.exports=r},4526:(e,t,n)=>{var r=n(3109),a=n(5845),i=n(5544);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(5745),a=n(3653),i=n(3359),o=n(2571),s=n(1698),l=n(5883);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=a,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=l,e.exports=c},8624:(e,t,n)=>{var r=n(7289).Symbol;e.exports=r},6759:(e,t,n)=>{var r=n(7289).Uint8Array;e.exports=r},3289:(e,t,n)=>{var r=n(781)(n(7289),"WeakMap");e.exports=r},4235:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n{var r=n(4499),a=n(2794),i=n(5585),o=n(667),s=n(674),l=n(3153),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&a(e),d=!n&&!u&&o(e),h=!n&&!u&&!d&&l(e),f=n||u||d||h,p=f?r(e.length,String):[],g=p.length;for(var m in e)!t&&!c.call(e,m)||f&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||p.push(m);return p}},5434:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(6351),a=n(3666),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];i.call(e,t)&&a(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},9194:(e,t,n)=>{var r=n(3666);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3035:(e,t,n)=>{var r=n(7538),a=n(6385);e.exports=function(e,t){return e&&r(t,a(t),e)}},6045:(e,t,n)=>{var r=n(7538),a=n(7086);e.exports=function(e,t){return e&&r(t,a(t),e)}},6351:(e,t,n)=>{var r=n(1438);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},6476:(e,t,n)=>{var r=n(7016),a=n(4235),i=n(7347),o=n(3035),s=n(6045),l=n(8087),c=n(2594),u=n(2497),d=n(4742),h=n(7253),f=n(5508),p=n(8466),g=n(7633),m=n(7355),v=n(6484),y=n(5585),b=n(667),x=n(5874),w=n(1845),S=n(1859),k=n(6385),_=n(7086),E="[object Arguments]",C="[object Function]",j="[object Object]",N={};N[E]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[j]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[C]=N["[object WeakMap]"]=!1,e.exports=function e(t,n,P,O,T,L){var A,R=1&n,M=2&n,F=4&n;if(P&&(A=T?P(t,O,T,L):P(t)),void 0!==A)return A;if(!w(t))return t;var I=y(t);if(I){if(A=g(t),!R)return c(t,A)}else{var D=p(t),z=D==C||"[object GeneratorFunction]"==D;if(b(t))return l(t,R);if(D==j||D==E||z&&!T){if(A=M||z?{}:v(t),!R)return M?d(t,s(A,t)):u(t,o(A,t))}else{if(!N[D])return T?t:{};A=m(t,D,R)}}L||(L=new r);var B=L.get(t);if(B)return B;L.set(t,A),S(t)?t.forEach((function(r){A.add(e(r,n,P,r,t,L))})):x(t)&&t.forEach((function(r,a){A.set(a,e(r,n,P,a,t,L))}));var U=I?void 0:(F?M?f:h:M?_:k)(t);return a(U||t,(function(r,a){U&&(r=t[a=r]),i(A,a,e(r,n,P,a,t,L))})),A}},8303:(e,t,n)=>{var r=n(1845),a=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},2785:(e,t,n)=>{var r=n(5705),a=n(6428)(r);e.exports=a},5461:(e,t,n)=>{var r=n(2550)();e.exports=r},5705:(e,t,n)=>{var r=n(5461),a=n(6385);e.exports=function(e,t){return e&&r(e,t,a)}},207:(e,t,n)=>{var r=n(4534),a=n(925);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n{var r=n(5349),a=n(5585);e.exports=function(e,t,n){var i=t(e);return a(e)?i:r(i,n(e))}},8665:(e,t,n)=>{var r=n(8624),a=n(3596),i=n(8186),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?a(e):i(e)}},1966:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},1276:(e,t,n)=>{var r=n(8665),a=n(9752);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},7081:(e,t,n)=>{var r=n(9110),a=n(9752);e.exports=function e(t,n,i,o,s){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!==t&&n!==n:r(t,n,i,o,e,s))}},9110:(e,t,n)=>{var r=n(7016),a=n(4132),i=n(9820),o=n(6353),s=n(8466),l=n(5585),c=n(667),u=n(3153),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),b=l(t),x=y?h:s(e),w=b?h:s(t),S=(x=x==d?f:x)==f,k=(w=w==d?f:w)==f,_=x==w;if(_&&c(e)){if(!c(t))return!1;y=!0,S=!1}if(_&&!S)return v||(v=new r),y||u(e)?a(e,t,n,g,m,v):i(e,t,x,n,g,m,v);if(!(1&n)){var E=S&&p.call(e,"__wrapped__"),C=k&&p.call(t,"__wrapped__");if(E||C){var j=E?e.value():e,N=C?t.value():t;return v||(v=new r),m(j,N,n,g,v)}}return!!_&&(v||(v=new r),o(e,t,n,g,m,v))}},7094:(e,t,n)=>{var r=n(8466),a=n(9752);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},9280:(e,t,n)=>{var r=n(7016),a=n(7081);e.exports=function(e,t,n,i){var o=n.length,s=o,l=!i;if(null==e)return!s;for(e=Object(e);o--;){var c=n[o];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o{var r=n(375),a=n(5401),i=n(1845),o=n(2043),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||a(e))&&(r(e)?h:s).test(o(e))}},8711:(e,t,n)=>{var r=n(8466),a=n(9752);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},7499:(e,t,n)=>{var r=n(8665),a=n(4276),i=n(9752),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&a(e.length)&&!!o[r(e)]}},1186:(e,t,n)=>{var r=n(5662),a=n(8768),i=n(9908),o=n(5585),s=n(4445);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?o(e)?a(e[0],e[1]):r(e):s(e)}},3409:(e,t,n)=>{var r=n(6132),a=n(8723),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9130:(e,t,n)=>{var r=n(1845),a=n(6132),i=n(3481),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&n.push(s);return n}},1839:(e,t,n)=>{var r=n(2785),a=n(2114);e.exports=function(e,t){var n=-1,i=a(e)?Array(e.length):[];return r(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}},5662:(e,t,n)=>{var r=n(9280),a=n(5113),i=n(2093);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},8768:(e,t,n)=>{var r=n(7081),a=n(9706),i=n(9775),o=n(8939),s=n(9253),l=n(2093),c=n(925);e.exports=function(e,t){return o(e)&&s(t)?l(c(e),t):function(n){var o=a(n,e);return void 0===o&&o===t?i(n,e):r(t,o,3)}}},1125:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},171:(e,t,n)=>{var r=n(207);e.exports=function(e){return function(t){return r(t,e)}}},4499:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(8624),a=n(5434),i=n(5585),o=n(2060),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return a(t,e)+"";if(o(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},6902:e=>{e.exports=function(e){return function(t){return e(t)}}},8905:e=>{e.exports=function(e,t){return e.has(t)}},7169:(e,t,n)=>{var r=n(9908);e.exports=function(e){return"function"==typeof e?e:r}},4534:(e,t,n)=>{var r=n(5585),a=n(8939),i=n(3002),o=n(1822);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:i(o(e))}},2604:(e,t,n)=>{var r=n(6759);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},8087:(e,t,n)=>{e=n.nmd(e);var r=n(7289),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},1893:(e,t,n)=>{var r=n(2604);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3360:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},7981:(e,t,n)=>{var r=n(8624),a=r?r.prototype:void 0,i=a?a.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},5888:(e,t,n)=>{var r=n(2604);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},2594:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(7347),a=n(6351);e.exports=function(e,t,n,i){var o=!n;n||(n={});for(var s=-1,l=t.length;++s{var r=n(7538),a=n(6504);e.exports=function(e,t){return r(e,a(e),t)}},4742:(e,t,n)=>{var r=n(7538),a=n(2757);e.exports=function(e,t){return r(e,a(e),t)}},7683:(e,t,n)=>{var r=n(7289)["__core-js_shared__"];e.exports=r},6428:(e,t,n)=>{var r=n(2114);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o{e.exports=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++a];if(!1===n(i[l],l,i))break}return t}}},1438:(e,t,n)=>{var r=n(781),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},4132:(e,t,n)=>{var r=n(4526),a=n(9330),i=n(8905);e.exports=function(e,t,n,o,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p{var r=n(8624),a=n(6759),i=n(3666),o=n(4132),s=n(258),l=n(3671),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)return!1;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=o(f(e),f(t),r,c,d,h);return h.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6353:(e,t,n)=>{var r=n(7253),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,o,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:a.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},7253:(e,t,n)=>{var r=n(2606),a=n(6504),i=n(6385);e.exports=function(e){return r(e,i,a)}},5508:(e,t,n)=>{var r=n(2606),a=n(2757),i=n(7086);e.exports=function(e){return r(e,i,a)}},6911:(e,t,n)=>{var r=n(1591);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},5113:(e,t,n)=>{var r=n(9253),a=n(6385);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,r(o)]}return t}},781:(e,t,n)=>{var r=n(3186),a=n(760);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},6116:(e,t,n)=>{var r=n(9698)(Object.getPrototypeOf,Object);e.exports=r},3596:(e,t,n)=>{var r=n(8624),a=Object.prototype,i=a.hasOwnProperty,o=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var a=o.call(e);return r&&(t?e[s]=n:delete e[s]),a}},6504:(e,t,n)=>{var r=n(4951),a=n(2554),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return i.call(e,t)})))}:a;e.exports=s},2757:(e,t,n)=>{var r=n(5349),a=n(6116),i=n(6504),o=n(2554),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=a(e);return t}:o;e.exports=s},8466:(e,t,n)=>{var r=n(1725),a=n(8579),i=n(9946),o=n(4199),s=n(3289),l=n(8665),c=n(2043),u="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",g=c(r),m=c(a),v=c(i),y=c(o),b=c(s),x=l;(r&&x(new r(new ArrayBuffer(1)))!=p||a&&x(new a)!=u||i&&x(i.resolve())!=d||o&&x(new o)!=h||s&&x(new s)!=f)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case g:return p;case m:return u;case v:return d;case y:return h;case b:return f}return t}),e.exports=x},760:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1898:(e,t,n)=>{var r=n(4534),a=n(2794),i=n(5585),o=n(674),s=n(4276),l=n(925);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c{var r=n(1353);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9843:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6266:(e,t,n)=>{var r=n(1353),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},7364:(e,t,n)=>{var r=n(1353),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},4156:(e,t,n)=>{var r=n(1353);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},7633:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},7355:(e,t,n)=>{var r=n(2604),a=n(1893),i=n(3360),o=n(7981),s=n(5888);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return o(e)}}},6484:(e,t,n)=>{var r=n(8303),a=n(6116),i=n(6132);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(a(e))}},674:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(5585),a=n(2060),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(o.test(e)||!i.test(e)||null!=t&&e in Object(t))}},1591:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5401:(e,t,n)=>{var r=n(7683),a=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!a&&a in e}},6132:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9253:(e,t,n)=>{var r=n(1845);e.exports=function(e){return e===e&&!r(e)}},329:e=>{e.exports=function(){this.__data__=[],this.size=0}},9666:(e,t,n)=>{var r=n(9194),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},2523:(e,t,n)=>{var r=n(9194);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4397:(e,t,n)=>{var r=n(9194);e.exports=function(e){return r(this.__data__,e)>-1}},3316:(e,t,n)=>{var r=n(9194);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},9e3:(e,t,n)=>{var r=n(9748),a=n(5745),i=n(8579);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||a),string:new r}}},7240:(e,t,n)=>{var r=n(6911);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},3414:(e,t,n)=>{var r=n(6911);e.exports=function(e){return r(this,e).get(e)}},7140:(e,t,n)=>{var r=n(6911);e.exports=function(e){return r(this,e).has(e)}},5429:(e,t,n)=>{var r=n(6911);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},258:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2093:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},3679:(e,t,n)=>{var r=n(2736);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},1353:(e,t,n)=>{var r=n(781)(Object,"create");e.exports=r},8723:(e,t,n)=>{var r=n(9698)(Object.keys,Object);e.exports=r},3481:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},7785:(e,t,n)=>{e=n.nmd(e);var r=n(2692),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s},8186:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9698:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},7289:(e,t,n)=>{var r=n(2692),a="object"==typeof self&&self&&self.Object===Object&&self,i=r||a||Function("return this")();e.exports=i},5845:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},5544:e=>{e.exports=function(e){return this.__data__.has(e)}},3671:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},3653:(e,t,n)=>{var r=n(5745);e.exports=function(){this.__data__=new r,this.size=0}},3359:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},2571:e=>{e.exports=function(e){return this.__data__.get(e)}},1698:e=>{e.exports=function(e){return this.__data__.has(e)}},5883:(e,t,n)=>{var r=n(5745),a=n(8579),i=n(3109);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!a||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(e,t),this.size=n.size,this}},3002:(e,t,n)=>{var r=n(3679),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(i,"$1"):n||e)})),t}));e.exports=o},925:(e,t,n)=>{var r=n(2060);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},2043:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},8504:(e,t,n)=>{var r=n(6476);e.exports=function(e){return r(e,5)}},3666:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},7827:(e,t,n)=>{var r=n(5705),a=n(7169);e.exports=function(e,t){return e&&r(e,a(t))}},9706:(e,t,n)=>{var r=n(207);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},9775:(e,t,n)=>{var r=n(1966),a=n(1898);e.exports=function(e,t){return null!=e&&a(e,t,r)}},9908:e=>{e.exports=function(e){return e}},2794:(e,t,n)=>{var r=n(1276),a=n(9752),i=Object.prototype,o=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return a(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},5585:e=>{var t=Array.isArray;e.exports=t},2114:(e,t,n)=>{var r=n(375),a=n(4276);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},667:(e,t,n)=>{e=n.nmd(e);var r=n(7289),a=n(5535),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||a;e.exports=l},375:(e,t,n)=>{var r=n(8665),a=n(1845);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4276:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5874:(e,t,n)=>{var r=n(7094),a=n(6902),i=n(7785),o=i&&i.isMap,s=o?a(o):r;e.exports=s},1845:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},9752:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},634:(e,t,n)=>{var r=n(8665),a=n(6116),i=n(9752),o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},1859:(e,t,n)=>{var r=n(8711),a=n(6902),i=n(7785),o=i&&i.isSet,s=o?a(o):r;e.exports=s},5406:(e,t,n)=>{var r=n(8665),a=n(5585),i=n(9752);e.exports=function(e){return"string"==typeof e||!a(e)&&i(e)&&"[object String]"==r(e)}},2060:(e,t,n)=>{var r=n(8665),a=n(9752);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},3153:(e,t,n)=>{var r=n(7499),a=n(6902),i=n(7785),o=i&&i.isTypedArray,s=o?a(o):r;e.exports=s},6385:(e,t,n)=>{var r=n(3200),a=n(3409),i=n(2114);e.exports=function(e){return i(e)?r(e):a(e)}},7086:(e,t,n)=>{var r=n(3200),a=n(9130),i=n(2114);e.exports=function(e){return i(e)?r(e,!0):a(e)}},3428:(e,t,n)=>{var r=n(5434),a=n(1186),i=n(1839),o=n(5585);e.exports=function(e,t){return(o(e)?r:i)(e,a(t,3))}},2736:(e,t,n)=>{var r=n(3109);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},4445:(e,t,n)=>{var r=n(1125),a=n(171),i=n(8939),o=n(925);e.exports=function(e){return i(e)?r(o(e)):a(e)}},2554:e=>{e.exports=function(){return[]}},5535:e=>{e.exports=function(){return!1}},1822:(e,t,n)=>{var r=n(1612);e.exports=function(e){return null==e?"":r(e)}},1729:(e,t,n)=>{"use strict";var r=n(9165);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},5192:(e,t,n)=>{e.exports=n(1729)()},9165:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},534:(e,t,n)=>{"use strict";var r=n(7313),a=n(2224);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,hw),t}return t}function fw(e,t){return ps(t.type,uw,e,t)}dw.displayName="MenuContext";let pw=r.Fragment;let gw=gs.RenderStrategy|gs.Static;let mw=r.Fragment;let vw=xs((function(e,t){let{__demoMode:n=!1,...a}=e,i=(0,r.useReducer)(fw,{__demoMode:n,menuState:n?0:1,buttonRef:(0,r.createRef)(),itemsRef:(0,r.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:s,buttonRef:l},c]=i,u=Fs(t);ec([l,s],((e,t)=>{var n;c({type:1}),ml(t,gl.Loose)||(e.preventDefault(),null==(n=l.current)||n.focus())}),0===o);let d=Rs((()=>{c({type:1})})),h=(0,r.useMemo)((()=>({open:0===o,close:d})),[o,d]),f={ref:u};return r.createElement(dw.Provider,{value:i},r.createElement(Cs,{value:ps(o,{0:_s.Open,1:_s.Closed})},vs({ourProps:f,theirProps:a,slot:h,defaultTag:pw,name:"Menu"})))})),yw=xs((function(e,t){var n;let a=ol(),{id:i="headlessui-menu-button-".concat(a),...o}=e,[s,l]=hw("Menu.Button"),c=Fs(s.buttonRef,t),u=Hs(),d=Rs((e=>{switch(e.key){case al.Space:case al.Enter:case al.ArrowDown:e.preventDefault(),e.stopPropagation(),l({type:0}),u.nextFrame((()=>l({type:2,focus:Zx.First})));break;case al.ArrowUp:e.preventDefault(),e.stopPropagation(),l({type:0}),u.nextFrame((()=>l({type:2,focus:Zx.Last})))}})),h=Rs((e=>{if(e.key===al.Space)e.preventDefault()})),f=Rs((t=>{if(il(t.currentTarget))return t.preventDefault();e.disabled||(0===s.menuState?(l({type:1}),u.nextFrame((()=>{var e;return null==(e=s.buttonRef.current)?void 0:e.focus({preventScroll:!0})}))):(t.preventDefault(),l({type:0})))})),p=(0,r.useMemo)((()=>({open:0===s.menuState})),[s]);return vs({ourProps:{ref:c,id:i,type:tw(e,s.buttonRef),"aria-haspopup":"menu","aria-controls":null==(n=s.itemsRef.current)?void 0:n.id,"aria-expanded":0===s.menuState,onKeyDown:d,onKeyUp:h,onClick:f},theirProps:o,slot:p,defaultTag:"button",name:"Menu.Button"})})),bw=xs((function(e,t){var n,a;let i=ol(),{id:o="headlessui-menu-items-".concat(i),...s}=e,[l,c]=hw("Menu.Items"),u=Fs(l.itemsRef,t),d=El(l.itemsRef),h=Hs(),f=Es(),p=null!==f?(f&_s.Open)===_s.Open:0===l.menuState;(0,r.useEffect)((()=>{let e=l.itemsRef.current;e&&0===l.menuState&&e!==(null==d?void 0:d.activeElement)&&e.focus({preventScroll:!0})}),[l.menuState,l.itemsRef,d]),function(e){let{container:t,accept:n,walk:a,enabled:i=!0}=e,o=(0,r.useRef)(n),s=(0,r.useRef)(a);(0,r.useEffect)((()=>{o.current=n,s.current=a}),[n,a]),Os((()=>{if(!t||!i)return;let e=cl(t);if(!e)return;let n=o.current,r=s.current,a=Object.assign((e=>n(e)),{acceptNode:n}),l=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,a,!1);for(;l.nextNode();)r(l.currentNode)}),[t,i,o,s])}({container:l.itemsRef.current,enabled:0===l.menuState,accept:e=>"menuitem"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let g=Rs((e=>{var t,n;switch(h.dispose(),e.key){case al.Space:if(""!==l.searchQuery)return e.preventDefault(),e.stopPropagation(),c({type:3,value:e.key});case al.Enter:if(e.preventDefault(),e.stopPropagation(),c({type:1}),null!==l.activeItemIndex){let{dataRef:e}=l.items[l.activeItemIndex];null==(n=null==(t=e.current)?void 0:t.domRef.current)||n.click()}vl(l.buttonRef.current);break;case al.ArrowDown:return e.preventDefault(),e.stopPropagation(),c({type:2,focus:Zx.Next});case al.ArrowUp:return e.preventDefault(),e.stopPropagation(),c({type:2,focus:Zx.Previous});case al.Home:case al.PageUp:return e.preventDefault(),e.stopPropagation(),c({type:2,focus:Zx.First});case al.End:case al.PageDown:return e.preventDefault(),e.stopPropagation(),c({type:2,focus:Zx.Last});case al.Escape:e.preventDefault(),e.stopPropagation(),c({type:1}),Ds().nextFrame((()=>{var e;return null==(e=l.buttonRef.current)?void 0:e.focus({preventScroll:!0})}));break;case al.Tab:e.preventDefault(),e.stopPropagation(),c({type:1}),Ds().nextFrame((()=>{!function(e,t){Sl(pl(),t,{relativeTo:e})}(l.buttonRef.current,e.shiftKey?dl.Previous:dl.Next)}));break;default:1===e.key.length&&(c({type:3,value:e.key}),h.setTimeout((()=>c({type:4})),350))}})),m=Rs((e=>{if(e.key===al.Space)e.preventDefault()})),v=(0,r.useMemo)((()=>({open:0===l.menuState})),[l]);return vs({ourProps:{"aria-activedescendant":null===l.activeItemIndex||null==(n=l.items[l.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(a=l.buttonRef.current)?void 0:a.id,id:o,onKeyDown:g,onKeyUp:m,role:"menu",tabIndex:0,ref:u},theirProps:s,slot:v,defaultTag:"div",features:gw,visible:p,name:"Menu.Items"})})),xw=xs((function(e,t){let n=ol(),{id:a="headlessui-menu-item-".concat(n),disabled:i=!1,...o}=e,[s,l]=hw("Menu.Item"),c=null!==s.activeItemIndex&&s.items[s.activeItemIndex].id===a,u=(0,r.useRef)(null),d=Fs(t,u);Os((()=>{if(s.__demoMode||0!==s.menuState||!c||0===s.activationTrigger)return;let e=Ds();return e.requestAnimationFrame((()=>{var e,t;null==(t=null==(e=u.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})),e.dispose}),[s.__demoMode,u,c,s.menuState,s.activationTrigger,s.activeItemIndex]);let h=iw(u),f=(0,r.useRef)({disabled:i,domRef:u,get textValue(){return h()}});Os((()=>{f.current.disabled=i}),[f,i]),Os((()=>(l({type:5,id:a,dataRef:f}),()=>l({type:6,id:a}))),[f,a]);let p=Rs((()=>{l({type:1})})),g=Rs((e=>{if(i)return e.preventDefault();l({type:1}),vl(s.buttonRef.current)})),m=Rs((()=>{if(i)return l({type:2,focus:Zx.Nothing});l({type:2,focus:Zx.Specific,id:a})})),v=function(){let e=(0,r.useRef)([-1,-1]);return{wasMoved(t){let n=nw(t);return(e.current[0]!==n[0]||e.current[1]!==n[1])&&(e.current=n,!0)},update(t){e.current=nw(t)}}}(),y=Rs((e=>v.update(e))),b=Rs((e=>{v.wasMoved(e)&&(i||c||l({type:2,focus:Zx.Specific,id:a,trigger:0}))})),x=Rs((e=>{v.wasMoved(e)&&(i||c&&l({type:2,focus:Zx.Nothing}))})),w=(0,r.useMemo)((()=>({active:c,disabled:i,close:p})),[c,i,p]);return vs({ourProps:{id:a,ref:d,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:y,onMouseEnter:y,onPointerMove:b,onMouseMove:b,onPointerLeave:x,onMouseLeave:x},theirProps:o,slot:w,defaultTag:mw,name:"Menu.Item"})})),ww=Object.assign(vw,{Button:yw,Items:bw,Item:xw});var Sw;function kw(){return kw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{setPicture:t}=e;const[n,a]=(0,r.useState)(null);return(0,Tc.jsx)("div",{className:"mt-4 border border-gray-200 shadow-sm rounded-lg p-4 bg-gray-50",children:(0,Tc.jsx)("div",{className:"flex items-center justify-center",children:(0,Tc.jsxs)("label",{className:"cursor-pointer",children:[(0,Tc.jsx)("div",{className:"w-24 h-24 rounded-full overflow-hidden border-2 border-gray-300 flex items-center justify-center ".concat(n?"border-blue-500":"border-gray-300"),children:n?(0,Tc.jsx)("img",{src:URL.createObjectURL(n),alt:"Uploaded",className:"w-full h-full object-cover"}):(0,Tc.jsx)("div",{className:"flex items-center justify-center",children:(0,Tc.jsx)(Ew,{className:"w-16 h-16 text-gray-400"})})}),(0,Tc.jsxs)("div",{className:"flex flex-col items-center mt-3",children:[(0,Tc.jsx)("span",{className:"block text-sm font-medium text-gray-700",children:n?"Change Image":"Upload Image"}),(0,Tc.jsx)("span",{className:"block text-xs text-gray-500",children:n?"Tap to select another":"Tap to select a file"})]}),(0,Tc.jsx)("input",{type:"file",className:"hidden",onChange:async e=>{const n=e.target.files[0];if(n)try{const e=await sd(n);t(e.data.link),a(n)}catch(rf){console.error("An error occured",rf),t(null)}}})]})})})});function jw(e){let{label:t,placeholder:n,value:r,onChange:a}=e;return(0,Tc.jsxs)("div",{children:[(0,Tc.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,Tc.jsx)("input",{type:"text",className:"w-full px-4 py-2 mt-1 border rounded-md bg-gray-50 text-gray-700 focus:ring-blue-500 focus:border-blue-500",placeholder:n,value:r,onChange:a})]})}function Nw(e){let{label:t,placeholder:n,value:r,onChange:a}=e;return(0,Tc.jsxs)("div",{children:[(0,Tc.jsx)("label",{className:"block text-sm font-medium text-gray-700",children:t}),(0,Tc.jsx)("textarea",{className:"w-full px-4 py-2 mt-1 border rounded-md bg-gray-50 text-gray-700 focus:ring-blue-500 focus:border-blue-500",rows:"3",placeholder:n,value:r,onChange:a})]})}function Pw(){return(0,Tc.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 flex justify-center items-center",children:(0,Tc.jsx)("div",{className:"flex justify-center items-center",children:(0,Tc.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-blue-500"})})})}const Ow=function(e){let{isOpen:t,onClose:n,sk:a,pk:i}=e;const[o,s]=(0,r.useState)(""),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(""),[h,f]=(0,r.useState)(!1),[p,g]=(0,r.useState)(!1);return(0,Tc.jsxs)(Tc.Fragment,{children:[(0,Tc.jsx)(nl.Root,{show:t,as:r.Fragment,children:(0,Tc.jsxs)(Oc,{as:"div",className:"relative z-50",onClose:n,children:[(0,Tc.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"}),(0,Tc.jsx)("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:(0,Tc.jsx)("div",{className:"flex items-center justify-center min-h-full p-4 text-center",children:(0,Tc.jsx)(nl.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,Tc.jsxs)(Oc.Panel,{className:"w-full max-w-lg transform overflow-hidden rounded-xl bg-white p-6 text-left align-middle shadow-lg transition-all",children:[(0,Tc.jsxs)("div",{className:"text-center mb-4",children:[(0,Tc.jsx)(Oc.Title,{as:"h3",className:"text-xl font-semibold leading-6 text-gray-800",children:"Create Your Account"}),(0,Tc.jsx)("p",{className:"text-sm text-gray-600",children:"Start exploring the world of memes!"})]}),(0,Tc.jsxs)("div",{className:"space-y-4",children:[(0,Tc.jsx)(jw,{label:"Username:",placeholder:"Username",value:o,onChange:function(e){s(e.target.value)}}),(0,Tc.jsx)(Nw,{label:"About Me:",placeholder:"Tell us about yourself",value:l,onChange:function(e){c(e.target.value)}}),(0,Tc.jsx)(Cw,{label:"Profile Picture:",setPicture:e=>{d(e)}}),(0,Tc.jsx)("button",{type:"button",className:"w-full rounded-md bg-gradient-to-r from-blue-500 to-teal-500 hover:bg-blue-700 px-4 py-2 text-sm font-bold text-white shadow focus:outline-none transition duration-300",onClick:async()=>{await async function(e,t){f(!0);const r=["wss://relay.damus.io","wss://relay.primal.net","wss://relay.snort.social","wss://relay.hllo.live"],a=new wa,i=e;e=Sa.decode(e),t=Sa.decode(t);const s={name:o,about:l,picture:u};u.length>0&&(s.picture=u);const c={kind:0,pubkey:t.data,created_at:Math.floor(Date.now()/1e3),tags:[["p",t.data],["w","memestrAccount"]],content:JSON.stringify(s)};c.id=aa(c),c.sig=la(c,e.data);try{await a.publish(r,c),a.close(r);const e=await Bx(t.data);let o=JSON.parse(e.content);o.pubKey=t.data,o.privateKey=i,localStorage.setItem("memestr",JSON.stringify(o)),f(!1),n(),console.log("Set the default login in local cache.",o),g(!0),setTimeout((()=>g(!1)),3e3)}catch(rf){console.error("Error during registration:",rf),f(!1)}}(a,i),n()},children:"Create Account and Login"}),h&&(0,Tc.jsx)(Pw,{})]})]})})})})]})}),p&&(0,Tc.jsx)("div",{className:"fixed top-0 inset-x-0 flex justify-center items-start z-50",children:(0,Tc.jsxs)("div",{className:"mt-12 p-4 bg-black text-white rounded-lg shadow-lg transition-transform transform-gpu animate-slideInSlideOut flex items-center",children:[(0,Tc.jsx)(Wc,{className:"h-6 w-6 mr-2 text-white"}),(0,Tc.jsx)("p",{children:"Created Account Successfully"})]})})]})};const Tw=function(e){let{isOpen:t,onClose:n}=e;const[a,i]=(0,r.useState)({}),[o,s]=(0,r.useState)("");return(0,Tc.jsx)(nl.Root,{show:t,as:r.Fragment,className:"z-50",children:(0,Tc.jsxs)(Oc,{as:"div",className:"relative z-40",onClose:()=>{n(a)},children:[(0,Tc.jsx)(nl.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-10",children:(0,Tc.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})}),(0,Tc.jsx)("div",{className:"fixed inset-0 z-40 overflow-hidden",children:(0,Tc.jsx)("div",{className:"flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0",children:(0,Tc.jsx)(nl.Child,{as:r.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,Tc.jsxs)(Oc.Panel,{className:"relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg",children:[(0,Tc.jsx)("div",{className:"bg-white px-4 sm:p-6 sm:pb-4",children:(0,Tc.jsx)("div",{className:"sm:flex sm:items-start",children:(0,Tc.jsxs)("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[(0,Tc.jsxs)(Oc.Title,{as:"h3",className:"text-lg font-semibold leading-6 text-gray-900 p-3 sm:p-0",children:["Login to Memestr",(0,Tc.jsx)("button",{type:"button",className:"absolute top-3 right-3 p-3 sm:p-0",onClick:()=>n({}),children:(0,Tc.jsx)(tu,{className:"h-6 w-6 text-gray-700","aria-hidden":"true"})})]}),(0,Tc.jsx)("div",{className:"mt-5",children:(0,Tc.jsx)(Oc.Description,{children:(0,Tc.jsxs)("div",{className:"mb-3",children:[(0,Tc.jsx)("label",{htmlFor:"loginKey",className:"flex justify-start block mb-2 text-sm font-medium font-sans text-gray-500 dark:text-black",children:"Enter your Nostr private key (starting with \u201cnsec\u201d):"}),(0,Tc.jsx)("input",{type:"text",id:"loginKey",onChange:function(e){s(e.target.value)},value:o,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5",placeholder:"Guy_who_farted",required:!0}),(0,Tc.jsx)("div",{className:"flex align-middle justify mt text-sm text-gray-300 p-1",children:"We don't store your keys."})]})})})]})})}),(0,Tc.jsx)("div",{className:"px-6 pb-3 bg-white text-right",children:(0,Tc.jsx)("button",{type:"button",className:"inline-flex justify-end rounded-full border border-transparent shadow-sm px-10 py-2 text-white font-medium sm:text-sm ".concat((o.trim(),"bg-gradient-to-r from-blue-500 to-teal-500 hover:bg-blue-700")),disabled:!o.trim(),onClick:()=>{!function(){if(""===o.trim())return;const e=localStorage.getItem("memestr");if(e){const t=JSON.parse(e);i({display_name:t.display_name,picture:t.picture,name:t.name}),n(t)}else Hx(o).then((e=>{const t={display_name:e.display_name,picture:e.picture,name:e.name,pubKey:Yr(Sa.decode(o).data),privateKey:o};i(t),localStorage.setItem("memestr",JSON.stringify(t)),n(t)}))}()},children:"Login"})})]})})})})]})})};var Lw;function Aw(){return Aw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n(!0);let e=function(){const e=et(Ye.utils.randomPrivateKey()),t=Yr(e),n=Sa.nsecEncode(e),r=Sa.npubEncode(t);return{epk:n,epubKey:r}}();f(e.epk),v(e.epubKey)};function w(){const e=localStorage.getItem("memestr");return e?JSON.parse(e):null}const S=()=>{g(null),s(!0)},k=async()=>{if(window.nostr)try{const e=await window.nostr.getPublicKey(),t=await Ux(e);t?(g({display_name:t.display_name,picture:t.picture,name:t.name,pubKey:e}),b(!0),localStorage.setItem("memestr",JSON.stringify({display_name:t.display_name,picture:t.picture,name:t.name,pubKey:e}))):alert("User details not found.")}catch(rf){console.error("Error logging in with extension:",rf),alert("There was an error during the login process.")}else alert("No extension found. Please try logging in with key instead.")};function _(){localStorage.removeItem("memestr"),g(null),b(!1),c(!0),setTimeout((()=>c(!1)),3e3)}(0,r.useEffect)((()=>{const e=localStorage.getItem("memestr");e?(g(JSON.parse(e)),b(!0)):(b(!1),g(null))}),[y,b]);const E=()=>{e("/profile")};return(0,Tc.jsxs)("div",{className:"inline-block text-left",children:[(0,Tc.jsxs)(ww,{as:"div",className:"relative ",children:[(0,Tc.jsx)("div",{children:(0,Tc.jsx)(ww.Button,{className:p?"inline-flex items-center justify-center rounded-full bg-white hidden p-1 md:inline-flex":"inline-flex items-center justify-center rounded-full bg-gradient-to-r from-blue-500 to-teal-500 p-2 hover:from-pink-500 hover:to-yellow-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50 hidden md:inline-flex",children:p&&void 0!==p.picture?void 0===p.picture?(0,Tc.jsx)("img",{src:Bw,alt:"Default Profile",className:"w-10 h-10 rounded-full"}):(0,Tc.jsx)("img",{src:p.picture,alt:"Profile",className:"w-10 h-10 rounded-full"}):(0,Tc.jsx)(zw,{})})}),(0,Tc.jsx)("div",{className:"md:hidden",children:(0,Tc.jsx)(ww.Button,{children:p?void 0===p.picture?(0,Tc.jsx)("img",{src:Bw,alt:"Default Profile",className:"w-8 h-8 rounded-full"}):(0,Tc.jsx)("img",{src:p.picture,alt:"Profile",className:"w-8 h-8 rounded-full"}):(0,Tc.jsx)(Qw,{})})}),(0,Tc.jsx)(nl,{as:r.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,Tc.jsx)(ww.Items,{className:"absolute z-50 md:z-10 mb-12 md:mt-12 w-48 h-max p-2 origin-top-right bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none right-0 md:right-0 bottom-0 md:top-0",children:(0,Tc.jsx)("div",{className:"py-1",children:y?(0,Tc.jsxs)(Tc.Fragment,{children:[(0,Tc.jsx)(ww.Item,{children:e=>{let{active:t}=e;return(0,Tc.jsxs)("button",{onClick:E,className:"".concat(t?"font-semibold text-gray-900":"font-normal text-gray-700"," group flex w-full items-center rounded-md px-2 py-2 text-sm"),children:[(0,Tc.jsx)(Qw,{className:"mr-2 h-6 w-6"}),p.name]})}}),(0,Tc.jsx)(ww.Item,{children:e=>{let{active:t}=e;return(0,Tc.jsxs)("button",{onClick:_,className:"".concat(t?"font-semibold text-gray-900":"font-normal text-gray-700"," group flex w-full items-center rounded-md px-2 py-2 text-sm hover:text-gray-900"),children:[(0,Tc.jsx)(Vw,{className:"mr-2 h-6 w-6"}),"Logout"]})}})]}):(0,Tc.jsxs)(Tc.Fragment,{children:[(0,Tc.jsx)(ww.Item,{children:e=>{let{active:t}=e;return(0,Tc.jsxs)("button",{onClick:x,className:"".concat(t?"font-semibold":"font-normal"," group flex w-full items-center rounded-md px-2 py-2 text-sm text-gray-700 hover:text-gray-900"),disabled:y,children:[(0,Tc.jsx)(Qw,{className:"mr-2 h-6 w-6"}),"Create Account"]})}}),(0,Tc.jsx)(ww.Item,{children:e=>{let{active:t}=e;return(0,Tc.jsxs)("button",{onClick:S,className:"".concat(t?"font-semibold":"font-normal"," group flex w-full items-center rounded-md px-2 py-2 text-sm text-gray-700 hover:text-gray-900"),children:[(0,Tc.jsx)(Mw,{className:"mr-2 h-6 w-6"}),"Login"]})}}),(0,Tc.jsx)(ww.Item,{children:e=>{let{active:t}=e;return(0,Tc.jsxs)("button",{onClick:k,className:"".concat(t?"font-semibold":"font-normal"," group flex w-full items-center rounded-md px-2 py-2 text-sm text-gray-700 hover:text-gray-900"),children:[(0,Tc.jsx)(nS,{className:"mr-2 h-6 w-6"}),"Extension Login"]})}})]})})})})]}),(0,Tc.jsx)(Qc,{isOpen:t,onClose:()=>{n(!1),i(!0)},sk:h,pk:m}),(0,Tc.jsx)(Ow,{isOpen:a,onClose:()=>{i(!1),w()&&b(!0)},sk:h,pk:m}),(0,Tc.jsx)(Tw,{isOpen:o,onClose:e=>{s(!1),e&&0!==Object.keys(e).length&&(g(e),b(!0),d(!0),setTimeout((()=>d(!1)),3e3))}}),l&&(0,Tc.jsx)("div",{className:"fixed top-0 inset-x-0 flex justify-center items-start z-50",children:(0,Tc.jsxs)("div",{className:"mt-12 p-4 bg-black text-white rounded-lg shadow-lg transition-transform transform-gpu animate-slideInSlideOut flex items-center",children:[(0,Tc.jsx)(Wc,{className:"h-6 w-6 mr-2 text-white"}),(0,Tc.jsx)("p",{children:"Logged Out Successfully"})]})}),u&&(0,Tc.jsx)("div",{className:"fixed top-0 inset-x-0 flex justify-center items-start z-50",children:(0,Tc.jsxs)("div",{className:"mt-12 p-4 bg-black text-white rounded-lg shadow-lg transition-transform transform-gpu animate-slideInSlideOut flex items-center",children:[(0,Tc.jsx)(Wc,{className:"h-6 w-6 mr-2 text-white"}),(0,Tc.jsx)("p",{children:"Logged In Successfully"})]})})]})};var aS;function iS(){return iS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=()=>{const e=window.scrollY;a(!(e>100)||e{window.removeEventListener("scroll",e)}}),[i]);const s="fixed w-full top-0 h-14 bg-white z-50 text-gray-700 border-b border-gray-200 ".concat(!n||t?"transition-transform transform -translate-y-full ease-in-out duration-300":"");return(0,Tc.jsx)("div",{className:s,children:(0,Tc.jsxs)("header",{className:"flex flex-row items-center h-14 px-3 lg:pr-96 md:pl-64",children:[(0,Tc.jsx)("div",{className:"flex basis-1/3 justify-start ",children:(0,Tc.jsx)(Xx,{})}),(0,Tc.jsx)("div",{className:"flex basis-1/3 justify-between items-center md:hidden",children:(0,Tc.jsx)(sS,{})}),(0,Tc.jsx)("div",{className:"hidden md:flex md:flex-1 md:justify-center md:items-center",children:(0,Tc.jsx)(sS,{})}),(0,Tc.jsx)("div",{className:"flex basis-1/3 justify-end items-center",children:(0,Tc.jsx)("button",{className:"hidden md:block pr-4",children:(0,Tc.jsx)(rS,{})})})]})})};var cS,uS;function dS(){return dS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[e,t]=(0,r.useState)(!1),n=Ao(),a=e=>n.pathname===e,i=Mo(),o="font-bold underline border-t-2 border-black";return(0,Tc.jsx)("div",{className:"footer-bar fixed inset-x-0 bottom-0 bg-white border-t border-gray-400 shadow-md flex justify-around items-center md:hidden z-50",children:(0,Tc.jsxs)("div",{className:"flex w-full justify-around items-center",children:[(0,Tc.jsx)("button",{onClick:()=>i("/"),className:"flex flex-col items-center text-center py-3 px-6 ".concat(a("/")?o:""),children:(0,Tc.jsx)(fS,{className:a("/")?"text-black":"text-gray-200"})}),(0,Tc.jsx)("button",{onClick:()=>i("/search"),className:"flex flex-col items-center text-center py-3 px-6 ".concat(a("/search")?o:""),children:(0,Tc.jsx)(fd,{className:a("/search")?"text-black":"text-gray-200"})}),(0,Tc.jsx)("button",{className:"flex flex-col items-center text-center p-1 px-6",onClick:function(){t(!0)},title:"Upload",children:(0,Tc.jsx)(bS,{className:"w-10 h-10"})}),e&&(0,Tc.jsx)(ld,{isOpen:e,onClose:function(){t(!1)}}),(0,Tc.jsx)("button",{className:"flex flex-col items-center text-center py-3 px-6 ",children:(0,Tc.jsx)(_S,{className:""})}),(0,Tc.jsx)("button",{className:"flex flex-col items-center text-center p-1 px-6",children:(0,Tc.jsx)(rS,{})})]})})});var CS;function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[e,t]=(0,r.useState)(""),[n,a]=(0,r.useState)("700px"),i=Mo();return(0,r.useEffect)((()=>{const e=()=>{const e=window.innerHeight;a("".concat(e-140,"px"))};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),(0,Tc.jsxs)("div",{className:"fixed inset-0 bottom-12 px-6 pr-6 pt-5 bg-white md:hidden ",style:{paddingBottom:"48rem"},children:[(0,Tc.jsxs)("form",{onSubmit:t=>{t.preventDefault(),e.trim()&&i("/search/".concat(e.trim()))},className:"flex items-center justify-center",children:[(0,Tc.jsx)("button",{type:"button",onClick:()=>{i(-1)},className:"mr-6",children:(0,Tc.jsx)(PS,{className:"h-6 w-6 text-white"})}),(0,Tc.jsx)("input",{type:"search",value:e,onChange:e=>{t(e.target.value)},placeholder:"Search...",className:"flex-grow p-2 px-4 bg-gray-200 rounded-full shadow-md text-black"}),(0,Tc.jsx)("button",{type:"submit",className:"ml-2",children:(0,Tc.jsx)(fd,{className:"h-6 w-6 text-white"})})]}),(0,Tc.jsx)("div",{className:"flex flex-wrap gap-2 p-2 mt-4 overflow-x-auto justify-center",style:{maxHeight:n,overflowY:"auto"},children:["bitcoin","nostr","grownstr","plebchain","siamstr","btc","meme","privacy","security","memes","tunestr","music","coffeechain","press","presse","memestr","photography","funny","france","artstr","foodstr","news","btcprague","sats","zaps","china","permaculture","inflation","primal","plebs","permies","photestr","homesteading","bible","biblestr","christian","crypto","yestr","new","thainostrich","nostrich","wisdom","hodl","us","dance"].map(((e,t)=>(0,Tc.jsx)("button",{onClick:()=>(e=>{i("/search/".concat(e))})(e),className:"bg-gray-200 text-black rounded-full px-4 py-1 text-lg focus:outline-none ",style:{flex:"0 0 auto"},children:e},t)))})]})});const TS=function(){const{isLoggedIn:e}=Pu(),t=Mo(),[n,a]=(0,r.useState)(null),[i,o]=(0,r.useState)(!0),[s,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(null),[f,p]=(0,r.useState)(""),[g,m]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),[b,x]=(0,r.useState)(""),[w,S]=(0,r.useState)(""),[k,_]=(0,r.useState)(""),[E,C]=(0,r.useState)(""),[j,N]=(0,r.useState)(""),[P,O]=(0,r.useState)(!1),[T,L]=(0,r.useState)(""),[A,R]=(0,r.useState)(null),[M,F]=(0,r.useState)(null);(0,r.useEffect)((()=>{e?I():t(-1)}),[e,t]),(0,r.useEffect)((()=>{n&&(x(n.name),S(n.about),_(n.lightningAddress),N(n.banner),C(n.picture))}),[n]);const I=async()=>{const e=localStorage.getItem("memestr");if(e){const t=JSON.parse(e).pubKey;h(t);try{const e=(await Bx(t)).content,n=JSON.parse(e);a({...n}),p(n.name),m(n.about),y(n.lightningAddress),l(n.picture),u(n.banner),o(!1)}catch(rf){console.error("Error fetching user details:",rf)}}};return(0,Tc.jsxs)("div",{className:"flex flex-col md:flex-row min-h-screen ",children:[(0,Tc.jsx)(Gd,{}),(0,Tc.jsxs)("main",{className:"md:w-7/12 p-4 pt-8",children:[(0,Tc.jsxs)("div",{className:"mt-8 mb-4 flex items-center justify-between",children:[(0,Tc.jsx)("h1",{className:"text-2xl font-bold",children:"Edit Profile"}),(0,Tc.jsxs)("div",{children:[(0,Tc.jsx)("button",{onClick:async()=>{const e=["wss://relay.damus.io","wss://relay.primal.net","wss://relay.snort.social","wss://relay.hllo.live"],t=new wa,n=localStorage.getItem("memestr");if(n){const r=JSON.parse(n).pubKey,i=JSON.parse(n).privateKey;let l=Sa.decode(i);const u={name:f,about:g,lightningAddress:v,picture:s,banner:c},d={kind:0,pubkey:r,created_at:Math.floor(Date.now()/1e3),tags:[["p",r],["w","memestrAccount"]],content:JSON.stringify(u)};d.id=aa(d),d.sig=la(d,l.data);try{await t.publish(e,d),t.close(e);const n=await Bx(r);let s=JSON.parse(n.content);s.pubKey=r,s.privateKey=i,localStorage.setItem("memestr",JSON.stringify(s)),a(s),o(!1),L("User Details Saved Successfully"),O(!0),setTimeout((()=>O(!1)),3e3)}catch(rf){console.error("Error during saving changes:",rf),o(!1)}}},className:"text-white bg-gradient-to-r from-blue-500 to-teal-500 hover:from-pink-500 hover:to-yellow-500 focus:outline-none focus:ring-4 font-medium rounded-full text-md px-5 py-2.5 me-2 mb-2 ",children:"Save"}),(0,Tc.jsx)("button",{onClick:()=>{p(b),m(w),y(k),t(-1)},className:"bg-gray-300 text-gray-700 px-4 py-2 rounded-full",children:"Cancel"})]})]}),i?(0,Tc.jsx)(Pw,{}):(0,Tc.jsxs)(Tc.Fragment,{children:[P&&(0,Tc.jsx)("div",{className:"fixed top-0 inset-x-0 flex justify-center items-start z-50",children:(0,Tc.jsxs)("div",{className:"mt-12 p-4 bg-black text-white rounded-lg shadow-lg transition-transform transform-gpu animate-slideInSlideOut flex items-center",children:[(0,Tc.jsx)("p",{className:"text-bold text-white px-2",children:T}),(0,Tc.jsx)(tu,{className:"h-6 w-6 mr-2 text-white cursor-pointer",onClick:()=>O(!1)})]})}),(0,Tc.jsx)("div",{className:"flex items-center justify-center mb-4",children:(0,Tc.jsxs)("label",{htmlFor:"banner-upload",children:[(0,Tc.jsx)("input",{type:"file",id:"banner-upload",accept:"image/*",onChange:async e=>{const t=e.target.files[0];if(t)try{const e=await sd(t);u(e.data.link),F(URL.createObjectURL(t))}catch(rf){console.error("An error occured:",rf),F(null)}},className:"hidden"}),(0,Tc.jsx)("div",{className:"w-screen h-48 bg-gray-200 flex items-center justify-center cursor-pointer overflow-hidden",style:{backgroundImage:"url(".concat(M||c||n.banner||j,")"),backgroundSize:"cover",backgroundPosition:"center"}})]})}),(0,Tc.jsx)("div",{className:"flex items-center mb-4 w-full",children:(0,Tc.jsxs)("label",{htmlFor:"profile-upload",children:[(0,Tc.jsx)("input",{type:"file",id:"profile-upload",accept:"image/*",onChange:async e=>{const t=e.target.files[0];if(t)try{const e=await sd(t);l(e.data.link),R(URL.createObjectURL(t))}catch(rf){console.error("An error occurred:",rf),l(null)}},className:"hidden"}),(0,Tc.jsx)("div",{className:"flex items-center justify-center mr-auto -mt-20 bg-gray-50 rounded-full border-gray-100 w-32 h-32 cursor-pointer overflow-hidden",style:{backgroundImage:"url(".concat(A||s||n.picture||E,")"),backgroundSize:"cover",backgroundPosition:"center"},children:!A&&!s&&!n.picture&&!localStorage.getItem("profileImage_".concat(d))&&(0,Tc.jsx)(Ew,{className:"w-24 h-24"})})]})}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"username",className:"text-lg font-semibold mb-2 block",children:"User Name"}),(0,Tc.jsx)("input",{type:"text",id:"username",className:"w-full px-4 py-2 border rounded",value:f,onChange:e=>p(e.target.value)})]}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"bio",className:"text-lg font-semibold mb-2 block",children:"Bio"}),(0,Tc.jsx)("textarea",{id:"bio",className:"w-full px-4 py-2 border rounded",rows:"4",placeholder:"Write your bio here...",value:g,onChange:e=>m(e.target.value)})]}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"lightning-address",className:"text-lg font-semibold mb-2 block",children:"Bitcoin Lightning Address"}),(0,Tc.jsx)("input",{type:"text",id:"lightning-address",className:"w-full px-4 py-2 border rounded",placeholder:"Enter your Bitcoin Lightning address",value:v,onChange:e=>y(e.target.value)})]}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"public-key",className:"text-lg font-semibold mb-2 block",children:"Public Key"}),(0,Tc.jsx)("input",{type:"text",id:"public-key",className:"w-full px-4 py-2 border rounded",value:d||"Not available",readOnly:!0})]})]})]}),(0,Tc.jsx)(pd,{})]})};const LS=function(){const{pubKey:e}=Fo(),t=Mo(),[n,a]=(0,r.useState)(null),[i,o]=(0,r.useState)(!0);return(0,r.useEffect)((()=>{(async()=>{try{const t=(await Bx(e)).content,n=JSON.parse(t);a(n),console.log(n),o(!1)}catch(rf){console.error("Error fetching user details:",rf)}})()}),[e]),(0,Tc.jsxs)("div",{className:"flex flex-col md:flex-row min-h-screen",children:[(0,Tc.jsx)(Gd,{}),(0,Tc.jsxs)("main",{className:"md:w-7/12 p-4 pt-8",children:[(0,Tc.jsxs)("div",{className:"mt-8 mb-4 flex items-center justify-between",children:[(0,Tc.jsx)("h1",{className:"text-2xl font-bold",children:"Profile"}),(0,Tc.jsx)("button",{onClick:()=>t(-1),className:"bg-gray-300 text-gray-700 px-4 py-2 rounded-full",children:"Back"})]}),i?(0,Tc.jsx)(Pw,{}):(0,Tc.jsxs)(Tc.Fragment,{children:[(0,Tc.jsx)("div",{className:"flex items-center justify-center mb-4",children:(0,Tc.jsx)("div",{className:"w-screen h-48 bg-gray-200 flex items-center justify-center cursor-pointer overflow-hidden",style:{backgroundImage:"url(".concat(n.banner,")"),backgroundSize:"cover",backgroundPosition:"center"}})}),(0,Tc.jsx)("div",{className:"flex items-center mb-4 w-full",children:(0,Tc.jsx)("div",{className:"flex items-center justify-center mr-auto -mt-20 bg-gray-50 rounded-full border-gray-100 w-32 h-32 cursor-pointer overflow-hidden",style:{backgroundImage:"url(".concat(n.picture,")"),backgroundSize:"cover",backgroundPosition:"center"},children:!n.picture&&(0,Tc.jsx)(Ew,{className:"w-24 h-24"})})}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"username",className:"text-lg font-semibold mb-2 block",children:"User Name"}),(0,Tc.jsx)("input",{type:"text",id:"username",className:"w-full px-4 py-2 border rounded",value:n.name,readOnly:!0})]}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"bio",className:"text-lg font-semibold mb-2 block",children:"Bio"}),(0,Tc.jsx)("textarea",{id:"bio",className:"w-full px-4 py-2 border rounded",rows:"4",value:n.about,readOnly:!0})]}),(0,Tc.jsxs)("div",{className:"mb-4",children:[(0,Tc.jsx)("label",{htmlFor:"lightning-address",className:"text-lg font-semibold mb-2 block",children:"Bitcoin Lightning Address"}),(0,Tc.jsx)("input",{type:"text",id:"lightning-address",className:"w-full px-4 py-2 border rounded",value:n.lightningAddress||n.lud16||n.lud6,readOnly:!0})]}),(0,Tc.jsxs)("div",{className:"mb-16 md:mb-4 ",children:[(0,Tc.jsx)("label",{htmlFor:"public-key",className:"text-lg font-semibold mb-2 block",children:"Public Key"}),(0,Tc.jsx)("input",{type:"text",id:"public-key",className:"w-full px-4 py-2 border rounded",value:e,readOnly:!0})]})]})]}),(0,Tc.jsx)(pd,{})]})};function AS(){let{searchQuery:e}=Fo();return(0,Tc.jsx)(Nx,{filterTags:[e],children:(0,Tc.jsx)(Px,{})})}const RS=function(){const e={"/":null,"/pets":["pets","dogs","cats"],"/nature":["nature","flowers","sky","sea"],"/food":["food"],"/photography":["photography"],"/vehicles":["cars","motorcycle","car","motorcycles"],"/crypto":["crypto","bitcoin","btc","ethereum","cryptocurrency","blockchain","nft"]};function t(){let e=Ao();return"/search"!==e.pathname&&"/meme-editor"!==e.pathname?(0,Tc.jsx)(lS,{}):null}return r.useEffect((()=>{(window._mtm=window._mtm||[]).push({"mtm.startTime":(new Date).getTime(),event:"mtm.Start"});var e=document,t=e.createElement("script"),n=e.getElementsByTagName("script")[0];t.async=!0,t.src="https://cdn.matomo.cloud/memestrapp.matomo.cloud/container_6nxjmRiN.js",n.parentNode.insertBefore(t,n)}),[]),(0,Tc.jsx)(Ou,{children:(0,Tc.jsxs)(is,{children:[(0,Tc.jsx)(t,{}),(0,Tc.jsx)(Nx,{filterTags:e["/"],children:(0,Tc.jsxs)(Xo,{children:[(0,Tc.jsx)($o,{exact:!0,path:"/",element:(0,Tc.jsx)(Px,{})}),(0,Tc.jsx)($o,{path:"/post/:postId",element:(0,Tc.jsx)(Kx,{})}),(0,Tc.jsx)($o,{path:"/profile",element:(0,Tc.jsx)(TS,{})}),(0,Tc.jsx)($o,{path:"/userprofile/:pubKey",element:(0,Tc.jsx)(LS,{})}),(0,Tc.jsx)($o,{path:"/search/:searchQuery",element:(0,Tc.jsx)(AS,{})}),(0,Tc.jsx)($o,{path:"/search",element:(0,Tc.jsx)(OS,{})}),(0,Tc.jsx)($o,{path:"/meme-editor",element:(0,Tc.jsx)(wx,{})})]})}),(0,Tc.jsx)(Nx,{filterTags:e["/pets"],children:(0,Tc.jsx)(Xo,{children:(0,Tc.jsx)($o,{exact:!0,path:"/pets",element:(0,Tc.jsx)(Px,{})})})}),(0,Tc.jsx)(Nx,{filterTags:e["/nature"],children:(0,Tc.jsx)(Xo,{children:(0,Tc.jsx)($o,{exact:!0,path:"/nature",element:(0,Tc.jsx)(Px,{})})})}),(0,Tc.jsx)(Nx,{filterTags:e["/food"],children:(0,Tc.jsx)(Xo,{children:(0,Tc.jsx)($o,{exact:!0,path:"/food",element:(0,Tc.jsx)(Px,{})})})}),(0,Tc.jsx)(Nx,{filterTags:e["/photography"],children:(0,Tc.jsx)(Xo,{children:(0,Tc.jsx)($o,{exact:!0,path:"/photography",element:(0,Tc.jsx)(Px,{})})})}),(0,Tc.jsx)(Nx,{filterTags:e["/vehicles"],children:(0,Tc.jsx)(Xo,{children:(0,Tc.jsx)($o,{exact:!0,path:"/vehicles",element:(0,Tc.jsx)(Px,{})})})}),(0,Tc.jsx)(Nx,{filterTags:e["/crypto"],children:(0,Tc.jsx)(Xo,{children:(0,Tc.jsx)($o,{exact:!0,path:"/crypto",element:(0,Tc.jsx)(Px,{})})})}),(0,Tc.jsx)(ES,{})]})})};i.createRoot(document.getElementById("root")).render((0,Tc.jsx)(Tc.Fragment,{children:(0,Tc.jsx)(RS,{})}))})()})(); \ No newline at end of file +/*! For license information please see main.a9a4c61b.js.LICENSE.txt */ +(()=>{var e={9932:(e,t,n)=>{"use strict";var r,a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",a({viewBox:"0 0 24 24",style:a({fill:n,width:i,height:l},u)},d),o.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},3050:(e,t,n)=>{"use strict";var r,a=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return o.default.createElement("svg",a({viewBox:"0 0 24 24",style:a({fill:n,width:i,height:l},u)},d),o.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},8925:function(e,t,n){var r,a,i;a=[],void 0===(i="function"===typeof(r=function(){"use strict";function t(e,t){return"undefined"==typeof t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function a(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):a(l.href)?r(e,t,n):i(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,o),n);else if(a(e))r(e,n,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var i="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||i&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);a?a.location=h:location.href=h,a=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,a):r)||(e.exports=i)},5252:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Animation=void 0;const r=n(2609),a=n(5532),i=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return(new Date).getTime()};class o{constructor(e,t){this.id=o.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:i(),frameRate:0},this.func=e,this.setLayers(t)}setLayers(e){let t=[];return e&&(t=Array.isArray(e)?e:[e]),this.layers=t,this}getLayers(){return this.layers}addLayer(e){const t=this.layers,n=t.length;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],t.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];t.getCubicArcLength=(e,r,a)=>{let i,o,s;i=a/2,o=0;for(let l=0;l<20;l++)s=i*t.tValues[20][l]+i,o+=t.cValues[20][l]*n(e,r,s);return i*o};function n(e,t,n){const a=r(1,n,e),i=r(1,n,t),o=a*a+i*i;return Math.sqrt(o)}t.getQuadraticArcLength=(e,t,n)=>{void 0===n&&(n=1);const r=e[0]-2*e[1]+e[2],a=t[0]-2*t[1]+t[2],i=2*e[1]-2*e[0],o=2*t[1]-2*t[0],s=4*(r*r+a*a),l=4*(r*i+a*o),c=i*i+o*o;if(0===s)return n*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));const u=l/(2*s),d=n+u,h=c/s-u*u,f=d*d+h>0?Math.sqrt(d*d+h):0,p=u*u+h>0?Math.sqrt(u*u+h):0,g=u+Math.sqrt(u*u+h)!==0?h*Math.log(Math.abs((d+f)/(u+p))):0;return Math.sqrt(s)/2*(d*f-u*p+g)};const r=(e,n,a)=>{const i=a.length-1;let o,s;if(0===i)return 0;if(0===e){s=0;for(let e=0;e<=i;e++)s+=t.binomialCoefficients[i][e]*Math.pow(1-n,i-e)*Math.pow(n,e)*a[e];return s}o=new Array(i);for(let t=0;t{let r=1,a=e/t,i=(e-n(a))/t,o=0;for(;r>.001;){const s=n(a+i),l=Math.abs(e-s)/t;if(l500)break}return a}},8771:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitCanvas=t.SceneCanvas=t.Canvas=void 0;const r=n(5532),a=n(1344),i=n(2609),o=n(9842),s=n(6518);var l;class c{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||i.Konva.pixelRatio||function(){if(l)return l;var e=r.Util.createCanvasElement(),t=e.getContext("2d");return l=(i.Konva._global.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),r.Util.releaseCanvas(e),l}();this.pixelRatio=t,this._canvas=r.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch(n){try{return this._canvas.toDataURL()}catch(a){return r.Util.error("Unable to get data URL. "+a.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}t.Canvas=c,o.Factory.addGetterSetter(c,"pixelRatio",void 0,(0,s.getNumberValidator)());t.SceneCanvas=class extends c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0,willReadFrequently:!1};super(e),this.context=new a.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}};t.HitCanvas=class extends c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0};super(e),this.hitCanvas=!0,this.context=new a.HitContext(this),this.setSize(e.width,e.height)}}},1418:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;const r=n(9842),a=n(2302),i=n(6518);class o extends a.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var n=[];return t.forEach((function(t){e(t)&&n.push(t)})),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.remove()})),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.destroy()})),this.children=[],this._requestDraw(),this}add(){if(0===arguments.length)return this;if(arguments.length>1){for(var e=0;e0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants((r=>{const a=r._isMatch(e);return a&&n.push(r),!(!a||!t)})),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n){if(t=e(r),t)return!0;if(r.hasChildren()&&(t=r._descendants(e),t))return!0}return!1}toObject(){var e=a.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach((t=>{e.children.push(t.toObject())})),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=a.Node.prototype.clone.call(this,e);return this.getChildren().forEach((function(e){t.add(e.clone())})),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach((n=>{n.isVisible()&&n.intersects(e)&&t.push(n)})),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach((function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;null===(e=this.children)||void 0===e||e.forEach((function(e,t){e.index=t})),this._requestDraw()}drawScene(e,t,n){var r=this.getLayer(),a=e||r&&r.getCanvas(),i=a&&a.getContext(),o=this._getCanvasCache(),s=o&&o.scene,l=a&&a.isCache;if(!this.isVisible()&&!l)return this;if(s){i.save();var c=this.getAbsoluteTransform(t).getMatrix();i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",a,t,n);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,a=r&&r.getContext(),i=this._getCanvasCache();if(i&&i.hit){a.save();var o=this.getAbsoluteTransform(t).getMatrix();a.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n,r){var a,i=t&&t.getContext(),o=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),c="number"===typeof o&&"number"===typeof s||l;const u=n===this;if(c){i.save();var d=this.getAbsoluteTransform(n),h=d.getMatrix();let e;if(i.transform(h[0],h[1],h[2],h[3],h[4],h[5]),i.beginPath(),l)e=l.call(this,i,this);else{var f=this.clipX(),p=this.clipY();i.rect(f||0,p||0,o,s)}i.clip.apply(i,e),h=d.copy().invert().getMatrix(),i.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var g=!u&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;g&&(i.save(),i._applyGlobalCompositeOperation(this)),null===(a=this.children)||void 0===a||a.forEach((function(a){a[e](t,n,r)})),g&&i.restore(),c&&i.restore()}getClientRect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,r,a,i,o=e.skipTransform,s=e.relativeTo,l={x:1/0,y:1/0,width:0,height:0},c=this;null===(t=this.children)||void 0===t||t.forEach((function(t){if(t.visible()){var o=t.getClientRect({relativeTo:c,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===o.width&&0===o.height||(void 0===n?(n=o.x,r=o.y,a=o.x+o.width,i=o.y+o.height):(n=Math.min(n,o.x),r=Math.min(r,o.y),a=Math.max(a,o.x+o.width),i=Math.max(i,o.y+o.height)))}}));for(var u=this.find("Shape"),d=!1,h=0;h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitContext=t.SceneContext=t.Context=void 0;const r=n(5532),a=n(2609);var i=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class o{constructor(e){this.canvas=e,a.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n,a,i,o,s=this.traceArr,l=s.length,c="";for(n=0;n"number"===typeof e?Math.floor(e):e))),c+="("+o.join(",")+")")):(c+=a.property,e||(c+="="+a.val)),c+=";";return c}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr;t.push(e),t.length>=100&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){const t=e.attrs.lineCap;t&&this.setAttr("lineCap",t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)}_applyLineJoin(e){const t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,a,i){this._context.arc(e,t,n,r,a,i)}arcTo(e,t,n,r,a){this._context.arcTo(e,t,n,r,a)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,a,i){this._context.bezierCurveTo(e,t,n,r,a,i)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:t})}_fillColor(e){var t=e.fill();this.setAttr("fillStyle",t),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var t=e._getLinearGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fillRadialGradient(e){const t=e._getRadialGradient();t&&(this.setAttr("fillStyle",t),e._fillFunc(this))}_fill(e){const t=e.fill(),n=e.getFillPriority();if(t&&"color"===n)return void this._fillColor(e);const r=e.getFillPatternImage();if(r&&"pattern"===n)return void this._fillPattern(e);const a=e.getFillLinearGradientColorStops();if(a&&"linear-gradient"===n)return void this._fillLinearGradient(e);const i=e.getFillRadialGradientColorStops();i&&"radial-gradient"===n?this._fillRadialGradient(e):t?this._fillColor(e):r?this._fillPattern(e):a?this._fillLinearGradient(e):i&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const t=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),r=e.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(t.x,t.y,n.x,n.y);if(r){for(var i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var r=n(1933);Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return r.Konva}});const a=n(1933);e.exports=a.Konva},995:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const r=n(2609),a=n(5532);t.DD={get isDragging(){var e=!1;return t.DD._dragElements.forEach((t=>{"dragging"===t.dragStatus&&(e=!0)})),e},justDragged:!1,get node(){var e;return t.DD._dragElements.forEach((t=>{e=t.node})),e},_dragElements:new Map,_drag(e){const n=[];t.DD._dragElements.forEach(((t,r)=>{const{node:i}=t,o=i.getStage();o.setPointersPositions(e),void 0===t.pointerId&&(t.pointerId=a.Util._getFirstPointerId(e));const s=o._changedPointerPositions.find((e=>e.id===t.pointerId));if(s){if("dragging"!==t.dragStatus){var l=i.dragDistance();if(Math.max(Math.abs(s.x-t.startPointerPos.x),Math.abs(s.y-t.startPointerPos.y)){t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)}))},_endDragBefore(e){const n=[];t.DD._dragElements.forEach((a=>{const{node:i}=a,o=i.getStage();e&&o.setPointersPositions(e);if(!o._changedPointerPositions.find((e=>e.id===a.pointerId)))return;"dragging"!==a.dragStatus&&"stopped"!==a.dragStatus||(t.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,a.dragStatus="stopped");const s=a.node.getLayer()||a.node instanceof r.Konva.Stage&&a.node;s&&-1===n.indexOf(s)&&n.push(s)})),n.forEach((e=>{e.draw()}))},_endDragAfter(e){t.DD._dragElements.forEach(((n,r)=>{"stopped"===n.dragStatus&&n.node.fire("dragend",{type:"dragend",target:n.node,evt:e},!0),"dragging"!==n.dragStatus&&t.DD._dragElements.delete(r)}))}},r.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1))},9842:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const r=n(5532),a=n(6518);var i="get",o="set";t.Factory={addGetterSetter(e,n,r,a,i){t.Factory.addGetter(e,n,r),t.Factory.addSetter(e,n,a,i),t.Factory.addOverloadedGetterSetter(e,n)},addGetter(e,t,n){var a=i+r.Util._capitalize(t);e.prototype[a]=e.prototype[a]||function(){var e=this.attrs[t];return void 0===e?n:e}},addSetter(e,n,a,i){var s=o+r.Util._capitalize(n);e.prototype[s]||t.Factory.overWriteSetter(e,n,a,i)},overWriteSetter(e,t,n,a){var i=o+r.Util._capitalize(t);e.prototype[i]=function(e){return n&&void 0!==e&&null!==e&&(e=n.call(this,e,t)),this._setAttr(t,e),a&&a.call(this),this}},addComponentsGetterSetter(e,n,s,l,c){var u,d,h=s.length,f=r.Util._capitalize,p=i+f(n),g=o+f(n);e.prototype[p]=function(){var e={};for(u=0;u{this._setAttr(n+f(e),void 0)})),this._fireChangeEvent(n,r,e),c&&c.call(this),this},t.Factory.addOverloadedGetterSetter(e,n)},addOverloadedGetterSetter(e,t){var n=r.Util._capitalize(t),a=o+n,s=i+n;e.prototype[t]=function(){return arguments.length?(this[a](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(e,n,a,o){r.Util.error("Adding deprecated "+n);var s=i+r.Util._capitalize(n),l=n+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[s]=function(){r.Util.error(l);var e=this.attrs[n];return void 0===e?a:e},t.Factory.addSetter(e,n,o,(function(){r.Util.error(l)})),t.Factory.addOverloadedGetterSetter(e,n)},backCompat(e,t){r.Util.each(t,(function(t,n){var a=e.prototype[n],s=i+r.Util._capitalize(t),l=o+r.Util._capitalize(t);function c(){a.apply(this,arguments),r.Util.error('"'+t+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[t]=c,e.prototype[s]=c,e.prototype[l]=c}))},afterSetFilter(){this._filterUpToDate=!1}}},231:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastLayer=void 0;const r=n(5532),a=n(4097),i=n(2609);class o extends a.Layer{constructor(e){super(e),this.listening(!1),r.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}t.FastLayer=o,o.prototype.nodeType="FastLayer",(0,i._registerNode)(o)},2609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const r=Math.PI/180;t.glob="undefined"!==typeof n.g?n.g:"undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:{},t.Konva={_global:t.glob,version:"9.3.11",isBrowser:"undefined"!==typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle:e=>t.Konva.angleDeg?e*r:e,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:"undefined"!==typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>t.Konva.DD.isDragging,isTransforming(){var e;return null===(e=t.Konva.Transformer)||void 0===e?void 0:e.isTransforming()},isDragReady:()=>!!t.Konva.DD.node,releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(e){t.glob.Konva=e}};t._registerNode=e=>{t.Konva[e.prototype.getClassName()]=e},t.Konva._injectGlobal(t.Konva)},7365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;const r=n(5532),a=n(1418),i=n(2609);class o extends a.Container{_validateAdd(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&r.Util.throw("You may only add groups and shapes to groups.")}}t.Group=o,o.prototype.nodeType="Group",(0,i._registerNode)(o)},4097:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layer=void 0;const r=n(5532),a=n(1418),i=n(2302),o=n(9842),s=n(8771),l=n(6518),c=n(7177),u=n(2609);var d=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],h=d.length;class f extends a.Container{constructor(e){super(e),this.canvas=new s.SceneCanvas,this.hitCanvas=new s.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r0?{antialiased:!0}:{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),a.Container.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),a.Container.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return r.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}t.Layer=f,f.prototype.nodeType="Layer",(0,u._registerNode)(f),o.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(f,"clearBeforeDraw",!0),o.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,l.getBooleanValidator)())},2302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Node=void 0;const r=n(5532),a=n(9842),i=n(8771),o=n(2609),s=n(995),l=n(6518);var c="absoluteOpacity",u="allEventListeners",d="absoluteTransform",h="absoluteScale",f="canvas",p="listening",g="mouseenter",m="mouseleave",v="Shape",y=" ",b="stage",x="transform",w="visible",S=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(y);let k=1;class _{constructor(e){this._id=k++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){e!==x&&e!==d||!this._cache.get(e)?e?this._cache.delete(e):this._cache.clear():this._cache.get(e).dirty=!0}_getCache(e,t){var n=this._cache.get(e);return(void 0===n||(e===x||e===d)&&!0===n.dirty)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){const n=t.map((e=>e+"Change.konva")).join(y);this.on(n,(()=>{this._clearCache(e)})),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(f)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===d&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){const{scene:e,filter:t,hit:n}=this._cache.get(f);r.Util.releaseCanvas(e,t,n),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var a=Math.ceil(t.width||n.width),o=Math.ceil(t.height||n.height),s=t.pixelRatio,l=void 0===t.x?Math.floor(n.x):t.x,u=void 0===t.y?Math.floor(n.y):t.y,d=t.offset||0,p=t.drawBorder||!1,g=t.hitCanvasPixelRatio||1;if(!a||!o)return void r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");a+=2*d+(Math.abs(Math.round(n.x)-l)>.5?1:0),o+=2*d+(Math.abs(Math.round(n.y)-u)>.5?1:0),l-=d,u-=d;var m=new i.SceneCanvas({pixelRatio:s,width:a,height:o}),v=new i.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),y=new i.HitCanvas({pixelRatio:g,width:a,height:o}),b=m.getContext(),x=y.getContext();return y.isCache=!0,m.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===t.imageSmoothingEnabled&&(m.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),b.save(),x.save(),b.translate(-l,-u),x.translate(-l,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(h),this.drawScene(m,this),this.drawHit(y,this),this._isUnderCache=!1,b.restore(),x.restore(),p&&(b.save(),b.beginPath(),b.rect(0,0,a,o),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(f,{scene:m,filter:v,hit:y,x:l,y:u}),this._requestDraw(),this}isCached(){return this._cache.has(f)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r=1/0,a=1/0,i=-1/0,o=-1/0,s=this.getAbsoluteTransform(t);return n.forEach((function(e){var t=s.point(e);void 0===r&&(r=i=t.x,a=o=t.y),r=Math.min(r,t.x),a=Math.min(a,t.y),i=Math.max(i,t.x),o=Math.max(o,t.y)})),{x:r,y:a,width:i-r,height:o-a}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e,t,n,a,i=this.filters(),o=this._getCanvasCache(),s=o.scene,l=o.filter,c=l.getContext();if(i){if(!this._filterUpToDate){var u=s.pixelRatio;l.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio);try{for(e=i.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/u,s.getHeight()/u),t=c.getImageData(0,0,l.getWidth(),l.getHeight()),n=0;n{var t,n;if(!e)return this;for(t in e)"children"!==t&&(n="set"+r.Util._capitalize(t),r.Util._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))})),this}isListening(){return this._getCache(p,this._isListening)}_isListening(e){if(!this.listening())return!1;const t=this.getParent();return!t||t===e||this===e||t._isListening(e)}isVisible(){return this._getCache(w,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const t=this.getParent();return!t||t===e||this===e||t._isVisible(e)}shouldDrawHit(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;s.DD._dragElements.forEach((e=>{"dragging"===e.dragStatus&&("Stage"===e.node.nodeType||e.node.getLayer()===n)&&(r=!0)}));var a=!t&&!o.Konva.hitOnDragEnabled&&(r||o.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e,t,n,r,a=this.getDepth(),i=this,o=0;const s=this.getStage();return"Stage"!==i.nodeType&&s&&function s(l){for(e=[],t=l.length,n=0;n0&&e[0].getDepth()<=a&&s(e)}(s.getChildren()),o}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(x),this._clearSelfAndDescendantCache(d)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges((()=>{this.x(e.x),this.y(e.y)})),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;var t=e.getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var a=this.getAbsoluteTransform(e).getMatrix(),i=new r.Transform,o=this.offset();return i.m=a.slice(),i.translate(o.x,o.y),i.getTranslation()}setAbsolutePosition(e){const{x:t,y:n,...r}=this._clearTransform();this.attrs.x=t,this.attrs.y=n,this._clearCache(x);var a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(e.x,e.y),e={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(r),this.setPosition({x:e.x,y:e.y}),this._clearCache(x),this._clearSelfAndDescendantCache(d),this}_setTransform(e){var t;for(t in e)this.attrs[t]=e[t]}_clearTransform(){var e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){var t=e.x,n=e.y,r=this.x(),a=this.y();return void 0!==t&&(r+=t),void 0!==n&&(a+=n),this.setPosition({x:r,y:a}),this}_eachAncestorReverse(e,t){var n,r,a=[],i=this.getParent();if(!t||t._id!==this._id){for(a.unshift(this);i&&(!t||i._id!==t._id);)a.unshift(i),i=i.parent;for(n=a.length,r=0;r0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&r.Util.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(c,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e,t,n,a,i=this.getAttrs();const o={attrs:{},className:this.getClassName()};for(e in i)t=i[e],r.Util.isObject(t)&&!r.Util._isPlainObject(t)&&!r.Util._isArray(t)||(n="function"===typeof this[e]&&this[e],delete i[e],a=n?n.call(this):null,i[e]=t,a!==t&&(o.attrs[e]=t));return r.Util._prepareToStringify(o)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var a=this.parent;a;){if(a===n)return r;a._isMatch(e)&&r.push(a),a=a.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if("function"===typeof e)return e(this);var t,n,a=e.replace(/ /g,"").split(","),i=a.length;for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return t.target=t.target||this,n?this._fireAndBubble(e,t):this._fire(e,t),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(d,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var t;if(e)return t=new r.Transform,this._eachAncestorReverse((function(e){var n=e.transformsEnabled();"all"===n?t.multiply(e.getTransform()):"position"===n&&t.translate(e.x()-e.offsetX(),e.y()-e.offsetY())}),e),t;t=this._cache.get(d)||new r.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(t):t.reset();var n=this.transformsEnabled();if("all"===n)t.multiply(this.getTransform());else if("position"===n){const e=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,a=this.attrs.offsetY||0;t.translate(e-r,n-a)}return t.dirty=!1,t}getAbsoluteScale(e){for(var t=this;t;)t._isUnderCache&&(e=t),t=t.getParent();const n=this.getAbsoluteTransform(e).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(x,this._getTransform)}_getTransform(){var e,t,n=this._cache.get(x)||new r.Transform;n.reset();var a=this.x(),i=this.y(),s=o.Konva.getAngle(this.rotation()),l=null!==(e=this.attrs.scaleX)&&void 0!==e?e:1,c=null!==(t=this.attrs.scaleY)&&void 0!==t?t:1,u=this.attrs.skewX||0,d=this.attrs.skewY||0,h=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===a&&0===i||n.translate(a,i),0!==s&&n.rotate(s),0===u&&0===d||n.skew(u,d),1===l&&1===c||n.scale(l,c),0===h&&0===f||n.translate(-1*h,-1*f),n.dirty=!1,n}clone(e){var t,n,a,i,o,s=r.Util.cloneObject(this.attrs);for(t in e)s[t]=e[t];var l=new this.constructor(s);for(t in this.eventListeners)for(a=(n=this.eventListeners[t]).length,i=0;i{try{const n=null===e||void 0===e?void 0:e.callback;n&&delete e.callback,r.Util._urlToImage(this.toDataURL(e),(function(e){t(e),null===n||void 0===n||n(e)}))}catch(a){n(a)}}))}toBlob(e){return new Promise(((t,n)=>{try{const n=null===e||void 0===e?void 0:e.callback;n&&delete e.callback,this.toCanvas(e).toBlob((e=>{t(e),null===n||void 0===n||n(e)}),null===e||void 0===e?void 0:e.mimeType,null===e||void 0===e?void 0:e.quality)}catch(r){n(r)}}))}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.Konva.dragDistance}_off(e,t,n){var r,a,i,o=this.eventListeners[e];for(r=0;r1&&void 0!==arguments[1])||arguments[1];s.DD._dragElements.has(this._id)||this._createDragElement(e);s.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},t)}_setDragPosition(e,t){const n=this.getStage()._getPointerById(t.pointerId);if(n){var a={x:n.x-t.offset.x,y:n.y-t.offset.y},i=this.dragBoundFunc();if(void 0!==i){const t=i.call(this,a,e);t?a=t:r.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===a.x&&this._lastPos.y===a.y||(this.setAbsolutePosition(a),this._requestDraw()),this._lastPos=a}}stopDrag(e){const t=s.DD._dragElements.get(this._id);t&&(t.dragStatus="stopped"),s.DD._endDragBefore(e),s.DD._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=s.DD._dragElements.get(this._id);return!!e&&"dragging"===e.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(e){if((!(void 0!==e.evt.button)||o.Konva.dragButtons.indexOf(e.evt.button)>=0)&&!this.isDragging()){var t=!1;s.DD._dragElements.forEach((e=>{this.isAncestorOf(e.node)&&(t=!0)})),t||this._createDragElement(e)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const e=s.DD._dragElements.get(this._id),t=e&&"dragging"===e.dragStatus,n=e&&"ready"===e.dragStatus;t?this.stopDrag():n&&s.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0};const t=this.getStage();if(!t)return!1;const n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return r.Util.haveIntersection(n,this.getClientRect())}static create(e,t){return r.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(e,t){var n,a,i,s=_.prototype.getClassName.call(e),l=e.children;t&&(e.attrs.container=t),o.Konva[s]||(r.Util.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");if(n=new(0,o.Konva[s])(e.attrs),l)for(a=l.length,i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.releaseCapture=t.setPointerCapture=t.hasPointerCapture=t.createEvent=t.getCapturedShape=void 0;const r=n(2609),a=new Map,i=void 0!==r.Konva._global.PointerEvent;function o(e){return{evt:e,pointerId:e.pointerId}}function s(e,t){const n=a.get(e);if(!n)return;const r=n.getStage();r&&r.content,a.delete(e),i&&n._fire("lostpointercapture",o(new PointerEvent("lostpointercapture")))}t.getCapturedShape=function(e){return a.get(e)},t.createEvent=o,t.hasPointerCapture=function(e,t){return a.get(e)===t},t.setPointerCapture=function(e,t){s(e),t.getStage()&&(a.set(e,t),i&&t._fire("gotpointercapture",o(new PointerEvent("gotpointercapture"))))},t.releaseCapture=s},7177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const r=n(2609),a=n(5532),i=n(9842),o=n(2302),s=n(6518),l=n(2609),c=n(1673);var u="hasShadow",d="shadowRGBA",h="patternImage",f="linearGradient",p="radialGradient";let g;function m(){return g||(g=a.Util.createCanvasElement().getContext("2d"),g)}t.shapes={};class v extends o.Node{constructor(e){let n;for(super(e);n=a.Util.getRandomColor(),!n||n in t.shapes;);this.colorKey=n,t.shapes[n]=this}getContext(){return a.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return a.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(u,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const e=m().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new a.Transform;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(r.Konva.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const n=t.getMatrix(),i="undefined"===typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(i)}return e}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=m(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),a=t.createLinearGradient(n.x,n.y,r.x,r.y),i=0;ithis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops())))}hasHitStroke(){const e=this.hitStrokeWidth();return"auto"===e?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage();if(!t)return!1;const n=t.bufferHitCanvas;n.getContext().clear(),this.drawHit(n,void 0,!0);return n.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var t;if(!(null===(t=this.attrs.perfectDrawEnabled)||void 0===t||t))return!1;const n=e||this.hasFill(),r=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(n&&r&&a)return!0;const i=this.hasShadow(),o=this.shadowForStrokeEnabled();return!!(n&&r&&i&&o)}setStrokeHitEnabled(e){a.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),a=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,i=r.width+a,o=r.height+a,s=!e.skipShadow&&this.hasShadow(),l=s?this.shadowOffsetX():0,c=s?this.shadowOffsetY():0,u=i+Math.abs(l),d=o+Math.abs(c),h=s&&this.shadowBlur()||0,f={width:u+2*h,height:d+2*h,x:-(a/2+h)+Math.min(l,0)+r.x,y:-(a/2+h)+Math.min(c,0)+r.y};return t?f:this._transformedRect(f,n)}drawScene(e,t,n){var r,a,i=this.getLayer(),o=e||i.getCanvas(),s=o.getContext(),l=this._getCanvasCache(),c=this.getSceneFunc(),u=this.hasShadow(),d=o.isCache,h=t===this;if(!this.isVisible()&&!h)return this;if(l){s.save();var f=this.getAbsoluteTransform(t).getMatrix();return s.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(s),s.restore(),this}if(!c)return this;if(s.save(),this._useBufferCanvas()&&!d){r=this.getStage();const e=n||r.bufferCanvas;(a=e.getContext()).clear(),a.save(),a._applyLineJoin(this);var p=this.getAbsoluteTransform(t).getMatrix();a.transform(p[0],p[1],p[2],p[3],p[4],p[5]),c.call(this,a,this),a.restore();var g=e.pixelRatio;u&&s._applyShadow(this),s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(e._canvas,0,0,e.width/g,e.height/g)}else{if(s._applyLineJoin(this),!h){p=this.getAbsoluteTransform(t).getMatrix();s.transform(p[0],p[1],p[2],p[3],p[4],p[5]),s._applyOpacity(this),s._applyGlobalCompositeOperation(this)}u&&s._applyShadow(this),c.call(this,s,this)}return s.restore(),this}drawHit(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,o=i&&i.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),c=l&&l.hit;if(this.colorKey||a.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),c){o.save();var u=this.getAbsoluteTransform(t).getMatrix();return o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!s)return this;o.save(),o._applyLineJoin(this);if(!(this===t)){var d=this.getAbsoluteTransform(t).getMatrix();o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}return s.call(this,o,this),o.restore(),this}drawHitFromCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;var t,n,r,i,o,s=this._getCanvasCache(),l=this._getCachedSceneCanvas(),c=s.hit,u=c.getContext(),d=c.getWidth(),h=c.getHeight();u.clear(),u.drawImage(l._canvas,0,0,d,h);try{for(r=(n=(t=u.getImageData(0,0,d,h)).data).length,i=a.Util._hexToRgb(this.colorKey),o=0;oe?(n[o]=i.r,n[o+1]=i.g,n[o+2]=i.b,n[o+3]=255):n[o+3]=0;u.putImageData(t,0,0)}catch(f){a.Util.error("Unable to draw hit graph from cached scene canvas. "+f.message)}return this}hasPointerCapture(e){return c.hasPointerCapture(e,this)}setPointerCapture(e){c.setPointerCapture(e,this)}releaseCapture(e){c.releaseCapture(e,this)}}t.Shape=v,v.prototype._fillFunc=function(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()},v.prototype._strokeFunc=function(e){e.stroke()},v.prototype._fillFuncHit=function(e){e.fill()},v.prototype._strokeFuncHit=function(e){e.stroke()},v.prototype._centroid=!1,v.prototype.nodeType="Shape",(0,l._registerNode)(v),v.prototype.eventListeners={},v.prototype.on.call(v.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(u)})),v.prototype.on.call(v.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(d)})),v.prototype.on.call(v.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(h)})),v.prototype.on.call(v.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(f)})),v.prototype.on.call(v.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(p)})),i.Factory.addGetterSetter(v,"stroke",void 0,(0,s.getStringOrGradientValidator)()),i.Factory.addGetterSetter(v,"strokeWidth",2,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillAfterStrokeEnabled",!1),i.Factory.addGetterSetter(v,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(v,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),i.Factory.addGetterSetter(v,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),i.Factory.addGetterSetter(v,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),i.Factory.addGetterSetter(v,"lineJoin"),i.Factory.addGetterSetter(v,"lineCap"),i.Factory.addGetterSetter(v,"sceneFunc"),i.Factory.addGetterSetter(v,"hitFunc"),i.Factory.addGetterSetter(v,"dash"),i.Factory.addGetterSetter(v,"dashOffset",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"shadowColor",void 0,(0,s.getStringValidator)()),i.Factory.addGetterSetter(v,"shadowBlur",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"shadowOpacity",1,(0,s.getNumberValidator)()),i.Factory.addComponentsGetterSetter(v,"shadowOffset",["x","y"]),i.Factory.addGetterSetter(v,"shadowOffsetX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"shadowOffsetY",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternImage"),i.Factory.addGetterSetter(v,"fill",void 0,(0,s.getStringOrGradientValidator)()),i.Factory.addGetterSetter(v,"fillPatternX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternY",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillLinearGradientColorStops"),i.Factory.addGetterSetter(v,"strokeLinearGradientColorStops"),i.Factory.addGetterSetter(v,"fillRadialGradientStartRadius",0),i.Factory.addGetterSetter(v,"fillRadialGradientEndRadius",0),i.Factory.addGetterSetter(v,"fillRadialGradientColorStops"),i.Factory.addGetterSetter(v,"fillPatternRepeat","repeat"),i.Factory.addGetterSetter(v,"fillEnabled",!0),i.Factory.addGetterSetter(v,"strokeEnabled",!0),i.Factory.addGetterSetter(v,"shadowEnabled",!0),i.Factory.addGetterSetter(v,"dashEnabled",!0),i.Factory.addGetterSetter(v,"strokeScaleEnabled",!0),i.Factory.addGetterSetter(v,"fillPriority","color"),i.Factory.addComponentsGetterSetter(v,"fillPatternOffset",["x","y"]),i.Factory.addGetterSetter(v,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),i.Factory.addComponentsGetterSetter(v,"fillPatternScale",["x","y"]),i.Factory.addGetterSetter(v,"fillPatternScaleX",1,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(v,"fillPatternScaleY",1,(0,s.getNumberValidator)()),i.Factory.addComponentsGetterSetter(v,"fillLinearGradientStartPoint",["x","y"]),i.Factory.addComponentsGetterSetter(v,"strokeLinearGradientStartPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillLinearGradientStartPointX",0),i.Factory.addGetterSetter(v,"strokeLinearGradientStartPointX",0),i.Factory.addGetterSetter(v,"fillLinearGradientStartPointY",0),i.Factory.addGetterSetter(v,"strokeLinearGradientStartPointY",0),i.Factory.addComponentsGetterSetter(v,"fillLinearGradientEndPoint",["x","y"]),i.Factory.addComponentsGetterSetter(v,"strokeLinearGradientEndPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillLinearGradientEndPointX",0),i.Factory.addGetterSetter(v,"strokeLinearGradientEndPointX",0),i.Factory.addGetterSetter(v,"fillLinearGradientEndPointY",0),i.Factory.addGetterSetter(v,"strokeLinearGradientEndPointY",0),i.Factory.addComponentsGetterSetter(v,"fillRadialGradientStartPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillRadialGradientStartPointX",0),i.Factory.addGetterSetter(v,"fillRadialGradientStartPointY",0),i.Factory.addComponentsGetterSetter(v,"fillRadialGradientEndPoint",["x","y"]),i.Factory.addGetterSetter(v,"fillRadialGradientEndPointX",0),i.Factory.addGetterSetter(v,"fillRadialGradientEndPointY",0),i.Factory.addGetterSetter(v,"fillPatternRotation",0),i.Factory.addGetterSetter(v,"fillRule",void 0,(0,s.getStringValidator)()),i.Factory.backCompat(v,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},593:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const r=n(5532),a=n(9842),i=n(1418),o=n(2609),s=n(8771),l=n(995),c=n(2609),u=n(1673);var d="mouseleave",h="mouseover",f="mouseenter",p="mousemove",g="mousedown",m="mouseup",v="pointermove",y="pointerdown",b="pointerup",x="pointercancel",w="pointerout",S="pointerleave",k="pointerover",_="pointerenter",E="contextmenu",C="touchstart",j="touchend",N="touchmove",P="touchcancel",O="wheel",T=[[f,"_pointerenter"],[g,"_pointerdown"],[p,"_pointermove"],[m,"_pointerup"],[d,"_pointerleave"],[C,"_pointerdown"],[N,"_pointermove"],[j,"_pointerup"],[P,"_pointercancel"],[h,"_pointerover"],[O,"_wheel"],[E,"_contextmenu"],[y,"_pointerdown"],[v,"_pointermove"],[b,"_pointerup"],[x,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];const L={mouse:{[w]:"mouseout",[S]:d,[k]:h,[_]:f,[v]:p,[y]:g,[b]:m,[x]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[w]:"touchout",[S]:"touchleave",[k]:"touchover",[_]:"touchenter",[v]:N,[y]:C,[b]:j,[x]:P,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[w]:w,[S]:S,[k]:k,[_]:_,[v]:v,[y]:y,[b]:b,[x]:x,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},A=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",R=e=>{const t=A(e);return"pointer"===t?o.Konva.pointerEventsEnabled&&L.pointer:"touch"===t?L.touch:"mouse"===t?L.mouse:void 0};function M(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(e.clipFunc||e.clipWidth||e.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}t.stages=[];class F extends i.Container{constructor(e){super(M(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{M(this.attrs)})),this._checkVisibility()}_validateAdd(e){const t="Layer"===e.getType(),n="FastLayer"===e.getType();t||n||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if("string"===typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e,t=this.children,n=t.length;for(e=0;e-1&&t.stages.splice(n,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(r.Util.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(e){return this._pointerPositions.find((t=>t.id===e))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){(e=e||{}).x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new s.SceneCanvas({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach((function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),t}getIntersection(e){if(!e)return null;var t,n=this.children;for(t=n.length-1;t>=0;t--){const r=n[t].getIntersection(e);if(r)return r}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+"px",this.content.style.height=t+"px"),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach((n=>{n.setSize({width:e,height:t}),n.draw()}))}add(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a1){for(var i=0;i5&&r.Util.warn("The stage has "+s+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),o.Konva.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return u.hasPointerCapture(e,this)}setPointerCapture(e){u.setPointerCapture(e,this)}releaseCapture(e){u.releaseCapture(e,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&T.forEach((e=>{let[t,n]=e;this.content.addEventListener(t,(e=>{this[n](e)}),{passive:!1})}))}_pointerenter(e){this.setPointersPositions(e);const t=R(e.type);t&&this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const t=R(e.type);t&&this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+"targetShape"];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){const t=R(e.type),n=A(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),a=!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled;r&&a?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+"targetShape"]=null):a&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(e){const t=R(e.type),n=A(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach((a=>{var i=this.getIntersection(a);if(l.DD.justDragged=!1,o.Konva["_"+n+"ListenClick"]=!0,!i||!i.isListening())return void(this[n+"ClickStartShape"]=void 0);o.Konva.capturePointerEventsEnabled&&i.setPointerCapture(a.id),this[n+"ClickStartShape"]=i,i._fireAndBubble(t.pointerdown,{evt:e,pointerId:a.id}),r=!0;const s=e.type.indexOf("touch")>=0;i.preventDefault()&&e.cancelable&&s&&e.preventDefault()})),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const t=R(e.type),n=A(e.type);if(!t)return;if(o.Konva.isDragging()&&l.DD.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled))return;var r={};let a=!1;var i=this._getTargetShape(n);this._changedPointerPositions.forEach((o=>{const s=u.getCapturedShape(o.id)||this.getIntersection(o),l=o.id,c={evt:e,pointerId:l};var d=i!==s;if(d&&i&&(i._fireAndBubble(t.pointerout,{...c},s),i._fireAndBubble(t.pointerleave,{...c},s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(a=!0,d&&(s._fireAndBubble(t.pointerover,{...c},i),s._fireAndBubble(t.pointerenter,{...c},i),this[n+"targetShape"]=s),s._fireAndBubble(t.pointermove,{...c})):i&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:l}),this[n+"targetShape"]=null)})),a||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const t=R(e.type),n=A(e.type);if(!t)return;this.setPointersPositions(e);const r=this[n+"ClickStartShape"],a=this[n+"ClickEndShape"];var i={};let s=!1;this._changedPointerPositions.forEach((c=>{const d=u.getCapturedShape(c.id)||this.getIntersection(c);if(d){if(d.releaseCapture(c.id),i[d._id])return;i[d._id]=!0}const h=c.id,f={evt:e,pointerId:h};let p=!1;o.Konva["_"+n+"InDblClickWindow"]?(p=!0,clearTimeout(this[n+"DblTimeout"])):l.DD.justDragged||(o.Konva["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){o.Konva["_"+n+"InDblClickWindow"]=!1}),o.Konva.dblClickWindow),d&&d.isListening()?(s=!0,this[n+"ClickEndShape"]=d,d._fireAndBubble(t.pointerup,{...f}),o.Konva["_"+n+"ListenClick"]&&r&&r===d&&(d._fireAndBubble(t.pointerclick,{...f}),p&&a&&a===d&&d._fireAndBubble(t.pointerdblclick,{...f}))):(this[n+"ClickEndShape"]=null,o.Konva["_"+n+"ListenClick"]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:h}),p&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:h}))})),s||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+n+"ListenClick"]=!1,e.cancelable&&"touch"!==n&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(E,{evt:e}):this._fire(E,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(O,{evt:e}):this._fire(O,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const t=u.getCapturedShape(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(b,u.createEvent(e)),u.releaseCapture(e.pointerId)}_lostpointercapture(e){u.releaseCapture(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,a=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,(e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})})),Array.prototype.forEach.call(e.changedTouches||e.touches,(e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))):(n=(e.clientX-t.left)/t.scaleX,a=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:a},this._pointerPositions=[{x:n,y:a,id:r.Util._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:a,id:r.Util._getFirstPointerId(e)}])}_setPointerPosition(e){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),o.Konva.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),e.appendChild(this.content),this._resizeDOM()}}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach((function(e){e.batchDraw()})),this}}t.Stage=F,F.prototype.nodeType="Stage",(0,c._registerNode)(F),a.Factory.addGetterSetter(F,"container"),o.Konva.isBrowser&&document.addEventListener("visibilitychange",(()=>{t.stages.forEach((e=>{e.batchDraw()}))}))},3914:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const r=n(5532),a=n(5252),i=n(2302),o=n(2609);var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=0,c=["fill","stroke","shadowColor"];class u{constructor(e,t,n,r,a,i,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=i,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=a-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class d{constructor(e){var n,i,c=this,h=e.node,f=h._id,p=e.easing||t.Easings.Linear,g=!!e.yoyo;n="undefined"===typeof e.duration?.3:0===e.duration?.001:e.duration,this.node=h,this._id=l++;var m=h.getLayer()||(h instanceof o.Konva.Stage?h.getLayers():null);for(i in m||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new a.Animation((function(){c.tween.onEnterFrame()}),m),this.tween=new u(i,(function(e){c._tweenFunc(e)}),p,0,1,1e3*n,g),this._addListeners(),d.attrs[f]||(d.attrs[f]={}),d.attrs[f][this._id]||(d.attrs[f][this._id]={}),d.tweens[f]||(d.tweens[f]={}),e)void 0===s[i]&&this._addAttr(i,e[i]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,t){var n,a,i,o,s,l,u,h,f=this.node,p=f._id;if((i=d.tweens[p][e])&&delete d.attrs[p][i][e],n=f.getAttr(e),r.Util._isArray(t))if(a=[],s=Math.max(t.length,n.length),"points"===e&&t.length!==n.length&&(t.length>n.length?(u=n,n=r.Util._prepareArrayForTween(n,t,f.closed())):(l=t,t=r.Util._prepareArrayForTween(t,n,f.closed()))),0===e.indexOf("fill"))for(o=0;o{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,t=d.attrs[e._id][this._id];t.points&&t.points.trueEnd&&e.setAttr("points",t.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,t=d.attrs[e._id][this._id];t.points&&t.points.trueStart&&e.points(t.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(1e3*e),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e,t=this.node._id,n=this._id,r=d.tweens[t];for(e in this.pause(),r)delete d.tweens[t][e];delete d.attrs[t][n]}}t.Tween=d,d.attrs={},d.tweens={},i.Node.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new d(e).play()},t.Easings={BackEaseIn(e,t,n,r){var a=1.70158;return n*(e/=r)*e*((a+1)*e-a)+t},BackEaseOut(e,t,n,r){var a=1.70158;return n*((e=e/r-1)*e*((a+1)*e+a)+1)+t},BackEaseInOut(e,t,n,r){var a=1.70158;return(e/=r/2)<1?n/2*(e*e*((1+(a*=1.525))*e-a))+t:n/2*((e-=2)*e*((1+(a*=1.525))*e+a)+2)+t},ElasticEaseIn(e,t,n,r,a,i){var o=0;return 0===e?t:1===(e/=r)?t+n:(i||(i=.3*r),!a||a(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t,BounceEaseIn:(e,n,r,a)=>r-t.Easings.BounceEaseOut(a-e,0,r,a)+n,BounceEaseInOut:(e,n,r,a)=>en*(e/=r)*e+t,EaseOut:(e,t,n,r)=>-n*(e/=r)*(e-2)+t,EaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,StrongEaseIn:(e,t,n,r)=>n*(e/=r)*e*e*e*e+t,StrongEaseOut:(e,t,n,r)=>n*((e=e/r-1)*e*e*e*e+1)+t,StrongEaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t,Linear:(e,t,n,r)=>n*e/r+t}},5532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const r=n(2609);class a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[1,0,0,1,0,0];this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new a(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,a=this.m[1]*t+this.m[3]*n,i=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=a,this.m[2]=i,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,a=this.m[2]+this.m[0]*e,i=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=a,this.m[3]=i,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],a=this.m[1]*e.m[2]+this.m[3]*e.m[3],i=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=a,this.m[4]=i,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,a=this.m[0]*e,i=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=a,this.m[4]=i,this.m[5]=o,this}getMatrix(){return this.m}decompose(){var e=this.m[0],n=this.m[1],r=this.m[2],a=this.m[3],i=e*a-n*r;let o={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=n){var s=Math.sqrt(e*e+n*n);o.rotation=n>0?Math.acos(e/s):-Math.acos(e/s),o.scaleX=s,o.scaleY=i/s,o.skewX=(e*r+n*a)/i,o.skewY=0}else if(0!=r||0!=a){var l=Math.sqrt(r*r+a*a);o.rotation=Math.PI/2-(a>0?Math.acos(-r/l):-Math.acos(r/l)),o.scaleX=i/l,o.scaleY=l,o.skewX=0,o.skewY=(e*r+n*a)/i}return o.rotation=t.Util._getRotation(o.rotation),o}}t.Transform=a;var i=Math.PI/180,o=180/Math.PI,s="Konva error: ",l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},c=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,u=[];const d="undefined"!==typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)};t.Util={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>"[object Array]"===Object.prototype.toString.call(e),_isNumber:e=>"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)&&isFinite(e),_isString:e=>"[object String]"===Object.prototype.toString.call(e),_isBoolean:e=>"[object Boolean]"===Object.prototype.toString.call(e),isObject:e=>e instanceof Object,isValidSelector(e){if("string"!==typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e||e>0?1:-1,requestAnimFrame(e){u.push(e),1===u.length&&d((function(){const e=u;u=[],e.forEach((function(e){e()}))}))},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(t){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,n){var r=t.Util.createImageElement();r.onload=function(){n(r)},r.src=e},_rgbToHex:(e,t,n)=>((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1),_hexToRgb(e){e=e.replace("#","");var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e="0"+e;return"#"+e},getRGB(e){var t;return e in l?{r:(t=l[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=c.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:e=>(e=e||"black",t.Util._namedColorToRBA(e)||t.Util._hex3ColorToRGBA(e)||t.Util._hex4ColorToRGBA(e)||t.Util._hex6ColorToRGBA(e)||t.Util._hex8ColorToRGBA(e)||t.Util._rgbColorToRGBA(e)||t.Util._rgbaColorToRGBA(e)||t.Util._hslColorToRGBA(e)),_namedColorToRBA(e){var t=l[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(((e,t)=>"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e)));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if("#"===e[0]&&9===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if("#"===e[0]&&5===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,a=Number(n[1])/100,i=Number(n[2])/100;let o,s,l;if(0===a)return l=255*i,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o=i<.5?i*(1+a):i+a-i*a;const c=2*i-o,u=[0,0,0];for(let e=0;e<3;e++)s=r+1/3*-(e-1),s<0&&s++,s>1&&s--,l=6*s<1?c+6*(o-c)*s:2*s<1?o:3*s<2?c+(o-c)*(2/3-s)*6:c,u[e]=255*l;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.heighte.slice(0),degToRad:e=>e*i,radToDeg:e=>e*o,_degToRad:e=>(t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(e)),_radToDeg:e=>(t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(e)),_getRotation:e=>r.Konva.angleDeg?t.Util.radToDeg(e):e,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(s+e)},error(e){console.error(s+e)},warn(e){r.Konva.showWarnings&&console.warn("Konva warning: "+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange:(e,t,n)=>t<=e&&e1?(o=n,s=r,l=(n-a)*(n-a)+(r-i)*(r-i)):l=((o=e+u*(n-e))-a)*(o-a)+((s=t+u*(r-t))-i)*(s-i)}return[o,s,l]},_getProjectionToLine(e,n,r){var a=t.Util.cloneObject(e),i=Number.MAX_VALUE;return n.forEach((function(o,s){if(r||s!==n.length-1){var l=n[(s+1)%n.length],c=t.Util._getProjectionToSegment(o.x,o.y,l.x,l.y,e.x,e.y),u=c[0],d=c[1],h=c[2];hn.length){var s=n;n=e,e=s}for(a=0;ae.touches?e.changedTouches[0].identifier:e.pointerId||999,releaseCanvas(){if(r.Konva.releaseCanvasOnDestroy){for(var e=arguments.length,t=new Array(e),n=0;n{e.width=0,e.height=0}))}},drawRoundedRectPath(e,t,n,r){let a=0,i=0,o=0,s=0;"number"===typeof r?a=i=o=s=Math.min(r,t/2,n/2):(a=Math.min(r[0]||0,t/2,n/2),i=Math.min(r[1]||0,t/2,n/2),s=Math.min(r[2]||0,t/2,n/2),o=Math.min(r[3]||0,t/2,n/2)),e.moveTo(a,0),e.lineTo(t-i,0),e.arc(t-i,i,i,3*Math.PI/2,0,!1),e.lineTo(t,n-s),e.arc(t-s,n-s,s,0,Math.PI/2,!1),e.lineTo(o,n),e.arc(o,n-o,o,Math.PI/2,Math.PI,!1),e.lineTo(0,a),e.arc(a,a,a,Math.PI,3*Math.PI/2,!1)}}},6518:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComponentValidator=t.getBooleanValidator=t.getNumberArrayValidator=t.getFunctionValidator=t.getStringOrGradientValidator=t.getStringValidator=t.getNumberOrAutoValidator=t.getNumberOrArrayOfNumbersValidator=t.getNumberValidator=t.alphaComponent=t.RGBComponent=void 0;const r=n(2609),a=n(5532);function i(e){return a.Util._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)||a.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}t.RGBComponent=function(e){return e>255?255:e<0?0:Math.round(e)},t.alphaComponent=function(e){return e>1?1:e<1e-4?1e-4:e},t.getNumberValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isNumber(e)||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}},t.getNumberOrArrayOfNumbersValidator=function(e){if(r.Konva.isUnminified)return function(t,n){let r=a.Util._isNumber(t),o=a.Util._isArray(t)&&t.length==e;return r||o||a.Util.warn(i(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}},t.getNumberOrAutoValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isNumber(e)||"auto"===e||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}},t.getStringValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isString(e)||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}},t.getStringOrGradientValidator=function(){if(r.Konva.isUnminified)return function(e,t){const n=a.Util._isString(e),r="[object CanvasGradient]"===Object.prototype.toString.call(e)||e&&e.addColorStop;return n||r||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}},t.getFunctionValidator=function(){if(r.Konva.isUnminified)return function(e,t){return a.Util._isFunction(e)||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}},t.getNumberArrayValidator=function(){if(r.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(a.Util._isArray(e)?e.forEach((function(e){a.Util._isNumber(e)||a.Util.warn('"'+t+'" attribute has non numeric element '+e+". Make sure that all elements are numbers.")})):a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}},t.getBooleanValidator=function(){if(r.Konva.isUnminified)return function(e,t){return!0===e||!1===e||a.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}},t.getComponentValidator=function(e){if(r.Konva.isUnminified)return function(t,n){return void 0===t||null===t||a.Util.isObject(t)||a.Util.warn(i(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}},1933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const r=n(2609),a=n(5532),i=n(2302),o=n(1418),s=n(593),l=n(4097),c=n(231),u=n(7365),d=n(995),h=n(7177),f=n(5252),p=n(3914),g=n(1344),m=n(8771);t.Konva=a.Util._assign(r.Konva,{Util:a.Util,Transform:a.Transform,Node:i.Node,Container:o.Container,Stage:s.Stage,stages:s.stages,Layer:l.Layer,FastLayer:c.FastLayer,Group:u.Group,DD:d.DD,Shape:h.Shape,shapes:h.shapes,Animation:f.Animation,Tween:p.Tween,Easings:p.Easings,Context:g.Context,Canvas:m.Canvas}),t.default=t.Konva},4493:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const r=n(1933),a=n(8387),i=n(1632),o=n(5927),s=n(8266),l=n(8288),c=n(6517),u=n(2328),d=n(4510),h=n(8048),f=n(5233),p=n(6981),g=n(6947),m=n(9012),v=n(2805),y=n(82),b=n(9868),x=n(8201),w=n(5876),S=n(1141),k=n(8650),_=n(172),E=n(7044),C=n(8720),j=n(6991),N=n(9966),P=n(6828),O=n(2878),T=n(4823),L=n(370),A=n(3740),R=n(4543),M=n(7580),F=n(8698),I=n(8804),D=n(2231),z=n(1702);t.Konva=r.Konva.Util._assign(r.Konva,{Arc:a.Arc,Arrow:i.Arrow,Circle:o.Circle,Ellipse:s.Ellipse,Image:l.Image,Label:c.Label,Tag:c.Tag,Line:u.Line,Path:d.Path,Rect:h.Rect,RegularPolygon:f.RegularPolygon,Ring:p.Ring,Sprite:g.Sprite,Star:m.Star,Text:v.Text,TextPath:y.TextPath,Transformer:b.Transformer,Wedge:x.Wedge,Filters:{Blur:w.Blur,Brighten:S.Brighten,Contrast:k.Contrast,Emboss:_.Emboss,Enhance:E.Enhance,Grayscale:C.Grayscale,HSL:j.HSL,HSV:N.HSV,Invert:P.Invert,Kaleidoscope:O.Kaleidoscope,Mask:T.Mask,Noise:L.Noise,Pixelate:A.Pixelate,Posterize:R.Posterize,RGB:M.RGB,RGBA:F.RGBA,Sepia:I.Sepia,Solarize:D.Solarize,Threshold:z.Threshold}})},5876:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Blur=void 0;const r=n(9842),a=n(2302),i=n(6518);function o(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var s=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];t.Blur=function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,a,i,c,u,d,h,f,p,g,m,v,y,b,x,w,S,k,_,E,C,j,N,P=e.data,O=e.width,T=e.height,L=t+t+1,A=O-1,R=T-1,M=t+1,F=M*(M+1)/2,I=new o,D=null,z=I,B=null,U=null,H=s[t],G=l[t];for(a=1;a>G,0!==j?(j=255/j,P[u]=(h*H>>G)*j,P[u+1]=(f*H>>G)*j,P[u+2]=(p*H>>G)*j):P[u]=P[u+1]=P[u+2]=0,h-=m,f-=v,p-=y,g-=b,m-=B.r,v-=B.g,y-=B.b,b-=B.a,i=d+((i=n+t+1)>G,j>0?(j=255/j,P[i]=(h*H>>G)*j,P[i+1]=(f*H>>G)*j,P[i+2]=(p*H>>G)*j):P[i]=P[i+1]=P[i+2]=0,h-=m,f-=v,p-=y,g-=b,m-=B.r,v-=B.g,y-=B.b,b-=B.a,i=n+((i=r+M){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Brighten=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Brighten=function(e){var t,n=255*this.brightness(),r=e.data,a=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contrast=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Contrast=function(e){var t,n=Math.pow((this.contrast()+100)/100,2),r=e.data,a=r.length,i=150,o=150,s=150;for(t=0;t255?255:i,o=(o*=255)<0?0:o>255?255:o,s=(s*=255)<0?0:s>255?255:s,r[t]=i,r[t+1]=o,r[t+2]=s},r.Factory.addGetterSetter(a.Node,"contrast",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter)},172:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emboss=void 0;const r=n(9842),a=n(2302),i=n(5532),o=n(6518);t.Emboss=function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),a=this.embossBlend(),o=0,s=0,l=e.data,c=e.width,u=e.height,d=4*c,h=u;switch(r){case"top-left":o=-1,s=-1;break;case"top":o=-1,s=0;break;case"top-right":o=-1,s=1;break;case"right":o=0,s=1;break;case"bottom-right":o=1,s=1;break;case"bottom":o=1,s=0;break;case"bottom-left":o=1,s=-1;break;case"left":o=0,s=-1;break;default:i.Util.error("Unknown emboss direction: "+r)}do{var f=(h-1)*d,p=o;h+p<1&&(p=0),h+p>u&&(p=0);var g=(h-1+p)*c*4,m=c;do{var v=f+4*(m-1),y=s;m+y<1&&(y=0),m+y>c&&(y=0);var b=g+4*(m-1+y),x=l[v]-l[b],w=l[v+1]-l[b+1],S=l[v+2]-l[b+2],k=x,_=k>0?k:-k;if((w>0?w:-w)>_&&(k=w),(S>0?S:-S)>_&&(k=S),k*=t,a){var E=l[v]+k,C=l[v+1]+k,j=l[v+2]+k;l[v]=E>255?255:E<0?0:E,l[v+1]=C>255?255:C<0?0:C,l[v+2]=j>255?255:j<0?0:j}else{var N=n-k;N<0?N=0:N>255&&(N=255),l[v]=l[v+1]=l[v+2]=N}}while(--m)}while(--h)},r.Factory.addGetterSetter(a.Node,"embossStrength",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossWhiteLevel",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)},7044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Enhance=void 0;const r=n(9842),a=n(2302),i=n(6518);function o(e,t,n,r,a){var i=n-t,o=a-r;return 0===i?r+o/2:0===o?r:o*((e-t)/i)+r}t.Enhance=function(e){var t,n,r,a,i=e.data,s=i.length,l=i[0],c=l,u=i[1],d=u,h=i[2],f=h,p=this.enhance();if(0!==p){for(a=0;ac&&(c=t),(n=i[a+1])d&&(d=n),(r=i[a+2])f&&(f=r);var g,m,v,y,b,x,w,S,k;for(c===l&&(c=255,l=0),d===u&&(d=255,u=0),f===h&&(f=255,h=0),p>0?(m=c+p*(255-c),v=l-p*(l-0),b=d+p*(255-d),x=u-p*(u-0),S=f+p*(255-f),k=h-p*(h-0)):(m=c+p*(c-(g=.5*(c+l))),v=l+p*(l-g),b=d+p*(d-(y=.5*(d+u))),x=u+p*(u-y),S=f+p*(f-(w=.5*(f+h))),k=h+p*(h-w)),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Grayscale=void 0;t.Grayscale=function(e){var t,n,r=e.data,a=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HSL=void 0;const r=n(9842),a=n(2302),i=n(6518);r.Factory.addGetterSetter(a.Node,"hue",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"saturation",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"luminance",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter);t.HSL=function(e){var t,n,r,a,i,o=e.data,s=o.length,l=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,u=127*this.luminance(),d=1*l*Math.cos(c*Math.PI/180),h=1*l*Math.sin(c*Math.PI/180),f=.299+.701*d+.167*h,p=.587-.587*d+.33*h,g=.114-.114*d-.497*h,m=.299-.299*d-.328*h,v=.587+.413*d+.035*h,y=.114-.114*d+.293*h,b=.299-.3*d+1.25*h,x=.587-.586*d-1.05*h,w=.114+.886*d-.2*h;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HSV=void 0;const r=n(9842),a=n(2302),i=n(6518);t.HSV=function(e){var t,n,r,a,i,o=e.data,s=o.length,l=Math.pow(2,this.value()),c=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,d=l*c*Math.cos(u*Math.PI/180),h=l*c*Math.sin(u*Math.PI/180),f=.299*l+.701*d+.167*h,p=.587*l-.587*d+.33*h,g=.114*l-.114*d-.497*h,m=.299*l-.299*d-.328*h,v=.587*l+.413*d+.035*h,y=.114*l-.114*d+.293*h,b=.299*l-.3*d+1.25*h,x=.587*l-.586*d-1.05*h,w=.114*l+.886*d-.2*h;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Invert=void 0;t.Invert=function(e){var t,n=e.data,r=n.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kaleidoscope=void 0;const r=n(9842),a=n(2302),i=n(5532),o=n(6518);t.Kaleidoscope=function(e){var t,n,r,a,o,s,l,c,u,d=e.width,h=e.height,f=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),g=Math.floor(d*(p%360)/360);if(!(f<1)){var m=i.Util.createCanvasElement();m.width=d,m.height=h;var v=m.getContext("2d").getImageData(0,0,d,h);i.Util.releaseCanvas(m),function(e,t,n){var r,a,i,o,s=e.data,l=t.data,c=e.width,u=e.height,d=n.polarCenterX||c/2,h=n.polarCenterY||u/2,f=0,p=0,g=0,m=0,v=Math.sqrt(d*d+h*h);a=c-d,i=u-h,v=(o=Math.sqrt(a*a+i*i))>v?o:v;var y,b,x,w,S=u,k=c,_=360/k*Math.PI/180;for(b=0;bd&&(x=b,w=0,S=-1),n=0;nb?l:b;var x,w,S,k=h,_=d,E=n.polarRotation||0;for(a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mask=void 0;const r=n(9842),a=n(2302),i=n(6518);function o(e,t,n){var r=4*(n*e.width+t),a=[];return a.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),a}function s(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}t.Mask=function(e){var t=function(e,t){var n=o(e,0,0),r=o(e,e.width-1,0),a=o(e,0,e.height-1),i=o(e,e.width-1,e.height-1),l=t||10;if(s(n,r)=0&&f=0&&p=0&&f=0&&p=1020?255:0}return o}(t=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],a=Math.round(Math.sqrt(r.length)),i=Math.floor(a/2),o=[],s=0;s=0&&f=0&&p{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Noise=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Noise=function(e){var t,n=255*this.noise(),r=e.data,a=r.length,i=n/2;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Pixelate=void 0;const r=n(9842),a=n(5532),i=n(2302),o=n(6518);t.Pixelate=function(e){var t,n,r,i,o,s,l,c,u,d,h,f,p,g,m=Math.ceil(this.pixelSize()),v=e.width,y=e.height,b=Math.ceil(v/m),x=Math.ceil(y/m),w=e.data;if(m<=0)a.Util.error("pixelSize value can not be <= 0");else for(f=0;f=v))for(n=d;n=y||(i+=w[(r=4*(v*n+t))+0],o+=w[r+1],s+=w[r+2],l+=w[r+3],g+=1);for(i/=g,o/=g,s/=g,l/=g,t=c;t=v))for(n=d;n=y||(w[(r=4*(v*n+t))+0]=i,w[r+1]=o,w[r+2]=s,w[r+3]=l)}},r.Factory.addGetterSetter(i.Node,"pixelSize",8,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},4543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Posterize=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Posterize=function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,a=r.length,i=255/n;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RGB=void 0;const r=n(9842),a=n(2302),i=n(6518);t.RGB=function(e){var t,n,r=e.data,a=r.length,i=this.red(),o=this.green(),s=this.blue();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"blue",0,i.RGBComponent,r.Factory.afterSetFilter)},8698:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RGBA=void 0;const r=n(9842),a=n(2302),i=n(6518);t.RGBA=function(e){var t,n,r=e.data,a=r.length,i=this.red(),o=this.green(),s=this.blue(),l=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(a.Node,"blue",0,i.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(a.Node,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}))},8804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sepia=void 0;t.Sepia=function(e){var t,n,r,a,i=e.data,o=i.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Solarize=void 0;t.Solarize=function(e){var t=e.data,n=e.width,r=4*n,a=e.height;do{var i=(a-1)*r,o=n;do{var s=i+4*(o-1),l=t[s],c=t[s+1],u=t[s+2];l>127&&(l=255-l),c>127&&(c=255-c),u>127&&(u=255-u),t[s]=l,t[s+1]=c,t[s+2]=u}while(--o)}while(--a)}},1702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Threshold=void 0;const r=n(9842),a=n(2302),i=n(6518);t.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,a=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4493);e.exports=r.Konva},8387:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arc=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(6518),s=n(2609);class l extends a.Shape{_sceneFunc(e){var t=i.Konva.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=i.Konva.getAngle(n?360-this.angle():this.angle()),a=Math.cos(Math.min(r,Math.PI)),o=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),s=Math.sin(Math.min(r,Math.PI/2)),l=a*(a>0?e:t),c=o*(o>0?e:t),u=s*(s>0?t:e);return{x:l,y:n?-1*u:c,width:1*t-l,height:u-c}}}t.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1,(0,o.getBooleanValidator)())},1632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=void 0;const r=n(9842),a=n(2328),i=n(6518),o=n(2609),s=n(4510);class l extends a.Line{_sceneFunc(e){super._sceneFunc(e);var t=2*Math.PI,n=this.points(),r=n,a=0!==this.tension()&&n.length>4;a&&(r=this.getTensionPoints());var i,o,l=this.pointerLength(),c=n.length;if(a){const e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[c-2],n[c-1]],t=s.Path.calcLength(r[r.length-4],r[r.length-3],"C",e),a=s.Path.getPointOnQuadraticBezier(Math.min(1,1-l/t),e[0],e[1],e[2],e[3],e[4],e[5]);i=n[c-2]-a.x,o=n[c-1]-a.y}else i=n[c-2]-n[c-4],o=n[c-1]-n[c-3];var u=(Math.atan2(o,i)+t)%t,d=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[c-2],n[c-1]),e.rotate(u),e.moveTo(0,0),e.lineTo(-l,d/2),e.lineTo(-l,-d/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),a?(i=(r[0]+r[2])/2-n[0],o=(r[1]+r[3])/2-n[1]):(i=n[2]-n[0],o=n[3]-n[1]),e.rotate((Math.atan2(-o,-i)+t)%t),e.moveTo(0,0),e.lineTo(-l,d/2),e.lineTo(-l,-d/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}}t.Arrow=l,l.prototype.className="Arrow",(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"pointerLength",10,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerWidth",10,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerAtBeginning",!1),r.Factory.addGetterSetter(l,"pointerAtEnding",!0)},5927:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Circle=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}t.Circle=s,s.prototype._centroid=!0,s.prototype.className="Circle",s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,i.getNumberValidator)())},8266:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipse=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}t.Ellipse=s,s.prototype.className="Ellipse",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o._registerNode)(s),r.Factory.addComponentsGetterSetter(s,"radius",["x","y"]),r.Factory.addGetterSetter(s,"radiusX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"radiusY",0,(0,i.getNumberValidator)())},8288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;const r=n(5532),a=n(9842),i=n(7177),o=n(2609),s=n(6518);class l extends i.Shape{constructor(e){super(e),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&4===e.readyState||e&&e.addEventListener&&e.addEventListener("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const t=this.getWidth(),n=this.getHeight(),a=this.cornerRadius(),i=this.attrs.image;let o;if(i){const e=this.attrs.cropWidth,r=this.attrs.cropHeight;o=e&&r?[i,this.cropX(),this.cropY(),e,r,0,0,t,n]:[i,0,0,t,n]}(this.hasFill()||this.hasStroke()||a)&&(e.beginPath(),a?r.Util.drawRoundedRectPath(e,t,n,a):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),i&&(a&&e.clip(),e.drawImage.apply(e,o))}_hitFunc(e){var t=this.width(),n=this.height(),a=this.cornerRadius();e.beginPath(),a?r.Util.drawRoundedRectPath(e,t,n,a):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,t;return null!==(e=this.attrs.width)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.width}getHeight(){var e,t;return null!==(e=this.attrs.height)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.height}static fromURL(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var a=r.Util.createImageElement();a.onload=function(){var e=new l({image:a});t(e)},a.onerror=n,a.crossOrigin="Anonymous",a.src=e}}t.Image=l,l.prototype.className="Image",(0,o._registerNode)(l),a.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4)),a.Factory.addGetterSetter(l,"image"),a.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),a.Factory.addGetterSetter(l,"cropX",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(l,"cropY",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(l,"cropWidth",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(l,"cropHeight",0,(0,s.getNumberValidator)())},6517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=t.Label=void 0;const r=n(9842),a=n(7177),i=n(7365),o=n(6518),s=n(2609);var l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],c="up",u="right",d="down",h="left",f=l.length;class p extends i.Group{constructor(e){super(e),this.on("add.konva",(function(e){this._addListeners(e.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t,n=this,r=function(){n._sync()};for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Line=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);function s(e,t,n,r,a,i,o){var s=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),l=Math.sqrt(Math.pow(a-n,2)+Math.pow(i-r,2)),c=o*s/(s+l),u=o*l/(s+l);return[n-c*(a-e),r-c*(i-t),n+u*(a-e),r+u*(i-t)]}function l(e,t){var n,r,a=e.length,i=[];for(n=2;n4){for(n=(t=this.getTensionPoints()).length,r=s?0:4,s||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Path=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(7588);class s extends a.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute()}))}_readDataAttribute(){this.dataArray=s.parsePathData(this.data()),this.pathLength=s.getPathLength(this.dataArray)}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;rc?l:c,g=l>c?1:l/c,m=l>c?c/l:1;e.translate(o,s),e.rotate(h),e.scale(g,m),e.arc(0,0,p,u,u+d,1-f),e.scale(1/g,1/m),e.rotate(-h),e.translate(-o,-s);break;case"z":n=!0,e.closePath()}}n||this.hasFill()?e.fillStrokeShape(this):e.strokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach((function(t){if("A"===t.command){var n=t.points[4],r=t.points[5],a=t.points[4]+r,i=Math.PI/180;if(Math.abs(n-a)a;r-=i){const n=s.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);e.push(n.x,n.y)}else for(let r=n+i;rt[r].pathLength;)e-=t[r].pathLength,++r;if(r===a)return{x:(n=t[r-1].points.slice(-2))[0],y:n[1]};if(e<.01)return{x:(n=t[r].points.slice(0,2))[0],y:n[1]};var i=t[r],l=i.points;switch(i.command){case"L":return s.getPointOnLine(e,i.start.x,i.start.y,l[0],l[1]);case"C":return s.getPointOnCubicBezier((0,o.t2length)(e,s.getPathLength(t),(e=>(0,o.getCubicArcLength)([i.start.x,l[0],l[2],l[4]],[i.start.y,l[1],l[3],l[5]],e))),i.start.x,i.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case"Q":return s.getPointOnQuadraticBezier((0,o.t2length)(e,s.getPathLength(t),(e=>(0,o.getQuadraticArcLength)([i.start.x,l[0],l[2]],[i.start.y,l[1],l[3]],e))),i.start.x,i.start.y,l[0],l[1],l[2],l[3]);case"A":var c=l[0],u=l[1],d=l[2],h=l[3],f=l[4],p=l[5],g=l[6];return f+=p*e/i.pathLength,s.getPointOnEllipticalArc(c,u,d,h,f,g)}return null}static getPointOnLine(e,t,n,r,a,i,o){void 0===i&&(i=t),void 0===o&&(o=n);var s=(a-n)/(r-t+1e-8),l=Math.sqrt(e*e/(1+s*s));r0&&!isNaN(f[0]);){var v,y,b,x,w,S,k,_,E,C,j="",N=[],P=l,O=c;switch(h){case"l":l+=f.shift(),c+=f.shift(),j="L",N.push(l,c);break;case"L":l=f.shift(),c=f.shift(),N.push(l,c);break;case"m":var T=f.shift(),L=f.shift();if(l+=T,c+=L,j="M",o.length>2&&"z"===o[o.length-1].command)for(var A=o.length-2;A>=0;A--)if("M"===o[A].command){l=o[A].points[0]+T,c=o[A].points[1]+L;break}N.push(l,c),h="l";break;case"M":l=f.shift(),c=f.shift(),j="M",N.push(l,c),h="L";break;case"h":l+=f.shift(),j="L",N.push(l,c);break;case"H":l=f.shift(),j="L",N.push(l,c);break;case"v":c+=f.shift(),j="L",N.push(l,c);break;case"V":c=f.shift(),j="L",N.push(l,c);break;case"C":N.push(f.shift(),f.shift(),f.shift(),f.shift()),l=f.shift(),c=f.shift(),N.push(l,c);break;case"c":N.push(l+f.shift(),c+f.shift(),l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),j="C",N.push(l,c);break;case"S":y=l,b=c,"C"===(v=o[o.length-1]).command&&(y=l+(l-v.points[2]),b=c+(c-v.points[3])),N.push(y,b,f.shift(),f.shift()),l=f.shift(),c=f.shift(),j="C",N.push(l,c);break;case"s":y=l,b=c,"C"===(v=o[o.length-1]).command&&(y=l+(l-v.points[2]),b=c+(c-v.points[3])),N.push(y,b,l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),j="C",N.push(l,c);break;case"Q":N.push(f.shift(),f.shift()),l=f.shift(),c=f.shift(),N.push(l,c);break;case"q":N.push(l+f.shift(),c+f.shift()),l+=f.shift(),c+=f.shift(),j="Q",N.push(l,c);break;case"T":y=l,b=c,"Q"===(v=o[o.length-1]).command&&(y=l+(l-v.points[0]),b=c+(c-v.points[1])),l=f.shift(),c=f.shift(),j="Q",N.push(y,b,l,c);break;case"t":y=l,b=c,"Q"===(v=o[o.length-1]).command&&(y=l+(l-v.points[0]),b=c+(c-v.points[1])),l+=f.shift(),c+=f.shift(),j="Q",N.push(y,b,l,c);break;case"A":x=f.shift(),w=f.shift(),S=f.shift(),k=f.shift(),_=f.shift(),E=l,C=c,l=f.shift(),c=f.shift(),j="A",N=this.convertEndpointToCenterParameterization(E,C,l,c,k,_,x,w,S);break;case"a":x=f.shift(),w=f.shift(),S=f.shift(),k=f.shift(),_=f.shift(),E=l,C=c,l+=f.shift(),c+=f.shift(),j="A",N=this.convertEndpointToCenterParameterization(E,C,l,c,k,_,x,w,S)}o.push({command:j||h,points:N,start:{x:P,y:O},pathLength:this.calcLength(P,O,j||h,N)})}"z"!==h&&"Z"!==h||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(e,t,n,r){var a,i,l,c,u=s;switch(n){case"L":return u.getLineLength(e,t,r[0],r[1]);case"C":return(0,o.getCubicArcLength)([e,r[0],r[2],r[4]],[t,r[1],r[3],r[5]],1);case"Q":return(0,o.getQuadraticArcLength)([e,r[0],r[2]],[t,r[1],r[3]],1);case"A":a=0;var d=r[4],h=r[5],f=r[4]+h,p=Math.PI/180;if(Math.abs(d-f)f;c-=p)l=u.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),a+=u.getLineLength(i.x,i.y,l.x,l.y),i=l;else for(c=d+p;c1&&(o*=Math.sqrt(h),s*=Math.sqrt(h));var f=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));a===i&&(f*=-1),isNaN(f)&&(f=0);var p=f*o*d/s,g=f*-s*u/o,m=(e+n)/2+Math.cos(c)*p-Math.sin(c)*g,v=(t+r)/2+Math.sin(c)*p+Math.cos(c)*g,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},x=function(e,t){return(e[0]*t[1]=1&&(_=0),0===i&&_>0&&(_-=2*Math.PI),1===i&&_<0&&(_+=2*Math.PI),[m,v,o,s,w,_,c,i]}}t.Path=s,s.prototype.className="Path",s.prototype._attrsAffectingSize=["data"],(0,i._registerNode)(s),r.Factory.addGetterSetter(s,"data")},8048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rect=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(5532),s=n(6518);class l extends a.Shape{_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();e.beginPath(),t?o.Util.drawRoundedRectPath(e,n,r,t):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}}t.Rect=l,l.prototype.className="Rect",(0,i._registerNode)(l),r.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4))},5233:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegularPolygon=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){const t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),a=Math.max(a,e.y)})),{x:t,y:r,width:n-t,height:a-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}t.RegularPolygon=s,s.prototype.className="RegularPolygon",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"sides",0,(0,i.getNumberValidator)())},6981:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ring=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);var s=2*Math.PI;class l extends a.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,s,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),s,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,i.getNumberValidator)())},6947:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sprite=void 0;const r=n(9842),a=n(7177),i=n(5252),o=n(6518),s=n(2609);class l extends a.Shape{constructor(e){super(e),this._updated=!0,this.anim=new i.Animation((()=>{var e=this._updated;return this._updated=!1,e})),this.on("animationChange.konva",(function(){this.frameIndex(0)})),this.on("frameIndexChange.konva",(function(){this._updated=!0})),this.on("frameRateChange.konva",(function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())}))}_sceneFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,a=this.animations()[t],i=this.frameOffsets(),o=a[r+0],s=a[r+1],l=a[r+2],c=a[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,l,c),e.closePath(),e.fillStrokeShape(this)),u)if(i){var d=i[t],h=2*n;e.drawImage(u,o,s,l,c,d[h+0],d[h+1],l,c)}else e.drawImage(u,o,s,l,c,0,0,l,c)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,a=this.animations()[t],i=this.frameOffsets(),o=a[r+2],s=a[r+3];if(e.beginPath(),i){var l=i[t],c=2*n;e.rect(l[c+0],l[c+1],o,s)}else e.rect(0,0,o,s);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval((function(){e._updateIndex()}),1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Star=void 0;const r=n(9842),a=n(7177),i=n(6518),o=n(2609);class s extends a.Shape{_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var a=1;a<2*r;a++){var i=a%2===0?n:t,o=i*Math.sin(a*Math.PI/r),s=-1*i*Math.cos(a*Math.PI/r);e.lineTo(o,s)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t.Star=s,s.prototype.className="Star",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"numPoints",5,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"innerRadius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"outerRadius",0,(0,i.getNumberValidator)())},2805:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Text=t.stringToArray=void 0;const r=n(5532),a=n(9842),i=n(7177),o=n(2609),s=n(6518),l=n(2609);function c(e){return Array.from(e)}t.stringToArray=c;var u,d="auto",h="inherit",f="justify",p="left",g="middle",m="normal",v=" ",y="none",b=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],x=b.length;function w(){return u||(u=r.Util.createCanvasElement().getContext("2d"))}class S extends i.Shape{constructor(e){super(function(e){return(e=e||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e}(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t1&&(k+=s)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=r.Util._isString(e)?e:null===e||void 0===e?"":e+"";return this._setAttr("text",t),this}getWidth(){return this.attrs.width===d||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===d||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t,n=w(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{actualBoundingBoxAscent:t.actualBoundingBoxAscent,actualBoundingBoxDescent:t.actualBoundingBoxDescent,actualBoundingBoxLeft:t.actualBoundingBoxLeft,actualBoundingBoxRight:t.actualBoundingBoxRight,alphabeticBaseline:t.alphabeticBaseline,emHeightAscent:t.emHeightAscent,emHeightDescent:t.emHeightDescent,fontBoundingBoxAscent:t.fontBoundingBoxAscent,fontBoundingBoxDescent:t.fontBoundingBoxDescent,hangingBaseline:t.hangingBaseline,ideographicBaseline:t.ideographicBaseline,width:t.width,height:r}}_getContextFont(){return this.fontStyle()+v+this.fontVariant()+v+(this.fontSize()+"px ")+this.fontFamily().split(",").map((e=>{const t=(e=e.trim()).indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return t&&!n&&(e='"'.concat(e,'"')),e})).join(", ")}_addTextLine(e){this.align()===f&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return w().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split("\n"),t=+this.fontSize(),n=0,r=this.lineHeight()*t,a=this.attrs.width,i=this.attrs.height,o=a!==d&&void 0!==a,s=i!==d&&void 0!==i,l=this.padding(),c=a-2*l,u=i-2*l,h=0,f=this.wrap(),p="char"!==f&&f!==y,g=this.ellipsis();this.textArr=[],w().font=this._getContextFont();for(var m=g?this._getTextWidth("\u2026"):0,b=0,x=e.length;bc)for(;S.length>0;){for(var _=0,E=S.length,C="",j=0;_>>1,P=S.slice(0,N+1),O=this._getTextWidth(P)+m;O<=c?(_=N+1,C=P,j=O):E=N}if(!C)break;if(p){var T,L=S[C.length];(T=(L===v||"-"===L)&&j<=c?C.length:Math.max(C.lastIndexOf(v),C.lastIndexOf("-"))+1)>0&&(_=T,C=C.slice(0,_),j=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,j),h+=r,this._shouldHandleEllipsis(h)){this._tryToAddEllipsisToLastLine();break}if((S=(S=S.slice(_)).trimLeft()).length>0&&(k=this._getTextWidth(S))<=c){this._addTextLine(S),h+=r,n=Math.max(n,k);break}}else this._addTextLine(S),h+=r,n=Math.max(n,k),this._shouldHandleEllipsis(h)&&bu)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,a=r!==d&&void 0!==r,i=r-2*this.padding();return!(this.wrap()!==y)||a&&e+n>i}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==d&&void 0!==e,n=e-2*this.padding(),r=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(a&&r){if(t)this._getTextWidth(a.text+"\u2026"){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextPath=void 0;const r=n(5532),a=n(9842),i=n(7177),o=n(4510),s=n(2805),l=n(6518),c=n(2609);var u="normal";function d(e){e.fillText(this.partialText,0,0)}function h(e){e.strokeText(this.partialText,0,0)}class f extends i.Shape{constructor(e){super(e),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute(),this._setTextData()})),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return o.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;return e-1>this.pathLength?null:o.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=o.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),a=this.glyphInfo;"underline"===t&&e.beginPath();for(var i=0;i=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transformer=void 0;const r=n(5532),a=n(9842),i=n(2302),o=n(7177),s=n(8048),l=n(7365),c=n(2609),u=n(6518),d=n(2609);var h="tr-konva",f=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map((e=>e+".".concat(h))).join(" "),p="nodesRect",g=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],m={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const v="ontouchstart"in c.Konva._global;var y=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function b(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),a=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:a}}function x(e,t){const n=function(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}(e);return b(e,t,n)}let w=0;class S extends l.Group{constructor(e){super(e),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(f,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return h+this._id}setNodes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._nodes&&this._nodes.length&&this.detach();const t=e.filter((e=>!e.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1)));return this._nodes=e=t,1===e.length&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((e=>{const t=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=e._attrsAffectingSize.map((e=>e+"Change."+this._getEventNamespace())).join(" ");e.on(n,t),e.on(g.map((e=>e+".".concat(this._getEventNamespace()))).join(" "),t),e.on("absoluteTransformChange.".concat(this._getEventNamespace()),t),this._proxyDrag(e)})),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let t;e.on("dragstart.".concat(this._getEventNamespace()),(n=>{t=e.getAbsolutePosition(),this.isDragging()||e===this.findOne(".back")||this.startDrag(n,!1)})),e.on("dragmove.".concat(this._getEventNamespace()),(n=>{if(!t)return;const r=e.getAbsolutePosition(),a=r.x-t.x,i=r.y-t.y;this.nodes().forEach((t=>{if(t===e)return;if(t.isDragging())return;const r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+a,y:r.y+i}),t.startDrag(n)})),t=null}))}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach((e=>{e.off("."+this._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(p),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(p,this.__getNodeRect)}__getNodeShape(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rotation(),n=arguments.length>2?arguments[2]:void 0;var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),o=r.x*a.x-e.offsetX()*a.x,s=r.y*a.y-e.offsetY()*a.y;const l=(c.Konva.getAngle(e.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return b({x:i.x+o*Math.cos(l)+s*Math.sin(-l),y:i.y+s*Math.cos(l)+o*Math.sin(l),width:r.width*a.x,height:r.height*a.y,rotation:l},-c.Konva.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],a=t.getAbsoluteTransform();r.forEach((function(t){var n=a.point(t);e.push(n)}))}));const t=new r.Transform;t.rotate(-c.Konva.getAngle(this.rotation()));var n=1/0,a=1/0,i=-1/0,o=-1/0;e.forEach((function(e){var r=t.point(e);void 0===n&&(n=i=r.x,a=o=r.y),n=Math.min(n,r.x),a=Math.min(a,r.y),i=Math.max(i,r.x),o=Math.max(o,r.y)})),t.invert();const s=t.point({x:n,y:a});return{x:s.x,y:s.y,width:i-n,height:o-a,rotation:c.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),y.forEach((e=>{this._createAnchor(e)})),this._createAnchor("rotater")}_createAnchor(e){var t=new s.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:v?10:"auto"}),n=this;t.on("mousedown touchstart",(function(e){n._handleMouseDown(e)})),t.on("dragstart",(e=>{t.stopDrag(),e.cancelBubble=!0})),t.on("dragend",(e=>{e.cancelBubble=!0})),t.on("mouseenter",(()=>{var n=c.Konva.getAngle(this.rotation()),a=this.rotateAnchorCursor(),i=function(e,t,n){if("rotater"===e)return n;t+=r.Util.degToRad(m[e]||0);var a=(r.Util.radToDeg(t)%360+360)%360;return r.Util._inRange(a,337.5,360)||r.Util._inRange(a,0,22.5)?"ns-resize":r.Util._inRange(a,22.5,67.5)?"nesw-resize":r.Util._inRange(a,67.5,112.5)?"ew-resize":r.Util._inRange(a,112.5,157.5)?"nwse-resize":r.Util._inRange(a,157.5,202.5)?"ns-resize":r.Util._inRange(a,202.5,247.5)?"nesw-resize":r.Util._inRange(a,247.5,292.5)?"ew-resize":r.Util._inRange(a,292.5,337.5)?"nwse-resize":(r.Util.error("Transformer has unknown angle for cursor detection: "+a),"pointer")}(e,n,a);t.getStage().content&&(t.getStage().content.style.cursor=i),this._cursorChange=!0})),t.on("mouseout",(()=>{t.getStage().content&&(t.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(t)}_createBack(){var e=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e,t){var n=t.getParent(),a=n.padding();e.beginPath(),e.rect(-a,-a,t.width()+2*a,t.height()+2*a),e.moveTo(t.width()/2,-a),n.rotateEnabled()&&n.rotateLineVisible()&&e.lineTo(t.width()/2,-n.rotateAnchorOffset()*r.Util._sign(t.height())-a),e.fillStrokeShape(t)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+2*n,t.height()+2*n),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",(e=>{e.cancelBubble=!0})),e.on("dragmove",(e=>{e.cancelBubble=!0})),e.on("dragend",(e=>{e.cancelBubble=!0})),this.on("dragmove",(e=>{this.update()}))}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,a=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/a),this.cos=Math.abs(n/a),"undefined"!==typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var i=e.target.getAbsolutePosition(),o=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-i.x,y:o.y-i.y},w++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e.evt,target:t})}))}_handleMouseMove(e){var t,n,r,a=this.findOne("."+this._movingAnchorName),i=a.getStage();i.setPointersPositions(e);const o=i.getPointerPosition();let s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const l=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(l,s,e)),a.setAbsolutePosition(s);const u=a.getAbsolutePosition();if(l.x!==u.x||l.y!==u.y)if("rotater"!==this._movingAnchorName){var d,h=this.shiftBehavior();d="inverted"===h?this.keepRatio()&&!e.shiftKey:"none"===h?this.keepRatio():this.keepRatio()||e.shiftKey;var f=this.centeredScaling()||e.altKey;if("top-left"===this._movingAnchorName){if(d){var p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(p.x-a.x(),2)+Math.pow(p.y-a.y(),2));var g=this.findOne(".top-left").x()>p.x?-1:1,m=this.findOne(".top-left").y()>p.y?-1:1;t=r*this.cos*g,n=r*this.sin*m,this.findOne(".top-left").x(p.x-t),this.findOne(".top-left").y(p.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(a.y());else if("top-right"===this._movingAnchorName){if(d){p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(a.x()-p.x,2)+Math.pow(p.y-a.y(),2));g=this.findOne(".top-right").x()p.y?-1:1;t=r*this.cos*g,n=r*this.sin*m,this.findOne(".top-right").x(p.x+t),this.findOne(".top-right").y(p.y-n)}var v=a.position();this.findOne(".top-left").y(v.y),this.findOne(".bottom-right").x(v.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(a.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(a.x());else if("bottom-left"===this._movingAnchorName){if(d){p=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(p.x-a.x(),2)+Math.pow(a.y()-p.y,2));g=p.x{var n;t._fire("transformend",{evt:e,target:t}),null===(n=t.getLayer())||void 0===n||n.batchDraw()})),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(r.Util._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(r.Util._inRange(e.height,2*-this.padding()-1,1))return void this.update();var a=new r.Transform;if(a.rotate(c.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=a.point({x:2*-this.padding(),y:0});e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=a.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=a.point({x:0,y:2*-this.padding()});e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=a.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding()}if(this.boundBoxFunc()){const t=this.boundBoxFunc()(n,e);t?e=t:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const i=1e7,o=new r.Transform;o.translate(n.x,n.y),o.rotate(n.rotation),o.scale(n.width/i,n.height/i);const s=new r.Transform,l=e.width/i,u=e.height/i;!1===this.flipEnabled()?(s.translate(e.x,e.y),s.rotate(e.rotation),s.translate(e.width<0?e.width:0,e.height<0?e.height:0),s.scale(Math.abs(l),Math.abs(u))):(s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(l,u));const d=s.multiply(o.invert());this._nodes.forEach((e=>{var t;const n=e.getParent().getAbsoluteTransform(),a=e.getTransform().copy();a.translate(e.offsetX(),e.offsetY());const i=new r.Transform;i.multiply(n.copy().invert()).multiply(d).multiply(n).multiply(a);const o=i.decompose();e.setAttrs(o),null===(t=e.getLayer())||void 0===t||t.batchDraw()})),this.rotation(r.Util._getRotation(e.rotation)),this._nodes.forEach((e=>{this._fire("transform",{evt:t,target:e}),e._fire("transform",{evt:t,target:e})})),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(r.Util._getRotation(t.rotation));var n=t.width,a=t.height,i=this.enabledAnchors(),o=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();const c=this.find("._anchor");c.forEach((e=>{e.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:o&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+s,visible:o&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:o&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:a/2,offsetX:l/2+s,visible:o&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:a/2,offsetX:l/2-s,visible:o&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:a,offsetX:l/2+s,offsetY:l/2-s,visible:o&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:a,offsetY:l/2-s,visible:o&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:a,offsetX:l/2-s,offsetY:l/2-s,visible:o&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*r.Util._sign(a)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:a,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const u=this.anchorStyleFunc();u&&c.forEach((e=>{u(e)})),null===(e=this.getLayer())||void 0===e||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return i.Node.prototype.toObject.call(this)}clone(e){return i.Node.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}t.Transformer=S,S.isTransforming=()=>w>0,S.prototype.className="Transformer",(0,d._registerNode)(S),a.Factory.addGetterSetter(S,"enabledAnchors",y,(function(e){return e instanceof Array||r.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===y.indexOf(e)&&r.Util.warn("Unknown anchor name: "+e+". Available names are: "+y.join(", "))})),e||[]})),a.Factory.addGetterSetter(S,"flipEnabled",!0,(0,u.getBooleanValidator)()),a.Factory.addGetterSetter(S,"resizeEnabled",!0),a.Factory.addGetterSetter(S,"anchorSize",10,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"rotateEnabled",!0),a.Factory.addGetterSetter(S,"rotateLineVisible",!0),a.Factory.addGetterSetter(S,"rotationSnaps",[]),a.Factory.addGetterSetter(S,"rotateAnchorOffset",50,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"rotateAnchorCursor","crosshair"),a.Factory.addGetterSetter(S,"rotationSnapTolerance",5,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderEnabled",!0),a.Factory.addGetterSetter(S,"anchorStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(S,"anchorStrokeWidth",1,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"anchorFill","white"),a.Factory.addGetterSetter(S,"anchorCornerRadius",0,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderStroke","rgb(0, 161, 255)"),a.Factory.addGetterSetter(S,"borderStrokeWidth",1,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"borderDash"),a.Factory.addGetterSetter(S,"keepRatio",!0),a.Factory.addGetterSetter(S,"shiftBehavior","default"),a.Factory.addGetterSetter(S,"centeredScaling",!1),a.Factory.addGetterSetter(S,"ignoreStroke",!1),a.Factory.addGetterSetter(S,"padding",0,(0,u.getNumberValidator)()),a.Factory.addGetterSetter(S,"node"),a.Factory.addGetterSetter(S,"nodes"),a.Factory.addGetterSetter(S,"boundBoxFunc"),a.Factory.addGetterSetter(S,"anchorDragBoundFunc"),a.Factory.addGetterSetter(S,"anchorStyleFunc"),a.Factory.addGetterSetter(S,"shouldOverdrawWholeArea",!1),a.Factory.addGetterSetter(S,"useSingleNodeRotation",!0),a.Factory.backCompat(S,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})},8201:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wedge=void 0;const r=n(9842),a=n(7177),i=n(2609),o=n(6518),s=n(2609);class l extends a.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,i.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}t.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"radius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1),r.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},1725:(e,t,n)=>{var r=n(781)(n(7289),"DataView");e.exports=r},9748:(e,t,n)=>{var r=n(6545),a=n(9843),i=n(6266),o=n(7364),s=n(4156);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(329),a=n(9666),i=n(2523),o=n(4397),s=n(3316);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(781)(n(7289),"Map");e.exports=r},3109:(e,t,n)=>{var r=n(9e3),a=n(7240),i=n(3414),o=n(7140),s=n(5429);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(781)(n(7289),"Promise");e.exports=r},4199:(e,t,n)=>{var r=n(781)(n(7289),"Set");e.exports=r},4526:(e,t,n)=>{var r=n(3109),a=n(5845),i=n(5544);function o(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(5745),a=n(3653),i=n(3359),o=n(2571),s=n(1698),l=n(5883);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=a,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=l,e.exports=c},8624:(e,t,n)=>{var r=n(7289).Symbol;e.exports=r},6759:(e,t,n)=>{var r=n(7289).Uint8Array;e.exports=r},3289:(e,t,n)=>{var r=n(781)(n(7289),"WeakMap");e.exports=r},4235:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n{var r=n(4499),a=n(2794),i=n(5585),o=n(667),s=n(674),l=n(3153),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&a(e),d=!n&&!u&&o(e),h=!n&&!u&&!d&&l(e),f=n||u||d||h,p=f?r(e.length,String):[],g=p.length;for(var m in e)!t&&!c.call(e,m)||f&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,g))||p.push(m);return p}},5434:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,a=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(6351),a=n(3666),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var o=e[t];i.call(e,t)&&a(o,n)&&(void 0!==n||t in e)||r(e,t,n)}},9194:(e,t,n)=>{var r=n(3666);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},3035:(e,t,n)=>{var r=n(7538),a=n(6385);e.exports=function(e,t){return e&&r(t,a(t),e)}},6045:(e,t,n)=>{var r=n(7538),a=n(7086);e.exports=function(e,t){return e&&r(t,a(t),e)}},6351:(e,t,n)=>{var r=n(1438);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},6476:(e,t,n)=>{var r=n(7016),a=n(4235),i=n(7347),o=n(3035),s=n(6045),l=n(8087),c=n(2594),u=n(2497),d=n(4742),h=n(7253),f=n(5508),p=n(8466),g=n(7633),m=n(7355),v=n(6484),y=n(5585),b=n(667),x=n(5874),w=n(1845),S=n(1859),k=n(6385),_=n(7086),E="[object Arguments]",C="[object Function]",j="[object Object]",N={};N[E]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object DataView]"]=N["[object Boolean]"]=N["[object Date]"]=N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Map]"]=N["[object Number]"]=N[j]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object Symbol]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Error]"]=N[C]=N["[object WeakMap]"]=!1,e.exports=function e(t,n,P,O,T,L){var A,R=1&n,M=2&n,F=4&n;if(P&&(A=T?P(t,O,T,L):P(t)),void 0!==A)return A;if(!w(t))return t;var I=y(t);if(I){if(A=g(t),!R)return c(t,A)}else{var D=p(t),z=D==C||"[object GeneratorFunction]"==D;if(b(t))return l(t,R);if(D==j||D==E||z&&!T){if(A=M||z?{}:v(t),!R)return M?d(t,s(A,t)):u(t,o(A,t))}else{if(!N[D])return T?t:{};A=m(t,D,R)}}L||(L=new r);var B=L.get(t);if(B)return B;L.set(t,A),S(t)?t.forEach((function(r){A.add(e(r,n,P,r,t,L))})):x(t)&&t.forEach((function(r,a){A.set(a,e(r,n,P,a,t,L))}));var U=I?void 0:(F?M?f:h:M?_:k)(t);return a(U||t,(function(r,a){U&&(r=t[a=r]),i(A,a,e(r,n,P,a,t,L))})),A}},8303:(e,t,n)=>{var r=n(1845),a=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(a)return a(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},2785:(e,t,n)=>{var r=n(5705),a=n(6428)(r);e.exports=a},5461:(e,t,n)=>{var r=n(2550)();e.exports=r},5705:(e,t,n)=>{var r=n(5461),a=n(6385);e.exports=function(e,t){return e&&r(e,t,a)}},207:(e,t,n)=>{var r=n(4534),a=n(925);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n{var r=n(5349),a=n(5585);e.exports=function(e,t,n){var i=t(e);return a(e)?i:r(i,n(e))}},8665:(e,t,n)=>{var r=n(8624),a=n(3596),i=n(8186),o=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":o&&o in Object(e)?a(e):i(e)}},1966:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},1276:(e,t,n)=>{var r=n(8665),a=n(9752);e.exports=function(e){return a(e)&&"[object Arguments]"==r(e)}},7081:(e,t,n)=>{var r=n(9110),a=n(9752);e.exports=function e(t,n,i,o,s){return t===n||(null==t||null==n||!a(t)&&!a(n)?t!==t&&n!==n:r(t,n,i,o,e,s))}},9110:(e,t,n)=>{var r=n(7016),a=n(4132),i=n(9820),o=n(6353),s=n(8466),l=n(5585),c=n(667),u=n(3153),d="[object Arguments]",h="[object Array]",f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,g,m,v){var y=l(e),b=l(t),x=y?h:s(e),w=b?h:s(t),S=(x=x==d?f:x)==f,k=(w=w==d?f:w)==f,_=x==w;if(_&&c(e)){if(!c(t))return!1;y=!0,S=!1}if(_&&!S)return v||(v=new r),y||u(e)?a(e,t,n,g,m,v):i(e,t,x,n,g,m,v);if(!(1&n)){var E=S&&p.call(e,"__wrapped__"),C=k&&p.call(t,"__wrapped__");if(E||C){var j=E?e.value():e,N=C?t.value():t;return v||(v=new r),m(j,N,n,g,v)}}return!!_&&(v||(v=new r),o(e,t,n,g,m,v))}},7094:(e,t,n)=>{var r=n(8466),a=n(9752);e.exports=function(e){return a(e)&&"[object Map]"==r(e)}},9280:(e,t,n)=>{var r=n(7016),a=n(7081);e.exports=function(e,t,n,i){var o=n.length,s=o,l=!i;if(null==e)return!s;for(e=Object(e);o--;){var c=n[o];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o{var r=n(375),a=n(5401),i=n(1845),o=n(2043),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||a(e))&&(r(e)?h:s).test(o(e))}},8711:(e,t,n)=>{var r=n(8466),a=n(9752);e.exports=function(e){return a(e)&&"[object Set]"==r(e)}},7499:(e,t,n)=>{var r=n(8665),a=n(4276),i=n(9752),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&a(e.length)&&!!o[r(e)]}},1186:(e,t,n)=>{var r=n(5662),a=n(8768),i=n(9908),o=n(5585),s=n(4445);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?o(e)?a(e[0],e[1]):r(e):s(e)}},3409:(e,t,n)=>{var r=n(6132),a=n(8723),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},9130:(e,t,n)=>{var r=n(1845),a=n(6132),i=n(3481),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=a(e),n=[];for(var s in e)("constructor"!=s||!t&&o.call(e,s))&&n.push(s);return n}},1839:(e,t,n)=>{var r=n(2785),a=n(2114);e.exports=function(e,t){var n=-1,i=a(e)?Array(e.length):[];return r(e,(function(e,r,a){i[++n]=t(e,r,a)})),i}},5662:(e,t,n)=>{var r=n(9280),a=n(5113),i=n(2093);e.exports=function(e){var t=a(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},8768:(e,t,n)=>{var r=n(7081),a=n(9706),i=n(9775),o=n(8939),s=n(9253),l=n(2093),c=n(925);e.exports=function(e,t){return o(e)&&s(t)?l(c(e),t):function(n){var o=a(n,e);return void 0===o&&o===t?i(n,e):r(t,o,3)}}},1125:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},171:(e,t,n)=>{var r=n(207);e.exports=function(e){return function(t){return r(t,e)}}},4499:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(8624),a=n(5434),i=n(5585),o=n(2060),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return a(t,e)+"";if(o(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}},6902:e=>{e.exports=function(e){return function(t){return e(t)}}},8905:e=>{e.exports=function(e,t){return e.has(t)}},7169:(e,t,n)=>{var r=n(9908);e.exports=function(e){return"function"==typeof e?e:r}},4534:(e,t,n)=>{var r=n(5585),a=n(8939),i=n(3002),o=n(1822);e.exports=function(e,t){return r(e)?e:a(e,t)?[e]:i(o(e))}},2604:(e,t,n)=>{var r=n(6759);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},8087:(e,t,n)=>{e=n.nmd(e);var r=n(7289),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},1893:(e,t,n)=>{var r=n(2604);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3360:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},7981:(e,t,n)=>{var r=n(8624),a=r?r.prototype:void 0,i=a?a.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},5888:(e,t,n)=>{var r=n(2604);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},2594:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(7347),a=n(6351);e.exports=function(e,t,n,i){var o=!n;n||(n={});for(var s=-1,l=t.length;++s{var r=n(7538),a=n(6504);e.exports=function(e,t){return r(e,a(e),t)}},4742:(e,t,n)=>{var r=n(7538),a=n(2757);e.exports=function(e,t){return r(e,a(e),t)}},7683:(e,t,n)=>{var r=n(7289)["__core-js_shared__"];e.exports=r},6428:(e,t,n)=>{var r=n(2114);e.exports=function(e,t){return function(n,a){if(null==n)return n;if(!r(n))return e(n,a);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o{e.exports=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++a];if(!1===n(i[l],l,i))break}return t}}},1438:(e,t,n)=>{var r=n(781),a=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=a},4132:(e,t,n)=>{var r=n(4526),a=n(9330),i=n(8905);e.exports=function(e,t,n,o,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),f=l.get(t);if(h&&f)return h==t&&f==e;var p=-1,g=!0,m=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++p{var r=n(8624),a=n(6759),i=n(3666),o=n(4132),s=n(258),l=n(3671),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new a(e),new a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var p=1&r;if(f||(f=l),e.size!=t.size&&!p)return!1;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=o(f(e),f(t),r,c,d,h);return h.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6353:(e,t,n)=>{var r=n(7253),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,o,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:a.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=l;++d{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},7253:(e,t,n)=>{var r=n(2606),a=n(6504),i=n(6385);e.exports=function(e){return r(e,i,a)}},5508:(e,t,n)=>{var r=n(2606),a=n(2757),i=n(7086);e.exports=function(e){return r(e,i,a)}},6911:(e,t,n)=>{var r=n(1591);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},5113:(e,t,n)=>{var r=n(9253),a=n(6385);e.exports=function(e){for(var t=a(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,r(o)]}return t}},781:(e,t,n)=>{var r=n(3186),a=n(760);e.exports=function(e,t){var n=a(e,t);return r(n)?n:void 0}},6116:(e,t,n)=>{var r=n(9698)(Object.getPrototypeOf,Object);e.exports=r},3596:(e,t,n)=>{var r=n(8624),a=Object.prototype,i=a.hasOwnProperty,o=a.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(l){}var a=o.call(e);return r&&(t?e[s]=n:delete e[s]),a}},6504:(e,t,n)=>{var r=n(4951),a=n(2554),i=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(e){return null==e?[]:(e=Object(e),r(o(e),(function(t){return i.call(e,t)})))}:a;e.exports=s},2757:(e,t,n)=>{var r=n(5349),a=n(6116),i=n(6504),o=n(2554),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=a(e);return t}:o;e.exports=s},8466:(e,t,n)=>{var r=n(1725),a=n(8579),i=n(9946),o=n(4199),s=n(3289),l=n(8665),c=n(2043),u="[object Map]",d="[object Promise]",h="[object Set]",f="[object WeakMap]",p="[object DataView]",g=c(r),m=c(a),v=c(i),y=c(o),b=c(s),x=l;(r&&x(new r(new ArrayBuffer(1)))!=p||a&&x(new a)!=u||i&&x(i.resolve())!=d||o&&x(new o)!=h||s&&x(new s)!=f)&&(x=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case g:return p;case m:return u;case v:return d;case y:return h;case b:return f}return t}),e.exports=x},760:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1898:(e,t,n)=>{var r=n(4534),a=n(2794),i=n(5585),o=n(674),s=n(4276),l=n(925);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c{var r=n(1353);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9843:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6266:(e,t,n)=>{var r=n(1353),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return a.call(t,e)?t[e]:void 0}},7364:(e,t,n)=>{var r=n(1353),a=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:a.call(t,e)}},4156:(e,t,n)=>{var r=n(1353);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},7633:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},7355:(e,t,n)=>{var r=n(2604),a=n(1893),i=n(3360),o=n(7981),s=n(5888);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return a(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return o(e)}}},6484:(e,t,n)=>{var r=n(8303),a=n(6116),i=n(6132);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(a(e))}},674:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(5585),a=n(2060),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(o.test(e)||!i.test(e)||null!=t&&e in Object(t))}},1591:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5401:(e,t,n)=>{var r=n(7683),a=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!a&&a in e}},6132:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},9253:(e,t,n)=>{var r=n(1845);e.exports=function(e){return e===e&&!r(e)}},329:e=>{e.exports=function(){this.__data__=[],this.size=0}},9666:(e,t,n)=>{var r=n(9194),a=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():a.call(t,n,1),--this.size,!0)}},2523:(e,t,n)=>{var r=n(9194);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},4397:(e,t,n)=>{var r=n(9194);e.exports=function(e){return r(this.__data__,e)>-1}},3316:(e,t,n)=>{var r=n(9194);e.exports=function(e,t){var n=this.__data__,a=r(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}},9e3:(e,t,n)=>{var r=n(9748),a=n(5745),i=n(8579);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||a),string:new r}}},7240:(e,t,n)=>{var r=n(6911);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},3414:(e,t,n)=>{var r=n(6911);e.exports=function(e){return r(this,e).get(e)}},7140:(e,t,n)=>{var r=n(6911);e.exports=function(e){return r(this,e).has(e)}},5429:(e,t,n)=>{var r=n(6911);e.exports=function(e,t){var n=r(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}},258:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},2093:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},3679:(e,t,n)=>{var r=n(2736);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},1353:(e,t,n)=>{var r=n(781)(Object,"create");e.exports=r},8723:(e,t,n)=>{var r=n(9698)(Object.keys,Object);e.exports=r},3481:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},7785:(e,t,n)=>{e=n.nmd(e);var r=n(2692),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(t){}}();e.exports=s},8186:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},9698:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},7289:(e,t,n)=>{var r=n(2692),a="object"==typeof self&&self&&self.Object===Object&&self,i=r||a||Function("return this")();e.exports=i},5845:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},5544:e=>{e.exports=function(e){return this.__data__.has(e)}},3671:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},3653:(e,t,n)=>{var r=n(5745);e.exports=function(){this.__data__=new r,this.size=0}},3359:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},2571:e=>{e.exports=function(e){return this.__data__.get(e)}},1698:e=>{e.exports=function(e){return this.__data__.has(e)}},5883:(e,t,n)=>{var r=n(5745),a=n(8579),i=n(3109);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!a||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(o)}return n.set(e,t),this.size=n.size,this}},3002:(e,t,n)=>{var r=n(3679),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,o=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(a,(function(e,n,r,a){t.push(r?a.replace(i,"$1"):n||e)})),t}));e.exports=o},925:(e,t,n)=>{var r=n(2060);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}},2043:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},8504:(e,t,n)=>{var r=n(6476);e.exports=function(e){return r(e,5)}},3666:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},7827:(e,t,n)=>{var r=n(5705),a=n(7169);e.exports=function(e,t){return e&&r(e,a(t))}},9706:(e,t,n)=>{var r=n(207);e.exports=function(e,t,n){var a=null==e?void 0:r(e,t);return void 0===a?n:a}},9775:(e,t,n)=>{var r=n(1966),a=n(1898);e.exports=function(e,t){return null!=e&&a(e,t,r)}},9908:e=>{e.exports=function(e){return e}},2794:(e,t,n)=>{var r=n(1276),a=n(9752),i=Object.prototype,o=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return a(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},5585:e=>{var t=Array.isArray;e.exports=t},2114:(e,t,n)=>{var r=n(375),a=n(4276);e.exports=function(e){return null!=e&&a(e.length)&&!r(e)}},667:(e,t,n)=>{e=n.nmd(e);var r=n(7289),a=n(5535),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||a;e.exports=l},375:(e,t,n)=>{var r=n(8665),a=n(1845);e.exports=function(e){if(!a(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},4276:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5874:(e,t,n)=>{var r=n(7094),a=n(6902),i=n(7785),o=i&&i.isMap,s=o?a(o):r;e.exports=s},1845:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},9752:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},634:(e,t,n)=>{var r=n(8665),a=n(6116),i=n(9752),o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=a(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},1859:(e,t,n)=>{var r=n(8711),a=n(6902),i=n(7785),o=i&&i.isSet,s=o?a(o):r;e.exports=s},5406:(e,t,n)=>{var r=n(8665),a=n(5585),i=n(9752);e.exports=function(e){return"string"==typeof e||!a(e)&&i(e)&&"[object String]"==r(e)}},2060:(e,t,n)=>{var r=n(8665),a=n(9752);e.exports=function(e){return"symbol"==typeof e||a(e)&&"[object Symbol]"==r(e)}},3153:(e,t,n)=>{var r=n(7499),a=n(6902),i=n(7785),o=i&&i.isTypedArray,s=o?a(o):r;e.exports=s},6385:(e,t,n)=>{var r=n(3200),a=n(3409),i=n(2114);e.exports=function(e){return i(e)?r(e):a(e)}},7086:(e,t,n)=>{var r=n(3200),a=n(9130),i=n(2114);e.exports=function(e){return i(e)?r(e,!0):a(e)}},3428:(e,t,n)=>{var r=n(5434),a=n(1186),i=n(1839),o=n(5585);e.exports=function(e,t){return(o(e)?r:i)(e,a(t,3))}},2736:(e,t,n)=>{var r=n(3109);function a(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(a.Cache||r),n}a.Cache=r,e.exports=a},4445:(e,t,n)=>{var r=n(1125),a=n(171),i=n(8939),o=n(925);e.exports=function(e){return i(e)?r(o(e)):a(e)}},2554:e=>{e.exports=function(){return[]}},5535:e=>{e.exports=function(){return!1}},1822:(e,t,n)=>{var r=n(1612);e.exports=function(e){return null==e?"":r(e)}},1729:(e,t,n)=>{"use strict";var r=n(9165);function a(){}function i(){}i.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,i,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:a};return n.PropTypes=n,n}},5192:(e,t,n)=>{e.exports=n(1729)()},9165:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},534:(e,t,n)=>{"use strict";var r=n(7313),a=n(2224);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n